@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Cors extends Object implements Serializable, Cloneable, StructuredPojo
Represents a CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.
Constructor and Description |
---|
Cors() |
Modifier and Type | Method and Description |
---|---|
Cors |
clone() |
boolean |
equals(Object obj) |
Boolean |
getAllowCredentials()
Specifies whether credentials are included in the CORS request.
|
List<String> |
getAllowHeaders()
Represents a collection of allowed headers.
|
List<String> |
getAllowMethods()
Represents a collection of allowed HTTP methods.
|
List<String> |
getAllowOrigins()
Represents a collection of allowed origins.
|
List<String> |
getExposeHeaders()
Represents a collection of exposed headers.
|
Integer |
getMaxAge()
The number of seconds that the browser should cache preflight request results.
|
int |
hashCode() |
Boolean |
isAllowCredentials()
Specifies whether credentials are included in the CORS request.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAllowCredentials(Boolean allowCredentials)
Specifies whether credentials are included in the CORS request.
|
void |
setAllowHeaders(Collection<String> allowHeaders)
Represents a collection of allowed headers.
|
void |
setAllowMethods(Collection<String> allowMethods)
Represents a collection of allowed HTTP methods.
|
void |
setAllowOrigins(Collection<String> allowOrigins)
Represents a collection of allowed origins.
|
void |
setExposeHeaders(Collection<String> exposeHeaders)
Represents a collection of exposed headers.
|
void |
setMaxAge(Integer maxAge)
The number of seconds that the browser should cache preflight request results.
|
String |
toString()
Returns a string representation of this object.
|
Cors |
withAllowCredentials(Boolean allowCredentials)
Specifies whether credentials are included in the CORS request.
|
Cors |
withAllowHeaders(Collection<String> allowHeaders)
Represents a collection of allowed headers.
|
Cors |
withAllowHeaders(String... allowHeaders)
Represents a collection of allowed headers.
|
Cors |
withAllowMethods(Collection<String> allowMethods)
Represents a collection of allowed HTTP methods.
|
Cors |
withAllowMethods(String... allowMethods)
Represents a collection of allowed HTTP methods.
|
Cors |
withAllowOrigins(Collection<String> allowOrigins)
Represents a collection of allowed origins.
|
Cors |
withAllowOrigins(String... allowOrigins)
Represents a collection of allowed origins.
|
Cors |
withExposeHeaders(Collection<String> exposeHeaders)
Represents a collection of exposed headers.
|
Cors |
withExposeHeaders(String... exposeHeaders)
Represents a collection of exposed headers.
|
Cors |
withMaxAge(Integer maxAge)
The number of seconds that the browser should cache preflight request results.
|
public void setAllowCredentials(Boolean allowCredentials)
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
allowCredentials
- Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.public Boolean getAllowCredentials()
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
public Cors withAllowCredentials(Boolean allowCredentials)
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
allowCredentials
- Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.public Boolean isAllowCredentials()
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
public List<String> getAllowHeaders()
Represents a collection of allowed headers. Supported only for HTTP APIs.
public void setAllowHeaders(Collection<String> allowHeaders)
Represents a collection of allowed headers. Supported only for HTTP APIs.
allowHeaders
- Represents a collection of allowed headers. Supported only for HTTP APIs.public Cors withAllowHeaders(String... allowHeaders)
Represents a collection of allowed headers. Supported only for HTTP APIs.
NOTE: This method appends the values to the existing list (if any). Use
setAllowHeaders(java.util.Collection)
or withAllowHeaders(java.util.Collection)
if you want to
override the existing values.
allowHeaders
- Represents a collection of allowed headers. Supported only for HTTP APIs.public Cors withAllowHeaders(Collection<String> allowHeaders)
Represents a collection of allowed headers. Supported only for HTTP APIs.
allowHeaders
- Represents a collection of allowed headers. Supported only for HTTP APIs.public List<String> getAllowMethods()
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
public void setAllowMethods(Collection<String> allowMethods)
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
allowMethods
- Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.public Cors withAllowMethods(String... allowMethods)
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
NOTE: This method appends the values to the existing list (if any). Use
setAllowMethods(java.util.Collection)
or withAllowMethods(java.util.Collection)
if you want to
override the existing values.
allowMethods
- Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.public Cors withAllowMethods(Collection<String> allowMethods)
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
allowMethods
- Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.public List<String> getAllowOrigins()
Represents a collection of allowed origins. Supported only for HTTP APIs.
public void setAllowOrigins(Collection<String> allowOrigins)
Represents a collection of allowed origins. Supported only for HTTP APIs.
allowOrigins
- Represents a collection of allowed origins. Supported only for HTTP APIs.public Cors withAllowOrigins(String... allowOrigins)
Represents a collection of allowed origins. Supported only for HTTP APIs.
NOTE: This method appends the values to the existing list (if any). Use
setAllowOrigins(java.util.Collection)
or withAllowOrigins(java.util.Collection)
if you want to
override the existing values.
allowOrigins
- Represents a collection of allowed origins. Supported only for HTTP APIs.public Cors withAllowOrigins(Collection<String> allowOrigins)
Represents a collection of allowed origins. Supported only for HTTP APIs.
allowOrigins
- Represents a collection of allowed origins. Supported only for HTTP APIs.public List<String> getExposeHeaders()
Represents a collection of exposed headers. Supported only for HTTP APIs.
public void setExposeHeaders(Collection<String> exposeHeaders)
Represents a collection of exposed headers. Supported only for HTTP APIs.
exposeHeaders
- Represents a collection of exposed headers. Supported only for HTTP APIs.public Cors withExposeHeaders(String... exposeHeaders)
Represents a collection of exposed headers. Supported only for HTTP APIs.
NOTE: This method appends the values to the existing list (if any). Use
setExposeHeaders(java.util.Collection)
or withExposeHeaders(java.util.Collection)
if you want
to override the existing values.
exposeHeaders
- Represents a collection of exposed headers. Supported only for HTTP APIs.public Cors withExposeHeaders(Collection<String> exposeHeaders)
Represents a collection of exposed headers. Supported only for HTTP APIs.
exposeHeaders
- Represents a collection of exposed headers. Supported only for HTTP APIs.public void setMaxAge(Integer maxAge)
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
maxAge
- The number of seconds that the browser should cache preflight request results. Supported only for HTTP
APIs.public Integer getMaxAge()
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
public Cors withMaxAge(Integer maxAge)
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
maxAge
- The number of seconds that the browser should cache preflight request results. Supported only for HTTP
APIs.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.