Class HttpRoute.Redirect.Builder

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

public static final class HttpRoute.Redirect.Builder extends com.google.protobuf.GeneratedMessage.Builder<HttpRoute.Redirect.Builder> implements HttpRoute.RedirectOrBuilder
 The specification for redirecting traffic.
 
Protobuf type google.cloud.networkservices.v1.HttpRoute.Redirect
  • 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<HttpRoute.Redirect.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<HttpRoute.Redirect.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<HttpRoute.Redirect.Builder>
    • getDefaultInstanceForType

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

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

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

      public HttpRoute.Redirect.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<HttpRoute.Redirect.Builder>
    • mergeFrom

    • isInitialized

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

      public HttpRoute.Redirect.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<HttpRoute.Redirect.Builder>
      Throws:
      IOException
    • getHostRedirect

      public String getHostRedirect()
       The host that will be used in the redirect response instead of the one
       that was supplied in the request.
       
      string host_redirect = 1;
      Specified by:
      getHostRedirect in interface HttpRoute.RedirectOrBuilder
      Returns:
      The hostRedirect.
    • getHostRedirectBytes

      public com.google.protobuf.ByteString getHostRedirectBytes()
       The host that will be used in the redirect response instead of the one
       that was supplied in the request.
       
      string host_redirect = 1;
      Specified by:
      getHostRedirectBytes in interface HttpRoute.RedirectOrBuilder
      Returns:
      The bytes for hostRedirect.
    • setHostRedirect

      public HttpRoute.Redirect.Builder setHostRedirect(String value)
       The host that will be used in the redirect response instead of the one
       that was supplied in the request.
       
      string host_redirect = 1;
      Parameters:
      value - The hostRedirect to set.
      Returns:
      This builder for chaining.
    • clearHostRedirect

      public HttpRoute.Redirect.Builder clearHostRedirect()
       The host that will be used in the redirect response instead of the one
       that was supplied in the request.
       
      string host_redirect = 1;
      Returns:
      This builder for chaining.
    • setHostRedirectBytes

      public HttpRoute.Redirect.Builder setHostRedirectBytes(com.google.protobuf.ByteString value)
       The host that will be used in the redirect response instead of the one
       that was supplied in the request.
       
      string host_redirect = 1;
      Parameters:
      value - The bytes for hostRedirect to set.
      Returns:
      This builder for chaining.
    • getPathRedirect

      public String getPathRedirect()
       The path that will be used in the redirect response instead of the one
       that was supplied in the request.
       path_redirect can not be supplied together with prefix_redirect. Supply
       one alone or neither. If neither is supplied, the path of the original
       request will be used for the redirect.
       
      string path_redirect = 2;
      Specified by:
      getPathRedirect in interface HttpRoute.RedirectOrBuilder
      Returns:
      The pathRedirect.
    • getPathRedirectBytes

      public com.google.protobuf.ByteString getPathRedirectBytes()
       The path that will be used in the redirect response instead of the one
       that was supplied in the request.
       path_redirect can not be supplied together with prefix_redirect. Supply
       one alone or neither. If neither is supplied, the path of the original
       request will be used for the redirect.
       
      string path_redirect = 2;
      Specified by:
      getPathRedirectBytes in interface HttpRoute.RedirectOrBuilder
      Returns:
      The bytes for pathRedirect.
    • setPathRedirect

      public HttpRoute.Redirect.Builder setPathRedirect(String value)
       The path that will be used in the redirect response instead of the one
       that was supplied in the request.
       path_redirect can not be supplied together with prefix_redirect. Supply
       one alone or neither. If neither is supplied, the path of the original
       request will be used for the redirect.
       
      string path_redirect = 2;
      Parameters:
      value - The pathRedirect to set.
      Returns:
      This builder for chaining.
    • clearPathRedirect

      public HttpRoute.Redirect.Builder clearPathRedirect()
       The path that will be used in the redirect response instead of the one
       that was supplied in the request.
       path_redirect can not be supplied together with prefix_redirect. Supply
       one alone or neither. If neither is supplied, the path of the original
       request will be used for the redirect.
       
      string path_redirect = 2;
      Returns:
      This builder for chaining.
    • setPathRedirectBytes

      public HttpRoute.Redirect.Builder setPathRedirectBytes(com.google.protobuf.ByteString value)
       The path that will be used in the redirect response instead of the one
       that was supplied in the request.
       path_redirect can not be supplied together with prefix_redirect. Supply
       one alone or neither. If neither is supplied, the path of the original
       request will be used for the redirect.
       
      string path_redirect = 2;
      Parameters:
      value - The bytes for pathRedirect to set.
      Returns:
      This builder for chaining.
    • getPrefixRewrite

      public String getPrefixRewrite()
       Indicates that during redirection, the matched prefix (or path) should be
       swapped with this value. This option allows URLs be dynamically created
       based on the request.
       
      string prefix_rewrite = 3;
      Specified by:
      getPrefixRewrite in interface HttpRoute.RedirectOrBuilder
      Returns:
      The prefixRewrite.
    • getPrefixRewriteBytes

      public com.google.protobuf.ByteString getPrefixRewriteBytes()
       Indicates that during redirection, the matched prefix (or path) should be
       swapped with this value. This option allows URLs be dynamically created
       based on the request.
       
      string prefix_rewrite = 3;
      Specified by:
      getPrefixRewriteBytes in interface HttpRoute.RedirectOrBuilder
      Returns:
      The bytes for prefixRewrite.
    • setPrefixRewrite

      public HttpRoute.Redirect.Builder setPrefixRewrite(String value)
       Indicates that during redirection, the matched prefix (or path) should be
       swapped with this value. This option allows URLs be dynamically created
       based on the request.
       
      string prefix_rewrite = 3;
      Parameters:
      value - The prefixRewrite to set.
      Returns:
      This builder for chaining.
    • clearPrefixRewrite

      public HttpRoute.Redirect.Builder clearPrefixRewrite()
       Indicates that during redirection, the matched prefix (or path) should be
       swapped with this value. This option allows URLs be dynamically created
       based on the request.
       
      string prefix_rewrite = 3;
      Returns:
      This builder for chaining.
    • setPrefixRewriteBytes

      public HttpRoute.Redirect.Builder setPrefixRewriteBytes(com.google.protobuf.ByteString value)
       Indicates that during redirection, the matched prefix (or path) should be
       swapped with this value. This option allows URLs be dynamically created
       based on the request.
       
      string prefix_rewrite = 3;
      Parameters:
      value - The bytes for prefixRewrite to set.
      Returns:
      This builder for chaining.
    • getResponseCodeValue

      public int getResponseCodeValue()
       The HTTP Status code to use for the redirect.
       
      .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;
      Specified by:
      getResponseCodeValue in interface HttpRoute.RedirectOrBuilder
      Returns:
      The enum numeric value on the wire for responseCode.
    • setResponseCodeValue

      public HttpRoute.Redirect.Builder setResponseCodeValue(int value)
       The HTTP Status code to use for the redirect.
       
      .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;
      Parameters:
      value - The enum numeric value on the wire for responseCode to set.
      Returns:
      This builder for chaining.
    • getResponseCode

      public HttpRoute.Redirect.ResponseCode getResponseCode()
       The HTTP Status code to use for the redirect.
       
      .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;
      Specified by:
      getResponseCode in interface HttpRoute.RedirectOrBuilder
      Returns:
      The responseCode.
    • setResponseCode

       The HTTP Status code to use for the redirect.
       
      .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;
      Parameters:
      value - The responseCode to set.
      Returns:
      This builder for chaining.
    • clearResponseCode

      public HttpRoute.Redirect.Builder clearResponseCode()
       The HTTP Status code to use for the redirect.
       
      .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;
      Returns:
      This builder for chaining.
    • getHttpsRedirect

      public boolean getHttpsRedirect()
       If set to true, the URL scheme in the redirected request is set to https.
       If set to false, the URL scheme of the redirected request will remain the
       same as that of the request.
      
       The default is set to false.
       
      bool https_redirect = 5;
      Specified by:
      getHttpsRedirect in interface HttpRoute.RedirectOrBuilder
      Returns:
      The httpsRedirect.
    • setHttpsRedirect

      public HttpRoute.Redirect.Builder setHttpsRedirect(boolean value)
       If set to true, the URL scheme in the redirected request is set to https.
       If set to false, the URL scheme of the redirected request will remain the
       same as that of the request.
      
       The default is set to false.
       
      bool https_redirect = 5;
      Parameters:
      value - The httpsRedirect to set.
      Returns:
      This builder for chaining.
    • clearHttpsRedirect

      public HttpRoute.Redirect.Builder clearHttpsRedirect()
       If set to true, the URL scheme in the redirected request is set to https.
       If set to false, the URL scheme of the redirected request will remain the
       same as that of the request.
      
       The default is set to false.
       
      bool https_redirect = 5;
      Returns:
      This builder for chaining.
    • getStripQuery

      public boolean getStripQuery()
       if set to true, any accompanying query portion of the original URL is
       removed prior to redirecting the request. If set to false, the query
       portion of the original URL is retained.
      
       The default is set to false.
       
      bool strip_query = 6;
      Specified by:
      getStripQuery in interface HttpRoute.RedirectOrBuilder
      Returns:
      The stripQuery.
    • setStripQuery

      public HttpRoute.Redirect.Builder setStripQuery(boolean value)
       if set to true, any accompanying query portion of the original URL is
       removed prior to redirecting the request. If set to false, the query
       portion of the original URL is retained.
      
       The default is set to false.
       
      bool strip_query = 6;
      Parameters:
      value - The stripQuery to set.
      Returns:
      This builder for chaining.
    • clearStripQuery

      public HttpRoute.Redirect.Builder clearStripQuery()
       if set to true, any accompanying query portion of the original URL is
       removed prior to redirecting the request. If set to false, the query
       portion of the original URL is retained.
      
       The default is set to false.
       
      bool strip_query = 6;
      Returns:
      This builder for chaining.
    • getPortRedirect

      public int getPortRedirect()
       The port that will be used in the redirected request instead of the one
       that was supplied in the request.
       
      int32 port_redirect = 7;
      Specified by:
      getPortRedirect in interface HttpRoute.RedirectOrBuilder
      Returns:
      The portRedirect.
    • setPortRedirect

      public HttpRoute.Redirect.Builder setPortRedirect(int value)
       The port that will be used in the redirected request instead of the one
       that was supplied in the request.
       
      int32 port_redirect = 7;
      Parameters:
      value - The portRedirect to set.
      Returns:
      This builder for chaining.
    • clearPortRedirect

      public HttpRoute.Redirect.Builder clearPortRedirect()
       The port that will be used in the redirected request instead of the one
       that was supplied in the request.
       
      int32 port_redirect = 7;
      Returns:
      This builder for chaining.