/*!
@page discoveryengine-override-authentication How to Override the Authentication Credentials

Unless otherwise configured, the client libraries use
[Application Default Credentials] to authenticate with Google Cloud Services.
While this works for most applications, in some cases you may need to override
this default. You can do so by providing the
[UnifiedCredentialsOption](@ref google::cloud::UnifiedCredentialsOption)
The following example shows how to explicitly load a service account key file:

<!-- inject-service-account-snippet-start -->
@snippet completion_client_samples.cc with-service-account

Follow these links to find examples for other \c *Client classes:

- [\c discoveryengine_v1::CompletionServiceClient](@ref discoveryengine_v1::CompletionServiceClient-service-account-snippet)
- [\c discoveryengine_v1::ControlServiceClient](@ref discoveryengine_v1::ControlServiceClient-service-account-snippet)
- [\c discoveryengine_v1::ConversationalSearchServiceClient](@ref discoveryengine_v1::ConversationalSearchServiceClient-service-account-snippet)
- [\c discoveryengine_v1::DataStoreServiceClient](@ref discoveryengine_v1::DataStoreServiceClient-service-account-snippet)
- [\c discoveryengine_v1::DocumentServiceClient](@ref discoveryengine_v1::DocumentServiceClient-service-account-snippet)
- [\c discoveryengine_v1::EngineServiceClient](@ref discoveryengine_v1::EngineServiceClient-service-account-snippet)
- [\c discoveryengine_v1::GroundedGenerationServiceClient](@ref discoveryengine_v1::GroundedGenerationServiceClient-service-account-snippet)
- [\c discoveryengine_v1::ProjectServiceClient](@ref discoveryengine_v1::ProjectServiceClient-service-account-snippet)
- [\c discoveryengine_v1::RankServiceClient](@ref discoveryengine_v1::RankServiceClient-service-account-snippet)
- [\c discoveryengine_v1::RecommendationServiceClient](@ref discoveryengine_v1::RecommendationServiceClient-service-account-snippet)
- [\c discoveryengine_v1::SchemaServiceClient](@ref discoveryengine_v1::SchemaServiceClient-service-account-snippet)
- [\c discoveryengine_v1::SearchServiceClient](@ref discoveryengine_v1::SearchServiceClient-service-account-snippet)
- [\c discoveryengine_v1::SiteSearchEngineServiceClient](@ref discoveryengine_v1::SiteSearchEngineServiceClient-service-account-snippet)
- [\c discoveryengine_v1::UserEventServiceClient](@ref discoveryengine_v1::UserEventServiceClient-service-account-snippet)

<!-- inject-service-account-snippet-end -->

Keep in mind that we chose this as an example because it is relatively easy to
understand. Consult the [Best practices for managing service account keys]
guide for more details.

@see @ref guac - for more information on the factory functions to create
`google::cloud::Credentials` objects.

[Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys
[Application Default Credentials]: https://cloud.google.com/docs/authentication#adc

*/

// <!-- inject-authentication-pages-start -->

/*! @page discoveryengine_v1::CompletionServiceClient-service-account-snippet Override discoveryengine_v1::CompletionServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/completion_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::ControlServiceClient-service-account-snippet Override discoveryengine_v1::ControlServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/control_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::ConversationalSearchServiceClient-service-account-snippet Override discoveryengine_v1::ConversationalSearchServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/conversational_search_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::DataStoreServiceClient-service-account-snippet Override discoveryengine_v1::DataStoreServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/data_store_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::DocumentServiceClient-service-account-snippet Override discoveryengine_v1::DocumentServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/document_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::EngineServiceClient-service-account-snippet Override discoveryengine_v1::EngineServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/engine_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::GroundedGenerationServiceClient-service-account-snippet Override discoveryengine_v1::GroundedGenerationServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/grounded_generation_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::ProjectServiceClient-service-account-snippet Override discoveryengine_v1::ProjectServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/project_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::RankServiceClient-service-account-snippet Override discoveryengine_v1::RankServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/rank_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::RecommendationServiceClient-service-account-snippet Override discoveryengine_v1::RecommendationServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/recommendation_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::SchemaServiceClient-service-account-snippet Override discoveryengine_v1::SchemaServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/schema_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::SearchServiceClient-service-account-snippet Override discoveryengine_v1::SearchServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/search_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::SiteSearchEngineServiceClient-service-account-snippet Override discoveryengine_v1::SiteSearchEngineServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/site_search_engine_client_samples.cc with-service-account

*/

/*! @page discoveryengine_v1::UserEventServiceClient-service-account-snippet Override discoveryengine_v1::UserEventServiceClient Authentication Defaults

@snippet google/cloud/discoveryengine/v1/samples/user_event_client_samples.cc with-service-account

*/
// <!-- inject-authentication-pages-end -->
