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

com.microsoft.azure.storage.LoggingProperties Maven / Gradle / Ivy

There is a newer version: 8.6.6
Show newest version
/**
 * 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;

import java.util.EnumSet;

/**
 * Represents the logging properties for the analytics service.
 */
public final class LoggingProperties {

    /**
     * The analytics version to use.
     */
    private String version = "1.0";

    /**
     * An EnumSet of LoggingOperations that represents which storage operations should be logged.
     */
    private EnumSet logOperationTypes = EnumSet.noneOf(LoggingOperations.class);

    /**
     * Represents the retention policy for the logging data.
     */
    private Integer retentionIntervalInDays;

    /**
     * Gets an EnumSet of {@link LoggingOperations} that represents which storage operations should be logged.
     * 
     * @return An EnumSet of {@link LoggingOperations}.
     */
    public EnumSet getLogOperationTypes() {
        return this.logOperationTypes;
    }

    /**
     * Gets the retention interval (in days).
     * 
     * @return An Integer which contains the retention interval.
     */
    public Integer getRetentionIntervalInDays() {
        return this.retentionIntervalInDays;
    }

    /**
     * Gets the analytics version.
     * 
     * @return A String which contains the version.
     */
    public String getVersion() {
        return this.version;
    }

    /**
     * Sets the {@link LoggingOperations} for which storage operations should be logged.
     * 
     * @param logOperationTypes
     *        An EnumSet of {@link LoggingOperations} to set.
     */
    public void setLogOperationTypes(final EnumSet logOperationTypes) {
        this.logOperationTypes = logOperationTypes;
    }

    /**
     * Sets the retention interval (in days).
     * 
     * @param retentionIntervalInDays
     *        An Integer which contains the retention interval to set.
     */
    public void setRetentionIntervalInDays(final Integer retentionIntervalInDays) {
        this.retentionIntervalInDays = retentionIntervalInDays;
    }

    /**
     * Sets the analytics version.
     * 
     * @param version
     *        A String which contains the version to set.
     */
    public void setVersion(final String version) {
        this.version = version;
    }
}