BlobServiceProperties.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.storage.blob.models;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import java.util.ArrayList;
import java.util.List;
/**
* Storage Service Properties.
*/
@JacksonXmlRootElement(localName = "StorageServiceProperties")
@Fluent
public final class BlobServiceProperties {
/*
* The logging property.
*/
@JsonProperty(value = "Logging")
private BlobAnalyticsLogging logging;
/*
* The hourMetrics property.
*/
@JsonProperty(value = "HourMetrics")
private BlobMetrics hourMetrics;
/*
* The minuteMetrics property.
*/
@JsonProperty(value = "MinuteMetrics")
private BlobMetrics minuteMetrics;
private static final class CorsWrapper {
@JacksonXmlProperty(localName = "CorsRule")
private final List<BlobCorsRule> items;
@JsonCreator
private CorsWrapper(@JacksonXmlProperty(localName = "CorsRule") List<BlobCorsRule> items) {
this.items = items;
}
}
/*
* The set of CORS rules.
*/
@JsonProperty(value = "Cors")
private CorsWrapper cors;
/*
* The default version to use for requests to the Blob service if an
* incoming request's version is not specified. Possible values include
* version 2008-10-27 and all more recent versions
*/
@JsonProperty(value = "DefaultServiceVersion")
private String defaultServiceVersion;
/*
* The deleteRetentionPolicy property.
*/
@JsonProperty(value = "DeleteRetentionPolicy")
private BlobRetentionPolicy deleteRetentionPolicy;
/*
* The staticWebsite property.
*/
@JsonProperty(value = "StaticWebsite")
private StaticWebsite staticWebsite;
/**
* Get the logging property: The logging property.
*
* @return the logging value.
*/
public BlobAnalyticsLogging getLogging() {
return this.logging;
}
/**
* Set the logging property: The logging property.
*
* @param logging the logging value to set.
* @return the BlobServiceProperties object itself.
*/
public BlobServiceProperties setLogging(BlobAnalyticsLogging logging) {
this.logging = logging;
return this;
}
/**
* Get the hourMetrics property: The hourMetrics property.
*
* @return the hourMetrics value.
*/
public BlobMetrics getHourMetrics() {
return this.hourMetrics;
}
/**
* Set the hourMetrics property: The hourMetrics property.
*
* @param hourMetrics the hourMetrics value to set.
* @return the BlobServiceProperties object itself.
*/
public BlobServiceProperties setHourMetrics(BlobMetrics hourMetrics) {
this.hourMetrics = hourMetrics;
return this;
}
/**
* Get the minuteMetrics property: The minuteMetrics property.
*
* @return the minuteMetrics value.
*/
public BlobMetrics getMinuteMetrics() {
return this.minuteMetrics;
}
/**
* Set the minuteMetrics property: The minuteMetrics property.
*
* @param minuteMetrics the minuteMetrics value to set.
* @return the BlobServiceProperties object itself.
*/
public BlobServiceProperties setMinuteMetrics(BlobMetrics minuteMetrics) {
this.minuteMetrics = minuteMetrics;
return this;
}
/**
* Get the cors property: The set of CORS rules.
*
* @return the cors value.
*/
public List<BlobCorsRule> getCors() {
if (this.cors == null) {
this.cors = new CorsWrapper(new ArrayList<BlobCorsRule>());
}
return this.cors.items;
}
/**
* Set the cors property: The set of CORS rules.
*
* @param cors the cors value to set.
* @return the BlobServiceProperties object itself.
*/
public BlobServiceProperties setCors(List<BlobCorsRule> cors) {
this.cors = new CorsWrapper(cors);
return this;
}
/**
* Get the defaultServiceVersion property: The default version to use for
* requests to the Blob service if an incoming request's version is not
* specified. Possible values include version 2008-10-27 and all more
* recent versions.
*
* @return the defaultServiceVersion value.
*/
public String getDefaultServiceVersion() {
return this.defaultServiceVersion;
}
/**
* Set the defaultServiceVersion property: The default version to use for
* requests to the Blob service if an incoming request's version is not
* specified. Possible values include version 2008-10-27 and all more
* recent versions.
*
* @param defaultServiceVersion the defaultServiceVersion value to set.
* @return the BlobServiceProperties object itself.
*/
public BlobServiceProperties setDefaultServiceVersion(String defaultServiceVersion) {
this.defaultServiceVersion = defaultServiceVersion;
return this;
}
/**
* Get the deleteRetentionPolicy property: The deleteRetentionPolicy
* property.
*
* @return the deleteRetentionPolicy value.
*/
public BlobRetentionPolicy getDeleteRetentionPolicy() {
return this.deleteRetentionPolicy;
}
/**
* Set the deleteRetentionPolicy property: The deleteRetentionPolicy
* property.
*
* @param deleteRetentionPolicy the deleteRetentionPolicy value to set.
* @return the BlobServiceProperties object itself.
*/
public BlobServiceProperties setDeleteRetentionPolicy(BlobRetentionPolicy deleteRetentionPolicy) {
this.deleteRetentionPolicy = deleteRetentionPolicy;
return this;
}
/**
* Get the staticWebsite property: The staticWebsite property.
*
* @return the staticWebsite value.
*/
public StaticWebsite getStaticWebsite() {
return this.staticWebsite;
}
/**
* Set the staticWebsite property: The staticWebsite property.
*
* @param staticWebsite the staticWebsite value to set.
* @return the BlobServiceProperties object itself.
*/
public BlobServiceProperties setStaticWebsite(StaticWebsite staticWebsite) {
this.staticWebsite = staticWebsite;
return this;
}
}