Esempio n. 1
0
 /// <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();
     }
 }
Esempio n. 2
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();
     }
     if (NodeStateCounts != null)
     {
         NodeStateCounts.Validate();
     }
 }
Esempio n. 3
0
 /// <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. 4
0
 /// <summary>
 /// Initializes a new instance of the ClusterInner class.
 /// </summary>
 /// <param name="vmSize">The size of the virtual machines in the
 /// cluster.</param>
 /// <param name="vmPriority">dedicated or lowpriority.</param>
 /// <param name="scaleSettings">Desired scale for the Cluster.</param>
 /// <param name="virtualMachineConfiguration">Settings for OS image and
 /// mounted data volumes.</param>
 /// <param name="nodeSetup">Setup to be done on all compute nodes in
 /// the Cluster.</param>
 /// <param name="userAccountSettings">Settings for user account of
 /// compute nodes.</param>
 /// <param name="subnet">Specifies the identifier of the
 /// subnet.</param>
 /// <param name="creationTime">The creation time of the
 /// cluster.</param>
 /// <param name="provisioningState">Specifies the provisioning state of
 /// the cluster.</param>
 /// <param name="provisioningStateTransitionTime">The provisioning
 /// state transition time of the cluster.</param>
 /// <param name="allocationState">Indicates whether the cluster is
 /// resizing.</param>
 /// <param name="allocationStateTransitionTime">The time at which the
 /// cluster entered its current allocation state.</param>
 /// <param name="errors">Contains details of various errors on the
 /// cluster including resize and node setup task</param>
 /// <param name="currentNodeCount">The number of compute nodes
 /// currently assigned to the cluster.</param>
 /// <param name="nodeStateCounts">Counts of various node states on the
 /// cluster.</param>
 public ClusterInner(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, 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?), ProvisioningState provisioningState = default(ProvisioningState), System.DateTime?provisioningStateTransitionTime = default(System.DateTime?), AllocationState?allocationState = default(AllocationState?), System.DateTime?allocationStateTransitionTime = default(System.DateTime?), IList <BatchAIError> errors = default(IList <BatchAIError>), int?currentNodeCount = default(int?), NodeStateCounts nodeStateCounts = default(NodeStateCounts))
     : base(location, id, name, type, tags)
 {
     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();
 }