-
Notifications
You must be signed in to change notification settings - Fork 444
Expand file tree
/
Copy pathsql_instances_client.h
More file actions
1526 lines (1473 loc) · 80.3 KB
/
sql_instances_client.h
File metadata and controls
1526 lines (1473 loc) · 80.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Generated by the Codegen C++ plugin.
// If you make any local changes, they will be lost.
// source: google/cloud/sql/v1/cloud_sql_instances.proto
#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCES_CLIENT_H
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCES_CLIENT_H
#include "google/cloud/sql/v1/sql_instances_rest_connection.h"
#include "google/cloud/future.h"
#include "google/cloud/options.h"
#include "google/cloud/polling_policy.h"
#include "google/cloud/status_or.h"
#include "google/cloud/version.h"
#include <map>
#include <memory>
#include <string>
namespace google {
namespace cloud {
namespace sql_v1 {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
///
/// SqlInstancesServiceClient
///
/// @par Equality
///
/// Instances of this class created via copy-construction or copy-assignment
/// always compare equal. Instances created with equal
/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare
/// equal share the same underlying resources.
///
/// @par Performance
///
/// Creating a new instance of this class is a relatively expensive operation,
/// new objects establish new connections to the service. In contrast,
/// copy-construction, move-construction, and the corresponding assignment
/// operations are relatively efficient as the copies share all underlying
/// resources.
///
/// @par Thread Safety
///
/// Concurrent access to different instances of this class, even if they compare
/// equal, is guaranteed to work. Two or more threads operating on the same
/// instance of this class is not guaranteed to work. Since copy-construction
/// and move-construction is a relatively efficient operation, consider using
/// such a copy when using this class from multiple threads.
///
class SqlInstancesServiceClient {
public:
explicit SqlInstancesServiceClient(
std::shared_ptr<SqlInstancesServiceConnection> connection,
Options opts = {});
~SqlInstancesServiceClient();
///@{
/// @name Copy and move support
SqlInstancesServiceClient(SqlInstancesServiceClient const&) = default;
SqlInstancesServiceClient& operator=(SqlInstancesServiceClient const&) =
default;
SqlInstancesServiceClient(SqlInstancesServiceClient&&) = default;
SqlInstancesServiceClient& operator=(SqlInstancesServiceClient&&) = default;
///@}
///@{
/// @name Equality
friend bool operator==(SqlInstancesServiceClient const& a,
SqlInstancesServiceClient const& b) {
return a.connection_ == b.connection_;
}
friend bool operator!=(SqlInstancesServiceClient const& a,
SqlInstancesServiceClient const& b) {
return !(a == b);
}
///@}
// clang-format off
///
/// Adds a new trusted Certificate Authority (CA) version for the specified
/// instance. Required to prepare for a certificate rotation. If a CA version
/// was previously added but never used in a certificate rotation, this
/// operation replaces that version. There cannot be more than one CA version
/// waiting to be rotated in. For instances that have enabled Certificate
/// Authority Service (CAS) based server CA, use AddServerCertificate to add a
/// new server certificate.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesAddServerCaRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesAddServerCaRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L452}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> AddServerCa(
google::cloud::sql::v1::SqlInstancesAddServerCaRequest const& request,
Options opts = {});
// clang-format off
///
/// Add a new trusted server certificate version for the specified instance
/// using Certificate Authority Service (CAS) server CA. Required to prepare
/// for a certificate rotation. If a server certificate version was previously
/// added but never used in a certificate rotation, this operation replaces
/// that version. There cannot be more than one certificate version waiting to
/// be rotated in. For instances not using CAS server CA, use AddServerCa
/// instead.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesAddServerCertificateRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesAddServerCertificateRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L461}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> AddServerCertificate(
google::cloud::sql::v1::SqlInstancesAddServerCertificateRequest const&
request,
Options opts = {});
// clang-format off
///
/// Adds a new Entra ID certificate for the specified instance. If an Entra ID
/// certificate was previously added but never used in a certificate rotation,
/// this operation replaces that version.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesAddEntraIdCertificateRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesAddEntraIdCertificateRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L470}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> AddEntraIdCertificate(
google::cloud::sql::v1::SqlInstancesAddEntraIdCertificateRequest const&
request,
Options opts = {});
// clang-format off
///
/// Creates a Cloud SQL instance as a clone of the source instance. Using this
/// operation might cause your instance to restart.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesCloneRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesCloneRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L479}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Clone(
google::cloud::sql::v1::SqlInstancesCloneRequest const& request,
Options opts = {});
// clang-format off
///
/// Deletes a Cloud SQL instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesDeleteRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesDeleteRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L491}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Delete(
google::cloud::sql::v1::SqlInstancesDeleteRequest const& request,
Options opts = {});
// clang-format off
///
/// Demotes the stand-alone instance to be a Cloud SQL read replica for an
/// external database server.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesDemoteMasterRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesDemoteMasterRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L516}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> DemoteMaster(
google::cloud::sql::v1::SqlInstancesDemoteMasterRequest const& request,
Options opts = {});
// clang-format off
///
/// Demotes an existing standalone instance to be a Cloud SQL read replica
/// for an external database server.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesDemoteRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesDemoteRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L527}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Demote(
google::cloud::sql::v1::SqlInstancesDemoteRequest const& request,
Options opts = {});
// clang-format off
///
/// Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
/// dump or CSV file.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesExportRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesExportRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L539}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Export(
google::cloud::sql::v1::SqlInstancesExportRequest const& request,
Options opts = {});
// clang-format off
///
/// Initiates a manual failover of a high availability (HA) primary instance
/// to a standby instance, which becomes the primary instance. Users are
/// then rerouted to the new primary. For more information, see the
/// [Overview of high
/// availability](https://cloud.google.com/sql/docs/mysql/high-availability)
/// page in the Cloud SQL documentation.
/// If using Legacy HA (MySQL only), this causes the instance to failover to
/// its failover replica instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesFailoverRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesFailoverRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L550}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Failover(
google::cloud::sql::v1::SqlInstancesFailoverRequest const& request,
Options opts = {});
// clang-format off
///
/// Reencrypt CMEK instance with latest key version.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesReencryptRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesReencryptRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L833}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Reencrypt(
google::cloud::sql::v1::SqlInstancesReencryptRequest const& request,
Options opts = {});
// clang-format off
///
/// Retrieves a resource containing information about a Cloud SQL instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesGetRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.DatabaseInstance])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.DatabaseInstance]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L1384}
/// [google.cloud.sql.v1.SqlInstancesGetRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L561}
///
// clang-format on
StatusOr<google::cloud::sql::v1::DatabaseInstance> Get(
google::cloud::sql::v1::SqlInstancesGetRequest const& request,
Options opts = {});
// clang-format off
///
/// Imports data into a Cloud SQL instance from a SQL dump or CSV file in
/// Cloud Storage.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesImportRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesImportRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L570}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Import(
google::cloud::sql::v1::SqlInstancesImportRequest const& request,
Options opts = {});
// clang-format off
///
/// Creates a new Cloud SQL instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesInsertRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesInsertRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L581}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Insert(
google::cloud::sql::v1::SqlInstancesInsertRequest const& request,
Options opts = {});
// clang-format off
///
/// Lists instances under a given project.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesListRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return a [StreamRange](@ref google::cloud::StreamRange)
/// to iterate of the results. See the documentation of this type for
/// details. In brief, this class has `begin()` and `end()` member
/// functions returning a iterator class meeting the
/// [input iterator requirements]. The value type for this iterator is a
/// [`StatusOr`] as the iteration may fail even after some values are
/// retrieved successfully, for example, if there is a network disconnect.
/// An empty set of results does not indicate an error, it indicates
/// that there are no resources meeting the request criteria.
/// On a successful iteration the `StatusOr<T>` contains elements of type
/// [google.cloud.sql.v1.DatabaseInstance], or rather,
/// the C++ class generated by Protobuf from that type. Please consult the
/// Protobuf documentation for details on the [Protobuf mapping rules].
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.DatabaseInstance]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L1384}
/// [google.cloud.sql.v1.SqlInstancesListRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L590}
///
// clang-format on
StreamRange<google::cloud::sql::v1::DatabaseInstance> List(
google::cloud::sql::v1::SqlInstancesListRequest request,
Options opts = {});
// clang-format off
///
/// Lists all of the trusted Certificate Authorities (CAs) for the specified
/// instance. There can be up to three CAs listed: the CA that was used to sign
/// the certificate that is currently in use, a CA that has been added but not
/// yet used to sign a certificate, and a CA used to sign a certificate that
/// has previously rotated out.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesListServerCasRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.InstancesListServerCasResponse])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.InstancesListServerCasResponse]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L1094}
/// [google.cloud.sql.v1.SqlInstancesListServerCasRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L617}
///
// clang-format on
StatusOr<google::cloud::sql::v1::InstancesListServerCasResponse>
ListServerCas(
google::cloud::sql::v1::SqlInstancesListServerCasRequest const& request,
Options opts = {});
// clang-format off
///
/// Lists all versions of server certificates and certificate authorities (CAs)
/// for the specified instance. There can be up to three sets of certs listed:
/// the certificate that is currently in use, a future that has been added but
/// not yet used to sign a certificate, and a certificate that has been rotated
/// out. For instances not using Certificate Authority Service (CAS) server CA,
/// use ListServerCas instead.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesListServerCertificatesRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.InstancesListServerCertificatesResponse])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.InstancesListServerCertificatesResponse]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L1105}
/// [google.cloud.sql.v1.SqlInstancesListServerCertificatesRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L626}
///
// clang-format on
StatusOr<google::cloud::sql::v1::InstancesListServerCertificatesResponse>
ListServerCertificates(
google::cloud::sql::v1::SqlInstancesListServerCertificatesRequest const&
request,
Options opts = {});
// clang-format off
///
/// Lists all versions of EntraID certificates for the specified instance.
/// There can be up to three sets of certificates listed: the certificate that
/// is currently in use, a future that has been added but not yet used to sign
/// a certificate, and a certificate that has been rotated out.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesListEntraIdCertificatesRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.InstancesListEntraIdCertificatesResponse])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.InstancesListEntraIdCertificatesResponse]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L1121}
/// [google.cloud.sql.v1.SqlInstancesListEntraIdCertificatesRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L635}
///
// clang-format on
StatusOr<google::cloud::sql::v1::InstancesListEntraIdCertificatesResponse>
ListEntraIdCertificates(
google::cloud::sql::v1::SqlInstancesListEntraIdCertificatesRequest const&
request,
Options opts = {});
// clang-format off
///
/// Partially updates settings of a Cloud SQL instance by merging the request
/// with the current configuration. This method supports patch semantics.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesPatchRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesPatchRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L644}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Patch(
google::cloud::sql::v1::SqlInstancesPatchRequest const& request,
Options opts = {});
// clang-format off
///
/// Promotes the read replica instance to be an independent Cloud SQL
/// primary instance.
/// Using this operation might cause your instance to restart.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L655}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> PromoteReplica(
google::cloud::sql::v1::SqlInstancesPromoteReplicaRequest const& request,
Options opts = {});
// clang-format off
///
/// Switches over from the primary instance to the DR replica
/// instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesSwitchoverRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesSwitchoverRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L672}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Switchover(
google::cloud::sql::v1::SqlInstancesSwitchoverRequest const& request,
Options opts = {});
// clang-format off
///
/// Deletes all client certificates and generates a new server SSL certificate
/// for the instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesResetSslConfigRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesResetSslConfigRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L687}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> ResetSslConfig(
google::cloud::sql::v1::SqlInstancesResetSslConfigRequest const& request,
Options opts = {});
// clang-format off
///
/// Restarts a Cloud SQL instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesRestartRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesRestartRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L713}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> Restart(
google::cloud::sql::v1::SqlInstancesRestartRequest const& request,
Options opts = {});
// clang-format off
///
/// Restores a backup of a Cloud SQL instance. Using this operation might cause
/// your instance to restart.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesRestoreBackupRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesRestoreBackupRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L722}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> RestoreBackup(
google::cloud::sql::v1::SqlInstancesRestoreBackupRequest const& request,
Options opts = {});
// clang-format off
///
/// Rotates the server certificate to one signed by the Certificate Authority
/// (CA) version previously added with the addServerCA method. For instances
/// that have enabled Certificate Authority Service (CAS) based server CA,
/// use RotateServerCertificate to rotate the server certificate.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesRotateServerCaRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesRotateServerCaRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L733}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> RotateServerCa(
google::cloud::sql::v1::SqlInstancesRotateServerCaRequest const& request,
Options opts = {});
// clang-format off
///
/// Rotates the server certificate version to one previously added with the
/// addServerCertificate method. For instances not using Certificate Authority
/// Service (CAS) server CA, use RotateServerCa instead.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesRotateServerCertificateRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesRotateServerCertificateRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L744}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> RotateServerCertificate(
google::cloud::sql::v1::SqlInstancesRotateServerCertificateRequest const&
request,
Options opts = {});
// clang-format off
///
/// Rotates the server certificate version to one previously added with the
/// addEntraIdCertificate method.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesRotateEntraIdCertificateRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesRotateEntraIdCertificateRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L757}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> RotateEntraIdCertificate(
google::cloud::sql::v1::SqlInstancesRotateEntraIdCertificateRequest const&
request,
Options opts = {});
// clang-format off
///
/// Starts the replication in the read replica instance.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.sql.v1.SqlInstancesStartReplicaRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return the result of the RPC. The response message type
/// ([google.cloud.sql.v1.Operation])
/// is mapped to a C++ class using the [Protobuf mapping rules].
/// If the request fails, the [`StatusOr`] contains the error details.
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.sql.v1.Operation]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_resources.proto#L1170}
/// [google.cloud.sql.v1.SqlInstancesStartReplicaRequest]: @googleapis_reference_link{google/cloud/sql/v1/cloud_sql_instances.proto#L770}
///
// clang-format on
StatusOr<google::cloud::sql::v1::Operation> StartReplica(
google::cloud::sql::v1::SqlInstancesStartReplicaRequest const& request,
Options opts = {});
// clang-format off
///
/// Stops the replication in the read replica instance.
///
/// @param request Unary RPCs, such as the one wrapped by this