All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.storage.file.FileShareProperties Maven / Gradle / Ivy

/**
 * Copyright Microsoft Corporation
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.microsoft.azure.storage.file;

import java.util.Date;

import com.microsoft.azure.storage.AccessCondition;

/**
 * Represents the system properties for a share.
 */
public final class FileShareProperties {

    /**
     * Represents the ETag value for the share.
     */
    private String etag;

    /**
     * Represents the share's last-modified time.
     */
    private Date lastModified;

    /**
     * Represents the limit on the size of files (in GB) stored on the share.
     */
    private Integer shareQuota;

    /**
     * Creates an instance of the FileShareProperties class.
     */
    public FileShareProperties() {
    }

    /**
     * Creates an instance of the FileShareProperties class by copying values from another
     * FileShareProperties instance.
     * 
     * @param other
     *            A {@link FileShareProperties} object which represents the file share properties to copy.
     */
    public FileShareProperties(final FileShareProperties other) {
        if (other != null) {
            this.setEtag(other.getEtag());
            this.setLastModified(other.getLastModified());
            this.setShareQuota(other.getShareQuota());
        }
    }

    /**
     * Gets the ETag value of the share.
     * 

* The ETag value is a unique identifier that is updated when a write operation is performed against the share. It * may be used to perform operations conditionally, providing concurrency control and improved efficiency. *

* The {@link AccessCondition#generateIfMatchCondition(String)} and * {@link AccessCondition#generateIfNoneMatchCondition(String)} methods take an ETag value and return an * {@link AccessCondition} object that may be specified on the request. * * @return A String which represents the ETag. */ public String getEtag() { return this.etag; } /** * Gets the last modified time on the share. * * @return A java.util.Date object which represents the last modified time. */ public Date getLastModified() { return this.lastModified; } /** * Gets the limit on the size of files (in GB) stored on the share. * * @return A java.lang.Integer object which represents the limit on * the size of files stored on the share. */ public Integer getShareQuota() { return shareQuota; } /** * Sets the ETag value on the share. * * @param etag * A String which represents the ETag to set. */ protected void setEtag(final String etag) { this.etag = etag; } /** * Sets the last modified time on the share. * * @param lastModified * A java.util.Date object which represents the last modified time to set. */ protected void setLastModified(final Date lastModified) { this.lastModified = lastModified; } /** * Sets the limit on the size of files (in GB) stored on the share. * * @param shareQuota * A java.lang.Integer object which represents the limit on * the size of files stored on the share. */ public void setShareQuota(Integer shareQuota) { this.shareQuota = shareQuota; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy