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.Builder
addAllAllowHeaders(Iterable<String> values)
Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.Builder
addAllAllowMethods(Iterable<String> values)
Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.Builder
addAllAllowOriginRegexes(Iterable<String> values)
Specifies a regular expression that matches allowed origins.CorsPolicy.Builder
addAllAllowOrigins(Iterable<String> values)
Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.Builder
addAllExposeHeaders(Iterable<String> values)
Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.Builder
addAllowHeaders(String value)
Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.Builder
addAllowHeadersBytes(com.google.protobuf.ByteString value)
Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.Builder
addAllowMethods(String value)
Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.Builder
addAllowMethodsBytes(com.google.protobuf.ByteString value)
Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.Builder
addAllowOriginRegexes(String value)
Specifies a regular expression that matches allowed origins.CorsPolicy.Builder
addAllowOriginRegexesBytes(com.google.protobuf.ByteString value)
Specifies a regular expression that matches allowed origins.CorsPolicy.Builder
addAllowOrigins(String value)
Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.Builder
addAllowOriginsBytes(com.google.protobuf.ByteString value)
Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.Builder
addExposeHeaders(String value)
Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.Builder
addExposeHeadersBytes(com.google.protobuf.ByteString value)
Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
CorsPolicy
build()
CorsPolicy
buildPartial()
CorsPolicy.Builder
clear()
CorsPolicy.Builder
clearAllowCredentials()
In response to a preflight request, setting this to true indicates that the actual request can include user credentials.CorsPolicy.Builder
clearAllowHeaders()
Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.Builder
clearAllowMethods()
Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.Builder
clearAllowOriginRegexes()
Specifies a regular expression that matches allowed origins.CorsPolicy.Builder
clearAllowOrigins()
Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.Builder
clearDisabled()
If true, the setting specifies the CORS policy is disabled.CorsPolicy.Builder
clearExposeHeaders()
Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
CorsPolicy.Builder
clearMaxAge()
Specifies how long results of a preflight request can be cached in seconds.CorsPolicy.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
CorsPolicy.Builder
clone()
boolean
getAllowCredentials()
In response to a preflight request, setting this to true indicates that the actual request can include user credentials.String
getAllowHeaders(int index)
Specifies the content for the Access-Control-Allow-Headers header.com.google.protobuf.ByteString
getAllowHeadersBytes(int index)
Specifies the content for the Access-Control-Allow-Headers header.int
getAllowHeadersCount()
Specifies the content for the Access-Control-Allow-Headers header.com.google.protobuf.ProtocolStringList
getAllowHeadersList()
Specifies the content for the Access-Control-Allow-Headers header.String
getAllowMethods(int index)
Specifies the content for the Access-Control-Allow-Methods header.com.google.protobuf.ByteString
getAllowMethodsBytes(int index)
Specifies the content for the Access-Control-Allow-Methods header.int
getAllowMethodsCount()
Specifies the content for the Access-Control-Allow-Methods header.com.google.protobuf.ProtocolStringList
getAllowMethodsList()
Specifies the content for the Access-Control-Allow-Methods header.String
getAllowOriginRegexes(int index)
Specifies a regular expression that matches allowed origins.com.google.protobuf.ByteString
getAllowOriginRegexesBytes(int index)
Specifies a regular expression that matches allowed origins.int
getAllowOriginRegexesCount()
Specifies a regular expression that matches allowed origins.com.google.protobuf.ProtocolStringList
getAllowOriginRegexesList()
Specifies a regular expression that matches allowed origins.String
getAllowOrigins(int index)
Specifies the list of origins that is allowed to do CORS requests.com.google.protobuf.ByteString
getAllowOriginsBytes(int index)
Specifies the list of origins that is allowed to do CORS requests.int
getAllowOriginsCount()
Specifies the list of origins that is allowed to do CORS requests.com.google.protobuf.ProtocolStringList
getAllowOriginsList()
Specifies the list of origins that is allowed to do CORS requests.CorsPolicy
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
boolean
getDisabled()
If true, the setting specifies the CORS policy is disabled.String
getExposeHeaders(int index)
Specifies the content for the Access-Control-Expose-Headers header.com.google.protobuf.ByteString
getExposeHeadersBytes(int index)
Specifies the content for the Access-Control-Expose-Headers header.int
getExposeHeadersCount()
Specifies the content for the Access-Control-Expose-Headers header.com.google.protobuf.ProtocolStringList
getExposeHeadersList()
Specifies the content for the Access-Control-Expose-Headers header.int
getMaxAge()
Specifies how long results of a preflight request can be cached in seconds.boolean
hasAllowCredentials()
In response to a preflight request, setting this to true indicates that the actual request can include user credentials.boolean
hasDisabled()
If true, the setting specifies the CORS policy is disabled.boolean
hasMaxAge()
Specifies how long results of a preflight request can be cached in seconds.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
CorsPolicy.Builder
mergeFrom(CorsPolicy other)
CorsPolicy.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
CorsPolicy.Builder
mergeFrom(com.google.protobuf.Message other)
CorsPolicy.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
CorsPolicy.Builder
setAllowCredentials(boolean value)
In response to a preflight request, setting this to true indicates that the actual request can include user credentials.CorsPolicy.Builder
setAllowHeaders(int index, String value)
Specifies the content for the Access-Control-Allow-Headers header.CorsPolicy.Builder
setAllowMethods(int index, String value)
Specifies the content for the Access-Control-Allow-Methods header.CorsPolicy.Builder
setAllowOriginRegexes(int index, String value)
Specifies a regular expression that matches allowed origins.CorsPolicy.Builder
setAllowOrigins(int index, String value)
Specifies the list of origins that is allowed to do CORS requests.CorsPolicy.Builder
setDisabled(boolean value)
If true, the setting specifies the CORS policy is disabled.CorsPolicy.Builder
setExposeHeaders(int index, String value)
Specifies the content for the Access-Control-Expose-Headers header.CorsPolicy.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
CorsPolicy.Builder
setMaxAge(int value)
Specifies how long results of a preflight request can be cached in seconds.CorsPolicy.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
CorsPolicy.Builder
setUnknownFields(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
clear
public CorsPolicy.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
getDefaultInstanceForType
public CorsPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public CorsPolicy build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public CorsPolicy buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public CorsPolicy.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
setField
public CorsPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
clearField
public CorsPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
clearOneof
public CorsPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
setRepeatedField
public CorsPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
addRepeatedField
public CorsPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
mergeFrom
public CorsPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<CorsPolicy.Builder>
-
mergeFrom
public CorsPolicy.Builder mergeFrom(CorsPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
hasAllowCredentials
in 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:
getAllowCredentials
in 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:
getAllowHeadersList
in 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:
getAllowHeadersCount
in 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:
getAllowHeaders
in 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:
getAllowHeadersBytes
in 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:
getAllowMethodsList
in 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:
getAllowMethodsCount
in 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:
getAllowMethods
in 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:
getAllowMethodsBytes
in 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:
getAllowOriginRegexesList
in 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:
getAllowOriginRegexesCount
in 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:
getAllowOriginRegexes
in 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:
getAllowOriginRegexesBytes
in 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:
getAllowOriginsList
in 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:
getAllowOriginsCount
in 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:
getAllowOrigins
in 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:
getAllowOriginsBytes
in 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:
hasDisabled
in 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:
getDisabled
in 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:
getExposeHeadersList
in 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:
getExposeHeadersCount
in 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:
getExposeHeaders
in 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:
getExposeHeadersBytes
in 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:
hasMaxAge
in 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:
getMaxAge
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
mergeUnknownFields
public final CorsPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<CorsPolicy.Builder>
-
-