Skip to content

Commit 3b67fc9

Browse files
committed
generated code
1 parent 42255e3 commit 3b67fc9

4 files changed

Lines changed: 43 additions & 1 deletion

File tree

generator/integration_tests/golden/v1/golden_rest_only_client.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ GoldenRestOnlyClient::Noop(google::protobuf::Empty const& request, Options opts)
3838
return connection_->Noop(request);
3939
}
4040

41+
StatusOr<google::protobuf::Empty> GoldenRestOnlyClient::WaitForConsistency(google::protobuf::Empty const& request, Options opts) {
42+
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
43+
return connection_->WaitForConsistency(request);
44+
}
45+
4146
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
4247
} // namespace golden_v1
4348
} // namespace cloud

generator/integration_tests/golden/v1/golden_rest_only_client.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,37 @@ class GoldenRestOnlyClient {
109109
Status
110110
Noop(google::protobuf::Empty const& request, Options opts = {});
111111

112+
113+
// clang-format off
114+
///
115+
/// Polls a table until it is consistent or the RetryPolicy is exhausted based
116+
/// on a consistency token, that is, if replication has caught up based on the
117+
/// provided conditions specified in the token and the check request.
118+
///
119+
/// @param request Unary RPCs, such as the one wrapped by this
120+
/// function, receive a single `request` proto message which includes all
121+
/// the inputs for the RPC. In this case, the proto message is a
122+
/// [google.bigtable.admin.v2.CheckConsistencyRequest].
123+
/// Proto messages are converted to C++ classes by Protobuf, using the
124+
/// [Protobuf mapping rules].
125+
/// @param opts Optional. Override the class-level options, such as retry and
126+
/// backoff policies.
127+
/// @return the result of the RPC. The response message type
128+
/// ([google.bigtable.admin.v2.CheckConsistencyResponse])
129+
/// is mapped to a C++ class using the [Protobuf mapping rules].
130+
/// If the request fails, the [`StatusOr`] contains the error details.
131+
///
132+
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
133+
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
134+
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
135+
/// [`future`]: @ref google::cloud::future
136+
/// [`StatusOr`]: @ref google::cloud::StatusOr
137+
/// [`Status`]: @ref google::cloud::Status
138+
/// [google.bigtable.admin.v2.CheckConsistencyRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L909}
139+
/// [google.bigtable.admin.v2.CheckConsistencyResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L948}
140+
///
141+
// clang-format on
142+
StatusOr<google::protobuf::Empty> WaitForConsistency(google::protobuf::Empty const& request, Options opts = {});
112143
private:
113144
std::shared_ptr<GoldenRestOnlyConnection> connection_;
114145
Options options_;

generator/integration_tests/golden/v1/golden_rest_only_connection.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ GoldenRestOnlyConnection::Noop(
4141
return Status(StatusCode::kUnimplemented, "not implemented");
4242
}
4343

44+
StatusOr<google::protobuf::Empty> GoldenRestOnlyConnection::WaitForConsistency(google::protobuf::Empty const&) {
45+
return StatusOr<google::protobuf::Empty>(
46+
Status(StatusCode::kUnimplemented, "not implemented"));
47+
}
48+
4449
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
4550
} // namespace golden_v1
4651
} // namespace cloud

generator/integration_tests/golden/v1/golden_rest_only_connection.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ class GoldenRestOnlyConnection {
176176

177177
virtual Status
178178
Noop(google::protobuf::Empty const& request);
179-
};
179+
180+
virtual StatusOr<google::protobuf::Empty> WaitForConsistency(google::protobuf::Empty const& request);};
180181

181182
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
182183
} // namespace golden_v1

0 commit comments

Comments
 (0)