Package com.google.cloud.compute.v1
Class CorsPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
com.google.cloud.compute.v1.CorsPolicy.Builder
- All Implemented Interfaces:
CorsPolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- CorsPolicy
public static final class CorsPolicy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionaddAllAllowHeaders(Iterable<String> values) Specifies the content for the Access-Control-Allow-Headers header.addAllAllowMethods(Iterable<String> values) Specifies the content for the Access-Control-Allow-Methods header.addAllAllowOriginRegexes(Iterable<String> values) Specifies a regular expression that matches allowed origins.addAllAllowOrigins(Iterable<String> values) Specifies the list of origins that is allowed to do CORS requests.addAllExposeHeaders(Iterable<String> values) Specifies the content for the Access-Control-Expose-Headers header.addAllowHeaders(String value) Specifies the content for the Access-Control-Allow-Headers header.addAllowHeadersBytes(com.google.protobuf.ByteString value) Specifies the content for the Access-Control-Allow-Headers header.addAllowMethods(String value) Specifies the content for the Access-Control-Allow-Methods header.addAllowMethodsBytes(com.google.protobuf.ByteString value) Specifies the content for the Access-Control-Allow-Methods header.addAllowOriginRegexes(String value) Specifies a regular expression that matches allowed origins.addAllowOriginRegexesBytes(com.google.protobuf.ByteString value) Specifies a regular expression that matches allowed origins.addAllowOrigins(String value) Specifies the list of origins that is allowed to do CORS requests.addAllowOriginsBytes(com.google.protobuf.ByteString value) Specifies the list of origins that is allowed to do CORS requests.addExposeHeaders(String value) Specifies the content for the Access-Control-Expose-Headers header.addExposeHeadersBytes(com.google.protobuf.ByteString value) Specifies the content for the Access-Control-Expose-Headers header.build()clear()In response to a preflight request, setting this to true indicates that the actual request can include user credentials.Specifies the content for the Access-Control-Allow-Headers header.Specifies the content for the Access-Control-Allow-Methods header.Specifies a regular expression that matches allowed origins.Specifies the list of origins that is allowed to do CORS requests.If true, disables the CORS policy.Specifies the content for the Access-Control-Expose-Headers header.Specifies how long results of a preflight request can be cached in seconds.booleanIn 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 final com.google.protobuf.Descriptors.Descriptorcom.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.booleanIn response to a preflight request, setting this to true indicates that the actual request can include user credentials.booleanIf true, disables the CORS policy.booleanSpecifies how long results of a preflight request can be cached in seconds.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(CorsPolicy other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAllowCredentials(boolean value) In response to a preflight request, setting this to true indicates that the actual request can include user credentials.setAllowHeaders(int index, String value) Specifies the content for the Access-Control-Allow-Headers header.setAllowMethods(int index, String value) Specifies the content for the Access-Control-Allow-Methods header.setAllowOriginRegexes(int index, String value) Specifies a regular expression that matches allowed origins.setAllowOrigins(int index, String value) Specifies the list of origins that is allowed to do CORS requests.setDisabled(boolean value) If true, disables the CORS policy.setExposeHeaders(int index, String value) Specifies the content for the Access-Control-Expose-Headers header.setMaxAge(int value) Specifies how long results of a preflight request can be cached in seconds.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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.Builder<CorsPolicy.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CorsPolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
-
mergeFrom
public CorsPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CorsPolicy.Builder>- Throws:
IOException
-
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.
-
setAllowCredentials
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;- Parameters:
value- The allowCredentials to set.- Returns:
- This builder for chaining.
-
clearAllowCredentials
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:
- This builder for chaining.
-
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.
-
setAllowHeaders
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Parameters:
index- The index to set the value at.value- The allowHeaders to set.- Returns:
- This builder for chaining.
-
addAllowHeaders
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Parameters:
value- The allowHeaders to add.- Returns:
- This builder for chaining.
-
addAllAllowHeaders
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Parameters:
values- The allowHeaders to add.- Returns:
- This builder for chaining.
-
clearAllowHeaders
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Returns:
- This builder for chaining.
-
addAllowHeadersBytes
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Parameters:
value- The bytes of the allowHeaders to add.- Returns:
- This builder for chaining.
-
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.
-
setAllowMethods
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Parameters:
index- The index to set the value at.value- The allowMethods to set.- Returns:
- This builder for chaining.
-
addAllowMethods
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Parameters:
value- The allowMethods to add.- Returns:
- This builder for chaining.
-
addAllAllowMethods
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Parameters:
values- The allowMethods to add.- Returns:
- This builder for chaining.
-
clearAllowMethods
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Returns:
- This builder for chaining.
-
addAllowMethodsBytes
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Parameters:
value- The bytes of the allowMethods to add.- Returns:
- This builder for chaining.
-
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.
-
setAllowOriginRegexes
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;- Parameters:
index- The index to set the value at.value- The allowOriginRegexes to set.- Returns:
- This builder for chaining.
-
addAllowOriginRegexes
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;- Parameters:
value- The allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
addAllAllowOriginRegexes
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;- Parameters:
values- The allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
clearAllowOriginRegexes
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:
- This builder for chaining.
-
addAllowOriginRegexesBytes
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;- Parameters:
value- The bytes of the allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
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.
-
setAllowOrigins
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;- Parameters:
index- The index to set the value at.value- The allowOrigins to set.- Returns:
- This builder for chaining.
-
addAllowOrigins
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;- Parameters:
value- The allowOrigins to add.- Returns:
- This builder for chaining.
-
addAllAllowOrigins
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;- Parameters:
values- The allowOrigins to add.- Returns:
- This builder for chaining.
-
clearAllowOrigins
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:
- This builder for chaining.
-
addAllowOriginsBytes
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;- Parameters:
value- The bytes of the allowOrigins to add.- Returns:
- This builder for chaining.
-
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.
-
setDisabled
If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect.
optional bool disabled = 270940796;- Parameters:
value- The disabled to set.- Returns:
- This builder for chaining.
-
clearDisabled
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:
- This builder for chaining.
-
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.
-
setExposeHeaders
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Parameters:
index- The index to set the value at.value- The exposeHeaders to set.- Returns:
- This builder for chaining.
-
addExposeHeaders
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Parameters:
value- The exposeHeaders to add.- Returns:
- This builder for chaining.
-
addAllExposeHeaders
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Parameters:
values- The exposeHeaders to add.- Returns:
- This builder for chaining.
-
clearExposeHeaders
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Returns:
- This builder for chaining.
-
addExposeHeadersBytes
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Parameters:
value- The bytes of the exposeHeaders to add.- Returns:
- This builder for chaining.
-
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.
-
setMaxAge
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;- Parameters:
value- The maxAge to set.- Returns:
- This builder for chaining.
-
clearMaxAge
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:
- This builder for chaining.
-