Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
mock_agents_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/agent.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_MOCKS_MOCK_AGENTS_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_MOCKS_MOCK_AGENTS_CONNECTION_H
21
22#include "google/cloud/dialogflow_cx/agents_connection.h"
23#include <gmock/gmock.h>
24
25namespace google {
26namespace cloud {
27namespace dialogflow_cx_mocks {
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30/**
31 * A class to mock `AgentsConnection`.
32 *
33 * Application developers may want to test their code with simulated responses,
34 * including errors, from an object of type `AgentsClient`. To do so,
35 * construct an object of type `AgentsClient` with an instance of this
36 * class. Then use the Google Test framework functions to program the behavior
37 * of this mock.
38 *
39 * @see [This example][bq-mock] for how to test your application with GoogleTest.
40 * While the example showcases types from the BigQuery library, the underlying
41 * principles apply for any pair of `*Client` and `*Connection`.
42 *
43 * [bq-mock]: @cloud_cpp_docs_link{bigquery,bigquery-read-mock}
44 */
46 public:
47 MOCK_METHOD(Options, options, (), (override));
48
49 MOCK_METHOD(StreamRange<google::cloud::dialogflow::cx::v3::Agent>, ListAgents,
50 (google::cloud::dialogflow::cx::v3::ListAgentsRequest request),
51 (override));
52
53 MOCK_METHOD(
54 StatusOr<google::cloud::dialogflow::cx::v3::Agent>, GetAgent,
55 (google::cloud::dialogflow::cx::v3::GetAgentRequest const& request),
56 (override));
57
58 MOCK_METHOD(
59 StatusOr<google::cloud::dialogflow::cx::v3::Agent>, CreateAgent,
60 (google::cloud::dialogflow::cx::v3::CreateAgentRequest const& request),
61 (override));
62
63 MOCK_METHOD(
64 StatusOr<google::cloud::dialogflow::cx::v3::Agent>, UpdateAgent,
65 (google::cloud::dialogflow::cx::v3::UpdateAgentRequest const& request),
66 (override));
67
68 MOCK_METHOD(
69 Status, DeleteAgent,
70 (google::cloud::dialogflow::cx::v3::DeleteAgentRequest const& request),
71 (override));
72
73 MOCK_METHOD(
74 future<StatusOr<google::cloud::dialogflow::cx::v3::ExportAgentResponse>>,
75 ExportAgent,
76 (google::cloud::dialogflow::cx::v3::ExportAgentRequest const& request),
77 (override));
78
79 MOCK_METHOD(
80 future<StatusOr<google::protobuf::Struct>>, RestoreAgent,
81 (google::cloud::dialogflow::cx::v3::RestoreAgentRequest const& request),
82 (override));
83
84 MOCK_METHOD(
85 StatusOr<google::cloud::dialogflow::cx::v3::AgentValidationResult>,
86 ValidateAgent,
87 (google::cloud::dialogflow::cx::v3::ValidateAgentRequest const& request),
88 (override));
89
90 MOCK_METHOD(
91 StatusOr<google::cloud::dialogflow::cx::v3::AgentValidationResult>,
92 GetAgentValidationResult,
93 (google::cloud::dialogflow::cx::v3::GetAgentValidationResultRequest const&
94 request),
95 (override));
96};
97
98GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
99} // namespace dialogflow_cx_mocks
100} // namespace cloud
101} // namespace google
102
103#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_MOCKS_MOCK_AGENTS_CONNECTION_H
The AgentsConnection object for AgentsClient.
Definition: agents_connection.h:65
A class to mock AgentsConnection.
Definition: mock_agents_connection.h:45
friend friend class future
Definition: mock_agents_connection.h:27
Definition: agents_client.h:33