/// <summary>Snippet for ResolveService</summary>
 public void ResolveServiceRequestObject()
 {
     // Snippet: ResolveService(ResolveServiceRequest, CallSettings)
     // Create client
     LookupServiceClient lookupServiceClient = LookupServiceClient.Create();
     // Initialize request argument(s)
     ResolveServiceRequest request = new ResolveServiceRequest
     {
         ServiceName    = ServiceName.FromProjectLocationNamespaceService("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]"),
         MaxEndpoints   = 0,
         EndpointFilter = "",
     };
     // Make the request
     ResolveServiceResponse response = lookupServiceClient.ResolveService(request);
     // End snippet
 }
    public Service ResolveService(
        string projectId   = "my-project",
        string locationId  = "us-east1",
        string namespaceId = "test-namespace",
        string serviceId   = "test-service")
    {
        // Create client
        LookupServiceClient lookupServiceClient = LookupServiceClient.Create();
        // Initialize request argument(s)
        ResolveServiceRequest request = new ResolveServiceRequest
        {
            ServiceName = ServiceName.FromProjectLocationNamespaceService(projectId, locationId, namespaceId, serviceId),
        };
        // Make the request
        ResolveServiceResponse response = lookupServiceClient.ResolveService(request);

        return(response.Service);
    }