Class TcpRoute.RouteDestination.Builder

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

public static final class TcpRoute.RouteDestination.Builder extends com.google.protobuf.GeneratedMessage.Builder<TcpRoute.RouteDestination.Builder> implements TcpRoute.RouteDestinationOrBuilder
 Describe the destination for traffic to be routed to.
 
Protobuf type google.cloud.networkservices.v1.TcpRoute.RouteDestination
  • 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<TcpRoute.RouteDestination.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<TcpRoute.RouteDestination.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<TcpRoute.RouteDestination.Builder>
    • getDefaultInstanceForType

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

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

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

      public TcpRoute.RouteDestination.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<TcpRoute.RouteDestination.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<TcpRoute.RouteDestination.Builder>
    • mergeFrom

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

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

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

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

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

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

      public int getWeight()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getWeight in interface TcpRoute.RouteDestinationOrBuilder
      Returns:
      The weight.
    • setWeight

      public TcpRoute.RouteDestination.Builder setWeight(int value)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The weight to set.
      Returns:
      This builder for chaining.
    • clearWeight

      public TcpRoute.RouteDestination.Builder clearWeight()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.