Class HttpRoute.CorsPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HttpRoute.CorsPolicy.Builder>
com.google.cloud.networkservices.v1.HttpRoute.CorsPolicy.Builder
- All Implemented Interfaces:
HttpRoute.CorsPolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- HttpRoute.CorsPolicy
public static final class HttpRoute.CorsPolicy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<HttpRoute.CorsPolicy.Builder>
implements HttpRoute.CorsPolicyOrBuilder
The Specification for allowing client side cross-origin requests.Protobuf type
google.cloud.networkservices.v1.HttpRoute.CorsPolicy-
Method Summary
Modifier and TypeMethodDescriptionaddAllAllowHeaders(Iterable<String> values) Specifies the content for Access-Control-Allow-Headers header.addAllAllowMethods(Iterable<String> values) Specifies the content for Access-Control-Allow-Methods header.addAllAllowOriginRegexes(Iterable<String> values) Specifies the regular expression patterns that match allowed origins.addAllAllowOrigins(Iterable<String> values) Specifies the list of origins that will be allowed to do CORS requests.addAllExposeHeaders(Iterable<String> values) Specifies the content for Access-Control-Expose-Headers header.addAllowHeaders(String value) Specifies the content for Access-Control-Allow-Headers header.addAllowHeadersBytes(com.google.protobuf.ByteString value) Specifies the content for Access-Control-Allow-Headers header.addAllowMethods(String value) Specifies the content for Access-Control-Allow-Methods header.addAllowMethodsBytes(com.google.protobuf.ByteString value) Specifies the content for Access-Control-Allow-Methods header.addAllowOriginRegexes(String value) Specifies the regular expression patterns that match allowed origins.addAllowOriginRegexesBytes(com.google.protobuf.ByteString value) Specifies the regular expression patterns that match allowed origins.addAllowOrigins(String value) Specifies the list of origins that will be allowed to do CORS requests.addAllowOriginsBytes(com.google.protobuf.ByteString value) Specifies the list of origins that will be allowed to do CORS requests.addExposeHeaders(String value) Specifies the content for Access-Control-Expose-Headers header.addExposeHeadersBytes(com.google.protobuf.ByteString value) Specifies the content for 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 Access-Control-Allow-Headers header.Specifies the content for Access-Control-Allow-Methods header.Specifies the regular expression patterns that match allowed origins.Specifies the list of origins that will be allowed to do CORS requests.If true, the CORS policy is disabled.Specifies the content for Access-Control-Expose-Headers header.Specifies how long result 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 Access-Control-Allow-Headers header.com.google.protobuf.ByteStringgetAllowHeadersBytes(int index) Specifies the content for Access-Control-Allow-Headers header.intSpecifies the content for Access-Control-Allow-Headers header.com.google.protobuf.ProtocolStringListSpecifies the content for Access-Control-Allow-Headers header.getAllowMethods(int index) Specifies the content for Access-Control-Allow-Methods header.com.google.protobuf.ByteStringgetAllowMethodsBytes(int index) Specifies the content for Access-Control-Allow-Methods header.intSpecifies the content for Access-Control-Allow-Methods header.com.google.protobuf.ProtocolStringListSpecifies the content for Access-Control-Allow-Methods header.getAllowOriginRegexes(int index) Specifies the regular expression patterns that match allowed origins.com.google.protobuf.ByteStringgetAllowOriginRegexesBytes(int index) Specifies the regular expression patterns that match allowed origins.intSpecifies the regular expression patterns that match allowed origins.com.google.protobuf.ProtocolStringListSpecifies the regular expression patterns that match allowed origins.getAllowOrigins(int index) Specifies the list of origins that will be allowed to do CORS requests.com.google.protobuf.ByteStringgetAllowOriginsBytes(int index) Specifies the list of origins that will be allowed to do CORS requests.intSpecifies the list of origins that will be allowed to do CORS requests.com.google.protobuf.ProtocolStringListSpecifies the list of origins that will be allowed to do CORS requests.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanIf true, the CORS policy is disabled.getExposeHeaders(int index) Specifies the content for Access-Control-Expose-Headers header.com.google.protobuf.ByteStringgetExposeHeadersBytes(int index) Specifies the content for Access-Control-Expose-Headers header.intSpecifies the content for Access-Control-Expose-Headers header.com.google.protobuf.ProtocolStringListSpecifies the content for Access-Control-Expose-Headers header.Specifies how long result of a preflight request can be cached in seconds.com.google.protobuf.ByteStringSpecifies how long result of a preflight request can be cached in seconds.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(HttpRoute.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 Access-Control-Allow-Headers header.setAllowMethods(int index, String value) Specifies the content for Access-Control-Allow-Methods header.setAllowOriginRegexes(int index, String value) Specifies the regular expression patterns that match allowed origins.setAllowOrigins(int index, String value) Specifies the list of origins that will be allowed to do CORS requests.setDisabled(boolean value) If true, the CORS policy is disabled.setExposeHeaders(int index, String value) Specifies the content for Access-Control-Expose-Headers header.Specifies how long result of a preflight request can be cached in seconds.setMaxAgeBytes(com.google.protobuf.ByteString value) Specifies how long result 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<HttpRoute.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<HttpRoute.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<HttpRoute.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<HttpRoute.CorsPolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.CorsPolicy.Builder>
-
mergeFrom
public HttpRoute.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<HttpRoute.CorsPolicy.Builder>- Throws:
IOException
-
getAllowOriginsList
public com.google.protobuf.ProtocolStringList getAllowOriginsList()Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Specified by:
getAllowOriginsListin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- A list containing the allowOrigins.
-
getAllowOriginsCount
public int getAllowOriginsCount()Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Specified by:
getAllowOriginsCountin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The count of allowOrigins.
-
getAllowOrigins
Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Specified by:
getAllowOriginsin interfaceHttpRoute.CorsPolicyOrBuilder- 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 will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Specified by:
getAllowOriginsBytesin interfaceHttpRoute.CorsPolicyOrBuilder- 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 will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- 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 will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Parameters:
value- The allowOrigins to add.- Returns:
- This builder for chaining.
-
addAllAllowOrigins
Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Parameters:
values- The allowOrigins to add.- Returns:
- This builder for chaining.
-
clearAllowOrigins
Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Returns:
- This builder for chaining.
-
addAllowOriginsBytes
Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
repeated string allow_origins = 1;- Parameters:
value- The bytes of the allowOrigins to add.- Returns:
- This builder for chaining.
-
getAllowOriginRegexesList
public com.google.protobuf.ProtocolStringList getAllowOriginRegexesList()Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Specified by:
getAllowOriginRegexesListin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- A list containing the allowOriginRegexes.
-
getAllowOriginRegexesCount
public int getAllowOriginRegexesCount()Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Specified by:
getAllowOriginRegexesCountin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The count of allowOriginRegexes.
-
getAllowOriginRegexes
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Specified by:
getAllowOriginRegexesin interfaceHttpRoute.CorsPolicyOrBuilder- 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 the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Specified by:
getAllowOriginRegexesBytesin interfaceHttpRoute.CorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowOriginRegexes at the given index.
-
setAllowOriginRegexes
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Parameters:
index- The index to set the value at.value- The allowOriginRegexes to set.- Returns:
- This builder for chaining.
-
addAllowOriginRegexes
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Parameters:
value- The allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
addAllAllowOriginRegexes
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Parameters:
values- The allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
clearAllowOriginRegexes
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Returns:
- This builder for chaining.
-
addAllowOriginRegexesBytes
public HttpRoute.CorsPolicy.Builder addAllowOriginRegexesBytes(com.google.protobuf.ByteString value) Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
repeated string allow_origin_regexes = 2;- Parameters:
value- The bytes of the allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
getAllowMethodsList
public com.google.protobuf.ProtocolStringList getAllowMethodsList()Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Specified by:
getAllowMethodsListin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- A list containing the allowMethods.
-
getAllowMethodsCount
public int getAllowMethodsCount()Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Specified by:
getAllowMethodsCountin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The count of allowMethods.
-
getAllowMethods
Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Specified by:
getAllowMethodsin interfaceHttpRoute.CorsPolicyOrBuilder- 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 Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Specified by:
getAllowMethodsBytesin interfaceHttpRoute.CorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowMethods at the given index.
-
setAllowMethods
Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Parameters:
index- The index to set the value at.value- The allowMethods to set.- Returns:
- This builder for chaining.
-
addAllowMethods
Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Parameters:
value- The allowMethods to add.- Returns:
- This builder for chaining.
-
addAllAllowMethods
Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Parameters:
values- The allowMethods to add.- Returns:
- This builder for chaining.
-
clearAllowMethods
Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Returns:
- This builder for chaining.
-
addAllowMethodsBytes
Specifies the content for Access-Control-Allow-Methods header.
repeated string allow_methods = 3;- Parameters:
value- The bytes of the allowMethods to add.- Returns:
- This builder for chaining.
-
getAllowHeadersList
public com.google.protobuf.ProtocolStringList getAllowHeadersList()Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Specified by:
getAllowHeadersListin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- A list containing the allowHeaders.
-
getAllowHeadersCount
public int getAllowHeadersCount()Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Specified by:
getAllowHeadersCountin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The count of allowHeaders.
-
getAllowHeaders
Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Specified by:
getAllowHeadersin interfaceHttpRoute.CorsPolicyOrBuilder- 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 Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Specified by:
getAllowHeadersBytesin interfaceHttpRoute.CorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowHeaders at the given index.
-
setAllowHeaders
Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Parameters:
index- The index to set the value at.value- The allowHeaders to set.- Returns:
- This builder for chaining.
-
addAllowHeaders
Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Parameters:
value- The allowHeaders to add.- Returns:
- This builder for chaining.
-
addAllAllowHeaders
Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Parameters:
values- The allowHeaders to add.- Returns:
- This builder for chaining.
-
clearAllowHeaders
Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Returns:
- This builder for chaining.
-
addAllowHeadersBytes
Specifies the content for Access-Control-Allow-Headers header.
repeated string allow_headers = 4;- Parameters:
value- The bytes of the allowHeaders to add.- Returns:
- This builder for chaining.
-
getExposeHeadersList
public com.google.protobuf.ProtocolStringList getExposeHeadersList()Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Specified by:
getExposeHeadersListin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- A list containing the exposeHeaders.
-
getExposeHeadersCount
public int getExposeHeadersCount()Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Specified by:
getExposeHeadersCountin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The count of exposeHeaders.
-
getExposeHeaders
Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Specified by:
getExposeHeadersin interfaceHttpRoute.CorsPolicyOrBuilder- 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 Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Specified by:
getExposeHeadersBytesin interfaceHttpRoute.CorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the exposeHeaders at the given index.
-
setExposeHeaders
Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Parameters:
index- The index to set the value at.value- The exposeHeaders to set.- Returns:
- This builder for chaining.
-
addExposeHeaders
Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Parameters:
value- The exposeHeaders to add.- Returns:
- This builder for chaining.
-
addAllExposeHeaders
Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Parameters:
values- The exposeHeaders to add.- Returns:
- This builder for chaining.
-
clearExposeHeaders
Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Returns:
- This builder for chaining.
-
addExposeHeadersBytes
Specifies the content for Access-Control-Expose-Headers header.
repeated string expose_headers = 5;- Parameters:
value- The bytes of the exposeHeaders to add.- Returns:
- This builder for chaining.
-
getMaxAge
Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
string max_age = 6;- Specified by:
getMaxAgein interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The maxAge.
-
getMaxAgeBytes
public com.google.protobuf.ByteString getMaxAgeBytes()Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
string max_age = 6;- Specified by:
getMaxAgeBytesin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The bytes for maxAge.
-
setMaxAge
Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
string max_age = 6;- Parameters:
value- The maxAge to set.- Returns:
- This builder for chaining.
-
clearMaxAge
Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
string max_age = 6;- Returns:
- This builder for chaining.
-
setMaxAgeBytes
Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
string max_age = 6;- Parameters:
value- The bytes for maxAge to set.- Returns:
- This builder for chaining.
-
getAllowCredentials
public boolean getAllowCredentials()In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.
bool allow_credentials = 7;- Specified by:
getAllowCredentialsin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The allowCredentials.
-
setAllowCredentials
In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.
bool allow_credentials = 7;- 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 translates to the Access-Control-Allow-Credentials header. Default value is false.
bool allow_credentials = 7;- Returns:
- This builder for chaining.
-
getDisabled
public boolean getDisabled()If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
bool disabled = 8;- Specified by:
getDisabledin interfaceHttpRoute.CorsPolicyOrBuilder- Returns:
- The disabled.
-
setDisabled
If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
bool disabled = 8;- Parameters:
value- The disabled to set.- Returns:
- This builder for chaining.
-
clearDisabled
If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
bool disabled = 8;- Returns:
- This builder for chaining.
-