google-cloud-spanner-admin-database-v1 0.1.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,6 +45,50 @@ module Google
45
45
  "projects/#{project}/instances/#{instance}/backups/#{backup}"
46
46
  end
47
47
 
48
+ ##
49
+ # Create a fully-qualified CryptoKey resource string.
50
+ #
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param key_ring [String]
58
+ # @param crypto_key [String]
59
+ #
60
+ # @return [::String]
61
+ def crypto_key_path project:, location:, key_ring:, crypto_key:
62
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
63
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
64
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
65
+
66
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
67
+ end
68
+
69
+ ##
70
+ # Create a fully-qualified CryptoKeyVersion resource string.
71
+ #
72
+ # The resource will be in the following format:
73
+ #
74
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`
75
+ #
76
+ # @param project [String]
77
+ # @param location [String]
78
+ # @param key_ring [String]
79
+ # @param crypto_key [String]
80
+ # @param crypto_key_version [String]
81
+ #
82
+ # @return [::String]
83
+ def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
84
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
85
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
86
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
87
+ raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"
88
+
89
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
90
+ end
91
+
48
92
  ##
49
93
  # Create a fully-qualified Database resource string.
50
94
  #
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Database
25
25
  module V1
26
- VERSION = "0.1.2"
26
+ VERSION = "0.4.0"
27
27
  end
28
28
  end
29
29
  end
@@ -9,17 +9,18 @@ require 'google/longrunning/operations_pb'
9
9
  require 'google/protobuf/field_mask_pb'
10
10
  require 'google/protobuf/timestamp_pb'
11
11
  require 'google/spanner/admin/database/v1/common_pb'
12
- require 'google/api/annotations_pb'
13
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
13
  add_file("google/spanner/admin/database/v1/backup.proto", :syntax => :proto3) do
15
14
  add_message "google.spanner.admin.database.v1.Backup" do
16
15
  optional :database, :string, 2
16
+ optional :version_time, :message, 9, "google.protobuf.Timestamp"
17
17
  optional :expire_time, :message, 3, "google.protobuf.Timestamp"
18
18
  optional :name, :string, 1
19
19
  optional :create_time, :message, 4, "google.protobuf.Timestamp"
20
20
  optional :size_bytes, :int64, 5
21
21
  optional :state, :enum, 6, "google.spanner.admin.database.v1.Backup.State"
22
22
  repeated :referencing_databases, :string, 7
23
+ optional :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
23
24
  end
24
25
  add_enum "google.spanner.admin.database.v1.Backup.State" do
25
26
  value :STATE_UNSPECIFIED, 0
@@ -30,6 +31,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
30
31
  optional :parent, :string, 1
31
32
  optional :backup_id, :string, 2
32
33
  optional :backup, :message, 3, "google.spanner.admin.database.v1.Backup"
34
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.CreateBackupEncryptionConfig"
33
35
  end
34
36
  add_message "google.spanner.admin.database.v1.CreateBackupMetadata" do
35
37
  optional :name, :string, 1
@@ -69,9 +71,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
69
71
  end
70
72
  add_message "google.spanner.admin.database.v1.BackupInfo" do
71
73
  optional :backup, :string, 1
74
+ optional :version_time, :message, 4, "google.protobuf.Timestamp"
72
75
  optional :create_time, :message, 2, "google.protobuf.Timestamp"
73
76
  optional :source_database, :string, 3
74
77
  end
78
+ add_message "google.spanner.admin.database.v1.CreateBackupEncryptionConfig" do
79
+ optional :encryption_type, :enum, 1, "google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType"
80
+ optional :kms_key_name, :string, 2
81
+ end
82
+ add_enum "google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType" do
83
+ value :ENCRYPTION_TYPE_UNSPECIFIED, 0
84
+ value :USE_DATABASE_ENCRYPTION, 1
85
+ value :GOOGLE_DEFAULT_ENCRYPTION, 2
86
+ value :CUSTOMER_MANAGED_ENCRYPTION, 3
87
+ end
75
88
  end
76
89
  end
77
90
 
@@ -93,6 +106,8 @@ module Google
93
106
  ListBackupOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsRequest").msgclass
94
107
  ListBackupOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsResponse").msgclass
95
108
  BackupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInfo").msgclass
109
+ CreateBackupEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig").msgclass
110
+ CreateBackupEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType").enummodule
96
111
  end
97
112
  end
98
113
  end
@@ -4,8 +4,9 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
7
8
  require 'google/protobuf/timestamp_pb'
8
- require 'google/api/annotations_pb'
9
+ require 'google/rpc/status_pb'
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/spanner/admin/database/v1/common.proto", :syntax => :proto3) do
11
12
  add_message "google.spanner.admin.database.v1.OperationProgress" do
@@ -13,6 +14,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  optional :start_time, :message, 2, "google.protobuf.Timestamp"
14
15
  optional :end_time, :message, 3, "google.protobuf.Timestamp"
15
16
  end
17
+ add_message "google.spanner.admin.database.v1.EncryptionConfig" do
18
+ optional :kms_key_name, :string, 2
19
+ end
20
+ add_message "google.spanner.admin.database.v1.EncryptionInfo" do
21
+ optional :encryption_type, :enum, 3, "google.spanner.admin.database.v1.EncryptionInfo.Type"
22
+ optional :encryption_status, :message, 4, "google.rpc.Status"
23
+ optional :kms_key_version, :string, 2
24
+ end
25
+ add_enum "google.spanner.admin.database.v1.EncryptionInfo.Type" do
26
+ value :TYPE_UNSPECIFIED, 0
27
+ value :GOOGLE_DEFAULT_ENCRYPTION, 1
28
+ value :CUSTOMER_MANAGED_ENCRYPTION, 2
29
+ end
16
30
  end
17
31
  end
18
32
 
@@ -23,6 +37,9 @@ module Google
23
37
  module Database
24
38
  module V1
25
39
  OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OperationProgress").msgclass
40
+ EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionConfig").msgclass
41
+ EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo").msgclass
42
+ EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo.Type").enummodule
26
43
  end
27
44
  end
28
45
  end
@@ -27,6 +27,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
27
27
  optional :state, :enum, 2, "google.spanner.admin.database.v1.Database.State"
28
28
  optional :create_time, :message, 3, "google.protobuf.Timestamp"
29
29
  optional :restore_info, :message, 4, "google.spanner.admin.database.v1.RestoreInfo"
30
+ optional :encryption_config, :message, 5, "google.spanner.admin.database.v1.EncryptionConfig"
31
+ repeated :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
32
+ optional :version_retention_period, :string, 6
33
+ optional :earliest_version_time, :message, 7, "google.protobuf.Timestamp"
30
34
  end
31
35
  add_enum "google.spanner.admin.database.v1.Database.State" do
32
36
  value :STATE_UNSPECIFIED, 0
@@ -47,6 +51,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
47
51
  optional :parent, :string, 1
48
52
  optional :create_statement, :string, 2
49
53
  repeated :extra_statements, :string, 3
54
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.EncryptionConfig"
50
55
  end
51
56
  add_message "google.spanner.admin.database.v1.CreateDatabaseMetadata" do
52
57
  optional :database, :string, 1
@@ -63,6 +68,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
63
68
  optional :database, :string, 1
64
69
  repeated :statements, :string, 2
65
70
  repeated :commit_timestamps, :message, 3, "google.protobuf.Timestamp"
71
+ optional :throttled, :bool, 4
66
72
  end
67
73
  add_message "google.spanner.admin.database.v1.DropDatabaseRequest" do
68
74
  optional :database, :string, 1
@@ -86,10 +92,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
86
92
  add_message "google.spanner.admin.database.v1.RestoreDatabaseRequest" do
87
93
  optional :parent, :string, 1
88
94
  optional :database_id, :string, 2
95
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig"
89
96
  oneof :source do
90
97
  optional :backup, :string, 3
91
98
  end
92
99
  end
100
+ add_message "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig" do
101
+ optional :encryption_type, :enum, 1, "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType"
102
+ optional :kms_key_name, :string, 2
103
+ end
104
+ add_enum "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType" do
105
+ value :ENCRYPTION_TYPE_UNSPECIFIED, 0
106
+ value :USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION, 1
107
+ value :GOOGLE_DEFAULT_ENCRYPTION, 2
108
+ value :CUSTOMER_MANAGED_ENCRYPTION, 3
109
+ end
93
110
  add_message "google.spanner.admin.database.v1.RestoreDatabaseMetadata" do
94
111
  optional :name, :string, 1
95
112
  optional :source_type, :enum, 2, "google.spanner.admin.database.v1.RestoreSourceType"
@@ -133,6 +150,8 @@ module Google
133
150
  ListDatabaseOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsRequest").msgclass
134
151
  ListDatabaseOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsResponse").msgclass
135
152
  RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseRequest").msgclass
153
+ RestoreDatabaseEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig").msgclass
154
+ RestoreDatabaseEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType").enummodule
136
155
  RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseMetadata").msgclass
137
156
  OptimizeRestoredDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata").msgclass
138
157
  RestoreSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule
@@ -41,34 +41,35 @@ module Google
41
41
  self.service_name = 'google.spanner.admin.database.v1.DatabaseAdmin'
42
42
 
43
43
  # Lists Cloud Spanner databases.
44
- rpc :ListDatabases, Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse
44
+ rpc :ListDatabases, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse
45
45
  # Creates a new Cloud Spanner database and starts to prepare it for serving.
46
46
  # The returned [long-running operation][google.longrunning.Operation] will
47
47
  # have a name of the format `<database_name>/operations/<operation_id>` and
48
48
  # can be used to track preparation of the database. The
49
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
50
+ # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
51
+ # The [response][google.longrunning.Operation.response] field type is
52
52
  # [Database][google.spanner.admin.database.v1.Database], if successful.
53
- rpc :CreateDatabase, Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, Google::Longrunning::Operation
53
+ rpc :CreateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation
54
54
  # Gets the state of a Cloud Spanner database.
55
- rpc :GetDatabase, Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, Google::Cloud::Spanner::Admin::Database::V1::Database
55
+ rpc :GetDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Database
56
56
  # Updates the schema of a Cloud Spanner database by
57
57
  # creating/altering/dropping tables, columns, indexes, etc. The returned
58
58
  # [long-running operation][google.longrunning.Operation] will have a name of
59
59
  # the format `<database_name>/operations/<operation_id>` and can be used to
60
60
  # track execution of the schema change(s). The
61
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, Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, Google::Longrunning::Operation
62
+ # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
63
+ # The operation has no response.
64
+ rpc :UpdateDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Google::Longrunning::Operation
64
65
  # Drops (aka deletes) a Cloud Spanner database.
65
66
  # Completed backups for the database will be retained according to their
66
67
  # `expire_time`.
67
- rpc :DropDatabase, Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, Google::Protobuf::Empty
68
+ rpc :DropDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, ::Google::Protobuf::Empty
68
69
  # Returns the schema of a Cloud Spanner database as a list of formatted
69
70
  # DDL statements. This method does not show pending schema updates, those may
70
71
  # be queried using the [Operations][google.longrunning.Operations] API.
71
- rpc :GetDatabaseDdl, Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse
72
+ rpc :GetDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse
72
73
  # Sets the access control policy on a database or backup resource.
73
74
  # Replaces any existing policy.
74
75
  #
@@ -76,7 +77,7 @@ module Google
76
77
  # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
77
78
  # For backups, authorization requires `spanner.backups.setIamPolicy`
78
79
  # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
79
- rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
80
+ rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
80
81
  # Gets the access control policy for a database or backup resource.
81
82
  # Returns an empty policy if a database or backup exists but does not have a
82
83
  # policy set.
@@ -85,7 +86,7 @@ module Google
85
86
  # [resource][google.iam.v1.GetIamPolicyRequest.resource].
86
87
  # For backups, authorization requires `spanner.backups.getIamPolicy`
87
88
  # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].
88
- rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
89
+ rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
89
90
  # Returns permissions that the caller has on the specified database or backup
90
91
  # resource.
91
92
  #
@@ -96,30 +97,33 @@ module Google
96
97
  # Calling this method on a backup that does not exist will
97
98
  # result in a NOT_FOUND error if the user has
98
99
  # `spanner.backups.list` permission on the containing instance.
99
- rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
100
+ rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
100
101
  # Starts creating a new Cloud Spanner Backup.
101
102
  # The returned backup [long-running operation][google.longrunning.Operation]
102
103
  # will have a name of the format
103
104
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
104
105
  # and can be used to track creation of the backup. The
105
106
  # [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, Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, Google::Longrunning::Operation
113
- # Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
114
- rpc :GetBackup, Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, Google::Cloud::Spanner::Admin::Database::V1::Backup
115
- # Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
116
- rpc :UpdateBackup, Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, Google::Cloud::Spanner::Admin::Database::V1::Backup
117
- # Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
118
- rpc :DeleteBackup, Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, Google::Protobuf::Empty
107
+ # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
108
+ # The [response][google.longrunning.Operation.response] field type is
109
+ # [Backup][google.spanner.admin.database.v1.Backup], if successful.
110
+ # Cancelling the returned operation will stop the creation and delete the
111
+ # backup. There can be only one pending backup creation per database. Backup
112
+ # creation of different databases can run concurrently.
113
+ rpc :CreateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Google::Longrunning::Operation
114
+ # Gets metadata on a pending or completed
115
+ # [Backup][google.spanner.admin.database.v1.Backup].
116
+ rpc :GetBackup, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
117
+ # Updates a pending or completed
118
+ # [Backup][google.spanner.admin.database.v1.Backup].
119
+ rpc :UpdateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
120
+ # Deletes a pending or completed
121
+ # [Backup][google.spanner.admin.database.v1.Backup].
122
+ rpc :DeleteBackup, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Google::Protobuf::Empty
119
123
  # Lists completed and pending backups.
120
124
  # Backups returned are ordered by `create_time` in descending order,
121
125
  # starting from the most recent `create_time`.
122
- rpc :ListBackups, Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse
126
+ rpc :ListBackups, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse
123
127
  # Create a new database by restoring from a completed backup. The new
124
128
  # database must be in the same project and in an instance with the same
125
129
  # instance configuration as the instance containing
@@ -137,7 +141,7 @@ module Google
137
141
  # Once the restore operation completes, a new restore operation can be
138
142
  # initiated, without waiting for the optimize operation associated with the
139
143
  # first restore to complete.
140
- rpc :RestoreDatabase, Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, Google::Longrunning::Operation
144
+ rpc :RestoreDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, ::Google::Longrunning::Operation
141
145
  # Lists database [longrunning-operations][google.longrunning.Operation].
142
146
  # A database operation has a name of the form
143
147
  # `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`.
@@ -146,7 +150,7 @@ module Google
146
150
  # `metadata.type_url` describes the type of the metadata. Operations returned
147
151
  # include those that have completed/failed/canceled within the last 7 days,
148
152
  # and pending operations.
149
- rpc :ListDatabaseOperations, Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse
153
+ rpc :ListDatabaseOperations, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse
150
154
  # Lists the backup [long-running operations][google.longrunning.Operation] in
151
155
  # the given instance. A backup operation has a name of the form
152
156
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`.
@@ -157,7 +161,7 @@ module Google
157
161
  # and pending operations. Operations returned are ordered by
158
162
  # `operation.metadata.value.progress.start_time` in descending order starting
159
163
  # from the most recently started operation.
160
- rpc :ListBackupOperations, Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse
164
+ rpc :ListBackupOperations, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse
161
165
  end
162
166
 
163
167
  Stub = Service.rpc_stub_class
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods