# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::GrpcRoute::Destination (v2.10.1)

2.10.1 (latest) 2.10.0 2.9.0 2.8.0 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.2.0 0.1.0 Reference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::GrpcRoute::Destination.

The destination to which traffic will be routed.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #service_name

    def service_name() -> ::String

**Returns**

- (::String) --- Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.

### #service_name=

    def service_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.
**Returns**

- (::String) --- Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.

### #weight

    def weight() -> ::Integer

**Returns**

- (::Integer) --- 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.

### #weight=

    def weight=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- 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.
**Returns**

- (::Integer) --- 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.