/// <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. Ex-
 /// Microsoft.Compute/virtualMachines or
 /// Microsoft.Storage/storageAccounts.</param>
 /// <param name="etag">Resource Etag.</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>
 public BlobContainer(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), 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?))
     : base(id, name, type, etag)
 {
     PublicAccess          = publicAccess;
     LastModifiedTime      = lastModifiedTime;
     LeaseStatus           = leaseStatus;
     LeaseState            = leaseState;
     LeaseDuration         = leaseDuration;
     Metadata              = metadata;
     ImmutabilityPolicy    = immutabilityPolicy;
     LegalHold             = legalHold;
     HasLegalHold          = hasLegalHold;
     HasImmutabilityPolicy = hasImmutabilityPolicy;
     CustomInit();
 }
Exemplo n.º 2
0
        public PSImmutabilityPolicyProperties(StorageModels.ImmutabilityPolicyProperties policy)
        {
            this.ImmutabilityPeriodSinceCreationInDays = policy.ImmutabilityPeriodSinceCreationInDays;
            this.State = policy.State;
            this.Etag  = policy.Etag;

            List <PSUpdateHistoryProperty> updateHistoryList = new List <PSUpdateHistoryProperty>();

            if (policy.UpdateHistory != null && policy.UpdateHistory.Count != 0)
            {
                foreach (UpdateHistoryProperty updateHistoryItem in policy.UpdateHistory)
                {
                    updateHistoryList.Add(new PSUpdateHistoryProperty(updateHistoryItem));
                }
            }
            this.UpdateHistory = updateHistoryList.ToArray();
        }
 /// <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>
 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?))
     : 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;
     CustomInit();
 }