Class TlsRoute.RouteDestination.Builder

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

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

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

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

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

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

      public TlsRoute.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<TlsRoute.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 TlsRoute.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 TlsRoute.RouteDestinationOrBuilder
      Returns:
      The bytes for serviceName.
    • setServiceName

      public TlsRoute.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 TlsRoute.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 TlsRoute.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 service_name field. This is computed as:
       - weight/Sum(weights in destinations)
       Weights in all destinations does not need to sum up to 100.
       
      int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getWeight in interface TlsRoute.RouteDestinationOrBuilder
      Returns:
      The weight.
    • setWeight

      public TlsRoute.RouteDestination.Builder setWeight(int value)
       Optional. Specifies the proportion of requests forwarded to the backend
       referenced by the service_name field. This is computed as:
       - weight/Sum(weights in destinations)
       Weights in all destinations does not need to sum up to 100.
       
      int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The weight to set.
      Returns:
      This builder for chaining.
    • clearWeight

      public TlsRoute.RouteDestination.Builder clearWeight()
       Optional. Specifies the proportion of requests forwarded to the backend
       referenced by the service_name field. This is computed as:
       - weight/Sum(weights in destinations)
       Weights in all destinations does not need to sum up to 100.
       
      int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.