public final class CorsPolicy extends com.google.protobuf.GeneratedMessageV3 implements CorsPolicyOrBuilder
The 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| Modifier and Type | Class and Description |
|---|---|
static class |
CorsPolicy.Builder
The specification for allowing client-side cross-origin requests.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ALLOW_CREDENTIALS_FIELD_NUMBER |
static int |
ALLOW_HEADERS_FIELD_NUMBER |
static int |
ALLOW_METHODS_FIELD_NUMBER |
static int |
ALLOW_ORIGIN_REGEXES_FIELD_NUMBER |
static int |
ALLOW_ORIGINS_FIELD_NUMBER |
static int |
DISABLED_FIELD_NUMBER |
static int |
EXPOSE_HEADERS_FIELD_NUMBER |
static int |
MAX_AGE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
getAllowCredentials()
In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
|
String |
getAllowHeaders(int index)
Specifies the content for the Access-Control-Allow-Headers header.
|
com.google.protobuf.ByteString |
getAllowHeadersBytes(int index)
Specifies the content for the Access-Control-Allow-Headers header.
|
int |
getAllowHeadersCount()
Specifies the content for the Access-Control-Allow-Headers header.
|
com.google.protobuf.ProtocolStringList |
getAllowHeadersList()
Specifies the content for the Access-Control-Allow-Headers header.
|
String |
getAllowMethods(int index)
Specifies the content for the Access-Control-Allow-Methods header.
|
com.google.protobuf.ByteString |
getAllowMethodsBytes(int index)
Specifies the content for the Access-Control-Allow-Methods header.
|
int |
getAllowMethodsCount()
Specifies the content for the Access-Control-Allow-Methods header.
|
com.google.protobuf.ProtocolStringList |
getAllowMethodsList()
Specifies the content for the Access-Control-Allow-Methods header.
|
String |
getAllowOriginRegexes(int index)
Specifies a regular expression that matches allowed origins.
|
com.google.protobuf.ByteString |
getAllowOriginRegexesBytes(int index)
Specifies a regular expression that matches allowed origins.
|
int |
getAllowOriginRegexesCount()
Specifies a regular expression that matches allowed origins.
|
com.google.protobuf.ProtocolStringList |
getAllowOriginRegexesList()
Specifies a regular expression that matches allowed origins.
|
String |
getAllowOrigins(int index)
Specifies the list of origins that is allowed to do CORS requests.
|
com.google.protobuf.ByteString |
getAllowOriginsBytes(int index)
Specifies the list of origins that is allowed to do CORS requests.
|
int |
getAllowOriginsCount()
Specifies the list of origins that is allowed to do CORS requests.
|
com.google.protobuf.ProtocolStringList |
getAllowOriginsList()
Specifies the list of origins that is allowed to do CORS requests.
|
static CorsPolicy |
getDefaultInstance() |
CorsPolicy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getDisabled()
If true, the setting specifies the CORS policy is disabled.
|
String |
getExposeHeaders(int index)
Specifies the content for the Access-Control-Expose-Headers header.
|
com.google.protobuf.ByteString |
getExposeHeadersBytes(int index)
Specifies the content for the Access-Control-Expose-Headers header.
|
int |
getExposeHeadersCount()
Specifies the content for the Access-Control-Expose-Headers header.
|
com.google.protobuf.ProtocolStringList |
getExposeHeadersList()
Specifies the content for the Access-Control-Expose-Headers header.
|
int |
getMaxAge()
Specifies how long results of a preflight request can be cached in seconds.
|
com.google.protobuf.Parser<CorsPolicy> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasAllowCredentials()
In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
|
boolean |
hasDisabled()
If true, the setting specifies the CORS policy is disabled.
|
int |
hashCode() |
boolean |
hasMaxAge()
Specifies how long results of a preflight request can be cached in seconds.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static CorsPolicy.Builder |
newBuilder() |
static CorsPolicy.Builder |
newBuilder(CorsPolicy prototype) |
CorsPolicy.Builder |
newBuilderForType() |
protected CorsPolicy.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static CorsPolicy |
parseDelimitedFrom(InputStream input) |
static CorsPolicy |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CorsPolicy |
parseFrom(byte[] data) |
static CorsPolicy |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CorsPolicy |
parseFrom(ByteBuffer data) |
static CorsPolicy |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CorsPolicy |
parseFrom(com.google.protobuf.ByteString data) |
static CorsPolicy |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CorsPolicy |
parseFrom(com.google.protobuf.CodedInputStream input) |
static CorsPolicy |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CorsPolicy |
parseFrom(InputStream input) |
static CorsPolicy |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<CorsPolicy> |
parser() |
CorsPolicy.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int ALLOW_CREDENTIALS_FIELD_NUMBER
public static final int ALLOW_HEADERS_FIELD_NUMBER
public static final int ALLOW_METHODS_FIELD_NUMBER
public static final int ALLOW_ORIGIN_REGEXES_FIELD_NUMBER
public static final int ALLOW_ORIGINS_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER
public static final int EXPOSE_HEADERS_FIELD_NUMBER
public static final int MAX_AGE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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;hasAllowCredentials in interface CorsPolicyOrBuilderpublic 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;getAllowCredentials in interface CorsPolicyOrBuilderpublic com.google.protobuf.ProtocolStringList getAllowHeadersList()
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;getAllowHeadersList in interface CorsPolicyOrBuilderpublic int getAllowHeadersCount()
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;getAllowHeadersCount in interface CorsPolicyOrBuilderpublic String getAllowHeaders(int index)
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;getAllowHeaders in interface CorsPolicyOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getAllowHeadersBytes(int index)
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;getAllowHeadersBytes in interface CorsPolicyOrBuilderindex - The index of the value to return.public com.google.protobuf.ProtocolStringList getAllowMethodsList()
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;getAllowMethodsList in interface CorsPolicyOrBuilderpublic int getAllowMethodsCount()
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;getAllowMethodsCount in interface CorsPolicyOrBuilderpublic String getAllowMethods(int index)
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;getAllowMethods in interface CorsPolicyOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getAllowMethodsBytes(int index)
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;getAllowMethodsBytes in interface CorsPolicyOrBuilderindex - The index of the value to return.public com.google.protobuf.ProtocolStringList getAllowOriginRegexesList()
Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;getAllowOriginRegexesList in interface CorsPolicyOrBuilderpublic int getAllowOriginRegexesCount()
Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;getAllowOriginRegexesCount in interface CorsPolicyOrBuilderpublic String getAllowOriginRegexes(int index)
Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;getAllowOriginRegexes in interface CorsPolicyOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getAllowOriginRegexesBytes(int index)
Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 215385810;getAllowOriginRegexesBytes in interface CorsPolicyOrBuilderindex - The index of the value to return.public com.google.protobuf.ProtocolStringList getAllowOriginsList()
Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
repeated string allow_origins = 194914071;getAllowOriginsList in interface CorsPolicyOrBuilderpublic int getAllowOriginsCount()
Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
repeated string allow_origins = 194914071;getAllowOriginsCount in interface CorsPolicyOrBuilderpublic 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 in allowOrigins or an item in allowOriginRegexes.
repeated string allow_origins = 194914071;getAllowOrigins in interface CorsPolicyOrBuilderindex - The index of the element to return.public com.google.protobuf.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 in allowOrigins or an item in allowOriginRegexes.
repeated string allow_origins = 194914071;getAllowOriginsBytes in interface CorsPolicyOrBuilderindex - The index of the value to return.public boolean hasDisabled()
If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
optional bool disabled = 270940796;hasDisabled in interface CorsPolicyOrBuilderpublic boolean getDisabled()
If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
optional bool disabled = 270940796;getDisabled in interface CorsPolicyOrBuilderpublic com.google.protobuf.ProtocolStringList getExposeHeadersList()
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;getExposeHeadersList in interface CorsPolicyOrBuilderpublic int getExposeHeadersCount()
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;getExposeHeadersCount in interface CorsPolicyOrBuilderpublic String getExposeHeaders(int index)
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;getExposeHeaders in interface CorsPolicyOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getExposeHeadersBytes(int index)
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;getExposeHeadersBytes in interface CorsPolicyOrBuilderindex - The index of the value to return.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;hasMaxAge in interface CorsPolicyOrBuilderpublic 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;getMaxAge in interface CorsPolicyOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static CorsPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CorsPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CorsPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CorsPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CorsPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CorsPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CorsPolicy parseFrom(InputStream input) throws IOException
IOExceptionpublic static CorsPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static CorsPolicy parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static CorsPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static CorsPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static CorsPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic CorsPolicy.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static CorsPolicy.Builder newBuilder()
public static CorsPolicy.Builder newBuilder(CorsPolicy prototype)
public CorsPolicy.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected CorsPolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static CorsPolicy getDefaultInstance()
public static com.google.protobuf.Parser<CorsPolicy> parser()
public com.google.protobuf.Parser<CorsPolicy> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public CorsPolicy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2023 Google LLC. All rights reserved.