Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
instance_admin_metadata_decorator.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_INTERNAL_INSTANCE_ADMIN_METADATA_DECORATOR_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_METADATA_DECORATOR_H
21 
22 #include "google/cloud/spanner/admin/internal/instance_admin_stub.h"
23 #include "google/cloud/version.h"
24 #include <google/longrunning/operations.grpc.pb.h>
25 #include <memory>
26 #include <string>
27 
28 namespace google {
29 namespace cloud {
30 namespace spanner_admin_internal {
31 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
32 
34  public:
35  ~InstanceAdminMetadata() override = default;
36  explicit InstanceAdminMetadata(std::shared_ptr<InstanceAdminStub> child);
37 
38  StatusOr<google::spanner::admin::instance::v1::ListInstanceConfigsResponse>
40  grpc::ClientContext& context,
41  google::spanner::admin::instance::v1::ListInstanceConfigsRequest const&
42  request) override;
43 
44  StatusOr<google::spanner::admin::instance::v1::InstanceConfig>
46  grpc::ClientContext& context,
47  google::spanner::admin::instance::v1::GetInstanceConfigRequest const&
48  request) override;
49 
50  StatusOr<google::spanner::admin::instance::v1::ListInstancesResponse>
52  grpc::ClientContext& context,
53  google::spanner::admin::instance::v1::ListInstancesRequest const& request)
54  override;
55 
56  StatusOr<google::spanner::admin::instance::v1::Instance> GetInstance(
57  grpc::ClientContext& context,
58  google::spanner::admin::instance::v1::GetInstanceRequest const& request)
59  override;
60 
61  future<StatusOr<google::longrunning::Operation>> AsyncCreateInstance(
63  std::unique_ptr<grpc::ClientContext> context,
64  google::spanner::admin::instance::v1::CreateInstanceRequest const&
65  request) override;
66 
67  future<StatusOr<google::longrunning::Operation>> AsyncUpdateInstance(
69  std::unique_ptr<grpc::ClientContext> context,
70  google::spanner::admin::instance::v1::UpdateInstanceRequest const&
71  request) override;
72 
74  grpc::ClientContext& context,
75  google::spanner::admin::instance::v1::DeleteInstanceRequest const&
76  request) override;
77 
78  StatusOr<google::iam::v1::Policy> SetIamPolicy(
79  grpc::ClientContext& context,
80  google::iam::v1::SetIamPolicyRequest const& request) override;
81 
82  StatusOr<google::iam::v1::Policy> GetIamPolicy(
83  grpc::ClientContext& context,
84  google::iam::v1::GetIamPolicyRequest const& request) override;
85 
86  StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
87  grpc::ClientContext& context,
88  google::iam::v1::TestIamPermissionsRequest const& request) override;
89 
90  future<StatusOr<google::longrunning::Operation>> AsyncGetOperation(
92  std::unique_ptr<grpc::ClientContext> context,
93  google::longrunning::GetOperationRequest const& request) override;
94 
97  std::unique_ptr<grpc::ClientContext> context,
98  google::longrunning::CancelOperationRequest const& request) override;
99 
100  private:
101  void SetMetadata(grpc::ClientContext& context,
102  std::string const& request_params);
103  std::shared_ptr<InstanceAdminStub> child_;
104  std::string api_client_header_;
105 }; // InstanceAdminMetadata
106 
107 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
108 } // namespace spanner_admin_internal
109 } // namespace cloud
110 } // namespace google
111 
112 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_METADATA_DECORATOR_H