类 VirtualServiceOuterClass.CorsPolicy.Builder

  • 所有已实现的接口:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, VirtualServiceOuterClass.CorsPolicyOrBuilder, java.lang.Cloneable
    封闭类:
    VirtualServiceOuterClass.CorsPolicy

    public static final class VirtualServiceOuterClass.CorsPolicy.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.CorsPolicy.Builder>
    implements VirtualServiceOuterClass.CorsPolicyOrBuilder
     Describes the Cross-Origin Resource Sharing (CORS) policy, for a given
     service. Refer to [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)
     for further details about cross origin resource sharing. For example,
     the following rule restricts cross origin requests to those originating
     from example.com domain using HTTP POST/GET, and sets the
     `Access-Control-Allow-Credentials` header to false. In addition, it only
     exposes `X-Foo-bar` header and sets an expiry period of 1 day.
     {{<tabset category-name="example">}}
     {{<tab name="v1alpha3" category-value="v1alpha3">}}
     ```yaml
     apiVersion: networking.istio.io/v1alpha3
     kind: VirtualService
     metadata:
       name: ratings-route
     spec:
       hosts:
       - ratings.prod.svc.cluster.local
       http:
       - route:
         - destination:
             host: ratings.prod.svc.cluster.local
             subset: v1
         corsPolicy:
           allowOrigins:
           - exact: https://example.com
           allowMethods:
           - POST
           - GET
           allowCredentials: false
           allowHeaders:
           - X-Foo-Bar
           maxAge: "24h"
     ```
     {{</tab>}}
     {{<tab name="v1beta1" category-value="v1beta1">}}
     ```yaml
     apiVersion: networking.istio.io/v1beta1
     kind: VirtualService
     metadata:
       name: ratings-route
     spec:
       hosts:
       - ratings.prod.svc.cluster.local
       http:
       - route:
         - destination:
             host: ratings.prod.svc.cluster.local
             subset: v1
         corsPolicy:
           allowOrigins:
           - exact: https://example.com
           allowMethods:
           - POST
           - GET
           allowCredentials: false
           allowHeaders:
           - X-Foo-Bar
           maxAge: "24h"
     ```
     {{</tab>}}
     {{</tabset>}}
     
    Protobuf type istio.networking.v1alpha3.CorsPolicy
    • 字段详细资料

      • bitField0_

        private int bitField0_
      • allowOrigin_

        private com.google.protobuf.LazyStringList allowOrigin_
      • allowMethods_

        private com.google.protobuf.LazyStringList allowMethods_
      • allowHeaders_

        private com.google.protobuf.LazyStringList allowHeaders_
      • exposeHeaders_

        private com.google.protobuf.LazyStringList exposeHeaders_
      • maxAge_

        private com.google.protobuf.Duration maxAge_
      • maxAgeBuilder_

        private com.google.protobuf.SingleFieldBuilderV3<com.google.protobuf.Duration,​com.google.protobuf.Duration.Builder,​com.google.protobuf.DurationOrBuilder> maxAgeBuilder_
      • allowCredentials_

        private com.google.protobuf.BoolValue allowCredentials_
      • allowCredentialsBuilder_

        private com.google.protobuf.SingleFieldBuilderV3<com.google.protobuf.BoolValue,​com.google.protobuf.BoolValue.Builder,​com.google.protobuf.BoolValueOrBuilder> allowCredentialsBuilder_
    • 构造器详细资料

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
    • 方法详细资料

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        指定者:
        internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.CorsPolicy.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        指定者:
        getDescriptorForType 在接口中 com.google.protobuf.Message.Builder
        指定者:
        getDescriptorForType 在接口中 com.google.protobuf.MessageOrBuilder
        覆盖:
        getDescriptorForType 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.CorsPolicy.Builder>
      • getDefaultInstanceForType

        public VirtualServiceOuterClass.CorsPolicy getDefaultInstanceForType()
        指定者:
        getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuilder
        指定者:
        getDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilder
      • build

        public VirtualServiceOuterClass.CorsPolicy build()
        指定者:
        build 在接口中 com.google.protobuf.Message.Builder
        指定者:
        build 在接口中 com.google.protobuf.MessageLite.Builder
      • buildPartial

        public VirtualServiceOuterClass.CorsPolicy buildPartial()
        指定者:
        buildPartial 在接口中 com.google.protobuf.Message.Builder
        指定者:
        buildPartial 在接口中 com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        指定者:
        isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilder
        覆盖:
        isInitialized 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.CorsPolicy.Builder>
      • mergeFrom

        public VirtualServiceOuterClass.CorsPolicy.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                              throws java.io.IOException
        指定者:
        mergeFrom 在接口中 com.google.protobuf.Message.Builder
        指定者:
        mergeFrom 在接口中 com.google.protobuf.MessageLite.Builder
        覆盖:
        mergeFrom 在类中 com.google.protobuf.AbstractMessage.Builder<VirtualServiceOuterClass.CorsPolicy.Builder>
        抛出:
        java.io.IOException
      • ensureAllowOriginIsMutable

        private void ensureAllowOriginIsMutable()
      • getAllowOriginList

        @Deprecated
        public com.google.protobuf.ProtocolStringList getAllowOriginList()
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        指定者:
        getAllowOriginList 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        A list containing the allowOrigin.
      • getAllowOriginCount

        @Deprecated
        public int getAllowOriginCount()
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        指定者:
        getAllowOriginCount 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        The count of allowOrigin.
      • getAllowOrigin

        @Deprecated
        public java.lang.String getAllowOrigin​(int index)
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        指定者:
        getAllowOrigin 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the element to return.
        返回:
        The allowOrigin at the given index.
      • getAllowOriginBytes

        @Deprecated
        public com.google.protobuf.ByteString getAllowOriginBytes​(int index)
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        指定者:
        getAllowOriginBytes 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the value to return.
        返回:
        The bytes of the allowOrigin at the given index.
      • setAllowOrigin

        @Deprecated
        public VirtualServiceOuterClass.CorsPolicy.Builder setAllowOrigin​(int index,
                                                                          java.lang.String value)
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        参数:
        index - The index to set the value at.
        value - The allowOrigin to set.
        返回:
        This builder for chaining.
      • addAllowOrigin

        @Deprecated
        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowOrigin​(java.lang.String value)
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        参数:
        value - The allowOrigin to add.
        返回:
        This builder for chaining.
      • addAllAllowOrigin

        @Deprecated
        public VirtualServiceOuterClass.CorsPolicy.Builder addAllAllowOrigin​(java.lang.Iterable<java.lang.String> values)
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        参数:
        values - The allowOrigin to add.
        返回:
        This builder for chaining.
      • clearAllowOrigin

        @Deprecated
        public VirtualServiceOuterClass.CorsPolicy.Builder clearAllowOrigin()
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        返回:
        This builder for chaining.
      • addAllowOriginBytes

        @Deprecated
        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowOriginBytes​(com.google.protobuf.ByteString value)
        已过时。
        istio.networking.v1alpha3.CorsPolicy.allow_origin is deprecated. See networking/v1alpha3/virtual_service.proto;l=1632
         The list of origins that are allowed to perform CORS requests. The
         content will be serialized into the Access-Control-Allow-Origin
         header. Wildcard * will allow all origins.
         $hide_from_docs
         
        repeated string allow_origin = 1 [deprecated = true];
        参数:
        value - The bytes of the allowOrigin to add.
        返回:
        This builder for chaining.
      • ensureAllowOriginsIsMutable

        private void ensureAllowOriginsIsMutable()
      • getAllowOriginsCount

        public int getAllowOriginsCount()
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
        指定者:
        getAllowOriginsCount 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
      • setAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder setAllowOrigins​(int index,
                                                                           VirtualServiceOuterClass.StringMatch value)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • setAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder setAllowOrigins​(int index,
                                                                           VirtualServiceOuterClass.StringMatch.Builder builderForValue)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • addAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowOrigins​(VirtualServiceOuterClass.StringMatch value)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • addAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowOrigins​(int index,
                                                                           VirtualServiceOuterClass.StringMatch value)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • addAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowOrigins​(VirtualServiceOuterClass.StringMatch.Builder builderForValue)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • addAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowOrigins​(int index,
                                                                           VirtualServiceOuterClass.StringMatch.Builder builderForValue)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • addAllAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllAllowOrigins​(java.lang.Iterable<? extends VirtualServiceOuterClass.StringMatch> values)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • clearAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder clearAllowOrigins()
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • removeAllowOrigins

        public VirtualServiceOuterClass.CorsPolicy.Builder removeAllowOrigins​(int index)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • getAllowOriginsBuilder

        public VirtualServiceOuterClass.StringMatch.Builder getAllowOriginsBuilder​(int index)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • addAllowOriginsBuilder

        public VirtualServiceOuterClass.StringMatch.Builder addAllowOriginsBuilder()
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • addAllowOriginsBuilder

        public VirtualServiceOuterClass.StringMatch.Builder addAllowOriginsBuilder​(int index)
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • getAllowOriginsBuilderList

        public java.util.List<VirtualServiceOuterClass.StringMatch.Builder> getAllowOriginsBuilderList()
         String patterns that match allowed origins.
         An origin is allowed if any of the string matchers match.
         If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.
         
        repeated .istio.networking.v1alpha3.StringMatch allow_origins = 7;
      • ensureAllowMethodsIsMutable

        private void ensureAllowMethodsIsMutable()
      • getAllowMethodsList

        public com.google.protobuf.ProtocolStringList getAllowMethodsList()
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        指定者:
        getAllowMethodsList 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        A list containing the allowMethods.
      • getAllowMethodsCount

        public int getAllowMethodsCount()
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        指定者:
        getAllowMethodsCount 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        The count of allowMethods.
      • getAllowMethods

        public java.lang.String getAllowMethods​(int index)
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        指定者:
        getAllowMethods 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the element to return.
        返回:
        The allowMethods at the given index.
      • getAllowMethodsBytes

        public com.google.protobuf.ByteString getAllowMethodsBytes​(int index)
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        指定者:
        getAllowMethodsBytes 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the value to return.
        返回:
        The bytes of the allowMethods at the given index.
      • setAllowMethods

        public VirtualServiceOuterClass.CorsPolicy.Builder setAllowMethods​(int index,
                                                                           java.lang.String value)
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        参数:
        index - The index to set the value at.
        value - The allowMethods to set.
        返回:
        This builder for chaining.
      • addAllowMethods

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowMethods​(java.lang.String value)
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        参数:
        value - The allowMethods to add.
        返回:
        This builder for chaining.
      • addAllAllowMethods

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllAllowMethods​(java.lang.Iterable<java.lang.String> values)
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        参数:
        values - The allowMethods to add.
        返回:
        This builder for chaining.
      • clearAllowMethods

        public VirtualServiceOuterClass.CorsPolicy.Builder clearAllowMethods()
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        返回:
        This builder for chaining.
      • addAllowMethodsBytes

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowMethodsBytes​(com.google.protobuf.ByteString value)
         List of HTTP methods allowed to access the resource. The content will
         be serialized into the Access-Control-Allow-Methods header.
         
        repeated string allow_methods = 2;
        参数:
        value - The bytes of the allowMethods to add.
        返回:
        This builder for chaining.
      • ensureAllowHeadersIsMutable

        private void ensureAllowHeadersIsMutable()
      • getAllowHeadersList

        public com.google.protobuf.ProtocolStringList getAllowHeadersList()
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        指定者:
        getAllowHeadersList 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        A list containing the allowHeaders.
      • getAllowHeadersCount

        public int getAllowHeadersCount()
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        指定者:
        getAllowHeadersCount 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        The count of allowHeaders.
      • getAllowHeaders

        public java.lang.String getAllowHeaders​(int index)
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        指定者:
        getAllowHeaders 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the element to return.
        返回:
        The allowHeaders at the given index.
      • getAllowHeadersBytes

        public com.google.protobuf.ByteString getAllowHeadersBytes​(int index)
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        指定者:
        getAllowHeadersBytes 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the value to return.
        返回:
        The bytes of the allowHeaders at the given index.
      • setAllowHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder setAllowHeaders​(int index,
                                                                           java.lang.String value)
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        参数:
        index - The index to set the value at.
        value - The allowHeaders to set.
        返回:
        This builder for chaining.
      • addAllowHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowHeaders​(java.lang.String value)
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        参数:
        value - The allowHeaders to add.
        返回:
        This builder for chaining.
      • addAllAllowHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllAllowHeaders​(java.lang.Iterable<java.lang.String> values)
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        参数:
        values - The allowHeaders to add.
        返回:
        This builder for chaining.
      • clearAllowHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder clearAllowHeaders()
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        返回:
        This builder for chaining.
      • addAllowHeadersBytes

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllowHeadersBytes​(com.google.protobuf.ByteString value)
         List of HTTP headers that can be used when requesting the
         resource. Serialized to Access-Control-Allow-Headers header.
         
        repeated string allow_headers = 3;
        参数:
        value - The bytes of the allowHeaders to add.
        返回:
        This builder for chaining.
      • ensureExposeHeadersIsMutable

        private void ensureExposeHeadersIsMutable()
      • getExposeHeadersList

        public com.google.protobuf.ProtocolStringList getExposeHeadersList()
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        指定者:
        getExposeHeadersList 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        A list containing the exposeHeaders.
      • getExposeHeadersCount

        public int getExposeHeadersCount()
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        指定者:
        getExposeHeadersCount 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        The count of exposeHeaders.
      • getExposeHeaders

        public java.lang.String getExposeHeaders​(int index)
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        指定者:
        getExposeHeaders 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the element to return.
        返回:
        The exposeHeaders at the given index.
      • getExposeHeadersBytes

        public com.google.protobuf.ByteString getExposeHeadersBytes​(int index)
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        指定者:
        getExposeHeadersBytes 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        参数:
        index - The index of the value to return.
        返回:
        The bytes of the exposeHeaders at the given index.
      • setExposeHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder setExposeHeaders​(int index,
                                                                            java.lang.String value)
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        参数:
        index - The index to set the value at.
        value - The exposeHeaders to set.
        返回:
        This builder for chaining.
      • addExposeHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder addExposeHeaders​(java.lang.String value)
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        参数:
        value - The exposeHeaders to add.
        返回:
        This builder for chaining.
      • addAllExposeHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder addAllExposeHeaders​(java.lang.Iterable<java.lang.String> values)
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        参数:
        values - The exposeHeaders to add.
        返回:
        This builder for chaining.
      • clearExposeHeaders

        public VirtualServiceOuterClass.CorsPolicy.Builder clearExposeHeaders()
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        返回:
        This builder for chaining.
      • addExposeHeadersBytes

        public VirtualServiceOuterClass.CorsPolicy.Builder addExposeHeadersBytes​(com.google.protobuf.ByteString value)
         A list of HTTP headers that the browsers are allowed to
         access. Serialized into Access-Control-Expose-Headers header.
         
        repeated string expose_headers = 4;
        参数:
        value - The bytes of the exposeHeaders to add.
        返回:
        This builder for chaining.
      • hasMaxAge

        public boolean hasMaxAge()
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
        指定者:
        hasMaxAge 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        Whether the maxAge field is set.
      • getMaxAge

        public com.google.protobuf.Duration getMaxAge()
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
        指定者:
        getMaxAge 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        The maxAge.
      • setMaxAge

        public VirtualServiceOuterClass.CorsPolicy.Builder setMaxAge​(com.google.protobuf.Duration value)
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
      • setMaxAge

        public VirtualServiceOuterClass.CorsPolicy.Builder setMaxAge​(com.google.protobuf.Duration.Builder builderForValue)
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
      • mergeMaxAge

        public VirtualServiceOuterClass.CorsPolicy.Builder mergeMaxAge​(com.google.protobuf.Duration value)
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
      • clearMaxAge

        public VirtualServiceOuterClass.CorsPolicy.Builder clearMaxAge()
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
      • getMaxAgeBuilder

        public com.google.protobuf.Duration.Builder getMaxAgeBuilder()
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
      • getMaxAgeOrBuilder

        public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder()
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
        指定者:
        getMaxAgeOrBuilder 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
      • getMaxAgeFieldBuilder

        private com.google.protobuf.SingleFieldBuilderV3<com.google.protobuf.Duration,​com.google.protobuf.Duration.Builder,​com.google.protobuf.DurationOrBuilder> getMaxAgeFieldBuilder()
         Specifies how long the results of a preflight request can be
         cached. Translates to the `Access-Control-Max-Age` header.
         
        .google.protobuf.Duration max_age = 5;
      • hasAllowCredentials

        public boolean hasAllowCredentials()
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
        指定者:
        hasAllowCredentials 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        Whether the allowCredentials field is set.
      • getAllowCredentials

        public com.google.protobuf.BoolValue getAllowCredentials()
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
        指定者:
        getAllowCredentials 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
        返回:
        The allowCredentials.
      • setAllowCredentials

        public VirtualServiceOuterClass.CorsPolicy.Builder setAllowCredentials​(com.google.protobuf.BoolValue value)
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
      • setAllowCredentials

        public VirtualServiceOuterClass.CorsPolicy.Builder setAllowCredentials​(com.google.protobuf.BoolValue.Builder builderForValue)
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
      • mergeAllowCredentials

        public VirtualServiceOuterClass.CorsPolicy.Builder mergeAllowCredentials​(com.google.protobuf.BoolValue value)
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
      • clearAllowCredentials

        public VirtualServiceOuterClass.CorsPolicy.Builder clearAllowCredentials()
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
      • getAllowCredentialsBuilder

        public com.google.protobuf.BoolValue.Builder getAllowCredentialsBuilder()
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
      • getAllowCredentialsOrBuilder

        public com.google.protobuf.BoolValueOrBuilder getAllowCredentialsOrBuilder()
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;
        指定者:
        getAllowCredentialsOrBuilder 在接口中 VirtualServiceOuterClass.CorsPolicyOrBuilder
      • getAllowCredentialsFieldBuilder

        private com.google.protobuf.SingleFieldBuilderV3<com.google.protobuf.BoolValue,​com.google.protobuf.BoolValue.Builder,​com.google.protobuf.BoolValueOrBuilder> getAllowCredentialsFieldBuilder()
         Indicates whether the caller is allowed to send the actual request
         (not the preflight) using credentials. Translates to
         `Access-Control-Allow-Credentials` header.
         
        .google.protobuf.BoolValue allow_credentials = 6;