Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
instance_admin_client.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_CLIENT_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INSTANCE_ADMIN_CLIENT_H
21 
22 #include "google/cloud/spanner/admin/instance_admin_connection.h"
23 #include "google/cloud/future.h"
24 #include "google/cloud/iam_updater.h"
25 #include "google/cloud/options.h"
26 #include "google/cloud/polling_policy.h"
27 #include "google/cloud/status_or.h"
28 #include "google/cloud/version.h"
29 #include <google/longrunning/operations.grpc.pb.h>
30 #include <map>
31 #include <memory>
32 
33 namespace google {
34 namespace cloud {
35 namespace spanner_admin {
36 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
37 
38 /**
39  * Cloud Spanner Instance Admin API
40  *
41  * The Cloud Spanner Instance Admin API can be used to create, delete,
42  * modify and list instances. Instances are dedicated Cloud Spanner serving
43  * and storage resources to be used by Cloud Spanner databases.
44  *
45  * Each instance has a "configuration", which dictates where the
46  * serving resources for the Cloud Spanner instance are located (e.g.,
47  * US-central, Europe). Configurations are created by Google based on
48  * resource availability.
49  *
50  * Cloud Spanner billing is based on the instances that exist and their
51  * sizes. After an instance exists, there are no additional
52  * per-database or per-operation charges for use of the instance
53  * (though there may be additional network bandwidth charges).
54  * Instances offer isolation: problems with databases in one instance
55  * will not affect other instances. However, within an instance
56  * databases can affect each other. For example, if one database in an
57  * instance receives a lot of requests and consumes most of the
58  * instance resources, fewer resources are available for other
59  * databases in that instance, and their performance may suffer.
60  */
62  public:
63  explicit InstanceAdminClient(
64  std::shared_ptr<InstanceAdminConnection> connection);
66 
67  //@{
68  // @name Copy and move support
73  //@}
74 
75  //@{
76  // @name Equality
77  friend bool operator==(InstanceAdminClient const& a,
78  InstanceAdminClient const& b) {
79  return a.connection_ == b.connection_;
80  }
81  friend bool operator!=(InstanceAdminClient const& a,
82  InstanceAdminClient const& b) {
83  return !(a == b);
84  }
85  //@}
86 
87  /**
88  * Lists the supported instance configurations for a given project.
89  *
90  * @param parent Required. The name of the project for which a list of
91  * supported instance configurations is requested. Values are of the form
92  * `projects/<project>`.
93  */
94  StreamRange<google::spanner::admin::instance::v1::InstanceConfig>
95  ListInstanceConfigs(std::string const& parent);
96 
97  /**
98  * Gets information about a particular instance configuration.
99  *
100  * @param name Required. The name of the requested instance configuration.
101  * Values are of the form `projects/<project>/instanceConfigs/<config>`.
102  * @return
103  * [google::spanner::admin::instance::v1::InstanceConfig](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L304)
104  */
105  StatusOr<google::spanner::admin::instance::v1::InstanceConfig>
106  GetInstanceConfig(std::string const& name);
107 
108  /**
109  * Lists all instances in the given project.
110  *
111  * @param parent Required. The name of the project for which a list of
112  * instances is requested. Values are of the form `projects/<project>`.
113  */
114  StreamRange<google::spanner::admin::instance::v1::Instance> ListInstances(
115  std::string const& parent);
116 
117  /**
118  * Gets information about a particular instance.
119  *
120  * @param name Required. The name of the requested instance. Values are of
121  * the form `projects/<project>/instances/<instance>`.
122  * @return
123  * [google::spanner::admin::instance::v1::Instance](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L328)
124  */
125  StatusOr<google::spanner::admin::instance::v1::Instance> GetInstance(
126  std::string const& name);
127 
128  /**
129  * Creates an instance and begins preparing it to begin serving. The
130  * returned [long-running operation][google.longrunning.Operation]
131  * can be used to track the progress of preparing the new
132  * instance. The instance name is assigned by the caller. If the
133  * named instance already exists, `CreateInstance` returns
134  * `ALREADY_EXISTS`.
135  *
136  * Immediately upon completion of this request:
137  *
138  * * The instance is readable via the API, with all requested attributes
139  * but no allocated resources. Its state is `CREATING`.
140  *
141  * Until completion of the returned operation:
142  *
143  * * Cancelling the operation renders the instance immediately unreadable
144  * via the API.
145  * * The instance can be deleted.
146  * * All other attempts to modify the instance are rejected.
147  *
148  * Upon completion of the returned operation:
149  *
150  * * Billing for all successfully-allocated resources begins (some types
151  * may have lower than the requested levels).
152  * * Databases can be created in the instance.
153  * * The instance's allocated resource levels are readable via the API.
154  * * The instance's state becomes `READY`.
155  *
156  * The returned [long-running operation][google.longrunning.Operation] will
157  * have a name of the format `<instance_name>/operations/<operation_id>` and
158  * can be used to track creation of the instance. The
159  * [metadata][google.longrunning.Operation.metadata] field type is
160  * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
161  * The [response][google.longrunning.Operation.response] field type is
162  * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
163  *
164  * @param parent Required. The name of the project in which to create the
165  * instance. Values are of the form `projects/<project>`.
166  * @param instance_id Required. The ID of the instance to create. Valid
167  * identifiers are of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2
168  * and 64 characters in length.
169  * @param instance Required. The instance to create. The name may be
170  * omitted, but if specified must be `<parent>/instances/<instance_id>`.
171  * @return
172  * [google::spanner::admin::instance::v1::Instance](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L328)
173  */
174  future<StatusOr<google::spanner::admin::instance::v1::Instance>>
176  std::string const& parent, std::string const& instance_id,
177  google::spanner::admin::instance::v1::Instance const& instance);
178 
179  /**
180  * Updates an instance, and begins allocating or releasing resources
181  * as requested. The returned [long-running
182  * operation][google.longrunning.Operation] can be used to track the
183  * progress of updating the instance. If the named instance does not
184  * exist, returns `NOT_FOUND`.
185  *
186  * Immediately upon completion of this request:
187  *
188  * * For resource types for which a decrease in the instance's allocation
189  * has been requested, billing is based on the newly-requested level.
190  *
191  * Until completion of the returned operation:
192  *
193  * * Cancelling the operation sets its metadata's
194  * [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time],
195  * and begins restoring resources to their pre-request values. The operation
196  * is guaranteed to succeed at undoing all resource changes,
197  * after which point it terminates with a `CANCELLED` status.
198  * * All other attempts to modify the instance are rejected.
199  * * Reading the instance via the API continues to give the pre-request
200  * resource levels.
201  *
202  * Upon completion of the returned operation:
203  *
204  * * Billing begins for all successfully-allocated resources (some types
205  * may have lower than the requested levels).
206  * * All newly-reserved resources are available for serving the instance's
207  * tables.
208  * * The instance's new resource levels are readable via the API.
209  *
210  * The returned [long-running operation][google.longrunning.Operation] will
211  * have a name of the format `<instance_name>/operations/<operation_id>` and
212  * can be used to track the instance modification. The
213  * [metadata][google.longrunning.Operation.metadata] field type is
214  * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
215  * The [response][google.longrunning.Operation.response] field type is
216  * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
217  *
218  * Authorization requires `spanner.instances.update` permission on
219  * resource [name][google.spanner.admin.instance.v1.Instance.name].
220  *
221  * @param instance Required. The instance to update, which must always
222  * include the instance name. Otherwise, only fields mentioned in
223  * [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask]
224  * need be included.
225  * @param field_mask Required. A mask specifying which fields in
226  * [Instance][google.spanner.admin.instance.v1.Instance] should be updated.
227  * The field mask must always be specified; this prevents any future fields
228  * in [Instance][google.spanner.admin.instance.v1.Instance] from being erased
229  * accidentally by clients that do not know about them.
230  * @return
231  * [google::spanner::admin::instance::v1::Instance](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L328)
232  */
233  future<StatusOr<google::spanner::admin::instance::v1::Instance>>
234  UpdateInstance(google::spanner::admin::instance::v1::Instance const& instance,
235  google::protobuf::FieldMask const& field_mask);
236 
237  /**
238  * Deletes an instance.
239  *
240  * Immediately upon completion of the request:
241  *
242  * * Billing ceases for all of the instance's reserved resources.
243  *
244  * Soon afterward:
245  *
246  * * The instance and *all of its databases* immediately and
247  * irrevocably disappear from the API. All data in the databases
248  * is permanently deleted.
249  *
250  * @param name Required. The name of the instance to be deleted. Values are
251  * of the form `projects/<project>/instances/<instance>`
252  */
253  Status DeleteInstance(std::string const& name);
254 
255  /**
256  * Sets the access control policy on an instance resource. Replaces any
257  * existing policy.
258  *
259  * Authorization requires `spanner.instances.setIamPolicy` on
260  * [resource][google.iam.v1.SetIamPolicyRequest.resource].
261  *
262  * @param resource REQUIRED: The resource for which the policy is being
263  * specified. See the operation documentation for the appropriate value for
264  * this field.
265  * @param policy REQUIRED: The complete policy to be applied to the
266  * `resource`. The size of the policy is limited to a few 10s of KB. An empty
267  * policy is a valid policy but certain Cloud Platform services (such as
268  * Projects) might reject them.
269  * @return
270  * [google::iam::v1::Policy](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/policy.proto#L88)
271  */
272  StatusOr<google::iam::v1::Policy> SetIamPolicy(
273  std::string const& resource, google::iam::v1::Policy const& policy);
274 
275  /**
276  * Updates the IAM policy for @p resource using an optimistic concurrency
277  * control loop.
278  *
279  * The loop fetches the current policy for @p resource, and passes it to @p
280  * updater, which should return the new policy. This new policy should use the
281  * current etag so that the read-modify-write cycle can detect races and rerun
282  * the update when there is a mismatch. If the new policy does not have an
283  * etag, the existing policy will be blindly overwritten. If @p updater does
284  * not yield a policy, the control loop is terminated and kCancelled is
285  * returned.
286  *
287  * @param resource Required. The resource for which the policy is being
288  * specified. See the operation documentation for the appropriate value for
289  * this field.
290  * @param updater Required. Functor to map the current policy to a new one.
291  * @param options Optional. Options to control the loop. Expected options
292  * are:
293  * - `InstanceAdminBackoffPolicyOption`
294  * @return google::iam::v1::Policy
295  */
296  StatusOr<google::iam::v1::Policy> SetIamPolicy(std::string const& resource,
297  IamUpdater const& updater,
298  Options options = {});
299 
300  /**
301  * Gets the access control policy for an instance resource. Returns an empty
302  * policy if an instance exists but does not have a policy set.
303  *
304  * Authorization requires `spanner.instances.getIamPolicy` on
305  * [resource][google.iam.v1.GetIamPolicyRequest.resource].
306  *
307  * @param resource REQUIRED: The resource for which the policy is being
308  * requested. See the operation documentation for the appropriate value for
309  * this field.
310  * @return
311  * [google::iam::v1::Policy](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/policy.proto#L88)
312  */
313  StatusOr<google::iam::v1::Policy> GetIamPolicy(std::string const& resource);
314 
315  /**
316  * Returns permissions that the caller has on the specified instance resource.
317  *
318  * Attempting this RPC on a non-existent Cloud Spanner instance resource will
319  * result in a NOT_FOUND error if the user has `spanner.instances.list`
320  * permission on the containing Google Cloud Project. Otherwise returns an
321  * empty set of permissions.
322  *
323  * @param resource REQUIRED: The resource for which the policy detail is
324  * being requested. See the operation documentation for the appropriate value
325  * for this field.
326  * @param permissions The set of permissions to check for the `resource`.
327  * Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
328  * For more information see [IAM
329  * Overview](https://cloud.google.com/iam/docs/overview#permissions).
330  * @return
331  * [google::iam::v1::TestIamPermissionsResponse](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/iam_policy.proto#L141)
332  */
333  StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
334  std::string const& resource, std::vector<std::string> const& permissions);
335 
336  /**
337  * Lists the supported instance configurations for a given project.
338  *
339  * @param request
340  * [google::spanner::admin::instance::v1::ListInstanceConfigsRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L415)
341  */
342  StreamRange<google::spanner::admin::instance::v1::InstanceConfig>
344  google::spanner::admin::instance::v1::ListInstanceConfigsRequest request);
345 
346  /**
347  * Gets information about a particular instance configuration.
348  *
349  * @param request
350  * [google::spanner::admin::instance::v1::GetInstanceConfigRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L449)
351  * @return
352  * [google::spanner::admin::instance::v1::InstanceConfig](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L304)
353  */
354  StatusOr<google::spanner::admin::instance::v1::InstanceConfig>
356  google::spanner::admin::instance::v1::GetInstanceConfigRequest const&
357  request);
358 
359  /**
360  * Lists all instances in the given project.
361  *
362  * @param request
363  * [google::spanner::admin::instance::v1::ListInstancesRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L499)
364  */
365  StreamRange<google::spanner::admin::instance::v1::Instance> ListInstances(
366  google::spanner::admin::instance::v1::ListInstancesRequest request);
367 
368  /**
369  * Gets information about a particular instance.
370  *
371  * @param request
372  * [google::spanner::admin::instance::v1::GetInstanceRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L461)
373  * @return
374  * [google::spanner::admin::instance::v1::Instance](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L328)
375  */
376  StatusOr<google::spanner::admin::instance::v1::Instance> GetInstance(
377  google::spanner::admin::instance::v1::GetInstanceRequest const& request);
378 
379  /**
380  * Creates an instance and begins preparing it to begin serving. The
381  * returned [long-running operation][google.longrunning.Operation]
382  * can be used to track the progress of preparing the new
383  * instance. The instance name is assigned by the caller. If the
384  * named instance already exists, `CreateInstance` returns
385  * `ALREADY_EXISTS`.
386  *
387  * Immediately upon completion of this request:
388  *
389  * * The instance is readable via the API, with all requested attributes
390  * but no allocated resources. Its state is `CREATING`.
391  *
392  * Until completion of the returned operation:
393  *
394  * * Cancelling the operation renders the instance immediately unreadable
395  * via the API.
396  * * The instance can be deleted.
397  * * All other attempts to modify the instance are rejected.
398  *
399  * Upon completion of the returned operation:
400  *
401  * * Billing for all successfully-allocated resources begins (some types
402  * may have lower than the requested levels).
403  * * Databases can be created in the instance.
404  * * The instance's allocated resource levels are readable via the API.
405  * * The instance's state becomes `READY`.
406  *
407  * The returned [long-running operation][google.longrunning.Operation] will
408  * have a name of the format `<instance_name>/operations/<operation_id>` and
409  * can be used to track creation of the instance. The
410  * [metadata][google.longrunning.Operation.metadata] field type is
411  * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
412  * The [response][google.longrunning.Operation.response] field type is
413  * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
414  *
415  * @param request
416  * [google::spanner::admin::instance::v1::CreateInstanceRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L478)
417  * @return
418  * [google::spanner::admin::instance::v1::Instance](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L328)
419  */
420  future<StatusOr<google::spanner::admin::instance::v1::Instance>>
422  google::spanner::admin::instance::v1::CreateInstanceRequest const&
423  request);
424 
425  /**
426  * Updates an instance, and begins allocating or releasing resources
427  * as requested. The returned [long-running
428  * operation][google.longrunning.Operation] can be used to track the
429  * progress of updating the instance. If the named instance does not
430  * exist, returns `NOT_FOUND`.
431  *
432  * Immediately upon completion of this request:
433  *
434  * * For resource types for which a decrease in the instance's allocation
435  * has been requested, billing is based on the newly-requested level.
436  *
437  * Until completion of the returned operation:
438  *
439  * * Cancelling the operation sets its metadata's
440  * [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time],
441  * and begins restoring resources to their pre-request values. The operation
442  * is guaranteed to succeed at undoing all resource changes,
443  * after which point it terminates with a `CANCELLED` status.
444  * * All other attempts to modify the instance are rejected.
445  * * Reading the instance via the API continues to give the pre-request
446  * resource levels.
447  *
448  * Upon completion of the returned operation:
449  *
450  * * Billing begins for all successfully-allocated resources (some types
451  * may have lower than the requested levels).
452  * * All newly-reserved resources are available for serving the instance's
453  * tables.
454  * * The instance's new resource levels are readable via the API.
455  *
456  * The returned [long-running operation][google.longrunning.Operation] will
457  * have a name of the format `<instance_name>/operations/<operation_id>` and
458  * can be used to track the instance modification. The
459  * [metadata][google.longrunning.Operation.metadata] field type is
460  * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
461  * The [response][google.longrunning.Operation.response] field type is
462  * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
463  *
464  * Authorization requires `spanner.instances.update` permission on
465  * resource [name][google.spanner.admin.instance.v1.Instance.name].
466  *
467  * @param request
468  * [google::spanner::admin::instance::v1::UpdateInstanceRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L552)
469  * @return
470  * [google::spanner::admin::instance::v1::Instance](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L328)
471  */
472  future<StatusOr<google::spanner::admin::instance::v1::Instance>>
474  google::spanner::admin::instance::v1::UpdateInstanceRequest const&
475  request);
476 
477  /**
478  * Deletes an instance.
479  *
480  * Immediately upon completion of the request:
481  *
482  * * Billing ceases for all of the instance's reserved resources.
483  *
484  * Soon afterward:
485  *
486  * * The instance and *all of its databases* immediately and
487  * irrevocably disappear from the API. All data in the databases
488  * is permanently deleted.
489  *
490  * @param request
491  * [google::spanner::admin::instance::v1::DeleteInstanceRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/spanner/admin/instance/v1/spanner_instance_admin.proto#L565)
492  */
494  google::spanner::admin::instance::v1::DeleteInstanceRequest const&
495  request);
496 
497  /**
498  * Sets the access control policy on an instance resource. Replaces any
499  * existing policy.
500  *
501  * Authorization requires `spanner.instances.setIamPolicy` on
502  * [resource][google.iam.v1.SetIamPolicyRequest.resource].
503  *
504  * @param request
505  * [google::iam::v1::SetIamPolicyRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/iam_policy.proto#L98)
506  * @return
507  * [google::iam::v1::Policy](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/policy.proto#L88)
508  */
509  StatusOr<google::iam::v1::Policy> SetIamPolicy(
510  google::iam::v1::SetIamPolicyRequest const& request);
511 
512  /**
513  * Gets the access control policy for an instance resource. Returns an empty
514  * policy if an instance exists but does not have a policy set.
515  *
516  * Authorization requires `spanner.instances.getIamPolicy` on
517  * [resource][google.iam.v1.GetIamPolicyRequest.resource].
518  *
519  * @param request
520  * [google::iam::v1::GetIamPolicyRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/iam_policy.proto#L113)
521  * @return
522  * [google::iam::v1::Policy](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/policy.proto#L88)
523  */
524  StatusOr<google::iam::v1::Policy> GetIamPolicy(
525  google::iam::v1::GetIamPolicyRequest const& request);
526 
527  /**
528  * Returns permissions that the caller has on the specified instance resource.
529  *
530  * Attempting this RPC on a non-existent Cloud Spanner instance resource will
531  * result in a NOT_FOUND error if the user has `spanner.instances.list`
532  * permission on the containing Google Cloud Project. Otherwise returns an
533  * empty set of permissions.
534  *
535  * @param request
536  * [google::iam::v1::TestIamPermissionsRequest](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/iam_policy.proto#L126)
537  * @return
538  * [google::iam::v1::TestIamPermissionsResponse](https://github.com/googleapis/googleapis/blob/ed739492993c4a99629b6430affdd6c0fb59d435/google/iam/v1/iam_policy.proto#L141)
539  */
540  StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
541  google::iam::v1::TestIamPermissionsRequest const& request);
542 
543  private:
544  std::shared_ptr<InstanceAdminConnection> connection_;
545 };
546 
547 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
548 } // namespace spanner_admin
549 } // namespace cloud
550 } // namespace google
551 
552 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INSTANCE_ADMIN_CLIENT_H