Пример #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 (SshConfiguration == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SshConfiguration");
     }
     if (DataDisks == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DataDisks");
     }
     if (SshConfiguration != null)
     {
         SshConfiguration.Validate();
     }
     if (DataDisks != null)
     {
         DataDisks.Validate();
     }
     if (Subnet != null)
     {
         Subnet.Validate();
     }
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the FileServerCreateParameters class.
 /// </summary>
 /// <param name="vmSize">VM size.</param>
 /// <param name="sshConfiguration">SSH configuration.</param>
 /// <param name="dataDisks">Data disks.</param>
 /// <param name="subnet">Subnet identifier.</param>
 public FileServerCreateParameters(string vmSize, SshConfiguration sshConfiguration, DataDisks dataDisks, ResourceId subnet = default(ResourceId))
 {
     VmSize           = vmSize;
     SshConfiguration = sshConfiguration;
     DataDisks        = dataDisks;
     Subnet           = subnet;
     CustomInit();
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the FileServer 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="sshConfiguration">SSH configuration.</param>
 /// <param name="dataDisks">Data disks configuration.</param>
 /// <param name="subnet">Subnet.</param>
 /// <param name="mountSettings">Mount settings.</param>
 /// <param name="provisioningStateTransitionTime">Provisioning State
 /// Transition time.</param>
 /// <param name="creationTime">Creation time.</param>
 /// <param name="provisioningState">Provisioning state.</param>
 public FileServer(string id = default(string), string name = default(string), string type = default(string), string vmSize = default(string), SshConfiguration sshConfiguration = default(SshConfiguration), DataDisks dataDisks = default(DataDisks), ResourceId subnet = default(ResourceId), MountSettings mountSettings = default(MountSettings), System.DateTime?provisioningStateTransitionTime = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), string provisioningState = default(string))
     : base(id, name, type)
 {
     VmSize           = vmSize;
     SshConfiguration = sshConfiguration;
     DataDisks        = dataDisks;
     Subnet           = subnet;
     MountSettings    = mountSettings;
     ProvisioningStateTransitionTime = provisioningStateTransitionTime;
     CreationTime      = creationTime;
     ProvisioningState = provisioningState;
     CustomInit();
 }
Пример #4
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (SshConfiguration != null)
     {
         SshConfiguration.Validate();
     }
     if (DataDisks != null)
     {
         DataDisks.Validate();
     }
     if (Subnet != null)
     {
         Subnet.Validate();
     }
 }