Package com.google.cloud.compute.v1
Class CorsPolicy
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.compute.v1.CorsPolicy
- All Implemented Interfaces:
CorsPolicyOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class CorsPolicy
extends com.google.protobuf.GeneratedMessage
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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe specification for allowing client-side cross-origin requests.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanIn response to a preflight request, setting this to true indicates that the actual request can include user credentials.getAllowHeaders(int index) Specifies the content for the Access-Control-Allow-Headers header.com.google.protobuf.ByteStringgetAllowHeadersBytes(int index) Specifies the content for the Access-Control-Allow-Headers header.intSpecifies the content for the Access-Control-Allow-Headers header.com.google.protobuf.ProtocolStringListSpecifies the content for the Access-Control-Allow-Headers header.getAllowMethods(int index) Specifies the content for the Access-Control-Allow-Methods header.com.google.protobuf.ByteStringgetAllowMethodsBytes(int index) Specifies the content for the Access-Control-Allow-Methods header.intSpecifies the content for the Access-Control-Allow-Methods header.com.google.protobuf.ProtocolStringListSpecifies the content for the Access-Control-Allow-Methods header.getAllowOriginRegexes(int index) Specifies a regular expression that matches allowed origins.com.google.protobuf.ByteStringgetAllowOriginRegexesBytes(int index) Specifies a regular expression that matches allowed origins.intSpecifies a regular expression that matches allowed origins.com.google.protobuf.ProtocolStringListSpecifies a regular expression that matches allowed origins.getAllowOrigins(int index) Specifies the list of origins that is allowed to do CORS requests.com.google.protobuf.ByteStringgetAllowOriginsBytes(int index) Specifies the list of origins that is allowed to do CORS requests.intSpecifies the list of origins that is allowed to do CORS requests.com.google.protobuf.ProtocolStringListSpecifies the list of origins that is allowed to do CORS requests.static CorsPolicystatic final com.google.protobuf.Descriptors.DescriptorbooleanIf true, disables the CORS policy.getExposeHeaders(int index) Specifies the content for the Access-Control-Expose-Headers header.com.google.protobuf.ByteStringgetExposeHeadersBytes(int index) Specifies the content for the Access-Control-Expose-Headers header.intSpecifies the content for the Access-Control-Expose-Headers header.com.google.protobuf.ProtocolStringListSpecifies the content for the Access-Control-Expose-Headers header.intSpecifies how long results of a preflight request can be cached in seconds.com.google.protobuf.Parser<CorsPolicy>intbooleanIn response to a preflight request, setting this to true indicates that the actual request can include user credentials.booleanIf true, disables the CORS policy.inthashCode()booleanSpecifies how long results of a preflight request can be cached in seconds.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic CorsPolicy.Builderstatic CorsPolicy.BuildernewBuilder(CorsPolicy prototype) protected CorsPolicy.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static CorsPolicyparseDelimitedFrom(InputStream input) static CorsPolicyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CorsPolicyparseFrom(byte[] data) static CorsPolicyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CorsPolicyparseFrom(com.google.protobuf.ByteString data) static CorsPolicyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CorsPolicyparseFrom(com.google.protobuf.CodedInputStream input) static CorsPolicyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CorsPolicyparseFrom(InputStream input) static CorsPolicyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CorsPolicyparseFrom(ByteBuffer data) static CorsPolicyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CorsPolicy>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
ALLOW_CREDENTIALS_FIELD_NUMBER
public static final int ALLOW_CREDENTIALS_FIELD_NUMBER- See Also:
-
ALLOW_HEADERS_FIELD_NUMBER
public static final int ALLOW_HEADERS_FIELD_NUMBER- See Also:
-
ALLOW_METHODS_FIELD_NUMBER
public static final int ALLOW_METHODS_FIELD_NUMBER- See Also:
-
ALLOW_ORIGIN_REGEXES_FIELD_NUMBER
public static final int ALLOW_ORIGIN_REGEXES_FIELD_NUMBER- See Also:
-
ALLOW_ORIGINS_FIELD_NUMBER
public static final int ALLOW_ORIGINS_FIELD_NUMBER- See Also:
-
DISABLED_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER- See Also:
-
EXPOSE_HEADERS_FIELD_NUMBER
public static final int EXPOSE_HEADERS_FIELD_NUMBER- See Also:
-
MAX_AGE_FIELD_NUMBER
public static final int MAX_AGE_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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;- Specified by:
hasAllowCredentialsin interfaceCorsPolicyOrBuilder- Returns:
- Whether the allowCredentials field is set.
-
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;- Specified by:
getAllowCredentialsin interfaceCorsPolicyOrBuilder- Returns:
- The allowCredentials.
-
getAllowHeadersList
public com.google.protobuf.ProtocolStringList getAllowHeadersList()Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Specified by:
getAllowHeadersListin interfaceCorsPolicyOrBuilder- Returns:
- A list containing the allowHeaders.
-
getAllowHeadersCount
public int getAllowHeadersCount()Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Specified by:
getAllowHeadersCountin interfaceCorsPolicyOrBuilder- Returns:
- The count of allowHeaders.
-
getAllowHeaders
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Specified by:
getAllowHeadersin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The allowHeaders at the given index.
-
getAllowHeadersBytes
public com.google.protobuf.ByteString getAllowHeadersBytes(int index) Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Specified by:
getAllowHeadersBytesin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowHeaders at the given index.
-
getAllowMethodsList
public com.google.protobuf.ProtocolStringList getAllowMethodsList()Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Specified by:
getAllowMethodsListin interfaceCorsPolicyOrBuilder- Returns:
- A list containing the allowMethods.
-
getAllowMethodsCount
public int getAllowMethodsCount()Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Specified by:
getAllowMethodsCountin interfaceCorsPolicyOrBuilder- Returns:
- The count of allowMethods.
-
getAllowMethods
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Specified by:
getAllowMethodsin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The allowMethods at the given index.
-
getAllowMethodsBytes
public com.google.protobuf.ByteString getAllowMethodsBytes(int index) Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Specified by:
getAllowMethodsBytesin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowMethods at the given index.
-
getAllowOriginRegexesList
public com.google.protobuf.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;- Specified by:
getAllowOriginRegexesListin interfaceCorsPolicyOrBuilder- Returns:
- A list containing the allowOriginRegexes.
-
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;- Specified by:
getAllowOriginRegexesCountin interfaceCorsPolicyOrBuilder- Returns:
- The count of allowOriginRegexes.
-
getAllowOriginRegexes
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;- Specified by:
getAllowOriginRegexesin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The allowOriginRegexes at the given index.
-
getAllowOriginRegexesBytes
public com.google.protobuf.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;- Specified by:
getAllowOriginRegexesBytesin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowOriginRegexes at the given index.
-
getAllowOriginsList
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 inallowOrigins or an item inallowOriginRegexes.
repeated string allow_origins = 194914071;- Specified by:
getAllowOriginsListin interfaceCorsPolicyOrBuilder- Returns:
- A list containing the allowOrigins.
-
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;- Specified by:
getAllowOriginsCountin interfaceCorsPolicyOrBuilder- Returns:
- The count of allowOrigins.
-
getAllowOrigins
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;- Specified by:
getAllowOriginsin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The allowOrigins at the given index.
-
getAllowOriginsBytes
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 inallowOrigins or an item inallowOriginRegexes.
repeated string allow_origins = 194914071;- Specified by:
getAllowOriginsBytesin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowOrigins at the given index.
-
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;- Specified by:
hasDisabledin interfaceCorsPolicyOrBuilder- Returns:
- Whether the disabled field is set.
-
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;- Specified by:
getDisabledin interfaceCorsPolicyOrBuilder- Returns:
- The disabled.
-
getExposeHeadersList
public com.google.protobuf.ProtocolStringList getExposeHeadersList()Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Specified by:
getExposeHeadersListin interfaceCorsPolicyOrBuilder- Returns:
- A list containing the exposeHeaders.
-
getExposeHeadersCount
public int getExposeHeadersCount()Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Specified by:
getExposeHeadersCountin interfaceCorsPolicyOrBuilder- Returns:
- The count of exposeHeaders.
-
getExposeHeaders
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Specified by:
getExposeHeadersin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The exposeHeaders at the given index.
-
getExposeHeadersBytes
public com.google.protobuf.ByteString getExposeHeadersBytes(int index) Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Specified by:
getExposeHeadersBytesin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the exposeHeaders at the given index.
-
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;- Specified by:
hasMaxAgein interfaceCorsPolicyOrBuilder- Returns:
- Whether the maxAge field is set.
-
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;- Specified by:
getMaxAgein interfaceCorsPolicyOrBuilder- Returns:
- The maxAge.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CorsPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CorsPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CorsPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CorsPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CorsPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CorsPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CorsPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static CorsPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CorsPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CorsPolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-