Class HttpRoute.Destination.Builder

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

public static final class HttpRoute.Destination.Builder extends com.google.protobuf.GeneratedMessage.Builder<HttpRoute.Destination.Builder> implements HttpRoute.DestinationOrBuilder
 Specifications of a destination to which the request should be routed to.
 
Protobuf type google.cloud.networkservices.v1.HttpRoute.Destination
  • 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.Destination.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.Destination.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.Destination.Builder>
    • getDefaultInstanceForType

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

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

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

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

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

      public String getServiceName()
       The URL of a BackendService to route traffic to.
       
      string service_name = 1 [(.google.api.resource_reference) = { ... }
      Specified by:
      getServiceName in interface HttpRoute.DestinationOrBuilder
      Returns:
      The serviceName.
    • getServiceNameBytes

      public com.google.protobuf.ByteString getServiceNameBytes()
       The URL of a BackendService to route traffic to.
       
      string service_name = 1 [(.google.api.resource_reference) = { ... }
      Specified by:
      getServiceNameBytes in interface HttpRoute.DestinationOrBuilder
      Returns:
      The bytes for serviceName.
    • setServiceName

      public HttpRoute.Destination.Builder setServiceName(String value)
       The URL of a BackendService to route traffic to.
       
      string service_name = 1 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The serviceName to set.
      Returns:
      This builder for chaining.
    • clearServiceName

      public HttpRoute.Destination.Builder clearServiceName()
       The URL of a BackendService to route traffic to.
       
      string service_name = 1 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setServiceNameBytes

      public HttpRoute.Destination.Builder setServiceNameBytes(com.google.protobuf.ByteString value)
       The URL of a BackendService to route traffic to.
       
      string service_name = 1 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for serviceName to set.
      Returns:
      This builder for chaining.
    • getWeight

      public int getWeight()
       Specifies the proportion of requests forwarded to the backend referenced
       by the serviceName field. This is computed as:
       - weight/Sum(weights in this destination list).
       For non-zero values, there may be some epsilon from the exact proportion
       defined here depending on the precision an implementation supports.
      
       If only one serviceName is specified and it has a weight greater than 0,
       100% of the traffic is forwarded to that backend.
      
       If weights are specified for any one service name, they need to be
       specified for all of them.
      
       If weights are unspecified for all services, then, traffic is distributed
       in equal proportions to all of them.
       
      int32 weight = 2;
      Specified by:
      getWeight in interface HttpRoute.DestinationOrBuilder
      Returns:
      The weight.
    • setWeight

      public HttpRoute.Destination.Builder setWeight(int value)
       Specifies the proportion of requests forwarded to the backend referenced
       by the serviceName field. This is computed as:
       - weight/Sum(weights in this destination list).
       For non-zero values, there may be some epsilon from the exact proportion
       defined here depending on the precision an implementation supports.
      
       If only one serviceName is specified and it has a weight greater than 0,
       100% of the traffic is forwarded to that backend.
      
       If weights are specified for any one service name, they need to be
       specified for all of them.
      
       If weights are unspecified for all services, then, traffic is distributed
       in equal proportions to all of them.
       
      int32 weight = 2;
      Parameters:
      value - The weight to set.
      Returns:
      This builder for chaining.
    • clearWeight

      public HttpRoute.Destination.Builder clearWeight()
       Specifies the proportion of requests forwarded to the backend referenced
       by the serviceName field. This is computed as:
       - weight/Sum(weights in this destination list).
       For non-zero values, there may be some epsilon from the exact proportion
       defined here depending on the precision an implementation supports.
      
       If only one serviceName is specified and it has a weight greater than 0,
       100% of the traffic is forwarded to that backend.
      
       If weights are specified for any one service name, they need to be
       specified for all of them.
      
       If weights are unspecified for all services, then, traffic is distributed
       in equal proportions to all of them.
       
      int32 weight = 2;
      Returns:
      This builder for chaining.
    • hasRequestHeaderModifier

      public boolean hasRequestHeaderModifier()
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasRequestHeaderModifier in interface HttpRoute.DestinationOrBuilder
      Returns:
      Whether the requestHeaderModifier field is set.
    • getRequestHeaderModifier

      public HttpRoute.HeaderModifier getRequestHeaderModifier()
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequestHeaderModifier in interface HttpRoute.DestinationOrBuilder
      Returns:
      The requestHeaderModifier.
    • setRequestHeaderModifier

      public HttpRoute.Destination.Builder setRequestHeaderModifier(HttpRoute.HeaderModifier value)
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setRequestHeaderModifier

      public HttpRoute.Destination.Builder setRequestHeaderModifier(HttpRoute.HeaderModifier.Builder builderForValue)
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
    • mergeRequestHeaderModifier

      public HttpRoute.Destination.Builder mergeRequestHeaderModifier(HttpRoute.HeaderModifier value)
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearRequestHeaderModifier

      public HttpRoute.Destination.Builder clearRequestHeaderModifier()
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getRequestHeaderModifierBuilder

      public HttpRoute.HeaderModifier.Builder getRequestHeaderModifierBuilder()
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getRequestHeaderModifierOrBuilder

      public HttpRoute.HeaderModifierOrBuilder getRequestHeaderModifierOrBuilder()
       Optional. The specification for modifying the headers of a matching
       request prior to delivery of the request to the destination. If
       HeaderModifiers are set on both the Destination and the RouteAction, they
       will be merged. Conflicts between the two will not be resolved on the
       configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequestHeaderModifierOrBuilder in interface HttpRoute.DestinationOrBuilder
    • hasResponseHeaderModifier

      public boolean hasResponseHeaderModifier()
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasResponseHeaderModifier in interface HttpRoute.DestinationOrBuilder
      Returns:
      Whether the responseHeaderModifier field is set.
    • getResponseHeaderModifier

      public HttpRoute.HeaderModifier getResponseHeaderModifier()
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseHeaderModifier in interface HttpRoute.DestinationOrBuilder
      Returns:
      The responseHeaderModifier.
    • setResponseHeaderModifier

      public HttpRoute.Destination.Builder setResponseHeaderModifier(HttpRoute.HeaderModifier value)
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
    • setResponseHeaderModifier

      public HttpRoute.Destination.Builder setResponseHeaderModifier(HttpRoute.HeaderModifier.Builder builderForValue)
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
    • mergeResponseHeaderModifier

      public HttpRoute.Destination.Builder mergeResponseHeaderModifier(HttpRoute.HeaderModifier value)
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
    • clearResponseHeaderModifier

      public HttpRoute.Destination.Builder clearResponseHeaderModifier()
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getResponseHeaderModifierBuilder

      public HttpRoute.HeaderModifier.Builder getResponseHeaderModifierBuilder()
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getResponseHeaderModifierOrBuilder

      public HttpRoute.HeaderModifierOrBuilder getResponseHeaderModifierOrBuilder()
       Optional. The specification for modifying the headers of a response prior
       to sending the response back to the client. If HeaderModifiers are set on
       both the Destination and the RouteAction, they will be merged. Conflicts
       between the two will not be resolved on the configuration.
       
      .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseHeaderModifierOrBuilder in interface HttpRoute.DestinationOrBuilder