Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Devices" /> class.
 /// </summary>
 /// <param name="callForward">callForward.</param>
 /// <param name="callRecording">callRecording.</param>
 /// <param name="callRestriction">Device level call restrictions for each available number classification.</param>
 /// <param name="callWaiting">callWaiting.</param>
 /// <param name="callerId">The device caller ID parameters.</param>
 /// <param name="callerIdOptions">callerIdOptions.</param>
 /// <param name="contactList">contactList.</param>
 /// <param name="deviceType">Arbitrary device type used by the UI and billing system.</param>
 /// <param name="dialPlan">A list of rules used to modify dialed numbers.</param>
 /// <param name="doNotDisturb">doNotDisturb.</param>
 /// <param name="enabled">Determines if the device is currently enabled (default to true).</param>
 /// <param name="excludeFromQueues">Do not ring this device when calling user/agent in queue (default to false).</param>
 /// <param name="flags">Flags set by external applications.</param>
 /// <param name="formatters">formatters.</param>
 /// <param name="hotdesk">hotdesk.</param>
 /// <param name="language">The language for the device.</param>
 /// <param name="macAddress">The MAC Address of the device (if applicable).</param>
 /// <param name="media">Configure audio/video/etc media options for this device.</param>
 /// <param name="metaflows">The device metaflow parameters.</param>
 /// <param name="musicOnHold">musicOnHold.</param>
 /// <param name="mwiUnsolicitedUpdates">When true enables unsolicited mwi notifications (default to true).</param>
 /// <param name="name">A friendly name for the device (required).</param>
 /// <param name="outboundFlags">List of flags (features) this device requires when making outbound calls.</param>
 /// <param name="ownerId">The ID of the user object that &#39;owns&#39; the device.</param>
 /// <param name="presenceId">Static presence ID (used instead of SIP username).</param>
 /// <param name="provision">provision.</param>
 /// <param name="registerOverwriteNotify">When true enables overwrite notifications (default to false).</param>
 /// <param name="ringtones">ringtones.</param>
 /// <param name="sip">sip.</param>
 /// <param name="suppressUnregisterNotifications">When true disables deregister notifications (default to false).</param>
 /// <param name="timezone">Device&#39;s timezone.</param>
 public Devices(DevicesCallForward callForward = default(DevicesCallForward), CallRecording callRecording = default(CallRecording), Dictionary <string, AccountsCallRestriction> callRestriction = default(Dictionary <string, AccountsCallRestriction>), CallWaiting callWaiting = default(CallWaiting), CallerId callerId = default(CallerId), DevicesCallerIdOptions callerIdOptions = default(DevicesCallerIdOptions), DevicesContactList contactList = default(DevicesContactList), string deviceType = default(string), Dialplans dialPlan = default(Dialplans), DevicesDoNotDisturb doNotDisturb = default(DevicesDoNotDisturb), bool?enabled = true, bool?excludeFromQueues = false, List <string> flags = default(List <string>), Formatters formatters = default(Formatters), DevicesHotdesk hotdesk = default(DevicesHotdesk), string language = default(string), string macAddress = default(string), EndpointMedia media = default(EndpointMedia), Metaflows metaflows = default(Metaflows), ClicktocallMusicOnHold musicOnHold = default(ClicktocallMusicOnHold), bool?mwiUnsolicitedUpdates = true, string name = default(string), Object outboundFlags = default(Object), string ownerId = default(string), string presenceId = default(string), DevicesProvision provision = default(DevicesProvision), bool?registerOverwriteNotify = false, AccountsRingtones ringtones = default(AccountsRingtones), DevicesSip sip = default(DevicesSip), bool?suppressUnregisterNotifications = false, string timezone = default(string))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for Devices and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     this.CallForward     = callForward;
     this.CallRecording   = callRecording;
     this.CallRestriction = callRestriction;
     this.CallWaiting     = callWaiting;
     this.CallerId        = callerId;
     this.CallerIdOptions = callerIdOptions;
     this.ContactList     = contactList;
     this.DeviceType      = deviceType;
     this.DialPlan        = dialPlan;
     this.DoNotDisturb    = doNotDisturb;
     // use default value if no "enabled" provided
     if (enabled == null)
     {
         this.Enabled = true;
     }
     else
     {
         this.Enabled = enabled;
     }
     // use default value if no "excludeFromQueues" provided
     if (excludeFromQueues == null)
     {
         this.ExcludeFromQueues = false;
     }
     else
     {
         this.ExcludeFromQueues = excludeFromQueues;
     }
     this.Flags       = flags;
     this.Formatters  = formatters;
     this.Hotdesk     = hotdesk;
     this.Language    = language;
     this.MacAddress  = macAddress;
     this.Media       = media;
     this.Metaflows   = metaflows;
     this.MusicOnHold = musicOnHold;
     // use default value if no "mwiUnsolicitedUpdates" provided
     if (mwiUnsolicitedUpdates == null)
     {
         this.MwiUnsolicitedUpdates = true;
     }
     else
     {
         this.MwiUnsolicitedUpdates = mwiUnsolicitedUpdates;
     }
     this.OutboundFlags = outboundFlags;
     this.OwnerId       = ownerId;
     this.PresenceId    = presenceId;
     this.Provision     = provision;
     // use default value if no "registerOverwriteNotify" provided
     if (registerOverwriteNotify == null)
     {
         this.RegisterOverwriteNotify = false;
     }
     else
     {
         this.RegisterOverwriteNotify = registerOverwriteNotify;
     }
     this.Ringtones = ringtones;
     this.Sip       = sip;
     // use default value if no "suppressUnregisterNotifications" provided
     if (suppressUnregisterNotifications == null)
     {
         this.SuppressUnregisterNotifications = false;
     }
     else
     {
         this.SuppressUnregisterNotifications = suppressUnregisterNotifications;
     }
     this.Timezone = timezone;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Users" /> class.
 /// </summary>
 /// <param name="callForward">callForward.</param>
 /// <param name="callRecording">callRecording.</param>
 /// <param name="callRestriction">Device level call restrictions for each available number classification.</param>
 /// <param name="callWaiting">callWaiting.</param>
 /// <param name="callerId">The device caller ID parameters.</param>
 /// <param name="callerIdOptions">callerIdOptions.</param>
 /// <param name="contactList">contactList.</param>
 /// <param name="dialPlan">A list of rules used to modify dialed numbers.</param>
 /// <param name="directories">Provides the mappings for what directory the user is a part of (the key), and what callflow (the value) to invoke if the user is selected by the caller..</param>
 /// <param name="doNotDisturb">doNotDisturb.</param>
 /// <param name="email">The email of the user.</param>
 /// <param name="enabled">Determines if the user is currently enabled (default to true).</param>
 /// <param name="featureLevel">The user level for assigning feature sets.</param>
 /// <param name="firstName">The first name of the user (required).</param>
 /// <param name="flags">Flags set by external applications.</param>
 /// <param name="formatters">formatters.</param>
 /// <param name="hotdesk">hotdesk.</param>
 /// <param name="language">The language for this user.</param>
 /// <param name="lastName">The last name of the user (required).</param>
 /// <param name="media">Configure audio/video/etc media options for this user.</param>
 /// <param name="metaflows">The device metaflow parameters.</param>
 /// <param name="musicOnHold">musicOnHold.</param>
 /// <param name="password">The GUI login password.</param>
 /// <param name="presenceId">Static presence ID (used instead of SIP username).</param>
 /// <param name="privLevel">The privilege level of the user (default to PrivLevelEnum.User).</param>
 /// <param name="profile">User&#39;s profile data.</param>
 /// <param name="pronouncedName">pronouncedName.</param>
 /// <param name="requirePasswordUpdate">UI flag that the user should update their password. (default to false).</param>
 /// <param name="ringtones">ringtones.</param>
 /// <param name="timezone">User&#39;s timezone.</param>
 /// <param name="username">The GUI login username - alpha-numeric, dashes, at symbol, periods, plusses, and underscores allowed.</param>
 /// <param name="verified">Determines if the user has been verified (default to false).</param>
 /// <param name="vmToEmailEnabled">Determines if the user would like voicemails emailed to them (default to true).</param>
 /// <param name="voicemail">voicemail.</param>
 public Users(UsersCallForward callForward = default(UsersCallForward), CallRecording callRecording = default(CallRecording), Dictionary <string, AccountsCallRestriction> callRestriction = default(Dictionary <string, AccountsCallRestriction>), CallWaiting callWaiting = default(CallWaiting), CallerId callerId = default(CallerId), DevicesCallerIdOptions callerIdOptions = default(DevicesCallerIdOptions), DevicesContactList contactList = default(DevicesContactList), Dialplans dialPlan = default(Dialplans), Object directories = default(Object), UsersDoNotDisturb doNotDisturb = default(UsersDoNotDisturb), string email = default(string), bool?enabled = true, string featureLevel = default(string), string firstName = default(string), List <string> flags = default(List <string>), Formatters formatters = default(Formatters), UsersHotdesk hotdesk = default(UsersHotdesk), string language = default(string), string lastName = default(string), EndpointMedia media = default(EndpointMedia), Metaflows metaflows = default(Metaflows), UsersMusicOnHold musicOnHold = default(UsersMusicOnHold), string password = default(string), string presenceId = default(string), PrivLevelEnum?privLevel = PrivLevelEnum.User, Profile profile = default(Profile), UsersPronouncedName pronouncedName = default(UsersPronouncedName), bool?requirePasswordUpdate = false, AccountsRingtones ringtones = default(AccountsRingtones), string timezone = default(string), string username = default(string), bool?verified = false, bool?vmToEmailEnabled = true, AccountsVoicemail voicemail = default(AccountsVoicemail))
 {
     // to ensure "firstName" is required (not null)
     if (firstName == null)
     {
         throw new InvalidDataException("firstName is a required property for Users and cannot be null");
     }
     else
     {
         this.FirstName = firstName;
     }
     // to ensure "lastName" is required (not null)
     if (lastName == null)
     {
         throw new InvalidDataException("lastName is a required property for Users and cannot be null");
     }
     else
     {
         this.LastName = lastName;
     }
     this.CallForward     = callForward;
     this.CallRecording   = callRecording;
     this.CallRestriction = callRestriction;
     this.CallWaiting     = callWaiting;
     this.CallerId        = callerId;
     this.CallerIdOptions = callerIdOptions;
     this.ContactList     = contactList;
     this.DialPlan        = dialPlan;
     this.Directories     = directories;
     this.DoNotDisturb    = doNotDisturb;
     this.Email           = email;
     // use default value if no "enabled" provided
     if (enabled == null)
     {
         this.Enabled = true;
     }
     else
     {
         this.Enabled = enabled;
     }
     this.FeatureLevel = featureLevel;
     this.Flags        = flags;
     this.Formatters   = formatters;
     this.Hotdesk      = hotdesk;
     this.Language     = language;
     this.Media        = media;
     this.Metaflows    = metaflows;
     this.MusicOnHold  = musicOnHold;
     this.Password     = password;
     this.PresenceId   = presenceId;
     // use default value if no "privLevel" provided
     if (privLevel == null)
     {
         this.PrivLevel = PrivLevelEnum.User;
     }
     else
     {
         this.PrivLevel = privLevel;
     }
     this.Profile        = profile;
     this.PronouncedName = pronouncedName;
     // use default value if no "requirePasswordUpdate" provided
     if (requirePasswordUpdate == null)
     {
         this.RequirePasswordUpdate = false;
     }
     else
     {
         this.RequirePasswordUpdate = requirePasswordUpdate;
     }
     this.Ringtones = ringtones;
     this.Timezone  = timezone;
     this.Username  = username;
     // use default value if no "verified" provided
     if (verified == null)
     {
         this.Verified = false;
     }
     else
     {
         this.Verified = verified;
     }
     // use default value if no "vmToEmailEnabled" provided
     if (vmToEmailEnabled == null)
     {
         this.VmToEmailEnabled = true;
     }
     else
     {
         this.VmToEmailEnabled = vmToEmailEnabled;
     }
     this.Voicemail = voicemail;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountsCallRecording" /> class.
 /// </summary>
 /// <param name="account">account.</param>
 /// <param name="endpoint">endpoint.</param>
 public AccountsCallRecording(CallRecording account = default(CallRecording), CallRecording endpoint = default(CallRecording))
 {
     this.Account  = account;
     this.Endpoint = endpoint;
 }