- 1.92.0 (latest)
- 1.91.0
- 1.90.0
- 1.88.0
- 1.86.0
- 1.85.0
- 1.84.0
- 1.83.0
- 1.82.0
- 1.80.0
- 1.78.0
- 1.77.0
- 1.74.0
- 1.73.0
- 1.72.0
- 1.70.0
- 1.69.0
- 1.68.0
- 1.67.0
- 1.66.0
- 1.65.0
- 1.64.0
- 1.63.0
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public final class CorsPolicy extends GeneratedMessageV3 implements CorsPolicyOrBuilderThe specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard.
Protobuf type google.cloud.compute.v1.CorsPolicy
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > CorsPolicyImplements
CorsPolicyOrBuilderStatic Fields
ALLOW_CREDENTIALS_FIELD_NUMBER
public static final int ALLOW_CREDENTIALS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
ALLOW_HEADERS_FIELD_NUMBER
public static final int ALLOW_HEADERS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
ALLOW_METHODS_FIELD_NUMBER
public static final int ALLOW_METHODS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
ALLOW_ORIGINS_FIELD_NUMBER
public static final int ALLOW_ORIGINS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
ALLOW_ORIGIN_REGEXES_FIELD_NUMBER
public static final int ALLOW_ORIGIN_REGEXES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
DISABLED_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
EXPOSE_HEADERS_FIELD_NUMBER
public static final int EXPOSE_HEADERS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
MAX_AGE_FIELD_NUMBER
public static final int MAX_AGE_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
Static Methods
getDefaultInstance()
public static CorsPolicy getDefaultInstance()| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
newBuilder()
public static CorsPolicy.Builder newBuilder()| Returns | |
|---|---|
| Type | Description |
CorsPolicy.Builder |
|
newBuilder(CorsPolicy prototype)
public static CorsPolicy.Builder newBuilder(CorsPolicy prototype)| Parameter | |
|---|---|
| Name | Description |
prototype |
CorsPolicy |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy.Builder |
|
parseDelimitedFrom(InputStream input)
public static CorsPolicy parseDelimitedFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static CorsPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(byte[] data)
public static CorsPolicy parseFrom(byte[] data)| Parameter | |
|---|---|
| Name | Description |
data |
byte[] |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CorsPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data)
public static CorsPolicy parseFrom(ByteString data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteString |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CorsPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(CodedInputStream input)
public static CorsPolicy parseFrom(CodedInputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
CodedInputStream |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static CorsPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input)
public static CorsPolicy parseFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static CorsPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(ByteBuffer data)
public static CorsPolicy parseFrom(ByteBuffer data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteBuffer |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CorsPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parser()
public static Parser<CorsPolicy> parser()| Returns | |
|---|---|
| Type | Description |
Parser<CorsPolicy> |
|
Methods
equals(Object obj)
public boolean equals(Object obj)| Parameter | |
|---|---|
| Name | Description |
obj |
Object |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getAllowCredentials()
public boolean getAllowCredentials()In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header.
Default is false.
optional bool allow_credentials = 481263366;
| Returns | |
|---|---|
| Type | Description |
boolean |
The allowCredentials. |
getAllowHeaders(int index)
public String getAllowHeaders(int index)Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The allowHeaders at the given index. |
getAllowHeadersBytes(int index)
public ByteString getAllowHeadersBytes(int index)Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the allowHeaders at the given index. |
getAllowHeadersCount()
public int getAllowHeadersCount()Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;
| Returns | |
|---|---|
| Type | Description |
int |
The count of allowHeaders. |
getAllowHeadersList()
public ProtocolStringList getAllowHeadersList()Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the allowHeaders. |
getAllowMethods(int index)
public String getAllowMethods(int index)Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The allowMethods at the given index. |
getAllowMethodsBytes(int index)
public ByteString getAllowMethodsBytes(int index)Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the allowMethods at the given index. |
getAllowMethodsCount()
public int getAllowMethodsCount()Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;
| Returns | |
|---|---|
| Type | Description |
int |
The count of allowMethods. |
getAllowMethodsList()
public ProtocolStringList getAllowMethodsList()Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the allowMethods. |
getAllowOriginRegexes(int index)
public String getAllowOriginRegexes(int index)Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The allowOriginRegexes at the given index. |
getAllowOriginRegexesBytes(int index)
public ByteString getAllowOriginRegexesBytes(int index)Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the allowOriginRegexes at the given index. |
getAllowOriginRegexesCount()
public int getAllowOriginRegexesCount()Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;
| Returns | |
|---|---|
| Type | Description |
int |
The count of allowOriginRegexes. |
getAllowOriginRegexesList()
public ProtocolStringList getAllowOriginRegexesList()Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the allowOriginRegexes. |
getAllowOrigins(int index)
public String getAllowOrigins(int index)Specifies the list of origins that is allowed to do CORS requests.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
repeated string allow_origins = 194914071;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The allowOrigins at the given index. |
getAllowOriginsBytes(int index)
public ByteString getAllowOriginsBytes(int index)Specifies the list of origins that is allowed to do CORS requests.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
repeated string allow_origins = 194914071;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the allowOrigins at the given index. |
getAllowOriginsCount()
public int getAllowOriginsCount()Specifies the list of origins that is allowed to do CORS requests.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
repeated string allow_origins = 194914071;
| Returns | |
|---|---|
| Type | Description |
int |
The count of allowOrigins. |
getAllowOriginsList()
public ProtocolStringList getAllowOriginsList()Specifies the list of origins that is allowed to do CORS requests.
An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
repeated string allow_origins = 194914071;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the allowOrigins. |
getDefaultInstanceForType()
public CorsPolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
CorsPolicy |
|
getDisabled()
public boolean getDisabled()If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.
optional bool disabled = 270940796;
| Returns | |
|---|---|
| Type | Description |
boolean |
The disabled. |
getExposeHeaders(int index)
public String getExposeHeaders(int index)Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The exposeHeaders at the given index. |
getExposeHeadersBytes(int index)
public ByteString getExposeHeadersBytes(int index)Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the exposeHeaders at the given index. |
getExposeHeadersCount()
public int getExposeHeadersCount()Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;
| Returns | |
|---|---|
| Type | Description |
int |
The count of exposeHeaders. |
getExposeHeadersList()
public ProtocolStringList getExposeHeadersList()Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the exposeHeaders. |
getMaxAge()
public int getMaxAge()Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
optional int32 max_age = 307559332;
| Returns | |
|---|---|
| Type | Description |
int |
The maxAge. |
getParserForType()
public Parser<CorsPolicy> getParserForType()| Returns | |
|---|---|
| Type | Description |
Parser<CorsPolicy> |
|
getSerializedSize()
public int getSerializedSize()| Returns | |
|---|---|
| Type | Description |
int |
|
hasAllowCredentials()
public boolean hasAllowCredentials()In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header.
Default is false.
optional bool allow_credentials = 481263366;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the allowCredentials field is set. |
hasDisabled()
public boolean hasDisabled()If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.
optional bool disabled = 270940796;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the disabled field is set. |
hasMaxAge()
public boolean hasMaxAge()Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
optional int32 max_age = 307559332;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the maxAge field is set. |
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
newBuilderForType()
public CorsPolicy.Builder newBuilderForType()| Returns | |
|---|---|
| Type | Description |
CorsPolicy.Builder |
|
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CorsPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)| Parameter | |
|---|---|
| Name | Description |
parent |
BuilderParent |
| Returns | |
|---|---|
| Type | Description |
CorsPolicy.Builder |
|
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)| Parameter | |
|---|---|
| Name | Description |
unused |
UnusedPrivateParameter |
| Returns | |
|---|---|
| Type | Description |
Object |
|
toBuilder()
public CorsPolicy.Builder toBuilder()| Returns | |
|---|---|
| Type | Description |
CorsPolicy.Builder |
|
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)| Parameter | |
|---|---|
| Name | Description |
output |
CodedOutputStream |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|