Class HttpRoute.CorsPolicy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.networkservices.v1.HttpRoute.CorsPolicy
All Implemented Interfaces:
HttpRoute.CorsPolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
HttpRoute

public static final class HttpRoute.CorsPolicy extends com.google.protobuf.GeneratedMessage implements HttpRoute.CorsPolicyOrBuilder
 The Specification for allowing client side cross-origin requests.
 
Protobuf type google.cloud.networkservices.v1.HttpRoute.CorsPolicy
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    The Specification for allowing client side cross-origin requests.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
    In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
    getAllowHeaders(int index)
    Specifies the content for Access-Control-Allow-Headers header.
    com.google.protobuf.ByteString
    Specifies the content for Access-Control-Allow-Headers header.
    int
    Specifies the content for Access-Control-Allow-Headers header.
    com.google.protobuf.ProtocolStringList
    Specifies the content for Access-Control-Allow-Headers header.
    getAllowMethods(int index)
    Specifies the content for Access-Control-Allow-Methods header.
    com.google.protobuf.ByteString
    Specifies the content for Access-Control-Allow-Methods header.
    int
    Specifies the content for Access-Control-Allow-Methods header.
    com.google.protobuf.ProtocolStringList
    Specifies the content for Access-Control-Allow-Methods header.
    Specifies the regular expression patterns that match allowed origins.
    com.google.protobuf.ByteString
    Specifies the regular expression patterns that match allowed origins.
    int
    Specifies the regular expression patterns that match allowed origins.
    com.google.protobuf.ProtocolStringList
    Specifies the regular expression patterns that match allowed origins.
    getAllowOrigins(int index)
    Specifies the list of origins that will be allowed to do CORS requests.
    com.google.protobuf.ByteString
    Specifies the list of origins that will be allowed to do CORS requests.
    int
    Specifies the list of origins that will be allowed to do CORS requests.
    com.google.protobuf.ProtocolStringList
    Specifies the list of origins that will be allowed to do CORS requests.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    boolean
    If true, the CORS policy is disabled.
    getExposeHeaders(int index)
    Specifies the content for Access-Control-Expose-Headers header.
    com.google.protobuf.ByteString
    Specifies the content for Access-Control-Expose-Headers header.
    int
    Specifies the content for Access-Control-Expose-Headers header.
    com.google.protobuf.ProtocolStringList
    Specifies the content for Access-Control-Expose-Headers header.
    Specifies how long result of a preflight request can be cached in seconds.
    com.google.protobuf.ByteString
    Specifies how long result of a preflight request can be cached in seconds.
    com.google.protobuf.Parser<HttpRoute.CorsPolicy>
     
    int
     
    int
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<HttpRoute.CorsPolicy>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • ALLOW_ORIGINS_FIELD_NUMBER

      public static final int ALLOW_ORIGINS_FIELD_NUMBER
      See Also:
    • ALLOW_ORIGIN_REGEXES_FIELD_NUMBER

      public static final int ALLOW_ORIGIN_REGEXES_FIELD_NUMBER
      See Also:
    • ALLOW_METHODS_FIELD_NUMBER

      public static final int ALLOW_METHODS_FIELD_NUMBER
      See Also:
    • ALLOW_HEADERS_FIELD_NUMBER

      public static final int ALLOW_HEADERS_FIELD_NUMBER
      See Also:
    • EXPOSE_HEADERS_FIELD_NUMBER

      public static final int EXPOSE_HEADERS_FIELD_NUMBER
      See Also:
    • MAX_AGE_FIELD_NUMBER

      public static final int MAX_AGE_FIELD_NUMBER
      See Also:
    • ALLOW_CREDENTIALS_FIELD_NUMBER

      public static final int ALLOW_CREDENTIALS_FIELD_NUMBER
      See Also:
    • DISABLED_FIELD_NUMBER

      public static final int DISABLED_FIELD_NUMBER
      See Also:
  • 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
    • getAllowOriginsList

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

      public int getAllowOriginsCount()
       Specifies the list of origins that will be allowed to do CORS requests.
       An origin is allowed if it matches either an item in allow_origins or
       an item in allow_origin_regexes.
       
      repeated string allow_origins = 1;
      Specified by:
      getAllowOriginsCount in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The count of allowOrigins.
    • getAllowOrigins

      public String getAllowOrigins(int index)
       Specifies the list of origins that will be allowed to do CORS requests.
       An origin is allowed if it matches either an item in allow_origins or
       an item in allow_origin_regexes.
       
      repeated string allow_origins = 1;
      Specified by:
      getAllowOrigins in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowOrigins at the given index.
    • getAllowOriginsBytes

      public com.google.protobuf.ByteString getAllowOriginsBytes(int index)
       Specifies the list of origins that will be allowed to do CORS requests.
       An origin is allowed if it matches either an item in allow_origins or
       an item in allow_origin_regexes.
       
      repeated string allow_origins = 1;
      Specified by:
      getAllowOriginsBytes in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowOrigins at the given index.
    • getAllowOriginRegexesList

      public com.google.protobuf.ProtocolStringList getAllowOriginRegexesList()
       Specifies the regular expression patterns that match allowed origins. For
       regular expression grammar, please see
       https://github.com/google/re2/wiki/Syntax.
       
      repeated string allow_origin_regexes = 2;
      Specified by:
      getAllowOriginRegexesList in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      A list containing the allowOriginRegexes.
    • getAllowOriginRegexesCount

      public int getAllowOriginRegexesCount()
       Specifies the regular expression patterns that match allowed origins. For
       regular expression grammar, please see
       https://github.com/google/re2/wiki/Syntax.
       
      repeated string allow_origin_regexes = 2;
      Specified by:
      getAllowOriginRegexesCount in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The count of allowOriginRegexes.
    • getAllowOriginRegexes

      public String getAllowOriginRegexes(int index)
       Specifies the regular expression patterns that match allowed origins. For
       regular expression grammar, please see
       https://github.com/google/re2/wiki/Syntax.
       
      repeated string allow_origin_regexes = 2;
      Specified by:
      getAllowOriginRegexes in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowOriginRegexes at the given index.
    • getAllowOriginRegexesBytes

      public com.google.protobuf.ByteString getAllowOriginRegexesBytes(int index)
       Specifies the regular expression patterns that match allowed origins. For
       regular expression grammar, please see
       https://github.com/google/re2/wiki/Syntax.
       
      repeated string allow_origin_regexes = 2;
      Specified by:
      getAllowOriginRegexesBytes in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowOriginRegexes at the given index.
    • getAllowMethodsList

      public com.google.protobuf.ProtocolStringList getAllowMethodsList()
       Specifies the content for Access-Control-Allow-Methods header.
       
      repeated string allow_methods = 3;
      Specified by:
      getAllowMethodsList in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      A list containing the allowMethods.
    • getAllowMethodsCount

      public int getAllowMethodsCount()
       Specifies the content for Access-Control-Allow-Methods header.
       
      repeated string allow_methods = 3;
      Specified by:
      getAllowMethodsCount in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The count of allowMethods.
    • getAllowMethods

      public String getAllowMethods(int index)
       Specifies the content for Access-Control-Allow-Methods header.
       
      repeated string allow_methods = 3;
      Specified by:
      getAllowMethods in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowMethods at the given index.
    • getAllowMethodsBytes

      public com.google.protobuf.ByteString getAllowMethodsBytes(int index)
       Specifies the content for Access-Control-Allow-Methods header.
       
      repeated string allow_methods = 3;
      Specified by:
      getAllowMethodsBytes in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowMethods at the given index.
    • getAllowHeadersList

      public com.google.protobuf.ProtocolStringList getAllowHeadersList()
       Specifies the content for Access-Control-Allow-Headers header.
       
      repeated string allow_headers = 4;
      Specified by:
      getAllowHeadersList in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      A list containing the allowHeaders.
    • getAllowHeadersCount

      public int getAllowHeadersCount()
       Specifies the content for Access-Control-Allow-Headers header.
       
      repeated string allow_headers = 4;
      Specified by:
      getAllowHeadersCount in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The count of allowHeaders.
    • getAllowHeaders

      public String getAllowHeaders(int index)
       Specifies the content for Access-Control-Allow-Headers header.
       
      repeated string allow_headers = 4;
      Specified by:
      getAllowHeaders in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowHeaders at the given index.
    • getAllowHeadersBytes

      public com.google.protobuf.ByteString getAllowHeadersBytes(int index)
       Specifies the content for Access-Control-Allow-Headers header.
       
      repeated string allow_headers = 4;
      Specified by:
      getAllowHeadersBytes in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowHeaders at the given index.
    • getExposeHeadersList

      public com.google.protobuf.ProtocolStringList getExposeHeadersList()
       Specifies the content for Access-Control-Expose-Headers header.
       
      repeated string expose_headers = 5;
      Specified by:
      getExposeHeadersList in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      A list containing the exposeHeaders.
    • getExposeHeadersCount

      public int getExposeHeadersCount()
       Specifies the content for Access-Control-Expose-Headers header.
       
      repeated string expose_headers = 5;
      Specified by:
      getExposeHeadersCount in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The count of exposeHeaders.
    • getExposeHeaders

      public String getExposeHeaders(int index)
       Specifies the content for Access-Control-Expose-Headers header.
       
      repeated string expose_headers = 5;
      Specified by:
      getExposeHeaders in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The exposeHeaders at the given index.
    • getExposeHeadersBytes

      public com.google.protobuf.ByteString getExposeHeadersBytes(int index)
       Specifies the content for Access-Control-Expose-Headers header.
       
      repeated string expose_headers = 5;
      Specified by:
      getExposeHeadersBytes in interface HttpRoute.CorsPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the exposeHeaders at the given index.
    • getMaxAge

      public String getMaxAge()
       Specifies how long result of a preflight request can be cached in
       seconds. This translates to the Access-Control-Max-Age header.
       
      string max_age = 6;
      Specified by:
      getMaxAge in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The maxAge.
    • getMaxAgeBytes

      public com.google.protobuf.ByteString getMaxAgeBytes()
       Specifies how long result of a preflight request can be cached in
       seconds. This translates to the Access-Control-Max-Age header.
       
      string max_age = 6;
      Specified by:
      getMaxAgeBytes in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The bytes for maxAge.
    • getAllowCredentials

      public boolean getAllowCredentials()
       In response to a preflight request, setting this to true indicates that
       the actual request can include user credentials. This translates to the
       Access-Control-Allow-Credentials header.
      
       Default value is false.
       
      bool allow_credentials = 7;
      Specified by:
      getAllowCredentials in interface HttpRoute.CorsPolicyOrBuilder
      Returns:
      The allowCredentials.
    • getDisabled

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

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static HttpRoute.CorsPolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static HttpRoute.CorsPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HttpRoute.CorsPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public HttpRoute.CorsPolicy.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static HttpRoute.CorsPolicy.Builder newBuilder()
    • newBuilder

      public static HttpRoute.CorsPolicy.Builder newBuilder(HttpRoute.CorsPolicy prototype)
    • toBuilder

      public HttpRoute.CorsPolicy.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected HttpRoute.CorsPolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static HttpRoute.CorsPolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<HttpRoute.CorsPolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<HttpRoute.CorsPolicy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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