/// <summary>
 /// Initializes a new instance of the <see cref="FarmSessionSettings" /> class.
 /// </summary>
 /// <param name="disconnectedSessionTimeoutMinutes">Disconnected sessions timeout (in minutes).Will be set when disconnected_session_timeout_policy is set to AFTER..</param>
 /// <param name="disconnectedSessionTimeoutPolicy">Log-off policy after disconnected session. Default value is NEVER. * IMMEDIATELY: Immmediately Logoff after user disconnect. * AFTER: Logoff after the specified number of minutes after user disconnect. * NEVER: Do not logoff after user disconnect. (required).</param>
 /// <param name="emptySessionTimeoutMinutes">Application empty session timeout in minutes. An empty session that has no remote-ablewindow is disconnected after the timeout. Default value is 1.Will be set when the empty_session_timeout_policy set to AFTER..</param>
 /// <param name="emptySessionTimeoutPolicy">Application empty session timeout policy. Default value is AFTER. * IMMEDIATE: Empty session will be disconnected immediately. * NEVER: Empty session will never disconnected. * AFTER: Empty session will be disconnected after specified number of minutes. (required).</param>
 /// <param name="logoffAfterTimeout">After timeout, empty application sessions are logged off when set to true. Otherwise sessions are disconnected.Default value is false. (required).</param>
 /// <param name="preLaunchSessionTimeoutMinutes">Application pre-launch session timeout in minutes. A pre-launch session is disconnected after the timeout.Will be set only when pre_launch_timeout_policy is set to AFTER..</param>
 /// <param name="preLaunchSessionTimeoutPolicy">Pre-launch session timeout policy for the application sessions on this Farm. * AFTER: Pre-launched session is disconnected after specified number of minutes. * NEVER: Pre-launched session is never disconnected..</param>
 public FarmSessionSettings(int?disconnectedSessionTimeoutMinutes = default(int?), DisconnectedSessionTimeoutPolicyEnum disconnectedSessionTimeoutPolicy = default(DisconnectedSessionTimeoutPolicyEnum), int?emptySessionTimeoutMinutes = default(int?), EmptySessionTimeoutPolicyEnum emptySessionTimeoutPolicy = default(EmptySessionTimeoutPolicyEnum), bool?logoffAfterTimeout = default(bool?), int?preLaunchSessionTimeoutMinutes = default(int?), PreLaunchSessionTimeoutPolicyEnum?preLaunchSessionTimeoutPolicy = default(PreLaunchSessionTimeoutPolicyEnum?))
 {
     // to ensure "disconnectedSessionTimeoutPolicy" is required (not null)
     if (disconnectedSessionTimeoutPolicy == null)
     {
         throw new InvalidDataException("disconnectedSessionTimeoutPolicy is a required property for FarmSessionSettings and cannot be null");
     }
     else
     {
         this.DisconnectedSessionTimeoutPolicy = disconnectedSessionTimeoutPolicy;
     }
     // to ensure "emptySessionTimeoutPolicy" is required (not null)
     if (emptySessionTimeoutPolicy == null)
     {
         throw new InvalidDataException("emptySessionTimeoutPolicy is a required property for FarmSessionSettings and cannot be null");
     }
     else
     {
         this.EmptySessionTimeoutPolicy = emptySessionTimeoutPolicy;
     }
     // to ensure "logoffAfterTimeout" is required (not null)
     if (logoffAfterTimeout == null)
     {
         throw new InvalidDataException("logoffAfterTimeout is a required property for FarmSessionSettings and cannot be null");
     }
     else
     {
         this.LogoffAfterTimeout = logoffAfterTimeout;
     }
     this.DisconnectedSessionTimeoutMinutes = disconnectedSessionTimeoutMinutes;
     this.EmptySessionTimeoutMinutes        = emptySessionTimeoutMinutes;
     this.PreLaunchSessionTimeoutMinutes    = preLaunchSessionTimeoutMinutes;
     this.PreLaunchSessionTimeoutPolicy     = preLaunchSessionTimeoutPolicy;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DesktopPoolSessionSettingsV2" /> class.
 /// </summary>
 /// <param name="allowMultipleSessionsPerUser">Indicates whether multiple sessions are allowed per user in case of Floating User Assignment. Default value is false. (required).</param>
 /// <param name="allowUsersToResetMachines">Indicates whether the user can be allowed to reset or restart their machines. Default value is false. (required).</param>
 /// <param name="deleteOrRefreshMachineAfterLogoff">Whether machines are to be deleted or refreshed after logoff in case of Floating User Assignment.This is applicable for automated desktops with virtual machines names based onpattern naming. This is not applicable for desktops that are using specified naming since dynamic creation and deletion of VMs is not supported.For Instant clone desktops this setting can only be set to DELETE. Default value is NEVER. * NEVER: Never delete or refresh the machine in the desktop pool. * DELETE: Delete the machine after user logoff. * REFRESH: Refresh the machine after user logoff. (required).</param>
 /// <param name="disconnectedSessionTimeoutMinutes">Disconnected sessions timeout (in minutes). Will be set when disconnected_session_timeout_policy is set to AFTER..</param>
 /// <param name="disconnectedSessionTimeoutPolicy">Log-off policy after disconnected session. Default value is NEVER. * IMMEDIATELY: Immmediately Logoff after user disconnect. * AFTER: Logoff after the specified number of minutes after user disconnect. * NEVER: Do not logoff after user disconnect. (required).</param>
 /// <param name="emptySessionTimeoutMinutes">Application empty session timeout (in minutes). An empty session (that has no remote-ablewindow) is disconnected after the timeout. Default value is 1.Will be set when the empty_session_timeout_policy set to AFTER..</param>
 /// <param name="emptySessionTimeoutPolicy">Application empty session timeout policy. Default value is AFTER. * IMMEDIATE: Empty session will be disconnected immediately. * NEVER: Empty session will never disconnected. * AFTER: Empty session will be disconnected after specified number of minutes. (required).</param>
 /// <param name="logoffAfterTimeout">Indicates whether the empty application sessions are logged off (true) or disconnected (false) after timeout.Default value is false. (required).</param>
 /// <param name="powerPolicy">Power policy for the machines in the desktop pool after logoff. This setting is only relevant for managed machines.Default value is TAKE_NO_POWER_ACTION.For Instant clone desktops this setting can only be set to ALWAYS_POWERED_ON. * TAKE_NO_POWER_ACTION: No action will be taken when user logs off. * ALWAYS_POWERED_ON: Ensure machines in the Desktop pool are always powered on.The connection server will monitor and power on machines as necessary. * SUSPEND: Suspend when a user logs off or when desktop pool is no longer keeping a machine as a spare.This does not affect spare and newly provisioned machines. * POWER_OFF: Power off when a user logs off or when desktop pool is no longer keeping a machine as a spare.This does not affect spare and newly provisioned machines. (required).</param>
 /// <param name="preLaunchSessionTimeoutMinutes">Application pre-launch session timeout (in minutes). A pre-launch session is disconnected after the timeout. Default value is 10.Will be required when the pre-launch session timeout policy is set to AFTER..</param>
 /// <param name="preLaunchSessionTimeoutPolicy">Application pre-launch session timeout policy. Default value is AFTER. * NEVER: Pre-launched session is never disconnected. * AFTER: Pre-launched session is disconnected after specified number of minutes..</param>
 /// <param name="refreshOsDiskAfterLogoff">Whether and when to refresh the OS disks for dedicated-assignment, linked-clone and instant-clone machines.Default value is NEVER. * NEVER: The OS disk is never refreshed. * ALWAYS: The OS disk is refreshed every time the user logs off. * EVERY: The OS disk is refreshed at regular intervals of a specified number of days. The number of days is counted from the last refresh, or from the initial provisioning if no refresh has occurred yet. For example, if the specified value is 3 days, and three days have passed since the last refresh, the machine is refreshed after the user logs off. * AT_SIZE: The OS disk is refreshed when its current size reaches a specified percentage of its maximum allowable size. The maximum size of a linked clone&#39;s OS disk is the size of the replica&#39;s OS disk. With this option, the size of the linked clone&#39;s OS disk in the datastore is compared to maximum allowable size. This disk-utilization percentage does not reflect disk usage that you might see inside the machine&#39;s guest operating system. (required).</param>
 /// <param name="refreshPeriodDaysForReplicaOsDisk">Regular interval at which to refresh the OS disk. Will be set when refresh_os_disk_after_logoff set to EVERY. (required).</param>
 /// <param name="refreshThresholdPercentageForReplicaOsDisk">With the &#39;AT_SIZE&#39; option for refreshOsDiskAfterLogoff, the size of the linked clone&#39;s OS diskin the datastore is compared to its maximum allowable size. This disk-utilization percentage does not reflect disk usage that you might see inside the machine&#39;s guest operating system.Will be set when refresh_os_disk_after_logoff set to AT_SIZE. (required).</param>
 public DesktopPoolSessionSettingsV2(bool?allowMultipleSessionsPerUser = default(bool?), bool?allowUsersToResetMachines = default(bool?), DeleteOrRefreshMachineAfterLogoffEnum deleteOrRefreshMachineAfterLogoff = default(DeleteOrRefreshMachineAfterLogoffEnum), int?disconnectedSessionTimeoutMinutes = default(int?), DisconnectedSessionTimeoutPolicyEnum disconnectedSessionTimeoutPolicy = default(DisconnectedSessionTimeoutPolicyEnum), int?emptySessionTimeoutMinutes = default(int?), EmptySessionTimeoutPolicyEnum emptySessionTimeoutPolicy = default(EmptySessionTimeoutPolicyEnum), bool?logoffAfterTimeout = default(bool?), PowerPolicyEnum powerPolicy = default(PowerPolicyEnum), int?preLaunchSessionTimeoutMinutes = default(int?), PreLaunchSessionTimeoutPolicyEnum?preLaunchSessionTimeoutPolicy = default(PreLaunchSessionTimeoutPolicyEnum?), RefreshOsDiskAfterLogoffEnum refreshOsDiskAfterLogoff = default(RefreshOsDiskAfterLogoffEnum), int?refreshPeriodDaysForReplicaOsDisk = default(int?), int?refreshThresholdPercentageForReplicaOsDisk = default(int?))
 {
     // to ensure "allowMultipleSessionsPerUser" is required (not null)
     if (allowMultipleSessionsPerUser == null)
     {
         throw new InvalidDataException("allowMultipleSessionsPerUser is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.AllowMultipleSessionsPerUser = allowMultipleSessionsPerUser;
     }
     // to ensure "allowUsersToResetMachines" is required (not null)
     if (allowUsersToResetMachines == null)
     {
         throw new InvalidDataException("allowUsersToResetMachines is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.AllowUsersToResetMachines = allowUsersToResetMachines;
     }
     // to ensure "deleteOrRefreshMachineAfterLogoff" is required (not null)
     if (deleteOrRefreshMachineAfterLogoff == null)
     {
         throw new InvalidDataException("deleteOrRefreshMachineAfterLogoff is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.DeleteOrRefreshMachineAfterLogoff = deleteOrRefreshMachineAfterLogoff;
     }
     // to ensure "disconnectedSessionTimeoutPolicy" is required (not null)
     if (disconnectedSessionTimeoutPolicy == null)
     {
         throw new InvalidDataException("disconnectedSessionTimeoutPolicy is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.DisconnectedSessionTimeoutPolicy = disconnectedSessionTimeoutPolicy;
     }
     // to ensure "emptySessionTimeoutPolicy" is required (not null)
     if (emptySessionTimeoutPolicy == null)
     {
         throw new InvalidDataException("emptySessionTimeoutPolicy is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.EmptySessionTimeoutPolicy = emptySessionTimeoutPolicy;
     }
     // to ensure "logoffAfterTimeout" is required (not null)
     if (logoffAfterTimeout == null)
     {
         throw new InvalidDataException("logoffAfterTimeout is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.LogoffAfterTimeout = logoffAfterTimeout;
     }
     // to ensure "powerPolicy" is required (not null)
     if (powerPolicy == null)
     {
         throw new InvalidDataException("powerPolicy is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.PowerPolicy = powerPolicy;
     }
     // to ensure "refreshOsDiskAfterLogoff" is required (not null)
     if (refreshOsDiskAfterLogoff == null)
     {
         throw new InvalidDataException("refreshOsDiskAfterLogoff is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.RefreshOsDiskAfterLogoff = refreshOsDiskAfterLogoff;
     }
     // to ensure "refreshPeriodDaysForReplicaOsDisk" is required (not null)
     if (refreshPeriodDaysForReplicaOsDisk == null)
     {
         throw new InvalidDataException("refreshPeriodDaysForReplicaOsDisk is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.RefreshPeriodDaysForReplicaOsDisk = refreshPeriodDaysForReplicaOsDisk;
     }
     // to ensure "refreshThresholdPercentageForReplicaOsDisk" is required (not null)
     if (refreshThresholdPercentageForReplicaOsDisk == null)
     {
         throw new InvalidDataException("refreshThresholdPercentageForReplicaOsDisk is a required property for DesktopPoolSessionSettingsV2 and cannot be null");
     }
     else
     {
         this.RefreshThresholdPercentageForReplicaOsDisk = refreshThresholdPercentageForReplicaOsDisk;
     }
     this.DisconnectedSessionTimeoutMinutes = disconnectedSessionTimeoutMinutes;
     this.EmptySessionTimeoutMinutes        = emptySessionTimeoutMinutes;
     this.PreLaunchSessionTimeoutMinutes    = preLaunchSessionTimeoutMinutes;
     this.PreLaunchSessionTimeoutPolicy     = preLaunchSessionTimeoutPolicy;
 }