/* Options: Date: 2025-05-04 23:45:41 SwiftVersion: 6.0 Version: 8.71 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://team.evovoice.io //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: ImportSpreadsheet.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Bulk import customers/phone numbers/users with validation of everythin */ // @Route("/import/spreadsheet", "POST") // @Api(Description="Bulk import customers/phone numbers/users with validation of everythin") public class ImportSpreadsheet : IReturn, IPost, Codable { public typealias Return = ImportSpreadsheetResult /** * The account ID for this import */ // @ApiMember(Description="The account ID for this import") public var accountId:String? /** * Set to true to actually apply the changes. Otherwise just a preview is returned */ // @ApiMember(Description="Set to true to actually apply the changes. Otherwise just a preview is returned") public var applyChanges:Bool? required public init(){} } public class ImportSpreadsheetResult : Codable { public var updatedCustomers:[CustomerInfo]? public var newCustomers:[CustomerInfo]? public var updatedPhoneNumbers:[EndpointInfo]? public var newPhoneNumbers:[EndpointInfo]? public var updatedUsers:[EndpointInfo]? public var newUsers:[EndpointInfo]? public var errors:[String]? public var changesApplied:Bool? required public init(){} } public class CustomerInfo : EntityInfo { /** * The ID of the account associated with this customer */ // @ApiMember(Description="The ID of the account associated with this customer") public var accountId:String? /** * The parent customer ID for this customer */ // @ApiMember(Description="The parent customer ID for this customer") public var parentCustomerId:String? /** * The breadcrumb to this customer */ // @ApiMember(Description="The breadcrumb to this customer") public var breadcrumb:[CustomerBreadcrumb]? /** * The name of the account associated with this customer */ // @ApiMember(Description="The name of the account associated with this customer") public var accountName:String? /** * Is this customer staging or production? */ // @ApiMember(Description="Is this customer staging or production?") public var isStaging:Bool? /** * The name of the company */ // @ApiMember(Description="The name of the company") public var name:String? /** * The reference ID for this company */ // @ApiMember(Description="The reference ID for this company") public var referenceId:String? /** * This customer's data values */ // @ApiMember(Description="This customer's data values") public var data:Struct? /** * The list of tags for this customer */ // @ApiMember(Description="The list of tags for this customer") public var tags:[Tag]? /** * This customer's schedule */ // @ApiMember(Description="This customer's schedule") public var schedule:Schedule? /** * Integration data for this customer */ // @ApiMember(Description="Integration data for this customer") public var integrationData:EntityIntegrationData? /** * Override this customer's billing settings? Otherwise inherits from parent */ // @ApiMember(Description="Override this customer's billing settings? Otherwise inherits from parent") public var overrideBillingSettings:Bool? /** * Billing settings for this customer */ // @ApiMember(Description="Billing settings for this customer") public var billingSettings:BillingSettings? /** * Should this customer override the parent customer's app settings */ // @ApiMember(Description="Should this customer override the parent customer's app settings") public var overrideAppSettings:Bool? /** * App / Portal settings for this customer */ // @ApiMember(Description="App / Portal settings for this customer") public var appSettings:AppSettings? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountId case parentCustomerId case breadcrumb case accountName case isStaging case name case referenceId case data case tags case schedule case integrationData case overrideBillingSettings case billingSettings case overrideAppSettings case appSettings } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountId = try container.decodeIfPresent(String.self, forKey: .accountId) parentCustomerId = try container.decodeIfPresent(String.self, forKey: .parentCustomerId) breadcrumb = try container.decodeIfPresent([CustomerBreadcrumb].self, forKey: .breadcrumb) ?? [] accountName = try container.decodeIfPresent(String.self, forKey: .accountName) isStaging = try container.decodeIfPresent(Bool.self, forKey: .isStaging) name = try container.decodeIfPresent(String.self, forKey: .name) referenceId = try container.decodeIfPresent(String.self, forKey: .referenceId) data = try container.decodeIfPresent(Struct.self, forKey: .data) tags = try container.decodeIfPresent([Tag].self, forKey: .tags) ?? [] schedule = try container.decodeIfPresent(Schedule.self, forKey: .schedule) integrationData = try container.decodeIfPresent(EntityIntegrationData.self, forKey: .integrationData) overrideBillingSettings = try container.decodeIfPresent(Bool.self, forKey: .overrideBillingSettings) billingSettings = try container.decodeIfPresent(BillingSettings.self, forKey: .billingSettings) overrideAppSettings = try container.decodeIfPresent(Bool.self, forKey: .overrideAppSettings) appSettings = try container.decodeIfPresent(AppSettings.self, forKey: .appSettings) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountId != nil { try container.encode(accountId, forKey: .accountId) } if parentCustomerId != nil { try container.encode(parentCustomerId, forKey: .parentCustomerId) } if breadcrumb != nil { try container.encode(breadcrumb, forKey: .breadcrumb) } if accountName != nil { try container.encode(accountName, forKey: .accountName) } if isStaging != nil { try container.encode(isStaging, forKey: .isStaging) } if name != nil { try container.encode(name, forKey: .name) } if referenceId != nil { try container.encode(referenceId, forKey: .referenceId) } if data != nil { try container.encode(data, forKey: .data) } if tags != nil { try container.encode(tags, forKey: .tags) } if schedule != nil { try container.encode(schedule, forKey: .schedule) } if integrationData != nil { try container.encode(integrationData, forKey: .integrationData) } if overrideBillingSettings != nil { try container.encode(overrideBillingSettings, forKey: .overrideBillingSettings) } if billingSettings != nil { try container.encode(billingSettings, forKey: .billingSettings) } if overrideAppSettings != nil { try container.encode(overrideAppSettings, forKey: .overrideAppSettings) } if appSettings != nil { try container.encode(appSettings, forKey: .appSettings) } } } public class EndpointInfo : EntityInfo { /** * The account ID this endpoint is associated with */ // @ApiMember(Description="The account ID this endpoint is associated with") public var accountId:String? /** * The name of the account this endpoint is associated with */ // @ApiMember(Description="The name of the account this endpoint is associated with") public var accountName:String? /** * The ID of the customer this endpoint is associated with */ // @ApiMember(Description="The ID of the customer this endpoint is associated with") public var customerId:String? /** * The name of the customer this endpoint is associated with */ // @ApiMember(Description="The name of the customer this endpoint is associated with") public var customerName:String? /** * The third party reference ID for the endpoint */ // @ApiMember(Description="The third party reference ID for the endpoint") public var referenceId:String? /** * The breadcrumb to the customer for this endpoint */ // @ApiMember(Description="The breadcrumb to the customer for this endpoint") public var customerBreadcrumb:[CustomerBreadcrumb]? /** * The display name of the endpoint */ // @ApiMember(Description="The display name of the endpoint") public var displayName:String? /** * The type of endpoint */ // @ApiMember(Description="The type of endpoint") public var type:EndpointTypes? /** * Extra info for this endpoint (typically to show in grid) */ // @ApiMember(Description="Extra info for this endpoint (typically to show in grid)") public var extraInformation:String? /** * The ID of the flow to use for voice */ // @ApiMember(Description="The ID of the flow to use for voice") public var flowId:String? /** * The name of the flow to use for voice */ // @ApiMember(Description="The name of the flow to use for voice") public var flowName:String? /** * The params for the voice flow */ // @ApiMember(Description="The params for the voice flow") public var flowParams:Struct? /** * Whether to use a single flow always or use scheduled flow system */ // @ApiMember(Description="Whether to use a single flow always or use scheduled flow system") public var flowSchedule:EndpointFlowSchedules? /** * This endpoint's schedule */ // @ApiMember(Description="This endpoint's schedule") public var schedule:Schedule? /** * The list of scheduled flows when using scheduling */ // @ApiMember(Description="The list of scheduled flows when using scheduling") public var scheduledFlows:[ScheduledFlow]? /** * Disable SMS */ // @ApiMember(Description="Disable SMS") public var disableSms:Bool? /** * Set this to true to prevent Evo Voice from overriding the 10DLC / SMS settings for this number */ // @ApiMember(Description="Set this to true to prevent Evo Voice from overriding the 10DLC / SMS settings for this number") public var useExternal10DlcCampaign:Bool? /** * Is this a virtual phone number? */ // @ApiMember(Description="Is this a virtual phone number?") public var isVirtualPhoneNumber:Bool? /** * Is caller ID verified for this virtual number? */ // @ApiMember(Description="Is caller ID verified for this virtual number?") public var isCallerIdVerified:Bool? /** * The verification code for this number */ // @ApiMember(Description="The verification code for this number") public var callerIdVerificationCode:String? /** * The phone number */ // @ApiMember(Description="The phone number") public var phoneNumber:String? /** * The Sid of the phone number */ // @ApiMember(Description="The Sid of the phone number") public var phoneNumberSid:String? /** * The caller ID Name (CNAM) for the phone number */ // @ApiMember(Description="The caller ID Name (CNAM) for the phone number") public var callerIdName:String? /** * The address SID associated with the phone number */ // @ApiMember(Description="The address SID associated with the phone number") public var addressSid:String? /** * Do not touch this phone number - for BYOA accounts */ // @ApiMember(Description="Do not touch this phone number - for BYOA accounts") public var doNotTouchPhoneNumber:Bool? /** * Is this number enrolled in a 10DLC messaging service campaign */ // @ApiMember(Description="Is this number enrolled in a 10DLC messaging service campaign") public var isEnrolledIn10DlcService:Bool? /** * Whether we look up caller ID or not */ // @ApiMember(Description="Whether we look up caller ID or not") public var enableCallerIdLookup:Bool? /** * The email address of the user */ // @ApiMember(Description="The email address of the user") public var userEmailAddress:String? /** * The Twilio Region for the SIP endpoint */ // @ApiMember(Description="The Twilio Region for the SIP endpoint") public var sipRegion:TwilioSipRegions? /** * The Twilio Sid of the credentials for Sip */ // @ApiMember(Description="The Twilio Sid of the credentials for Sip") public var sipCredentialSid:String? /** * The Twilio SIP user name */ // @ApiMember(Description="The Twilio SIP user name") public var sipUserName:String? /** * The Twilio SIP password */ // @ApiMember(Description="The Twilio SIP password") public var sipPassword:String? /** * The SIP domain */ // @ApiMember(Description="The SIP domain") public var sipDomain:String? /** * Is emergency calling enabled on this number? */ // @ApiMember(Description="Is emergency calling enabled on this number?") public var enableEmergencyCalling:Bool? /** * The SID of the emergency address for this number */ // @ApiMember(Description="The SID of the emergency address for this number") public var emergencyAddressSid:String? /** * The ID of the phone number to use for emergency dialing */ // @ApiMember(Description="The ID of the phone number to use for emergency dialing") public var emergencyPhoneNumberId:String? /** * The current agent state of this user endpoint */ // @ApiMember(Description="The current agent state of this user endpoint") public var agentState:AgentStates? /** * The current agent state reason of this user endpoint */ // @ApiMember(Description="The current agent state reason of this user endpoint") public var agentStateReason:AgentStateReasons? /** * The mode for this user */ // @ApiMember(Description="The mode for this user") public var userMode:UserModes? /** * The ID of the file to use for voicemail greeting */ // @ApiMember(Description="The ID of the file to use for voicemail greeting") public var voicemailGreetingId:String? /** * The endpoint's data */ // @ApiMember(Description="The endpoint's data") public var data:Struct? /** * The email address for email endpoints */ // @ApiMember(Description="The email address for email endpoints") public var emailAddress:String? /** * The first name of the user (for user endpoints) */ // @ApiMember(Description="The first name of the user (for user endpoints)") public var userFirstName:String? /** * The last name of the user (for user endpoints) */ // @ApiMember(Description="The last name of the user (for user endpoints)") public var userLastName:String? /** * The URL of an image for this user's avatar */ // @ApiMember(Description="The URL of an image for this user's avatar") public var avatarUrl:String? /** * Does this user have manager role? */ // @ApiMember(Description="Does this user have manager role?") public var managerRole:UserManagerRoles? /** * The list of dashboard permissions for when the manager role is custom */ // @ApiMember(Description="The list of dashboard permissions for when the manager role is custom") public var dashboardPermissions:[DashboardPermissions]? /** * The type of visibility this user has to their own fields */ // @ApiMember(Description="The type of visibility this user has to their own fields") public var myFieldPermissions:UserDataFieldModes? /** * The type of visibility this user has to customer fields */ // @ApiMember(Description="The type of visibility this user has to customer fields") public var customerFieldPermissions:UserDataFieldModes? /** * The type of visibility this user has to other user fields */ // @ApiMember(Description="The type of visibility this user has to other user fields") public var otherUserFieldPermissions:UserDataFieldModes? /** * The type of visibility this user has to other endpoint fields */ // @ApiMember(Description="The type of visibility this user has to other endpoint fields") public var otherEndpointFieldPermissions:UserDataFieldModes? /** * The name of this endpoint (for bots etc.) */ // @ApiMember(Description="The name of this endpoint (for bots etc.)") public var name:String? /** * The list of tags for this endpoint */ // @ApiMember(Description="The list of tags for this endpoint") public var tags:[Tag]? /** * The list of action URLs */ // @ApiMember(Description="The list of action URLs") public var actionUrls:[EndpointActionUrl]? /** * The list of members in this team */ // @ApiMember(Description="The list of members in this team") public var teamMemberIds:[String]? /** * Visibility of this user/team in contact lists */ // @ApiMember(Description="Visibility of this user/team in contact lists") public var contactListVisibility:CustomerVisibility? /** * The list of contacts personal to this user */ // @ApiMember(Description="The list of contacts personal to this user") public var contacts:[EndpointContact]? /** * The documo ID for this number */ // @ApiMember(Description="The documo ID for this number") public var documoId:String? /** * Integration data for this endpoint */ // @ApiMember(Description="Integration data for this endpoint") public var integrationData:EntityIntegrationData? /** * Settings for third party phone system */ // @ApiMember(Description="Settings for third party phone system") public var thirdPartyPhoneSystemSettings:ThirdPartyPhoneSystemSettings? /** * Should this user override the parent customer's app settings */ // @ApiMember(Description="Should this user override the parent customer's app settings") public var overrideAppSettings:Bool? /** * App / Portal settings for this user */ // @ApiMember(Description="App / Portal settings for this user") public var appSettings:AppSettings? /** * Configuration for the AI assistant */ // @ApiMember(Description="Configuration for the AI assistant") public var assistantSettings:AssistantSettings? /** * Configuration for the embed */ // @ApiMember(Description="Configuration for the embed") public var embedSettings:EmbedSettings? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountId case accountName case customerId case customerName case referenceId case customerBreadcrumb case displayName case type case extraInformation case flowId case flowName case flowParams case flowSchedule case schedule case scheduledFlows case disableSms case useExternal10DlcCampaign case isVirtualPhoneNumber case isCallerIdVerified case callerIdVerificationCode case phoneNumber case phoneNumberSid case callerIdName case addressSid case doNotTouchPhoneNumber case isEnrolledIn10DlcService case enableCallerIdLookup case userEmailAddress case sipRegion case sipCredentialSid case sipUserName case sipPassword case sipDomain case enableEmergencyCalling case emergencyAddressSid case emergencyPhoneNumberId case agentState case agentStateReason case userMode case voicemailGreetingId case data case emailAddress case userFirstName case userLastName case avatarUrl case managerRole case dashboardPermissions case myFieldPermissions case customerFieldPermissions case otherUserFieldPermissions case otherEndpointFieldPermissions case name case tags case actionUrls case teamMemberIds case contactListVisibility case contacts case documoId case integrationData case thirdPartyPhoneSystemSettings case overrideAppSettings case appSettings case assistantSettings case embedSettings } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountId = try container.decodeIfPresent(String.self, forKey: .accountId) accountName = try container.decodeIfPresent(String.self, forKey: .accountName) customerId = try container.decodeIfPresent(String.self, forKey: .customerId) customerName = try container.decodeIfPresent(String.self, forKey: .customerName) referenceId = try container.decodeIfPresent(String.self, forKey: .referenceId) customerBreadcrumb = try container.decodeIfPresent([CustomerBreadcrumb].self, forKey: .customerBreadcrumb) ?? [] displayName = try container.decodeIfPresent(String.self, forKey: .displayName) type = try container.decodeIfPresent(EndpointTypes.self, forKey: .type) extraInformation = try container.decodeIfPresent(String.self, forKey: .extraInformation) flowId = try container.decodeIfPresent(String.self, forKey: .flowId) flowName = try container.decodeIfPresent(String.self, forKey: .flowName) flowParams = try container.decodeIfPresent(Struct.self, forKey: .flowParams) flowSchedule = try container.decodeIfPresent(EndpointFlowSchedules.self, forKey: .flowSchedule) schedule = try container.decodeIfPresent(Schedule.self, forKey: .schedule) scheduledFlows = try container.decodeIfPresent([ScheduledFlow].self, forKey: .scheduledFlows) ?? [] disableSms = try container.decodeIfPresent(Bool.self, forKey: .disableSms) useExternal10DlcCampaign = try container.decodeIfPresent(Bool.self, forKey: .useExternal10DlcCampaign) isVirtualPhoneNumber = try container.decodeIfPresent(Bool.self, forKey: .isVirtualPhoneNumber) isCallerIdVerified = try container.decodeIfPresent(Bool.self, forKey: .isCallerIdVerified) callerIdVerificationCode = try container.decodeIfPresent(String.self, forKey: .callerIdVerificationCode) phoneNumber = try container.decodeIfPresent(String.self, forKey: .phoneNumber) phoneNumberSid = try container.decodeIfPresent(String.self, forKey: .phoneNumberSid) callerIdName = try container.decodeIfPresent(String.self, forKey: .callerIdName) addressSid = try container.decodeIfPresent(String.self, forKey: .addressSid) doNotTouchPhoneNumber = try container.decodeIfPresent(Bool.self, forKey: .doNotTouchPhoneNumber) isEnrolledIn10DlcService = try container.decodeIfPresent(Bool.self, forKey: .isEnrolledIn10DlcService) enableCallerIdLookup = try container.decodeIfPresent(Bool.self, forKey: .enableCallerIdLookup) userEmailAddress = try container.decodeIfPresent(String.self, forKey: .userEmailAddress) sipRegion = try container.decodeIfPresent(TwilioSipRegions.self, forKey: .sipRegion) sipCredentialSid = try container.decodeIfPresent(String.self, forKey: .sipCredentialSid) sipUserName = try container.decodeIfPresent(String.self, forKey: .sipUserName) sipPassword = try container.decodeIfPresent(String.self, forKey: .sipPassword) sipDomain = try container.decodeIfPresent(String.self, forKey: .sipDomain) enableEmergencyCalling = try container.decodeIfPresent(Bool.self, forKey: .enableEmergencyCalling) emergencyAddressSid = try container.decodeIfPresent(String.self, forKey: .emergencyAddressSid) emergencyPhoneNumberId = try container.decodeIfPresent(String.self, forKey: .emergencyPhoneNumberId) agentState = try container.decodeIfPresent(AgentStates.self, forKey: .agentState) agentStateReason = try container.decodeIfPresent(AgentStateReasons.self, forKey: .agentStateReason) userMode = try container.decodeIfPresent(UserModes.self, forKey: .userMode) voicemailGreetingId = try container.decodeIfPresent(String.self, forKey: .voicemailGreetingId) data = try container.decodeIfPresent(Struct.self, forKey: .data) emailAddress = try container.decodeIfPresent(String.self, forKey: .emailAddress) userFirstName = try container.decodeIfPresent(String.self, forKey: .userFirstName) userLastName = try container.decodeIfPresent(String.self, forKey: .userLastName) avatarUrl = try container.decodeIfPresent(String.self, forKey: .avatarUrl) managerRole = try container.decodeIfPresent(UserManagerRoles.self, forKey: .managerRole) dashboardPermissions = try container.decodeIfPresent([DashboardPermissions].self, forKey: .dashboardPermissions) ?? [] myFieldPermissions = try container.decodeIfPresent(UserDataFieldModes.self, forKey: .myFieldPermissions) customerFieldPermissions = try container.decodeIfPresent(UserDataFieldModes.self, forKey: .customerFieldPermissions) otherUserFieldPermissions = try container.decodeIfPresent(UserDataFieldModes.self, forKey: .otherUserFieldPermissions) otherEndpointFieldPermissions = try container.decodeIfPresent(UserDataFieldModes.self, forKey: .otherEndpointFieldPermissions) name = try container.decodeIfPresent(String.self, forKey: .name) tags = try container.decodeIfPresent([Tag].self, forKey: .tags) ?? [] actionUrls = try container.decodeIfPresent([EndpointActionUrl].self, forKey: .actionUrls) ?? [] teamMemberIds = try container.decodeIfPresent([String].self, forKey: .teamMemberIds) ?? [] contactListVisibility = try container.decodeIfPresent(CustomerVisibility.self, forKey: .contactListVisibility) contacts = try container.decodeIfPresent([EndpointContact].self, forKey: .contacts) ?? [] documoId = try container.decodeIfPresent(String.self, forKey: .documoId) integrationData = try container.decodeIfPresent(EntityIntegrationData.self, forKey: .integrationData) thirdPartyPhoneSystemSettings = try container.decodeIfPresent(ThirdPartyPhoneSystemSettings.self, forKey: .thirdPartyPhoneSystemSettings) overrideAppSettings = try container.decodeIfPresent(Bool.self, forKey: .overrideAppSettings) appSettings = try container.decodeIfPresent(AppSettings.self, forKey: .appSettings) assistantSettings = try container.decodeIfPresent(AssistantSettings.self, forKey: .assistantSettings) embedSettings = try container.decodeIfPresent(EmbedSettings.self, forKey: .embedSettings) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountId != nil { try container.encode(accountId, forKey: .accountId) } if accountName != nil { try container.encode(accountName, forKey: .accountName) } if customerId != nil { try container.encode(customerId, forKey: .customerId) } if customerName != nil { try container.encode(customerName, forKey: .customerName) } if referenceId != nil { try container.encode(referenceId, forKey: .referenceId) } if customerBreadcrumb != nil { try container.encode(customerBreadcrumb, forKey: .customerBreadcrumb) } if displayName != nil { try container.encode(displayName, forKey: .displayName) } if type != nil { try container.encode(type, forKey: .type) } if extraInformation != nil { try container.encode(extraInformation, forKey: .extraInformation) } if flowId != nil { try container.encode(flowId, forKey: .flowId) } if flowName != nil { try container.encode(flowName, forKey: .flowName) } if flowParams != nil { try container.encode(flowParams, forKey: .flowParams) } if flowSchedule != nil { try container.encode(flowSchedule, forKey: .flowSchedule) } if schedule != nil { try container.encode(schedule, forKey: .schedule) } if scheduledFlows != nil { try container.encode(scheduledFlows, forKey: .scheduledFlows) } if disableSms != nil { try container.encode(disableSms, forKey: .disableSms) } if useExternal10DlcCampaign != nil { try container.encode(useExternal10DlcCampaign, forKey: .useExternal10DlcCampaign) } if isVirtualPhoneNumber != nil { try container.encode(isVirtualPhoneNumber, forKey: .isVirtualPhoneNumber) } if isCallerIdVerified != nil { try container.encode(isCallerIdVerified, forKey: .isCallerIdVerified) } if callerIdVerificationCode != nil { try container.encode(callerIdVerificationCode, forKey: .callerIdVerificationCode) } if phoneNumber != nil { try container.encode(phoneNumber, forKey: .phoneNumber) } if phoneNumberSid != nil { try container.encode(phoneNumberSid, forKey: .phoneNumberSid) } if callerIdName != nil { try container.encode(callerIdName, forKey: .callerIdName) } if addressSid != nil { try container.encode(addressSid, forKey: .addressSid) } if doNotTouchPhoneNumber != nil { try container.encode(doNotTouchPhoneNumber, forKey: .doNotTouchPhoneNumber) } if isEnrolledIn10DlcService != nil { try container.encode(isEnrolledIn10DlcService, forKey: .isEnrolledIn10DlcService) } if enableCallerIdLookup != nil { try container.encode(enableCallerIdLookup, forKey: .enableCallerIdLookup) } if userEmailAddress != nil { try container.encode(userEmailAddress, forKey: .userEmailAddress) } if sipRegion != nil { try container.encode(sipRegion, forKey: .sipRegion) } if sipCredentialSid != nil { try container.encode(sipCredentialSid, forKey: .sipCredentialSid) } if sipUserName != nil { try container.encode(sipUserName, forKey: .sipUserName) } if sipPassword != nil { try container.encode(sipPassword, forKey: .sipPassword) } if sipDomain != nil { try container.encode(sipDomain, forKey: .sipDomain) } if enableEmergencyCalling != nil { try container.encode(enableEmergencyCalling, forKey: .enableEmergencyCalling) } if emergencyAddressSid != nil { try container.encode(emergencyAddressSid, forKey: .emergencyAddressSid) } if emergencyPhoneNumberId != nil { try container.encode(emergencyPhoneNumberId, forKey: .emergencyPhoneNumberId) } if agentState != nil { try container.encode(agentState, forKey: .agentState) } if agentStateReason != nil { try container.encode(agentStateReason, forKey: .agentStateReason) } if userMode != nil { try container.encode(userMode, forKey: .userMode) } if voicemailGreetingId != nil { try container.encode(voicemailGreetingId, forKey: .voicemailGreetingId) } if data != nil { try container.encode(data, forKey: .data) } if emailAddress != nil { try container.encode(emailAddress, forKey: .emailAddress) } if userFirstName != nil { try container.encode(userFirstName, forKey: .userFirstName) } if userLastName != nil { try container.encode(userLastName, forKey: .userLastName) } if avatarUrl != nil { try container.encode(avatarUrl, forKey: .avatarUrl) } if managerRole != nil { try container.encode(managerRole, forKey: .managerRole) } if dashboardPermissions != nil { try container.encode(dashboardPermissions, forKey: .dashboardPermissions) } if myFieldPermissions != nil { try container.encode(myFieldPermissions, forKey: .myFieldPermissions) } if customerFieldPermissions != nil { try container.encode(customerFieldPermissions, forKey: .customerFieldPermissions) } if otherUserFieldPermissions != nil { try container.encode(otherUserFieldPermissions, forKey: .otherUserFieldPermissions) } if otherEndpointFieldPermissions != nil { try container.encode(otherEndpointFieldPermissions, forKey: .otherEndpointFieldPermissions) } if name != nil { try container.encode(name, forKey: .name) } if tags != nil { try container.encode(tags, forKey: .tags) } if actionUrls != nil { try container.encode(actionUrls, forKey: .actionUrls) } if teamMemberIds != nil { try container.encode(teamMemberIds, forKey: .teamMemberIds) } if contactListVisibility != nil { try container.encode(contactListVisibility, forKey: .contactListVisibility) } if contacts != nil { try container.encode(contacts, forKey: .contacts) } if documoId != nil { try container.encode(documoId, forKey: .documoId) } if integrationData != nil { try container.encode(integrationData, forKey: .integrationData) } if thirdPartyPhoneSystemSettings != nil { try container.encode(thirdPartyPhoneSystemSettings, forKey: .thirdPartyPhoneSystemSettings) } if overrideAppSettings != nil { try container.encode(overrideAppSettings, forKey: .overrideAppSettings) } if appSettings != nil { try container.encode(appSettings, forKey: .appSettings) } if assistantSettings != nil { try container.encode(assistantSettings, forKey: .assistantSettings) } if embedSettings != nil { try container.encode(embedSettings, forKey: .embedSettings) } } }