How to Override the Default Endpoint

In some cases, you may need to override the default endpoint used by the client library. Use the EndpointOption when initializing the client library to change this default.

For example, this will override the default endpoint for policysimulator_v1::SimulatorClient:

  // This configuration is common with Private Google Access:
  auto options = google::cloud::Options{}.set<google::cloud::EndpointOption>(
  auto client = google::cloud::policysimulator_v1::SimulatorClient(