Class GrpcRoute.Destination

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

public static final class GrpcRoute.Destination extends com.google.protobuf.GeneratedMessage implements GrpcRoute.DestinationOrBuilder
 The destination to which traffic will be routed.
 
Protobuf type google.cloud.networkservices.v1.GrpcRoute.Destination
See Also:
  • Field Details

  • 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
    • getDestinationTypeCase

      public GrpcRoute.Destination.DestinationTypeCase getDestinationTypeCase()
      Specified by:
      getDestinationTypeCase in interface GrpcRoute.DestinationOrBuilder
    • 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.
    • 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.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static GrpcRoute.Destination parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GrpcRoute.Destination parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GrpcRoute.Destination parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GrpcRoute.Destination parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static GrpcRoute.Destination.Builder newBuilder()
    • newBuilder

      public static GrpcRoute.Destination.Builder newBuilder(GrpcRoute.Destination prototype)
    • toBuilder

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

      protected GrpcRoute.Destination.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static GrpcRoute.Destination getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<GrpcRoute.Destination> parser()
    • getParserForType

      public com.google.protobuf.Parser<GrpcRoute.Destination> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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