Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
instance_admin_connection.h
Go to the documentation of this file.
1 // Copyright 2021 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/spanner/admin/instance/v1/spanner_instance_admin.proto
18 
19 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INSTANCE_ADMIN_CONNECTION_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INSTANCE_ADMIN_CONNECTION_H
21 
22 #include "google/cloud/spanner/admin/instance_admin_connection_idempotency_policy.h"
23 #include "google/cloud/spanner/admin/internal/instance_admin_stub.h"
24 #include "google/cloud/spanner/admin/retry_traits.h"
25 #include "google/cloud/backoff_policy.h"
26 #include "google/cloud/future.h"
27 #include "google/cloud/options.h"
28 #include "google/cloud/polling_policy.h"
29 #include "google/cloud/status_or.h"
30 #include "google/cloud/stream_range.h"
31 #include "google/cloud/version.h"
32 #include <google/longrunning/operations.grpc.pb.h>
33 #include <memory>
34 
35 namespace google {
36 namespace cloud {
37 namespace spanner_admin {
38 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
39 
40 using InstanceAdminRetryPolicy =
41  ::google::cloud::internal::TraitBasedRetryPolicy<
43 
44 using InstanceAdminLimitedTimeRetryPolicy =
45  ::google::cloud::internal::LimitedTimeRetryPolicy<
47 
48 using InstanceAdminLimitedErrorCountRetryPolicy =
49  ::google::cloud::internal::LimitedErrorCountRetryPolicy<
51 
53  public:
54  virtual ~InstanceAdminConnection() = 0;
55 
56  virtual StreamRange<google::spanner::admin::instance::v1::InstanceConfig>
58  google::spanner::admin::instance::v1::ListInstanceConfigsRequest request);
59 
60  virtual StatusOr<google::spanner::admin::instance::v1::InstanceConfig>
62  google::spanner::admin::instance::v1::GetInstanceConfigRequest const&
63  request);
64 
65  virtual StreamRange<google::spanner::admin::instance::v1::Instance>
67  google::spanner::admin::instance::v1::ListInstancesRequest request);
68 
69  virtual StatusOr<google::spanner::admin::instance::v1::Instance> GetInstance(
70  google::spanner::admin::instance::v1::GetInstanceRequest const& request);
71 
72  virtual future<StatusOr<google::spanner::admin::instance::v1::Instance>>
74  google::spanner::admin::instance::v1::CreateInstanceRequest const&
75  request);
76 
77  virtual future<StatusOr<google::spanner::admin::instance::v1::Instance>>
79  google::spanner::admin::instance::v1::UpdateInstanceRequest const&
80  request);
81 
82  virtual Status DeleteInstance(
83  google::spanner::admin::instance::v1::DeleteInstanceRequest const&
84  request);
85 
86  virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
87  google::iam::v1::SetIamPolicyRequest const& request);
88 
89  virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
90  google::iam::v1::GetIamPolicyRequest const& request);
91 
92  virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
93  TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const& request);
94 };
95 
97  Options options = {});
98 
99 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
100 } // namespace spanner_admin
101 } // namespace cloud
102 } // namespace google
103 
104 namespace google {
105 namespace cloud {
106 namespace spanner_admin_internal {
107 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
108 
109 std::shared_ptr<spanner_admin::InstanceAdminConnection>
110 MakeInstanceAdminConnection(std::shared_ptr<InstanceAdminStub> stub,
111  Options options);
112 
113 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
114 } // namespace spanner_admin_internal
115 } // namespace cloud
116 } // namespace google
117 
118 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INSTANCE_ADMIN_CONNECTION_H