Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Accounts" /> class.
 /// </summary>
 /// <param name="callRecording">callRecording.</param>
 /// <param name="callRestriction">Account level call restrictions for each available number classification.</param>
 /// <param name="callWaiting">callWaiting.</param>
 /// <param name="callerId">The account default caller ID parameters.</param>
 /// <param name="callerIdOptions">callerIdOptions.</param>
 /// <param name="dialPlan">A list of default rules used to modify dialed numbers.</param>
 /// <param name="doNotDisturb">doNotDisturb.</param>
 /// <param name="enabled">Determines if the account is currently enabled (default to true).</param>
 /// <param name="flags">Flags set by external applications.</param>
 /// <param name="formatters">formatters.</param>
 /// <param name="language">The language for this account.</param>
 /// <param name="metaflows">metaflows.</param>
 /// <param name="musicOnHold">musicOnHold.</param>
 /// <param name="name">A friendly name for the account (required).</param>
 /// <param name="notifications">notifications.</param>
 /// <param name="org">Full legal name of the organization.</param>
 /// <param name="preflow">preflow.</param>
 /// <param name="realm">The realm of the account, ie: &#39;account1.2600hz.com&#39;.</param>
 /// <param name="ringtones">ringtones.</param>
 /// <param name="timezone">The default timezone.</param>
 /// <param name="topup">topup.</param>
 /// <param name="voicemail">voicemail.</param>
 /// <param name="zones">A priority ordered mapping of zones for the account.</param>
 public Accounts(AccountsCallRecording callRecording = default(AccountsCallRecording), Dictionary <string, AccountsCallRestriction> callRestriction = default(Dictionary <string, AccountsCallRestriction>), CallWaiting callWaiting = default(CallWaiting), CallerId callerId = default(CallerId), AccountsCallerIdOptions callerIdOptions = default(AccountsCallerIdOptions), Dialplans dialPlan = default(Dialplans), AccountsDoNotDisturb doNotDisturb = default(AccountsDoNotDisturb), bool?enabled = true, List <string> flags = default(List <string>), Formatters formatters = default(Formatters), string language = default(string), Metaflows metaflows = default(Metaflows), AccountsMusicOnHold musicOnHold = default(AccountsMusicOnHold), string name = default(string), AccountsNotifications notifications = default(AccountsNotifications), string org = default(string), AccountsPreflow preflow = default(AccountsPreflow), string realm = default(string), AccountsRingtones ringtones = default(AccountsRingtones), string timezone = default(string), AccountsTopup topup = default(AccountsTopup), AccountsVoicemail voicemail = default(AccountsVoicemail), Object zones = default(Object))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for Accounts and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     this.CallRecording   = callRecording;
     this.CallRestriction = callRestriction;
     this.CallWaiting     = callWaiting;
     this.CallerId        = callerId;
     this.CallerIdOptions = callerIdOptions;
     this.DialPlan        = dialPlan;
     this.DoNotDisturb    = doNotDisturb;
     // use default value if no "enabled" provided
     if (enabled == null)
     {
         this.Enabled = true;
     }
     else
     {
         this.Enabled = enabled;
     }
     this.Flags         = flags;
     this.Formatters    = formatters;
     this.Language      = language;
     this.Metaflows     = metaflows;
     this.MusicOnHold   = musicOnHold;
     this.Notifications = notifications;
     this.Org           = org;
     this.Preflow       = preflow;
     this.Realm         = realm;
     this.Ringtones     = ringtones;
     this.Timezone      = timezone;
     this.Topup         = topup;
     this.Voicemail     = voicemail;
     this.Zones         = zones;
 }