Class CorsPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
com.google.cloud.compute.v1.CorsPolicy.Builder
All Implemented Interfaces:
CorsPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CorsPolicy

public static final class CorsPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder> implements CorsPolicyOrBuilder
 The specification for allowing client-side cross-origin requests. For more
 information about the W3C recommendation for cross-origin resource sharing
 (CORS), see Fetch API Living
 Standard.
 
Protobuf type google.cloud.compute.v1.CorsPolicy
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
    • clear

      public CorsPolicy.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
    • getDefaultInstanceForType

      public CorsPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public CorsPolicy build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CorsPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CorsPolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CorsPolicy.Builder>
    • mergeFrom

      public CorsPolicy.Builder mergeFrom(CorsPolicy other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<CorsPolicy.Builder>
    • mergeFrom

      public CorsPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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 interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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 interface 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 the Access-Control-Allow-Headers
       header.
       
      repeated string allow_headers = 45179024;
      Specified by:
      getAllowHeadersBytes in interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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 interface 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 the Access-Control-Allow-Methods
       header.
       
      repeated string allow_methods = 205405372;
      Specified by:
      getAllowMethodsBytes in interface CorsPolicyOrBuilder
      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, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Specified by:
      getAllowOriginRegexesList in interface CorsPolicyOrBuilder
      Returns:
      A list containing the allowOriginRegexes.
    • getAllowOriginRegexesCount

      public int getAllowOriginRegexesCount()
       Specifies a regular expression that matches allowed origins. For
       more information, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Specified by:
      getAllowOriginRegexesCount in interface CorsPolicyOrBuilder
      Returns:
      The count of allowOriginRegexes.
    • getAllowOriginRegexes

      public String getAllowOriginRegexes(int index)
       Specifies a regular expression that matches allowed origins. For
       more information, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Specified by:
      getAllowOriginRegexes in interface 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 a regular expression that matches allowed origins. For
       more information, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Specified by:
      getAllowOriginRegexesBytes in interface CorsPolicyOrBuilder
      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, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Parameters:
      index - The index to set the value at.
      value - The allowOriginRegexes to set.
      Returns:
      This builder for chaining.
    • addAllowOriginRegexes

      public CorsPolicy.Builder addAllowOriginRegexes(String value)
       Specifies a regular expression that matches allowed origins. For
       more information, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Parameters:
      value - The allowOriginRegexes to add.
      Returns:
      This builder for chaining.
    • addAllAllowOriginRegexes

      public CorsPolicy.Builder addAllAllowOriginRegexes(Iterable<String> values)
       Specifies a regular expression that matches allowed origins. For
       more information, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Parameters:
      values - The allowOriginRegexes to add.
      Returns:
      This builder for chaining.
    • clearAllowOriginRegexes

      public CorsPolicy.Builder clearAllowOriginRegexes()
       Specifies a regular expression that matches allowed origins. For
       more information, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Returns:
      This builder for chaining.
    • addAllowOriginRegexesBytes

      public CorsPolicy.Builder addAllowOriginRegexesBytes(com.google.protobuf.ByteString value)
       Specifies a regular expression that matches allowed origins. For
       more information, see regular expression syntax.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
      
       Regular expressions can only be used when the loadBalancingScheme is
       set to INTERNAL_SELF_MANAGED.
       
      repeated string allow_origin_regexes = 215385810;
      Parameters:
      value - The bytes of the allowOriginRegexes to add.
      Returns:
      This builder for chaining.
    • getAllowOriginsList

      public com.google.protobuf.ProtocolStringList getAllowOriginsList()
       Specifies the list of origins that is allowed to do CORS requests.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
       
      repeated string allow_origins = 194914071;
      Specified by:
      getAllowOriginsList in interface CorsPolicyOrBuilder
      Returns:
      A list containing the allowOrigins.
    • getAllowOriginsCount

      public int getAllowOriginsCount()
       Specifies the list of origins that is allowed to do CORS requests.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
       
      repeated string allow_origins = 194914071;
      Specified by:
      getAllowOriginsCount in interface CorsPolicyOrBuilder
      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 inallowOrigins or an item inallowOriginRegexes.
       
      repeated string allow_origins = 194914071;
      Specified by:
      getAllowOrigins in interface 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 is allowed to do CORS requests.
      
       An origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.
       
      repeated string allow_origins = 194914071;
      Specified by:
      getAllowOriginsBytes in interface CorsPolicyOrBuilder
      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 inallowOrigins or an item inallowOriginRegexes.
       
      repeated string allow_origins = 194914071;
      Parameters:
      index - The index to set the value at.
      value - The allowOrigins to set.
      Returns:
      This builder for chaining.
    • addAllowOrigins

      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 inallowOrigins or an item inallowOriginRegexes.
       
      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 inallowOrigins or an item inallowOriginRegexes.
       
      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 inallowOrigins or an item inallowOriginRegexes.
       
      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 inallowOrigins or an item inallowOriginRegexes.
       
      repeated string allow_origins = 194914071;
      Parameters:
      value - The bytes of the allowOrigins to add.
      Returns:
      This builder for chaining.
    • hasDisabled

      public boolean hasDisabled()
       If true, disables the CORS policy.
       The default value is false, which indicates that the CORS
       policy is in effect.
       
      optional bool disabled = 270940796;
      Specified by:
      hasDisabled in interface CorsPolicyOrBuilder
      Returns:
      Whether the disabled field is set.
    • getDisabled

      public boolean getDisabled()
       If true, disables the CORS policy.
       The default value is false, which indicates that the CORS
       policy is in effect.
       
      optional bool disabled = 270940796;
      Specified by:
      getDisabled in interface CorsPolicyOrBuilder
      Returns:
      The disabled.
    • setDisabled

      public CorsPolicy.Builder setDisabled(boolean value)
       If true, disables the CORS policy.
       The default value is false, which indicates that the CORS
       policy is in effect.
       
      optional bool disabled = 270940796;
      Parameters:
      value - The disabled to set.
      Returns:
      This builder for chaining.
    • clearDisabled

      public CorsPolicy.Builder clearDisabled()
       If true, disables the CORS policy.
       The default value is false, which indicates that the CORS
       policy is in effect.
       
      optional bool disabled = 270940796;
      Returns:
      This builder for chaining.
    • getExposeHeadersList

      public com.google.protobuf.ProtocolStringList getExposeHeadersList()
       Specifies the content for the Access-Control-Expose-Headers
       header.
       
      repeated string expose_headers = 247604747;
      Specified by:
      getExposeHeadersList in interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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 interface 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 the Access-Control-Expose-Headers
       header.
       
      repeated string expose_headers = 247604747;
      Specified by:
      getExposeHeadersBytes in interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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 interface CorsPolicyOrBuilder
      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.