Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for
license information.
Code generated by Microsoft (R) AutoRest Code Generator.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.storage;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
Specifies a CORS rule for the Blob service.
/**
* Specifies a CORS rule for the Blob service.
*/
public class CorsRule {
Required if CorsRule element is present. A list of origin domains that
will be allowed via CORS, or "*" to allow all domains.
/**
* Required if CorsRule element is present. A list of origin domains that
* will be allowed via CORS, or "*" to allow all domains.
*/
@JsonProperty(value = "allowedOrigins", required = true)
private List<String> allowedOrigins;
Required if CorsRule element is present. A list of HTTP methods that are
allowed to be executed by the origin.
/**
* Required if CorsRule element is present. A list of HTTP methods that are
* allowed to be executed by the origin.
*/
@JsonProperty(value = "allowedMethods", required = true)
private List<String> allowedMethods;
Required if CorsRule element is present. The number of seconds that the
client/browser should cache a preflight response.
/**
* Required if CorsRule element is present. The number of seconds that the
* client/browser should cache a preflight response.
*/
@JsonProperty(value = "maxAgeInSeconds", required = true)
private int maxAgeInSeconds;
Required if CorsRule element is present. A list of response headers to
expose to CORS clients.
/**
* Required if CorsRule element is present. A list of response headers to
* expose to CORS clients.
*/
@JsonProperty(value = "exposedHeaders", required = true)
private List<String> exposedHeaders;
Required if CorsRule element is present. A list of headers allowed to be
part of the cross-origin request.
/**
* Required if CorsRule element is present. A list of headers allowed to be
* part of the cross-origin request.
*/
@JsonProperty(value = "allowedHeaders", required = true)
private List<String> allowedHeaders;
Get required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.
Returns: the allowedOrigins value
/**
* Get required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.
*
* @return the allowedOrigins value
*/
public List<String> allowedOrigins() {
return this.allowedOrigins;
}
Set required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.
Params: - allowedOrigins – the allowedOrigins value to set
Returns: the CorsRule object itself.
/**
* Set required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.
*
* @param allowedOrigins the allowedOrigins value to set
* @return the CorsRule object itself.
*/
public CorsRule withAllowedOrigins(List<String> allowedOrigins) {
this.allowedOrigins = allowedOrigins;
return this;
}
Get required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.
Returns: the allowedMethods value
/**
* Get required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.
*
* @return the allowedMethods value
*/
public List<String> allowedMethods() {
return this.allowedMethods;
}
Set required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.
Params: - allowedMethods – the allowedMethods value to set
Returns: the CorsRule object itself.
/**
* Set required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.
*
* @param allowedMethods the allowedMethods value to set
* @return the CorsRule object itself.
*/
public CorsRule withAllowedMethods(List<String> allowedMethods) {
this.allowedMethods = allowedMethods;
return this;
}
Get required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.
Returns: the maxAgeInSeconds value
/**
* Get required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.
*
* @return the maxAgeInSeconds value
*/
public int maxAgeInSeconds() {
return this.maxAgeInSeconds;
}
Set required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.
Params: - maxAgeInSeconds – the maxAgeInSeconds value to set
Returns: the CorsRule object itself.
/**
* Set required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.
*
* @param maxAgeInSeconds the maxAgeInSeconds value to set
* @return the CorsRule object itself.
*/
public CorsRule withMaxAgeInSeconds(int maxAgeInSeconds) {
this.maxAgeInSeconds = maxAgeInSeconds;
return this;
}
Get required if CorsRule element is present. A list of response headers to expose to CORS clients.
Returns: the exposedHeaders value
/**
* Get required if CorsRule element is present. A list of response headers to expose to CORS clients.
*
* @return the exposedHeaders value
*/
public List<String> exposedHeaders() {
return this.exposedHeaders;
}
Set required if CorsRule element is present. A list of response headers to expose to CORS clients.
Params: - exposedHeaders – the exposedHeaders value to set
Returns: the CorsRule object itself.
/**
* Set required if CorsRule element is present. A list of response headers to expose to CORS clients.
*
* @param exposedHeaders the exposedHeaders value to set
* @return the CorsRule object itself.
*/
public CorsRule withExposedHeaders(List<String> exposedHeaders) {
this.exposedHeaders = exposedHeaders;
return this;
}
Get required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.
Returns: the allowedHeaders value
/**
* Get required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.
*
* @return the allowedHeaders value
*/
public List<String> allowedHeaders() {
return this.allowedHeaders;
}
Set required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.
Params: - allowedHeaders – the allowedHeaders value to set
Returns: the CorsRule object itself.
/**
* Set required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.
*
* @param allowedHeaders the allowedHeaders value to set
* @return the CorsRule object itself.
*/
public CorsRule withAllowedHeaders(List<String> allowedHeaders) {
this.allowedHeaders = allowedHeaders;
return this;
}
}