Google Cloud Service Directory V1 Client - Class ResolveServiceRequest (1.1.2)

Reference documentation and code samples for the Google Cloud Service Directory V1 Client class ResolveServiceRequest.

The request message for LookupService.ResolveService.

Looks up a service by its name, returns the service and its endpoints.

Generated from protobuf message google.cloud.servicedirectory.v1.ResolveServiceRequest

Namespace

Google \ Cloud \ ServiceDirectory \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. The name of the service to resolve.

↳ max_endpoints int

Optional. The maximum number of endpoints to return. Defaults to 25. Maximum is 100. If a value less than one is specified, the Default is used. If a value greater than the Maximum is specified, the Maximum is used.

↳ endpoint_filter string

Optional. The filter applied to the endpoints of the resolved service. General filter string syntax:

getName

Required. The name of the service to resolve.

Returns
TypeDescription
string

setName

Required. The name of the service to resolve.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMaxEndpoints

Optional. The maximum number of endpoints to return. Defaults to 25.

Maximum is 100. If a value less than one is specified, the Default is used. If a value greater than the Maximum is specified, the Maximum is used.

Returns
TypeDescription
int

setMaxEndpoints

Optional. The maximum number of endpoints to return. Defaults to 25.

Maximum is 100. If a value less than one is specified, the Default is used. If a value greater than the Maximum is specified, the Maximum is used.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getEndpointFilter

Optional. The filter applied to the endpoints of the resolved service.

General filter string syntax:

  • "metadata.owner" returns Endpoints that have a label with the key "owner", this is the same as "metadata:owner"
  • "metadata.protocol=gRPC" returns Endpoints that have key/value "protocol=gRPC"
  • "metadata.owner!=sd AND metadata.foo=bar" returns Endpoints that have "owner" field in metadata with a value that is not "sd" AND have the key/value foo=bar.
Returns
TypeDescription
string

setEndpointFilter

Optional. The filter applied to the endpoints of the resolved service.

General filter string syntax:

  • "metadata.owner" returns Endpoints that have a label with the key "owner", this is the same as "metadata:owner"
  • "metadata.protocol=gRPC" returns Endpoints that have key/value "protocol=gRPC"
  • "metadata.owner!=sd AND metadata.foo=bar" returns Endpoints that have "owner" field in metadata with a value that is not "sd" AND have the key/value foo=bar.
Parameter
NameDescription
var string
Returns
TypeDescription
$this