类 VirtualServiceOuterClass.HTTPRedirect.Builder

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

    public static final class VirtualServiceOuterClass.HTTPRedirect.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.HTTPRedirect.Builder>
    implements VirtualServiceOuterClass.HTTPRedirectOrBuilder
     HTTPRedirect can be used to send a 301 redirect response to the caller,
     where the Authority/Host and the URI in the response can be swapped with
     the specified values. For example, the following rule redirects
     requests for /v1/getProductRatings API on the ratings service to
     /v1/bookRatings provided by the bookratings service.
     {{<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:
       - match:
         - uri:
             exact: /v1/getProductRatings
         redirect:
           uri: /v1/bookRatings
           authority: newratings.default.svc.cluster.local
       ...
     ```
     {{</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:
       - match:
         - uri:
             exact: /v1/getProductRatings
         redirect:
           uri: /v1/bookRatings
           authority: newratings.default.svc.cluster.local
       ...
     ```
     {{</tab>}}
     {{</tabset>}}
     
    Protobuf type istio.networking.v1alpha3.HTTPRedirect
    • 字段详细资料

      • uri_

        private java.lang.Object uri_
      • authority_

        private java.lang.Object authority_
      • redirectCode_

        private int redirectCode_
    • 构造器详细资料

      • 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.HTTPRedirect.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.HTTPRedirect.Builder>
      • getDefaultInstanceForType

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

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

        public VirtualServiceOuterClass.HTTPRedirect 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.HTTPRedirect.Builder>
      • mergeFrom

        public VirtualServiceOuterClass.HTTPRedirect.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.HTTPRedirect.Builder>
        抛出:
        java.io.IOException
      • getUri

        public java.lang.String getUri()
         On a redirect, overwrite the Path portion of the URL with this
         value. Note that the entire path will be replaced, irrespective of the
         request URI being matched as an exact path or prefix.
         
        string uri = 1;
        指定者:
        getUri 在接口中 VirtualServiceOuterClass.HTTPRedirectOrBuilder
        返回:
        The uri.
      • getUriBytes

        public com.google.protobuf.ByteString getUriBytes()
         On a redirect, overwrite the Path portion of the URL with this
         value. Note that the entire path will be replaced, irrespective of the
         request URI being matched as an exact path or prefix.
         
        string uri = 1;
        指定者:
        getUriBytes 在接口中 VirtualServiceOuterClass.HTTPRedirectOrBuilder
        返回:
        The bytes for uri.
      • setUri

        public VirtualServiceOuterClass.HTTPRedirect.Builder setUri​(java.lang.String value)
         On a redirect, overwrite the Path portion of the URL with this
         value. Note that the entire path will be replaced, irrespective of the
         request URI being matched as an exact path or prefix.
         
        string uri = 1;
        参数:
        value - The uri to set.
        返回:
        This builder for chaining.
      • clearUri

        public VirtualServiceOuterClass.HTTPRedirect.Builder clearUri()
         On a redirect, overwrite the Path portion of the URL with this
         value. Note that the entire path will be replaced, irrespective of the
         request URI being matched as an exact path or prefix.
         
        string uri = 1;
        返回:
        This builder for chaining.
      • setUriBytes

        public VirtualServiceOuterClass.HTTPRedirect.Builder setUriBytes​(com.google.protobuf.ByteString value)
         On a redirect, overwrite the Path portion of the URL with this
         value. Note that the entire path will be replaced, irrespective of the
         request URI being matched as an exact path or prefix.
         
        string uri = 1;
        参数:
        value - The bytes for uri to set.
        返回:
        This builder for chaining.
      • setAuthority

        public VirtualServiceOuterClass.HTTPRedirect.Builder setAuthority​(java.lang.String value)
         On a redirect, overwrite the Authority/Host portion of the URL with
         this value.
         
        string authority = 2;
        参数:
        value - The authority to set.
        返回:
        This builder for chaining.
      • clearAuthority

        public VirtualServiceOuterClass.HTTPRedirect.Builder clearAuthority()
         On a redirect, overwrite the Authority/Host portion of the URL with
         this value.
         
        string authority = 2;
        返回:
        This builder for chaining.
      • setAuthorityBytes

        public VirtualServiceOuterClass.HTTPRedirect.Builder setAuthorityBytes​(com.google.protobuf.ByteString value)
         On a redirect, overwrite the Authority/Host portion of the URL with
         this value.
         
        string authority = 2;
        参数:
        value - The bytes for authority to set.
        返回:
        This builder for chaining.
      • getRedirectCode

        public int getRedirectCode()
         On a redirect, Specifies the HTTP status code to use in the redirect
         response. The default response code is MOVED_PERMANENTLY (301).
         
        uint32 redirect_code = 3;
        指定者:
        getRedirectCode 在接口中 VirtualServiceOuterClass.HTTPRedirectOrBuilder
        返回:
        The redirectCode.
      • setRedirectCode

        public VirtualServiceOuterClass.HTTPRedirect.Builder setRedirectCode​(int value)
         On a redirect, Specifies the HTTP status code to use in the redirect
         response. The default response code is MOVED_PERMANENTLY (301).
         
        uint32 redirect_code = 3;
        参数:
        value - The redirectCode to set.
        返回:
        This builder for chaining.
      • clearRedirectCode

        public VirtualServiceOuterClass.HTTPRedirect.Builder clearRedirectCode()
         On a redirect, Specifies the HTTP status code to use in the redirect
         response. The default response code is MOVED_PERMANENTLY (301).
         
        uint32 redirect_code = 3;
        返回:
        This builder for chaining.