This shows how to override the retry policies for dialogflow_cx::SecuritySettingsServiceClient:
auto options =
.
set<google::cloud::dialogflow_cx::
SecuritySettingsServiceConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
SecuritySettingsServiceRetryPolicyOption>(
SecuritySettingsServiceLimitedErrorCountRetryPolicy(3)
.clone())
SecuritySettingsServiceBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
options);
auto c1 =
auto c2 =
.
set<google::cloud::dialogflow_cx::
SecuritySettingsServiceRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
Options & set(ValueTypeT< T > v)
Service for managing security settings for Dialogflow.
Definition: security_settings_client.h:61
Definition: agents_client.h:33
::google::cloud::internal::LimitedTimeRetryPolicy< dialogflow_cx_internal::SecuritySettingsServiceRetryTraits > SecuritySettingsServiceLimitedTimeRetryPolicy
Definition: security_settings_connection.h:44
std::shared_ptr< SecuritySettingsServiceConnection > MakeSecuritySettingsServiceConnection(std::string const &location, Options options={})
A factory function to construct an object of type SecuritySettingsServiceConnection.
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
class CustomIdempotencyPolicy
SecuritySettingsServiceConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::dialogflow_cx::
SecuritySettingsServiceConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};