Exemple #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (StorageId == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "StorageId");
     }
     if (CustomPersistentDiskProperties != null)
     {
         CustomPersistentDiskProperties.Validate();
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the CustomPersistentDiskResource
 /// class.
 /// </summary>
 /// <param name="storageId">The resource id of Azure Spring Apps
 /// Storage resource.</param>
 /// <param name="customPersistentDiskProperties">Properties of the
 /// custom persistent disk resource payload.</param>
 public CustomPersistentDiskResource(string storageId, CustomPersistentDiskProperties customPersistentDiskProperties = default(CustomPersistentDiskProperties))
 {
     CustomPersistentDiskProperties = customPersistentDiskProperties;
     StorageId = storageId;
     CustomInit();
 }