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.GeneratedMessageV3.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.GeneratedMessageV3.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 typegoogle.cloud.compute.v1.CorsPolicy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CorsPolicy.BuilderaddAllAllowHeaders(Iterable<String> values)Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.BuilderaddAllAllowMethods(Iterable<String> values)Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.BuilderaddAllAllowOriginRegexes(Iterable<String> values)Specifies a regular expression that matches allowed origins.CorsPolicy.BuilderaddAllAllowOrigins(Iterable<String> values)Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.BuilderaddAllExposeHeaders(Iterable<String> values)Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.BuilderaddAllowHeaders(String value)Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.BuilderaddAllowHeadersBytes(com.google.protobuf.ByteString value)Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.BuilderaddAllowMethods(String value)Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.BuilderaddAllowMethodsBytes(com.google.protobuf.ByteString value)Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.BuilderaddAllowOriginRegexes(String value)Specifies a regular expression that matches allowed origins.CorsPolicy.BuilderaddAllowOriginRegexesBytes(com.google.protobuf.ByteString value)Specifies a regular expression that matches allowed origins.CorsPolicy.BuilderaddAllowOrigins(String value)Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.BuilderaddAllowOriginsBytes(com.google.protobuf.ByteString value)Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.BuilderaddExposeHeaders(String value)Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.BuilderaddExposeHeadersBytes(com.google.protobuf.ByteString value)Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)CorsPolicybuild()CorsPolicybuildPartial()CorsPolicy.Builderclear()CorsPolicy.BuilderclearAllowCredentials()In response to a preflight request, setting this to true indicates that the actual request can include user credentials.CorsPolicy.BuilderclearAllowHeaders()Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.BuilderclearAllowMethods()Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.BuilderclearAllowOriginRegexes()Specifies a regular expression that matches allowed origins.CorsPolicy.BuilderclearAllowOrigins()Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.BuilderclearDisabled()If true, the setting specifies the CORS policy is disabled.CorsPolicy.BuilderclearExposeHeaders()Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)CorsPolicy.BuilderclearMaxAge()Specifies how long results of a preflight request can be cached in seconds.CorsPolicy.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)CorsPolicy.Builderclone()booleangetAllowCredentials()In response to a preflight request, setting this to true indicates that the actual request can include user credentials.StringgetAllowHeaders(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.intgetAllowHeadersCount()Specifies the content for the Access-Control-Allow-Headers header.com.google.protobuf.ProtocolStringListgetAllowHeadersList()Specifies the content for the Access-Control-Allow-Headers header.StringgetAllowMethods(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.intgetAllowMethodsCount()Specifies the content for the Access-Control-Allow-Methods header.com.google.protobuf.ProtocolStringListgetAllowMethodsList()Specifies the content for the Access-Control-Allow-Methods header.StringgetAllowOriginRegexes(int index)Specifies a regular expression that matches allowed origins.com.google.protobuf.ByteStringgetAllowOriginRegexesBytes(int index)Specifies a regular expression that matches allowed origins.intgetAllowOriginRegexesCount()Specifies a regular expression that matches allowed origins.com.google.protobuf.ProtocolStringListgetAllowOriginRegexesList()Specifies a regular expression that matches allowed origins.StringgetAllowOrigins(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.intgetAllowOriginsCount()Specifies the list of origins that is allowed to do CORS requests.com.google.protobuf.ProtocolStringListgetAllowOriginsList()Specifies the list of origins that is allowed to do CORS requests.CorsPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()booleangetDisabled()If true, the setting specifies the CORS policy is disabled.StringgetExposeHeaders(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.intgetExposeHeadersCount()Specifies the content for the Access-Control-Expose-Headers header.com.google.protobuf.ProtocolStringListgetExposeHeadersList()Specifies the content for the Access-Control-Expose-Headers header.intgetMaxAge()Specifies how long results of a preflight request can be cached in seconds.booleanhasAllowCredentials()In response to a preflight request, setting this to true indicates that the actual request can include user credentials.booleanhasDisabled()If true, the setting specifies the CORS policy is disabled.booleanhasMaxAge()Specifies how long results of a preflight request can be cached in seconds.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()CorsPolicy.BuildermergeFrom(CorsPolicy other)CorsPolicy.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)CorsPolicy.BuildermergeFrom(com.google.protobuf.Message other)CorsPolicy.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)CorsPolicy.BuildersetAllowCredentials(boolean value)In response to a preflight request, setting this to true indicates that the actual request can include user credentials.CorsPolicy.BuildersetAllowHeaders(int index, String value)Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.BuildersetAllowMethods(int index, String value)Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.BuildersetAllowOriginRegexes(int index, String value)Specifies a regular expression that matches allowed origins.CorsPolicy.BuildersetAllowOrigins(int index, String value)Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.BuildersetDisabled(boolean value)If true, the setting specifies the CORS policy is disabled.CorsPolicy.BuildersetExposeHeaders(int index, String value)Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)CorsPolicy.BuildersetMaxAge(int value)Specifies how long results of a preflight request can be cached in seconds.CorsPolicy.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)CorsPolicy.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
clear
public CorsPolicy.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
getDefaultInstanceForType
public CorsPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public CorsPolicy build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public CorsPolicy buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public CorsPolicy.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
setField
public CorsPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
clearField
public CorsPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
clearOneof
public CorsPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
setRepeatedField
public CorsPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
addRepeatedField
public CorsPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
mergeFrom
public CorsPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CorsPolicy.Builder>
-
mergeFrom
public CorsPolicy.Builder mergeFrom(CorsPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public CorsPolicy.Builder setAllowCredentials(boolean value)
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
public CorsPolicy.Builder 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
public String getAllowHeaders(int index)
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
public CorsPolicy.Builder setAllowHeaders(int index, String value)
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
public CorsPolicy.Builder addAllowHeaders(String value)
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
public CorsPolicy.Builder addAllAllowHeaders(Iterable<String> values)
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
public CorsPolicy.Builder clearAllowHeaders()
Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 45179024;- Returns:
- This builder for chaining.
-
addAllowHeadersBytes
public CorsPolicy.Builder addAllowHeadersBytes(com.google.protobuf.ByteString value)
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
public String getAllowMethods(int index)
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
public CorsPolicy.Builder setAllowMethods(int index, String value)
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
public CorsPolicy.Builder addAllowMethods(String value)
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
public CorsPolicy.Builder addAllAllowMethods(Iterable<String> values)
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
public CorsPolicy.Builder clearAllowMethods()
Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 205405372;- Returns:
- This builder for chaining.
-
addAllowMethodsBytes
public CorsPolicy.Builder addAllowMethodsBytes(com.google.protobuf.ByteString value)
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 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;- 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 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;- Specified by:
getAllowOriginRegexesCountin interfaceCorsPolicyOrBuilder- Returns:
- The count of allowOriginRegexes.
-
getAllowOriginRegexes
public 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;- 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 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;- Specified by:
getAllowOriginRegexesBytesin interfaceCorsPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the allowOriginRegexes at the given index.
-
setAllowOriginRegexes
public CorsPolicy.Builder setAllowOriginRegexes(int index, String value)
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;- Parameters:
index- The index to set the value at.value- The allowOriginRegexes to set.- Returns:
- This builder for chaining.
-
addAllowOriginRegexes
public CorsPolicy.Builder addAllowOriginRegexes(String value)
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;- Parameters:
value- The allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
addAllAllowOriginRegexes
public CorsPolicy.Builder addAllAllowOriginRegexes(Iterable<String> values)
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;- Parameters:
values- The allowOriginRegexes to add.- Returns:
- This builder for chaining.
-
clearAllowOriginRegexes
public CorsPolicy.Builder clearAllowOriginRegexes()
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;- Returns:
- This builder for chaining.
-
addAllowOriginRegexesBytes
public CorsPolicy.Builder addAllowOriginRegexesBytes(com.google.protobuf.ByteString value)
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;- 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 in allowOrigins or an item in allowOriginRegexes.
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 in allowOrigins or an item in allowOriginRegexes.
repeated string allow_origins = 194914071;- Specified by:
getAllowOriginsCountin interfaceCorsPolicyOrBuilder- Returns:
- The count of allowOrigins.
-
getAllowOrigins
public String getAllowOrigins(int index)
Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
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 in allowOrigins or an item in allowOriginRegexes.
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
public CorsPolicy.Builder setAllowOrigins(int index, String value)
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;- Parameters:
index- The index to set the value at.value- The allowOrigins to set.- Returns:
- This builder for chaining.
-
addAllowOrigins
public CorsPolicy.Builder addAllowOrigins(String value)
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;- Parameters:
value- The allowOrigins to add.- Returns:
- This builder for chaining.
-
addAllAllowOrigins
public CorsPolicy.Builder addAllAllowOrigins(Iterable<String> values)
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;- Parameters:
values- The allowOrigins to add.- Returns:
- This builder for chaining.
-
clearAllowOrigins
public CorsPolicy.Builder clearAllowOrigins()
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;- Returns:
- This builder for chaining.
-
addAllowOriginsBytes
public CorsPolicy.Builder addAllowOriginsBytes(com.google.protobuf.ByteString value)
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;- Parameters:
value- The bytes of the allowOrigins to add.- Returns:
- This builder for chaining.
-
hasDisabled
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;- Specified by:
hasDisabledin interfaceCorsPolicyOrBuilder- Returns:
- Whether the disabled field is set.
-
getDisabled
public 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;- Specified by:
getDisabledin interfaceCorsPolicyOrBuilder- Returns:
- The disabled.
-
setDisabled
public CorsPolicy.Builder setDisabled(boolean value)
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;- Parameters:
value- The disabled to set.- Returns:
- This builder for chaining.
-
clearDisabled
public CorsPolicy.Builder clearDisabled()
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;- 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
public String getExposeHeaders(int index)
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
public CorsPolicy.Builder setExposeHeaders(int index, String value)
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
public CorsPolicy.Builder addExposeHeaders(String value)
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
public CorsPolicy.Builder addAllExposeHeaders(Iterable<String> values)
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
public CorsPolicy.Builder clearExposeHeaders()
Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 247604747;- Returns:
- This builder for chaining.
-
addExposeHeadersBytes
public CorsPolicy.Builder addExposeHeadersBytes(com.google.protobuf.ByteString value)
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
public CorsPolicy.Builder setMaxAge(int value)
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
public CorsPolicy.Builder 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.
-
setUnknownFields
public final CorsPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
mergeUnknownFields
public final CorsPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
-