google-cloud-spanner 1.16.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +23 -0
  4. data/lib/google-cloud-spanner.rb +10 -13
  5. data/lib/google/cloud/spanner.rb +6 -8
  6. data/lib/google/cloud/spanner/admin/database/credentials.rb +2 -2
  7. data/lib/google/cloud/spanner/admin/instance/credentials.rb +2 -2
  8. data/lib/google/cloud/spanner/backup.rb +1 -1
  9. data/lib/google/cloud/spanner/backup/job.rb +2 -2
  10. data/lib/google/cloud/spanner/backup/job/list.rb +2 -2
  11. data/lib/google/cloud/spanner/backup/list.rb +1 -2
  12. data/lib/google/cloud/spanner/backup/restore/job.rb +2 -2
  13. data/lib/google/cloud/spanner/batch_client.rb +2 -2
  14. data/lib/google/cloud/spanner/batch_snapshot.rb +6 -8
  15. data/lib/google/cloud/spanner/batch_update.rb +1 -1
  16. data/lib/google/cloud/spanner/client.rb +8 -8
  17. data/lib/google/cloud/spanner/commit.rb +14 -14
  18. data/lib/google/cloud/spanner/convert.rb +7 -7
  19. data/lib/google/cloud/spanner/credentials.rb +2 -2
  20. data/lib/google/cloud/spanner/data.rb +2 -2
  21. data/lib/google/cloud/spanner/database.rb +22 -22
  22. data/lib/google/cloud/spanner/database/backup_info.rb +1 -1
  23. data/lib/google/cloud/spanner/database/job.rb +3 -3
  24. data/lib/google/cloud/spanner/database/job/list.rb +2 -2
  25. data/lib/google/cloud/spanner/database/list.rb +1 -1
  26. data/lib/google/cloud/spanner/database/restore_info.rb +1 -1
  27. data/lib/google/cloud/spanner/fields.rb +8 -8
  28. data/lib/google/cloud/spanner/instance.rb +5 -12
  29. data/lib/google/cloud/spanner/instance/config.rb +1 -1
  30. data/lib/google/cloud/spanner/instance/config/list.rb +1 -1
  31. data/lib/google/cloud/spanner/instance/job.rb +2 -2
  32. data/lib/google/cloud/spanner/instance/list.rb +1 -1
  33. data/lib/google/cloud/spanner/partition.rb +4 -4
  34. data/lib/google/cloud/spanner/policy.rb +2 -2
  35. data/lib/google/cloud/spanner/service.rb +209 -297
  36. data/lib/google/cloud/spanner/session.rb +9 -9
  37. data/lib/google/cloud/spanner/snapshot.rb +2 -2
  38. data/lib/google/cloud/spanner/transaction.rb +2 -2
  39. data/lib/google/cloud/spanner/version.rb +1 -1
  40. metadata +18 -107
  41. data/lib/google/cloud/spanner/admin/database.rb +0 -149
  42. data/lib/google/cloud/spanner/admin/database/v1.rb +0 -147
  43. data/lib/google/cloud/spanner/admin/database/v1/credentials.rb +0 -46
  44. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb +0 -1513
  45. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client_config.json +0 -111
  46. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  47. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/options.rb +0 -33
  48. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/policy.rb +0 -151
  49. data/lib/google/cloud/spanner/admin/database/v1/doc/google/longrunning/operations.rb +0 -51
  50. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/any.rb +0 -131
  51. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/empty.rb +0 -29
  52. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/field_mask.rb +0 -222
  53. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/timestamp.rb +0 -113
  54. data/lib/google/cloud/spanner/admin/database/v1/doc/google/rpc/status.rb +0 -39
  55. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/backup.rb +0 -325
  56. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/spanner_database_admin.rb +0 -368
  57. data/lib/google/cloud/spanner/admin/database/v1/doc/google/type/expr.rb +0 -45
  58. data/lib/google/cloud/spanner/admin/instance.rb +0 -164
  59. data/lib/google/cloud/spanner/admin/instance/v1.rb +0 -162
  60. data/lib/google/cloud/spanner/admin/instance/v1/credentials.rb +0 -46
  61. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  62. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/options.rb +0 -33
  63. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/policy.rb +0 -151
  64. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/longrunning/operations.rb +0 -51
  65. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/any.rb +0 -131
  66. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/empty.rb +0 -29
  67. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/field_mask.rb +0 -222
  68. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/rpc/status.rb +0 -39
  69. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb +0 -334
  70. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/type/expr.rb +0 -45
  71. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb +0 -975
  72. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client_config.json +0 -76
  73. data/lib/google/cloud/spanner/v1.rb +0 -16
  74. data/lib/google/cloud/spanner/v1/credentials.rb +0 -42
  75. data/lib/google/cloud/spanner/v1/doc/google/protobuf/any.rb +0 -131
  76. data/lib/google/cloud/spanner/v1/doc/google/protobuf/duration.rb +0 -91
  77. data/lib/google/cloud/spanner/v1/doc/google/protobuf/empty.rb +0 -29
  78. data/lib/google/cloud/spanner/v1/doc/google/protobuf/struct.rb +0 -74
  79. data/lib/google/cloud/spanner/v1/doc/google/protobuf/timestamp.rb +0 -113
  80. data/lib/google/cloud/spanner/v1/doc/google/rpc/status.rb +0 -39
  81. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/keys.rb +0 -150
  82. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/mutation.rb +0 -95
  83. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/query_plan.rb +0 -121
  84. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/result_set.rb +0 -190
  85. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/spanner.rb +0 -570
  86. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/transaction.rb +0 -432
  87. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb +0 -112
  88. data/lib/google/cloud/spanner/v1/spanner_client.rb +0 -1485
  89. data/lib/google/cloud/spanner/v1/spanner_client_config.json +0 -121
  90. data/lib/google/spanner/admin/database/v1/backup_pb.rb +0 -98
  91. data/lib/google/spanner/admin/database/v1/common_pb.rb +0 -28
  92. data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +0 -141
  93. data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +0 -169
  94. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +0 -125
  95. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +0 -181
  96. data/lib/google/spanner/v1/keys_pb.rb +0 -34
  97. data/lib/google/spanner/v1/mutation_pb.rb +0 -39
  98. data/lib/google/spanner/v1/query_plan_pb.rb +0 -48
  99. data/lib/google/spanner/v1/result_set_pb.rb +0 -48
  100. data/lib/google/spanner/v1/spanner_pb.rb +0 -179
  101. data/lib/google/spanner/v1/spanner_services_pb.rb +0 -179
  102. data/lib/google/spanner/v1/transaction_pb.rb +0 -56
  103. data/lib/google/spanner/v1/type_pb.rb +0 -44
@@ -1,121 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.spanner.v1.Spanner": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "UNAVAILABLE"
7
- ],
8
- "non_idempotent": [],
9
- "long_running": [
10
- "UNAVAILABLE"
11
- ]
12
- },
13
- "retry_params": {
14
- "default": {
15
- "initial_retry_delay_millis": 250,
16
- "retry_delay_multiplier": 1.3,
17
- "max_retry_delay_millis": 32000,
18
- "initial_rpc_timeout_millis": 360000,
19
- "rpc_timeout_multiplier": 1.0,
20
- "max_rpc_timeout_millis": 360000,
21
- "total_timeout_millis": 3600000
22
- },
23
- "streaming": {
24
- "initial_retry_delay_millis": 250,
25
- "retry_delay_multiplier": 1.3,
26
- "max_retry_delay_millis": 32000,
27
- "initial_rpc_timeout_millis": 360000,
28
- "rpc_timeout_multiplier": 1.0,
29
- "max_rpc_timeout_millis": 360000,
30
- "total_timeout_millis": 3600000
31
- },
32
- "long_running": {
33
- "initial_retry_delay_millis": 250,
34
- "retry_delay_multiplier": 1.3,
35
- "max_retry_delay_millis": 32000,
36
- "initial_rpc_timeout_millis": 3600000,
37
- "rpc_timeout_multiplier": 1.0,
38
- "max_rpc_timeout_millis": 3600000,
39
- "total_timeout_millis": 3600000
40
- }
41
- },
42
- "methods": {
43
- "CreateSession": {
44
- "timeout_millis": 30000,
45
- "retry_codes_name": "idempotent",
46
- "retry_params_name": "default"
47
- },
48
- "BatchCreateSessions": {
49
- "timeout_millis": 60000,
50
- "retry_codes_name": "idempotent",
51
- "retry_params_name": "default"
52
- },
53
- "GetSession": {
54
- "timeout_millis": 30000,
55
- "retry_codes_name": "idempotent",
56
- "retry_params_name": "default"
57
- },
58
- "ListSessions": {
59
- "timeout_millis": 3600000,
60
- "retry_codes_name": "idempotent",
61
- "retry_params_name": "default"
62
- },
63
- "DeleteSession": {
64
- "timeout_millis": 30000,
65
- "retry_codes_name": "idempotent",
66
- "retry_params_name": "default"
67
- },
68
- "ExecuteSql": {
69
- "timeout_millis": 30000,
70
- "retry_codes_name": "idempotent",
71
- "retry_params_name": "default"
72
- },
73
- "ExecuteStreamingSql": {
74
- "timeout_millis": 3600000,
75
- "retry_codes_name": "non_idempotent",
76
- "retry_params_name": "streaming"
77
- },
78
- "ExecuteBatchDml": {
79
- "timeout_millis": 30000,
80
- "retry_codes_name": "idempotent",
81
- "retry_params_name": "default"
82
- },
83
- "Read": {
84
- "timeout_millis": 30000,
85
- "retry_codes_name": "idempotent",
86
- "retry_params_name": "default"
87
- },
88
- "StreamingRead": {
89
- "timeout_millis": 3600000,
90
- "retry_codes_name": "non_idempotent",
91
- "retry_params_name": "streaming"
92
- },
93
- "BeginTransaction": {
94
- "timeout_millis": 30000,
95
- "retry_codes_name": "idempotent",
96
- "retry_params_name": "default"
97
- },
98
- "Commit": {
99
- "timeout_millis": 3600000,
100
- "retry_codes_name": "long_running",
101
- "retry_params_name": "long_running"
102
- },
103
- "Rollback": {
104
- "timeout_millis": 30000,
105
- "retry_codes_name": "idempotent",
106
- "retry_params_name": "default"
107
- },
108
- "PartitionQuery": {
109
- "timeout_millis": 30000,
110
- "retry_codes_name": "idempotent",
111
- "retry_params_name": "default"
112
- },
113
- "PartitionRead": {
114
- "timeout_millis": 30000,
115
- "retry_codes_name": "idempotent",
116
- "retry_params_name": "default"
117
- }
118
- }
119
- }
120
- }
121
- }
@@ -1,98 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/spanner/admin/database/v1/backup.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/field_behavior_pb'
8
- require 'google/api/resource_pb'
9
- require 'google/longrunning/operations_pb'
10
- require 'google/protobuf/field_mask_pb'
11
- require 'google/protobuf/timestamp_pb'
12
- require 'google/spanner/admin/database/v1/common_pb'
13
- require 'google/api/annotations_pb'
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_message "google.spanner.admin.database.v1.Backup" do
16
- optional :database, :string, 2
17
- optional :expire_time, :message, 3, "google.protobuf.Timestamp"
18
- optional :name, :string, 1
19
- optional :create_time, :message, 4, "google.protobuf.Timestamp"
20
- optional :size_bytes, :int64, 5
21
- optional :state, :enum, 6, "google.spanner.admin.database.v1.Backup.State"
22
- repeated :referencing_databases, :string, 7
23
- end
24
- add_enum "google.spanner.admin.database.v1.Backup.State" do
25
- value :STATE_UNSPECIFIED, 0
26
- value :CREATING, 1
27
- value :READY, 2
28
- end
29
- add_message "google.spanner.admin.database.v1.CreateBackupRequest" do
30
- optional :parent, :string, 1
31
- optional :backup_id, :string, 2
32
- optional :backup, :message, 3, "google.spanner.admin.database.v1.Backup"
33
- end
34
- add_message "google.spanner.admin.database.v1.CreateBackupMetadata" do
35
- optional :name, :string, 1
36
- optional :database, :string, 2
37
- optional :progress, :message, 3, "google.spanner.admin.database.v1.OperationProgress"
38
- optional :cancel_time, :message, 4, "google.protobuf.Timestamp"
39
- end
40
- add_message "google.spanner.admin.database.v1.UpdateBackupRequest" do
41
- optional :backup, :message, 1, "google.spanner.admin.database.v1.Backup"
42
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
43
- end
44
- add_message "google.spanner.admin.database.v1.GetBackupRequest" do
45
- optional :name, :string, 1
46
- end
47
- add_message "google.spanner.admin.database.v1.DeleteBackupRequest" do
48
- optional :name, :string, 1
49
- end
50
- add_message "google.spanner.admin.database.v1.ListBackupsRequest" do
51
- optional :parent, :string, 1
52
- optional :filter, :string, 2
53
- optional :page_size, :int32, 3
54
- optional :page_token, :string, 4
55
- end
56
- add_message "google.spanner.admin.database.v1.ListBackupsResponse" do
57
- repeated :backups, :message, 1, "google.spanner.admin.database.v1.Backup"
58
- optional :next_page_token, :string, 2
59
- end
60
- add_message "google.spanner.admin.database.v1.ListBackupOperationsRequest" do
61
- optional :parent, :string, 1
62
- optional :filter, :string, 2
63
- optional :page_size, :int32, 3
64
- optional :page_token, :string, 4
65
- end
66
- add_message "google.spanner.admin.database.v1.ListBackupOperationsResponse" do
67
- repeated :operations, :message, 1, "google.longrunning.Operation"
68
- optional :next_page_token, :string, 2
69
- end
70
- add_message "google.spanner.admin.database.v1.BackupInfo" do
71
- optional :backup, :string, 1
72
- optional :create_time, :message, 2, "google.protobuf.Timestamp"
73
- optional :source_database, :string, 3
74
- end
75
- end
76
-
77
- module Google
78
- module Spanner
79
- module Admin
80
- module Database
81
- module V1
82
- Backup = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup").msgclass
83
- Backup::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup.State").enummodule
84
- CreateBackupRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupRequest").msgclass
85
- CreateBackupMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupMetadata").msgclass
86
- UpdateBackupRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateBackupRequest").msgclass
87
- GetBackupRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetBackupRequest").msgclass
88
- DeleteBackupRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DeleteBackupRequest").msgclass
89
- ListBackupsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsRequest").msgclass
90
- ListBackupsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsResponse").msgclass
91
- ListBackupOperationsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsRequest").msgclass
92
- ListBackupOperationsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsResponse").msgclass
93
- BackupInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInfo").msgclass
94
- end
95
- end
96
- end
97
- end
98
- end
@@ -1,28 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/spanner/admin/database/v1/common.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/field_behavior_pb'
8
- require 'google/protobuf/timestamp_pb'
9
- require 'google/api/annotations_pb'
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_message "google.spanner.admin.database.v1.OperationProgress" do
12
- optional :progress_percent, :int32, 1
13
- optional :start_time, :message, 2, "google.protobuf.Timestamp"
14
- optional :end_time, :message, 3, "google.protobuf.Timestamp"
15
- end
16
- end
17
-
18
- module Google
19
- module Spanner
20
- module Admin
21
- module Database
22
- module V1
23
- OperationProgress = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OperationProgress").msgclass
24
- end
25
- end
26
- end
27
- end
28
- end
@@ -1,141 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/spanner/admin/database/v1/spanner_database_admin.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
- require 'google/iam/v1/iam_policy_pb'
12
- require 'google/iam/v1/policy_pb'
13
- require 'google/longrunning/operations_pb'
14
- require 'google/protobuf/empty_pb'
15
- require 'google/protobuf/timestamp_pb'
16
- require 'google/spanner/admin/database/v1/backup_pb'
17
- require 'google/spanner/admin/database/v1/common_pb'
18
- Google::Protobuf::DescriptorPool.generated_pool.build do
19
- add_message "google.spanner.admin.database.v1.RestoreInfo" do
20
- optional :source_type, :enum, 1, "google.spanner.admin.database.v1.RestoreSourceType"
21
- oneof :source_info do
22
- optional :backup_info, :message, 2, "google.spanner.admin.database.v1.BackupInfo"
23
- end
24
- end
25
- add_message "google.spanner.admin.database.v1.Database" do
26
- optional :name, :string, 1
27
- optional :state, :enum, 2, "google.spanner.admin.database.v1.Database.State"
28
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
29
- optional :restore_info, :message, 4, "google.spanner.admin.database.v1.RestoreInfo"
30
- end
31
- add_enum "google.spanner.admin.database.v1.Database.State" do
32
- value :STATE_UNSPECIFIED, 0
33
- value :CREATING, 1
34
- value :READY, 2
35
- value :READY_OPTIMIZING, 3
36
- end
37
- add_message "google.spanner.admin.database.v1.ListDatabasesRequest" do
38
- optional :parent, :string, 1
39
- optional :page_size, :int32, 3
40
- optional :page_token, :string, 4
41
- end
42
- add_message "google.spanner.admin.database.v1.ListDatabasesResponse" do
43
- repeated :databases, :message, 1, "google.spanner.admin.database.v1.Database"
44
- optional :next_page_token, :string, 2
45
- end
46
- add_message "google.spanner.admin.database.v1.CreateDatabaseRequest" do
47
- optional :parent, :string, 1
48
- optional :create_statement, :string, 2
49
- repeated :extra_statements, :string, 3
50
- end
51
- add_message "google.spanner.admin.database.v1.CreateDatabaseMetadata" do
52
- optional :database, :string, 1
53
- end
54
- add_message "google.spanner.admin.database.v1.GetDatabaseRequest" do
55
- optional :name, :string, 1
56
- end
57
- add_message "google.spanner.admin.database.v1.UpdateDatabaseDdlRequest" do
58
- optional :database, :string, 1
59
- repeated :statements, :string, 2
60
- optional :operation_id, :string, 3
61
- end
62
- add_message "google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata" do
63
- optional :database, :string, 1
64
- repeated :statements, :string, 2
65
- repeated :commit_timestamps, :message, 3, "google.protobuf.Timestamp"
66
- end
67
- add_message "google.spanner.admin.database.v1.DropDatabaseRequest" do
68
- optional :database, :string, 1
69
- end
70
- add_message "google.spanner.admin.database.v1.GetDatabaseDdlRequest" do
71
- optional :database, :string, 1
72
- end
73
- add_message "google.spanner.admin.database.v1.GetDatabaseDdlResponse" do
74
- repeated :statements, :string, 1
75
- end
76
- add_message "google.spanner.admin.database.v1.ListDatabaseOperationsRequest" do
77
- optional :parent, :string, 1
78
- optional :filter, :string, 2
79
- optional :page_size, :int32, 3
80
- optional :page_token, :string, 4
81
- end
82
- add_message "google.spanner.admin.database.v1.ListDatabaseOperationsResponse" do
83
- repeated :operations, :message, 1, "google.longrunning.Operation"
84
- optional :next_page_token, :string, 2
85
- end
86
- add_message "google.spanner.admin.database.v1.RestoreDatabaseRequest" do
87
- optional :parent, :string, 1
88
- optional :database_id, :string, 2
89
- oneof :source do
90
- optional :backup, :string, 3
91
- end
92
- end
93
- add_message "google.spanner.admin.database.v1.RestoreDatabaseMetadata" do
94
- optional :name, :string, 1
95
- optional :source_type, :enum, 2, "google.spanner.admin.database.v1.RestoreSourceType"
96
- optional :progress, :message, 4, "google.spanner.admin.database.v1.OperationProgress"
97
- optional :cancel_time, :message, 5, "google.protobuf.Timestamp"
98
- optional :optimize_database_operation_name, :string, 6
99
- oneof :source_info do
100
- optional :backup_info, :message, 3, "google.spanner.admin.database.v1.BackupInfo"
101
- end
102
- end
103
- add_message "google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata" do
104
- optional :name, :string, 1
105
- optional :progress, :message, 2, "google.spanner.admin.database.v1.OperationProgress"
106
- end
107
- add_enum "google.spanner.admin.database.v1.RestoreSourceType" do
108
- value :TYPE_UNSPECIFIED, 0
109
- value :BACKUP, 1
110
- end
111
- end
112
-
113
- module Google
114
- module Spanner
115
- module Admin
116
- module Database
117
- module V1
118
- RestoreInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreInfo").msgclass
119
- Database = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database").msgclass
120
- Database::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database.State").enummodule
121
- ListDatabasesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesRequest").msgclass
122
- ListDatabasesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesResponse").msgclass
123
- CreateDatabaseRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseRequest").msgclass
124
- CreateDatabaseMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseMetadata").msgclass
125
- GetDatabaseRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseRequest").msgclass
126
- UpdateDatabaseDdlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlRequest").msgclass
127
- UpdateDatabaseDdlMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata").msgclass
128
- DropDatabaseRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DropDatabaseRequest").msgclass
129
- GetDatabaseDdlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlRequest").msgclass
130
- GetDatabaseDdlResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlResponse").msgclass
131
- ListDatabaseOperationsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsRequest").msgclass
132
- ListDatabaseOperationsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsResponse").msgclass
133
- RestoreDatabaseRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseRequest").msgclass
134
- RestoreDatabaseMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseMetadata").msgclass
135
- OptimizeRestoredDatabaseMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata").msgclass
136
- RestoreSourceType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule
137
- end
138
- end
139
- end
140
- end
141
- end
@@ -1,169 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/spanner/admin/database/v1/spanner_database_admin.proto for package 'google.spanner.admin.database.v1'
3
- # Original file comments:
4
- # Copyright 2020 Google LLC
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
-
20
- require 'grpc'
21
- require 'google/spanner/admin/database/v1/spanner_database_admin_pb'
22
-
23
- module Google
24
- module Spanner
25
- module Admin
26
- module Database
27
- module V1
28
- module DatabaseAdmin
29
- # Cloud Spanner Database Admin API
30
- #
31
- # The Cloud Spanner Database Admin API can be used to create, drop, and
32
- # list databases. It also enables updating the schema of pre-existing
33
- # databases. It can be also used to create, delete and list backups for a
34
- # database and to restore from an existing backup.
35
- class Service
36
-
37
- include GRPC::GenericService
38
-
39
- self.marshal_class_method = :encode
40
- self.unmarshal_class_method = :decode
41
- self.service_name = 'google.spanner.admin.database.v1.DatabaseAdmin'
42
-
43
- # Lists Cloud Spanner databases.
44
- rpc :ListDatabases, ListDatabasesRequest, ListDatabasesResponse
45
- # Creates a new Cloud Spanner database and starts to prepare it for serving.
46
- # The returned [long-running operation][google.longrunning.Operation] will
47
- # have a name of the format `<database_name>/operations/<operation_id>` and
48
- # can be used to track preparation of the database. The
49
- # [metadata][google.longrunning.Operation.metadata] field type is
50
- # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
51
- # [response][google.longrunning.Operation.response] field type is
52
- # [Database][google.spanner.admin.database.v1.Database], if successful.
53
- rpc :CreateDatabase, CreateDatabaseRequest, Google::Longrunning::Operation
54
- # Gets the state of a Cloud Spanner database.
55
- rpc :GetDatabase, GetDatabaseRequest, Database
56
- # Updates the schema of a Cloud Spanner database by
57
- # creating/altering/dropping tables, columns, indexes, etc. The returned
58
- # [long-running operation][google.longrunning.Operation] will have a name of
59
- # the format `<database_name>/operations/<operation_id>` and can be used to
60
- # track execution of the schema change(s). The
61
- # [metadata][google.longrunning.Operation.metadata] field type is
62
- # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
63
- rpc :UpdateDatabaseDdl, UpdateDatabaseDdlRequest, Google::Longrunning::Operation
64
- # Drops (aka deletes) a Cloud Spanner database.
65
- # Completed backups for the database will be retained according to their
66
- # `expire_time`.
67
- rpc :DropDatabase, DropDatabaseRequest, Google::Protobuf::Empty
68
- # Returns the schema of a Cloud Spanner database as a list of formatted
69
- # DDL statements. This method does not show pending schema updates, those may
70
- # be queried using the [Operations][google.longrunning.Operations] API.
71
- rpc :GetDatabaseDdl, GetDatabaseDdlRequest, GetDatabaseDdlResponse
72
- # Sets the access control policy on a database or backup resource.
73
- # Replaces any existing policy.
74
- #
75
- # Authorization requires `spanner.databases.setIamPolicy`
76
- # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
77
- # For backups, authorization requires `spanner.backups.setIamPolicy`
78
- # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
79
- rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
80
- # Gets the access control policy for a database or backup resource.
81
- # Returns an empty policy if a database or backup exists but does not have a
82
- # policy set.
83
- #
84
- # Authorization requires `spanner.databases.getIamPolicy` permission on
85
- # [resource][google.iam.v1.GetIamPolicyRequest.resource].
86
- # For backups, authorization requires `spanner.backups.getIamPolicy`
87
- # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].
88
- rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
89
- # Returns permissions that the caller has on the specified database or backup
90
- # resource.
91
- #
92
- # Attempting this RPC on a non-existent Cloud Spanner database will
93
- # result in a NOT_FOUND error if the user has
94
- # `spanner.databases.list` permission on the containing Cloud
95
- # Spanner instance. Otherwise returns an empty set of permissions.
96
- # Calling this method on a backup that does not exist will
97
- # result in a NOT_FOUND error if the user has
98
- # `spanner.backups.list` permission on the containing instance.
99
- rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
100
- # Starts creating a new Cloud Spanner Backup.
101
- # The returned backup [long-running operation][google.longrunning.Operation]
102
- # will have a name of the format
103
- # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
104
- # and can be used to track creation of the backup. The
105
- # [metadata][google.longrunning.Operation.metadata] field type is
106
- # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The
107
- # [response][google.longrunning.Operation.response] field type is
108
- # [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
109
- # creation and delete the backup.
110
- # There can be only one pending backup creation per database. Backup creation
111
- # of different databases can run concurrently.
112
- rpc :CreateBackup, CreateBackupRequest, Google::Longrunning::Operation
113
- # Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
114
- rpc :GetBackup, GetBackupRequest, Backup
115
- # Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
116
- rpc :UpdateBackup, UpdateBackupRequest, Backup
117
- # Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
118
- rpc :DeleteBackup, DeleteBackupRequest, Google::Protobuf::Empty
119
- # Lists completed and pending backups.
120
- # Backups returned are ordered by `create_time` in descending order,
121
- # starting from the most recent `create_time`.
122
- rpc :ListBackups, ListBackupsRequest, ListBackupsResponse
123
- # Create a new database by restoring from a completed backup. The new
124
- # database must be in the same project and in an instance with the same
125
- # instance configuration as the instance containing
126
- # the backup. The returned database [long-running
127
- # operation][google.longrunning.Operation] has a name of the format
128
- # `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`,
129
- # and can be used to track the progress of the operation, and to cancel it.
130
- # The [metadata][google.longrunning.Operation.metadata] field type is
131
- # [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
132
- # The [response][google.longrunning.Operation.response] type
133
- # is [Database][google.spanner.admin.database.v1.Database], if
134
- # successful. Cancelling the returned operation will stop the restore and
135
- # delete the database.
136
- # There can be only one database being restored into an instance at a time.
137
- # Once the restore operation completes, a new restore operation can be
138
- # initiated, without waiting for the optimize operation associated with the
139
- # first restore to complete.
140
- rpc :RestoreDatabase, RestoreDatabaseRequest, Google::Longrunning::Operation
141
- # Lists database [longrunning-operations][google.longrunning.Operation].
142
- # A database operation has a name of the form
143
- # `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`.
144
- # The long-running operation
145
- # [metadata][google.longrunning.Operation.metadata] field type
146
- # `metadata.type_url` describes the type of the metadata. Operations returned
147
- # include those that have completed/failed/canceled within the last 7 days,
148
- # and pending operations.
149
- rpc :ListDatabaseOperations, ListDatabaseOperationsRequest, ListDatabaseOperationsResponse
150
- # Lists the backup [long-running operations][google.longrunning.Operation] in
151
- # the given instance. A backup operation has a name of the form
152
- # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`.
153
- # The long-running operation
154
- # [metadata][google.longrunning.Operation.metadata] field type
155
- # `metadata.type_url` describes the type of the metadata. Operations returned
156
- # include those that have completed/failed/canceled within the last 7 days,
157
- # and pending operations. Operations returned are ordered by
158
- # `operation.metadata.value.progress.start_time` in descending order starting
159
- # from the most recently started operation.
160
- rpc :ListBackupOperations, ListBackupOperationsRequest, ListBackupOperationsResponse
161
- end
162
-
163
- Stub = Service.rpc_stub_class
164
- end
165
- end
166
- end
167
- end
168
- end
169
- end