Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
changelogs_connection.h
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Generated by the Codegen C++ plugin.
16// If you make any local changes, they will be lost.
17// source: google/cloud/dialogflow/cx/v3/changelog.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_CHANGELOGS_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_CHANGELOGS_CONNECTION_H
21
22#include "google/cloud/dialogflow_cx/changelogs_connection_idempotency_policy.h"
23#include "google/cloud/dialogflow_cx/internal/changelogs_retry_traits.h"
24#include "google/cloud/backoff_policy.h"
25#include "google/cloud/options.h"
26#include "google/cloud/status_or.h"
27#include "google/cloud/stream_range.h"
28#include "google/cloud/version.h"
29#include <google/cloud/dialogflow/cx/v3/changelog.pb.h>
30#include <memory>
31#include <string>
32
33namespace google {
34namespace cloud {
35namespace dialogflow_cx {
36GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
37
38using ChangelogsRetryPolicy = ::google::cloud::internal::TraitBasedRetryPolicy<
39 dialogflow_cx_internal::ChangelogsRetryTraits>;
40
41using ChangelogsLimitedTimeRetryPolicy =
42 ::google::cloud::internal::LimitedTimeRetryPolicy<
43 dialogflow_cx_internal::ChangelogsRetryTraits>;
44
45using ChangelogsLimitedErrorCountRetryPolicy =
46 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
47 dialogflow_cx_internal::ChangelogsRetryTraits>;
48
49/**
50 * The `ChangelogsConnection` object for `ChangelogsClient`.
51 *
52 * This interface defines virtual methods for each of the user-facing overload
53 * sets in `ChangelogsClient`. This allows users to inject custom behavior
54 * (e.g., with a Google Mock object) when writing tests that use objects of type
55 * `ChangelogsClient`.
56 *
57 * To create a concrete instance, see `MakeChangelogsConnection()`.
58 *
59 * For mocking, see `dialogflow_cx_mocks::MockChangelogsConnection`.
60 */
62 public:
63 virtual ~ChangelogsConnection() = 0;
64
65 virtual Options options() { return Options{}; }
66
67 virtual StreamRange<google::cloud::dialogflow::cx::v3::Changelog>
69 google::cloud::dialogflow::cx::v3::ListChangelogsRequest request);
70
71 virtual StatusOr<google::cloud::dialogflow::cx::v3::Changelog> GetChangelog(
72 google::cloud::dialogflow::cx::v3::GetChangelogRequest const& request);
73};
74
75/**
76 * A factory function to construct an object of type `ChangelogsConnection`.
77 *
78 * The returned connection object should not be used directly; instead it
79 * should be passed as an argument to the constructor of ChangelogsClient.
80 *
81 * The optional @p options argument may be used to configure aspects of the
82 * returned `ChangelogsConnection`. Expected options are any of the types in
83 * the following option lists:
84 *
85 * - `google::cloud::CommonOptionList`
86 * - `google::cloud::GrpcOptionList`
87 * - `google::cloud::UnifiedCredentialsOptionList`
88 * - `google::cloud::dialogflow_cx::ChangelogsPolicyOptionList`
89 *
90 * @note Unexpected options will be ignored. To log unexpected options instead,
91 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
92 *
93 * @param location Sets the prefix for the default `EndpointOption` value.
94 * @param options (optional) Configure the `ChangelogsConnection` created by
95 * this function.
96 */
98 std::string const& location, Options options = {});
99
100/**
101 * A backwards-compatible version of the previous factory function. Unless
102 * the service also offers a global endpoint, the default value of the
103 * `EndpointOption` may be useless, in which case it must be overridden.
104 *
105 * @deprecated Please use the `location` overload instead.
106 */
108 Options options = {});
109
110GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
111} // namespace dialogflow_cx
112} // namespace cloud
113} // namespace google
114
115#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_CHANGELOGS_CONNECTION_H
The ChangelogsConnection object for ChangelogsClient.
Definition: changelogs_connection.h:61
virtual StreamRange< google::cloud::dialogflow::cx::v3::Changelog > ListChangelogs(google::cloud::dialogflow::cx::v3::ListChangelogsRequest request)
virtual StatusOr< google::cloud::dialogflow::cx::v3::Changelog > GetChangelog(google::cloud::dialogflow::cx::v3::GetChangelogRequest const &request)
virtual Options options()
Definition: changelogs_connection.h:65
Definition: agents_client.h:33
std::shared_ptr< ChangelogsConnection > MakeChangelogsConnection(std::string const &location, Options options={})
A factory function to construct an object of type ChangelogsConnection.
std::shared_ptr< ChangelogsConnection > MakeChangelogsConnection(Options options={})
A backwards-compatible version of the previous factory function.