/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public override void Validate() { base.Validate(); if (Sku != null) { Sku.Validate(); } if (Identity != null) { Identity.Validate(); } if (CustomDomain != null) { CustomDomain.Validate(); } if (SasPolicy != null) { SasPolicy.Validate(); } if (KeyPolicy != null) { KeyPolicy.Validate(); } if (Encryption != null) { Encryption.Validate(); } if (AzureFilesIdentityBasedAuthentication != null) { AzureFilesIdentityBasedAuthentication.Validate(); } if (NetworkRuleSet != null) { NetworkRuleSet.Validate(); } if (PrivateEndpointConnections != null) { foreach (var element in PrivateEndpointConnections) { if (element != null) { element.Validate(); } } } if (BlobRestoreStatus != null) { BlobRestoreStatus.Validate(); } if (ImmutableStorageWithVersioning != null) { ImmutableStorageWithVersioning.Validate(); } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Sku == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Sku"); } if (Kind == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); } if (Location == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Location"); } if (Sku != null) { Sku.Validate(); } if (Identity != null) { Identity.Validate(); } if (SasPolicy != null) { SasPolicy.Validate(); } if (KeyPolicy != null) { KeyPolicy.Validate(); } if (CustomDomain != null) { CustomDomain.Validate(); } if (Encryption != null) { Encryption.Validate(); } if (NetworkRuleSet != null) { NetworkRuleSet.Validate(); } if (AzureFilesIdentityBasedAuthentication != null) { AzureFilesIdentityBasedAuthentication.Validate(); } if (ImmutableStorageWithVersioning != null) { ImmutableStorageWithVersioning.Validate(); } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Sku != null) { Sku.Validate(); } if (Identity != null) { Identity.Validate(); } if (CustomDomain != null) { CustomDomain.Validate(); } if (Encryption != null) { Encryption.Validate(); } if (SasPolicy != null) { SasPolicy.Validate(); } if (KeyPolicy != null) { KeyPolicy.Validate(); } if (AzureFilesIdentityBasedAuthentication != null) { AzureFilesIdentityBasedAuthentication.Validate(); } if (NetworkRuleSet != null) { NetworkRuleSet.Validate(); } if (ImmutableStorageWithVersioning != null) { ImmutableStorageWithVersioning.Validate(); } }
/// <summary> /// Initializes a new instance of the BlobContainer class. /// </summary> /// <param name="id">Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}</param> /// <param name="name">The name of the resource</param> /// <param name="type">The type of the resource. E.g. /// "Microsoft.Compute/virtualMachines" or /// "Microsoft.Storage/storageAccounts"</param> /// <param name="etag">Resource Etag.</param> /// <param name="version">The version of the deleted blob /// container.</param> /// <param name="deleted">Indicates whether the blob container was /// deleted.</param> /// <param name="deletedTime">Blob container deletion time.</param> /// <param name="remainingRetentionDays">Remaining retention days for /// soft deleted blob container.</param> /// <param name="defaultEncryptionScope">Default the container to use /// specified encryption scope for all writes.</param> /// <param name="denyEncryptionScopeOverride">Block override of /// encryption scope from the container default.</param> /// <param name="publicAccess">Specifies whether data in the container /// may be accessed publicly and the level of access. Possible values /// include: 'Container', 'Blob', 'None'</param> /// <param name="lastModifiedTime">Returns the date and time the /// container was last modified.</param> /// <param name="leaseStatus">The lease status of the container. /// Possible values include: 'Locked', 'Unlocked'</param> /// <param name="leaseState">Lease state of the container. Possible /// values include: 'Available', 'Leased', 'Expired', 'Breaking', /// 'Broken'</param> /// <param name="leaseDuration">Specifies whether the lease on a /// container is of infinite or fixed duration, only when the container /// is leased. Possible values include: 'Infinite', 'Fixed'</param> /// <param name="metadata">A name-value pair to associate with the /// container as metadata.</param> /// <param name="immutabilityPolicy">The ImmutabilityPolicy property of /// the container.</param> /// <param name="legalHold">The LegalHold property of the /// container.</param> /// <param name="hasLegalHold">The hasLegalHold public property is set /// to true by SRP if there are at least one existing tag. The /// hasLegalHold public property is set to false by SRP if all existing /// legal hold tags are cleared out. There can be a maximum of 1000 /// blob containers with hasLegalHold=true for a given account.</param> /// <param name="hasImmutabilityPolicy">The hasImmutabilityPolicy /// public property is set to true by SRP if ImmutabilityPolicy has /// been created for this container. The hasImmutabilityPolicy public /// property is set to false by SRP if ImmutabilityPolicy has not been /// created for this container.</param> /// <param name="immutableStorageWithVersioning">The object level /// immutability property of the container. The property is immutable /// and can only be set to true at the container creation time. /// Existing containers must undergo a migration process.</param> public BlobContainer(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), string version = default(string), bool?deleted = default(bool?), System.DateTime?deletedTime = default(System.DateTime?), int?remainingRetentionDays = default(int?), string defaultEncryptionScope = default(string), bool?denyEncryptionScopeOverride = default(bool?), PublicAccess?publicAccess = default(PublicAccess?), System.DateTime?lastModifiedTime = default(System.DateTime?), string leaseStatus = default(string), string leaseState = default(string), string leaseDuration = default(string), IDictionary <string, string> metadata = default(IDictionary <string, string>), ImmutabilityPolicyProperties immutabilityPolicy = default(ImmutabilityPolicyProperties), LegalHoldProperties legalHold = default(LegalHoldProperties), bool?hasLegalHold = default(bool?), bool?hasImmutabilityPolicy = default(bool?), ImmutableStorageWithVersioning immutableStorageWithVersioning = default(ImmutableStorageWithVersioning)) : base(id, name, type, etag) { Version = version; Deleted = deleted; DeletedTime = deletedTime; RemainingRetentionDays = remainingRetentionDays; DefaultEncryptionScope = defaultEncryptionScope; DenyEncryptionScopeOverride = denyEncryptionScopeOverride; PublicAccess = publicAccess; LastModifiedTime = lastModifiedTime; LeaseStatus = leaseStatus; LeaseState = leaseState; LeaseDuration = leaseDuration; Metadata = metadata; ImmutabilityPolicy = immutabilityPolicy; LegalHold = legalHold; HasLegalHold = hasLegalHold; HasImmutabilityPolicy = hasImmutabilityPolicy; ImmutableStorageWithVersioning = immutableStorageWithVersioning; CustomInit(); }