/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (VmSize == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "VmSize");
     }
     if (UserAccountSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UserAccountSettings");
     }
     if (ScaleSettings != null)
     {
         ScaleSettings.Validate();
     }
     if (VirtualMachineConfiguration != null)
     {
         VirtualMachineConfiguration.Validate();
     }
     if (NodeSetup != null)
     {
         NodeSetup.Validate();
     }
     if (UserAccountSettings != null)
     {
         UserAccountSettings.Validate();
     }
     if (Subnet != null)
     {
         Subnet.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the ClusterCreateParameters class.
 /// </summary>
 /// <param name="vmSize">VM size.</param>
 /// <param name="userAccountSettings">User account settings.</param>
 /// <param name="vmPriority">VM priority.</param>
 /// <param name="scaleSettings">Scale settings.</param>
 /// <param name="virtualMachineConfiguration">VM configuration.</param>
 /// <param name="nodeSetup">Node setup.</param>
 /// <param name="subnet">Subnet.</param>
 public ClusterCreateParameters(string vmSize, UserAccountSettings userAccountSettings, VmPriority?vmPriority = default(VmPriority?), ScaleSettings scaleSettings = default(ScaleSettings), VirtualMachineConfiguration virtualMachineConfiguration = default(VirtualMachineConfiguration), NodeSetup nodeSetup = default(NodeSetup), ResourceId subnet = default(ResourceId))
 {
     VmSize        = vmSize;
     VmPriority    = vmPriority;
     ScaleSettings = scaleSettings;
     VirtualMachineConfiguration = virtualMachineConfiguration;
     NodeSetup           = nodeSetup;
     UserAccountSettings = userAccountSettings;
     Subnet = subnet;
     CustomInit();
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the Cluster class.
 /// </summary>
 /// <param name="id">The ID of the resource.</param>
 /// <param name="name">The name of the resource.</param>
 /// <param name="type">The type of the resource.</param>
 /// <param name="vmSize">VM size.</param>
 /// <param name="vmPriority">VM priority.</param>
 /// <param name="scaleSettings">Scale settings.</param>
 /// <param name="virtualMachineConfiguration">VM configuration.</param>
 /// <param name="nodeSetup">Node setup.</param>
 /// <param name="userAccountSettings">User account settings.</param>
 /// <param name="subnet">Subnet.</param>
 /// <param name="creationTime">Creation time.</param>
 /// <param name="provisioningState">Provisioning state.</param>
 /// <param name="provisioningStateTransitionTime">Provisioning State
 /// Transition time.</param>
 /// <param name="allocationState">Allocation state.</param>
 /// <param name="allocationStateTransitionTime">Allocation state
 /// transition time.</param>
 /// <param name="errors">Errors.</param>
 /// <param name="currentNodeCount">Current node count.</param>
 /// <param name="nodeStateCounts">Node state counts.</param>
 public Cluster(string id = default(string), string name = default(string), string type = default(string), string vmSize = default(string), VmPriority?vmPriority = default(VmPriority?), ScaleSettings scaleSettings = default(ScaleSettings), VirtualMachineConfiguration virtualMachineConfiguration = default(VirtualMachineConfiguration), NodeSetup nodeSetup = default(NodeSetup), UserAccountSettings userAccountSettings = default(UserAccountSettings), ResourceId subnet = default(ResourceId), System.DateTime?creationTime = default(System.DateTime?), string provisioningState = default(string), System.DateTime?provisioningStateTransitionTime = default(System.DateTime?), string allocationState = default(string), System.DateTime?allocationStateTransitionTime = default(System.DateTime?), IList <BatchAIError> errors = default(IList <BatchAIError>), int?currentNodeCount = default(int?), NodeStateCounts nodeStateCounts = default(NodeStateCounts))
     : base(id, name, type)
 {
     VmSize        = vmSize;
     VmPriority    = vmPriority;
     ScaleSettings = scaleSettings;
     VirtualMachineConfiguration = virtualMachineConfiguration;
     NodeSetup           = nodeSetup;
     UserAccountSettings = userAccountSettings;
     Subnet            = subnet;
     CreationTime      = creationTime;
     ProvisioningState = provisioningState;
     ProvisioningStateTransitionTime = provisioningStateTransitionTime;
     AllocationState = allocationState;
     AllocationStateTransitionTime = allocationStateTransitionTime;
     Errors           = errors;
     CurrentNodeCount = currentNodeCount;
     NodeStateCounts  = nodeStateCounts;
     CustomInit();
 }
Esempio n. 4
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ScaleSettings != null)
     {
         ScaleSettings.Validate();
     }
     if (VirtualMachineConfiguration != null)
     {
         VirtualMachineConfiguration.Validate();
     }
     if (NodeSetup != null)
     {
         NodeSetup.Validate();
     }
     if (UserAccountSettings != null)
     {
         UserAccountSettings.Validate();
     }
     if (Subnet != null)
     {
         Subnet.Validate();
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the SshConfiguration class.
 /// </summary>
 /// <param name="userAccountSettings">User account settings.</param>
 /// <param name="publicIPsToAllow">Allowed public IPs.</param>
 public SshConfiguration(UserAccountSettings userAccountSettings, IList <string> publicIPsToAllow = default(IList <string>))
 {
     PublicIPsToAllow    = publicIPsToAllow;
     UserAccountSettings = userAccountSettings;
     CustomInit();
 }