Class GrpcRoute.Destination.Builder

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

public static final class GrpcRoute.Destination.Builder extends com.google.protobuf.GeneratedMessage.Builder<GrpcRoute.Destination.Builder> implements GrpcRoute.DestinationOrBuilder
 The destination to which traffic will be routed.
 
Protobuf type google.cloud.networkservices.v1.GrpcRoute.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<GrpcRoute.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<GrpcRoute.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<GrpcRoute.Destination.Builder>
    • getDefaultInstanceForType

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

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

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

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

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

      public GrpcRoute.Destination.DestinationTypeCase getDestinationTypeCase()
      Specified by:
      getDestinationTypeCase in interface GrpcRoute.DestinationOrBuilder
    • clearDestinationType

      public GrpcRoute.Destination.Builder clearDestinationType()
    • hasServiceName

      public boolean hasServiceName()
       Required. The URL of a destination service to which to route traffic.
       Must refer to either a BackendService or ServiceDirectoryService.
       
      string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      hasServiceName in interface GrpcRoute.DestinationOrBuilder
      Returns:
      Whether the serviceName field is set.
    • getServiceName

      public String getServiceName()
       Required. The URL of a destination service to which to route traffic.
       Must refer to either a BackendService or ServiceDirectoryService.
       
      string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getServiceName in interface GrpcRoute.DestinationOrBuilder
      Returns:
      The serviceName.
    • getServiceNameBytes

      public com.google.protobuf.ByteString getServiceNameBytes()
       Required. The URL of a destination service to which to route traffic.
       Must refer to either a BackendService or ServiceDirectoryService.
       
      string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getServiceNameBytes in interface GrpcRoute.DestinationOrBuilder
      Returns:
      The bytes for serviceName.
    • setServiceName

      public GrpcRoute.Destination.Builder setServiceName(String value)
       Required. The URL of a destination service to which to route traffic.
       Must refer to either a BackendService or ServiceDirectoryService.
       
      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 GrpcRoute.Destination.Builder clearServiceName()
       Required. The URL of a destination service to which to route traffic.
       Must refer to either a BackendService or ServiceDirectoryService.
       
      string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setServiceNameBytes

      public GrpcRoute.Destination.Builder setServiceNameBytes(com.google.protobuf.ByteString value)
       Required. The URL of a destination service to which to route traffic.
       Must refer to either a BackendService or ServiceDirectoryService.
       
      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.
    • hasWeight

      public boolean hasWeight()
       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.
       
      optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasWeight in interface GrpcRoute.DestinationOrBuilder
      Returns:
      Whether the weight field is set.
    • 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.
       
      optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getWeight in interface GrpcRoute.DestinationOrBuilder
      Returns:
      The weight.
    • setWeight

      public GrpcRoute.Destination.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.
       
      optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The weight to set.
      Returns:
      This builder for chaining.
    • clearWeight

      public GrpcRoute.Destination.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.
       
      optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.