google-cloud-build-v1 0.2.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,7 +47,7 @@ module Google
47
47
  # @return [::String]
48
48
  def build_path **args
49
49
  resources = {
50
- "build:project" => (proc do |project:, build:|
50
+ "build:project" => (proc do |project:, build:|
51
51
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
52
52
 
53
53
  "projects/#{project}/builds/#{build}"
@@ -82,6 +82,27 @@ module Google
82
82
  "projects/#{project}/triggers/#{trigger}"
83
83
  end
84
84
 
85
+ ##
86
+ # Create a fully-qualified CryptoKey resource string.
87
+ #
88
+ # The resource will be in the following format:
89
+ #
90
+ # `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
91
+ #
92
+ # @param project [String]
93
+ # @param location [String]
94
+ # @param keyring [String]
95
+ # @param key [String]
96
+ #
97
+ # @return [::String]
98
+ def crypto_key_path project:, location:, keyring:, key:
99
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
100
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
101
+ raise ::ArgumentError, "keyring cannot contain /" if keyring.to_s.include? "/"
102
+
103
+ "projects/#{project}/locations/#{location}/keyRings/#{keyring}/cryptoKeys/#{key}"
104
+ end
105
+
85
106
  ##
86
107
  # Create a fully-qualified Location resource string.
87
108
  #
@@ -113,6 +134,25 @@ module Google
113
134
  "projects/#{project}"
114
135
  end
115
136
 
137
+ ##
138
+ # Create a fully-qualified SecretVersion resource string.
139
+ #
140
+ # The resource will be in the following format:
141
+ #
142
+ # `projects/{project}/secrets/{secret}/versions/{version}`
143
+ #
144
+ # @param project [String]
145
+ # @param secret [String]
146
+ # @param version [String]
147
+ #
148
+ # @return [::String]
149
+ def secret_version_path project:, secret:, version:
150
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
151
+ raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
152
+
153
+ "projects/#{project}/secrets/#{secret}/versions/#{version}"
154
+ end
155
+
116
156
  ##
117
157
  # Create a fully-qualified ServiceAccount resource string.
118
158
  #
@@ -130,6 +170,40 @@ module Google
130
170
  "projects/#{project}/serviceAccounts/#{service_account}"
131
171
  end
132
172
 
173
+ ##
174
+ # Create a fully-qualified Subscription resource string.
175
+ #
176
+ # The resource will be in the following format:
177
+ #
178
+ # `projects/{project}/subscriptions/{subscription}`
179
+ #
180
+ # @param project [String]
181
+ # @param subscription [String]
182
+ #
183
+ # @return [::String]
184
+ def subscription_path project:, subscription:
185
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
186
+
187
+ "projects/#{project}/subscriptions/#{subscription}"
188
+ end
189
+
190
+ ##
191
+ # Create a fully-qualified Topic resource string.
192
+ #
193
+ # The resource will be in the following format:
194
+ #
195
+ # `projects/{project}/topics/{topic}`
196
+ #
197
+ # @param project [String]
198
+ # @param topic [String]
199
+ #
200
+ # @return [::String]
201
+ def topic_path project:, topic:
202
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
203
+
204
+ "projects/#{project}/topics/#{topic}"
205
+ end
206
+
133
207
  extend self
134
208
  end
135
209
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Build
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/api/annotations_pb'
7
7
  require 'google/api/client_pb'
8
8
  require 'google/api/field_behavior_pb'
9
+ require 'google/api/httpbody_pb'
9
10
  require 'google/api/resource_pb'
10
11
  require 'google/longrunning/operations_pb'
11
12
  require 'google/protobuf/duration_pb'
@@ -109,6 +110,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
109
110
  repeated :secrets, :message, 32, "google.devtools.cloudbuild.v1.Secret"
110
111
  map :timing, :string, :message, 33, "google.devtools.cloudbuild.v1.TimeSpan"
111
112
  optional :service_account, :string, 42
113
+ optional :available_secrets, :message, 47, "google.devtools.cloudbuild.v1.Secrets"
112
114
  end
113
115
  add_enum "google.devtools.cloudbuild.v1.Build.Status" do
114
116
  value :STATUS_UNKNOWN, 0
@@ -154,6 +156,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
154
156
  value :SHA256, 1
155
157
  value :MD5, 2
156
158
  end
159
+ add_message "google.devtools.cloudbuild.v1.Secrets" do
160
+ repeated :secret_manager, :message, 1, "google.devtools.cloudbuild.v1.SecretManagerSecret"
161
+ repeated :inline, :message, 2, "google.devtools.cloudbuild.v1.InlineSecret"
162
+ end
163
+ add_message "google.devtools.cloudbuild.v1.InlineSecret" do
164
+ optional :kms_key_name, :string, 1
165
+ map :env_map, :string, :bytes, 2
166
+ end
167
+ add_message "google.devtools.cloudbuild.v1.SecretManagerSecret" do
168
+ optional :version_name, :string, 1
169
+ optional :env, :string, 2
170
+ end
157
171
  add_message "google.devtools.cloudbuild.v1.Secret" do
158
172
  optional :kms_key_name, :string, 1
159
173
  map :secret_env, :string, :bytes, 3
@@ -191,11 +205,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
191
205
  repeated :tags, :string, 19
192
206
  optional :trigger_template, :message, 7, "google.devtools.cloudbuild.v1.RepoSource"
193
207
  optional :github, :message, 13, "google.devtools.cloudbuild.v1.GitHubEventsConfig"
208
+ optional :pubsub_config, :message, 29, "google.devtools.cloudbuild.v1.PubsubConfig"
194
209
  optional :create_time, :message, 5, "google.protobuf.Timestamp"
195
210
  optional :disabled, :bool, 9
196
211
  map :substitutions, :string, :string, 11
197
212
  repeated :ignored_files, :string, 15
198
213
  repeated :included_files, :string, 16
214
+ optional :filter, :string, 30
199
215
  oneof :build_template do
200
216
  optional :build, :message, 4, "google.devtools.cloudbuild.v1.Build"
201
217
  optional :filename, :string, 8
@@ -210,6 +226,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
210
226
  optional :push, :message, 5, "google.devtools.cloudbuild.v1.PushFilter"
211
227
  end
212
228
  end
229
+ add_message "google.devtools.cloudbuild.v1.PubsubConfig" do
230
+ optional :subscription, :string, 1
231
+ optional :topic, :string, 2
232
+ optional :service_account_email, :string, 3
233
+ optional :state, :enum, 4, "google.devtools.cloudbuild.v1.PubsubConfig.State"
234
+ end
235
+ add_enum "google.devtools.cloudbuild.v1.PubsubConfig.State" do
236
+ value :STATE_UNSPECIFIED, 0
237
+ value :OK, 1
238
+ value :SUBSCRIPTION_DELETED, 2
239
+ value :TOPIC_DELETED, 3
240
+ value :SUBSCRIPTION_MISCONFIGURED, 4
241
+ end
213
242
  add_message "google.devtools.cloudbuild.v1.PullRequestFilter" do
214
243
  optional :comment_control, :enum, 5, "google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl"
215
244
  optional :invert_regex, :bool, 6
@@ -220,6 +249,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
220
249
  add_enum "google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl" do
221
250
  value :COMMENTS_DISABLED, 0
222
251
  value :COMMENTS_ENABLED, 1
252
+ value :COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY, 2
223
253
  end
224
254
  add_message "google.devtools.cloudbuild.v1.PushFilter" do
225
255
  optional :invert_regex, :bool, 4
@@ -276,6 +306,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
276
306
  value :UNSPECIFIED, 0
277
307
  value :N1_HIGHCPU_8, 1
278
308
  value :N1_HIGHCPU_32, 2
309
+ value :E2_HIGHCPU_8, 5
310
+ value :E2_HIGHCPU_32, 6
279
311
  end
280
312
  add_enum "google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption" do
281
313
  value :MUST_MATCH, 0
@@ -294,6 +326,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
294
326
  value :CLOUD_LOGGING_ONLY, 5
295
327
  value :NONE, 4
296
328
  end
329
+ add_message "google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest" do
330
+ optional :body, :message, 1, "google.api.HttpBody"
331
+ optional :project_id, :string, 2
332
+ optional :trigger, :string, 3
333
+ optional :secret, :string, 4
334
+ end
335
+ add_message "google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse" do
336
+ end
297
337
  add_message "google.devtools.cloudbuild.v1.WorkerPool" do
298
338
  optional :name, :string, 14
299
339
  optional :project_id, :string, 2
@@ -378,6 +418,9 @@ module Google
378
418
  FileHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.FileHashes").msgclass
379
419
  Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash").msgclass
380
420
  Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash.HashType").enummodule
421
+ Secrets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secrets").msgclass
422
+ InlineSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.InlineSecret").msgclass
423
+ SecretManagerSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.SecretManagerSecret").msgclass
381
424
  Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secret").msgclass
382
425
  CreateBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateBuildRequest").msgclass
383
426
  GetBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetBuildRequest").msgclass
@@ -386,6 +429,8 @@ module Google
386
429
  CancelBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CancelBuildRequest").msgclass
387
430
  BuildTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildTrigger").msgclass
388
431
  GitHubEventsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEventsConfig").msgclass
432
+ PubsubConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig").msgclass
433
+ PubsubConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig.State").enummodule
389
434
  PullRequestFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter").msgclass
390
435
  PullRequestFilter::CommentControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl").enummodule
391
436
  PushFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PushFilter").msgclass
@@ -401,6 +446,8 @@ module Google
401
446
  BuildOptions::SubstitutionOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption").enummodule
402
447
  BuildOptions::LogStreamingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption").enummodule
403
448
  BuildOptions::LoggingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LoggingMode").enummodule
449
+ ReceiveTriggerWebhookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest").msgclass
450
+ ReceiveTriggerWebhookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse").msgclass
404
451
  WorkerPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool").msgclass
405
452
  WorkerPool::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.Region").enummodule
406
453
  WorkerPool::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.Status").enummodule
@@ -45,19 +45,19 @@ module Google
45
45
  # This method returns a long-running `Operation`, which includes the build
46
46
  # ID. Pass the build ID to `GetBuild` to determine the build status (such as
47
47
  # `SUCCESS` or `FAILURE`).
48
- rpc :CreateBuild, Google::Cloud::Build::V1::CreateBuildRequest, Google::Longrunning::Operation
48
+ rpc :CreateBuild, ::Google::Cloud::Build::V1::CreateBuildRequest, ::Google::Longrunning::Operation
49
49
  # Returns information about a previously requested build.
50
50
  #
51
51
  # The `Build` that is returned includes its status (such as `SUCCESS`,
52
52
  # `FAILURE`, or `WORKING`), and timing information.
53
- rpc :GetBuild, Google::Cloud::Build::V1::GetBuildRequest, Google::Cloud::Build::V1::Build
53
+ rpc :GetBuild, ::Google::Cloud::Build::V1::GetBuildRequest, ::Google::Cloud::Build::V1::Build
54
54
  # Lists previously requested builds.
55
55
  #
56
56
  # Previously requested builds may still be in-progress, or may have finished
57
57
  # successfully or unsuccessfully.
58
- rpc :ListBuilds, Google::Cloud::Build::V1::ListBuildsRequest, Google::Cloud::Build::V1::ListBuildsResponse
58
+ rpc :ListBuilds, ::Google::Cloud::Build::V1::ListBuildsRequest, ::Google::Cloud::Build::V1::ListBuildsResponse
59
59
  # Cancels a build in progress.
60
- rpc :CancelBuild, Google::Cloud::Build::V1::CancelBuildRequest, Google::Cloud::Build::V1::Build
60
+ rpc :CancelBuild, ::Google::Cloud::Build::V1::CancelBuildRequest, ::Google::Cloud::Build::V1::Build
61
61
  # Creates a new build based on the specified build.
62
62
  #
63
63
  # This method creates a new build using the original build request, which may
@@ -85,49 +85,52 @@ module Google
85
85
  # generation of the object, the new build will attempt to use the same
86
86
  # object, which may or may not be available depending on the bucket's
87
87
  # lifecycle management settings.
88
- rpc :RetryBuild, Google::Cloud::Build::V1::RetryBuildRequest, Google::Longrunning::Operation
88
+ rpc :RetryBuild, ::Google::Cloud::Build::V1::RetryBuildRequest, ::Google::Longrunning::Operation
89
89
  # Creates a new `BuildTrigger`.
90
90
  #
91
91
  # This API is experimental.
92
- rpc :CreateBuildTrigger, Google::Cloud::Build::V1::CreateBuildTriggerRequest, Google::Cloud::Build::V1::BuildTrigger
92
+ rpc :CreateBuildTrigger, ::Google::Cloud::Build::V1::CreateBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger
93
93
  # Returns information about a `BuildTrigger`.
94
94
  #
95
95
  # This API is experimental.
96
- rpc :GetBuildTrigger, Google::Cloud::Build::V1::GetBuildTriggerRequest, Google::Cloud::Build::V1::BuildTrigger
96
+ rpc :GetBuildTrigger, ::Google::Cloud::Build::V1::GetBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger
97
97
  # Lists existing `BuildTrigger`s.
98
98
  #
99
99
  # This API is experimental.
100
- rpc :ListBuildTriggers, Google::Cloud::Build::V1::ListBuildTriggersRequest, Google::Cloud::Build::V1::ListBuildTriggersResponse
100
+ rpc :ListBuildTriggers, ::Google::Cloud::Build::V1::ListBuildTriggersRequest, ::Google::Cloud::Build::V1::ListBuildTriggersResponse
101
101
  # Deletes a `BuildTrigger` by its project ID and trigger ID.
102
102
  #
103
103
  # This API is experimental.
104
- rpc :DeleteBuildTrigger, Google::Cloud::Build::V1::DeleteBuildTriggerRequest, Google::Protobuf::Empty
104
+ rpc :DeleteBuildTrigger, ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, ::Google::Protobuf::Empty
105
105
  # Updates a `BuildTrigger` by its project ID and trigger ID.
106
106
  #
107
107
  # This API is experimental.
108
- rpc :UpdateBuildTrigger, Google::Cloud::Build::V1::UpdateBuildTriggerRequest, Google::Cloud::Build::V1::BuildTrigger
108
+ rpc :UpdateBuildTrigger, ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger
109
109
  # Runs a `BuildTrigger` at a particular source revision.
110
- rpc :RunBuildTrigger, Google::Cloud::Build::V1::RunBuildTriggerRequest, Google::Longrunning::Operation
110
+ rpc :RunBuildTrigger, ::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Google::Longrunning::Operation
111
+ # ReceiveTriggerWebhook [Experimental] is called when the API receives a
112
+ # webhook request targeted at a specific trigger.
113
+ rpc :ReceiveTriggerWebhook, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse
111
114
  # Creates a `WorkerPool` to run the builds, and returns the new worker pool.
112
115
  #
113
116
  # This API is experimental.
114
- rpc :CreateWorkerPool, Google::Cloud::Build::V1::CreateWorkerPoolRequest, Google::Cloud::Build::V1::WorkerPool
117
+ rpc :CreateWorkerPool, ::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool
115
118
  # Returns information about a `WorkerPool`.
116
119
  #
117
120
  # This API is experimental.
118
- rpc :GetWorkerPool, Google::Cloud::Build::V1::GetWorkerPoolRequest, Google::Cloud::Build::V1::WorkerPool
121
+ rpc :GetWorkerPool, ::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool
119
122
  # Deletes a `WorkerPool` by its project ID and WorkerPool name.
120
123
  #
121
124
  # This API is experimental.
122
- rpc :DeleteWorkerPool, Google::Cloud::Build::V1::DeleteWorkerPoolRequest, Google::Protobuf::Empty
125
+ rpc :DeleteWorkerPool, ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Google::Protobuf::Empty
123
126
  # Update a `WorkerPool`.
124
127
  #
125
128
  # This API is experimental.
126
- rpc :UpdateWorkerPool, Google::Cloud::Build::V1::UpdateWorkerPoolRequest, Google::Cloud::Build::V1::WorkerPool
129
+ rpc :UpdateWorkerPool, ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool
127
130
  # List project's `WorkerPools`.
128
131
  #
129
132
  # This API is experimental.
130
- rpc :ListWorkerPools, Google::Cloud::Build::V1::ListWorkerPoolsRequest, Google::Cloud::Build::V1::ListWorkerPoolsResponse
133
+ rpc :ListWorkerPools, ::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Google::Cloud::Build::V1::ListWorkerPoolsResponse
131
134
  end
132
135
 
133
136
  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
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Message that represents an arbitrary HTTP body. It should only be used for
23
+ # payload formats that can't be represented as JSON, such as raw binary or
24
+ # an HTML page.
25
+ #
26
+ #
27
+ # This message can be used both in streaming and non-streaming API methods in
28
+ # the request as well as the response.
29
+ #
30
+ # It can be used as a top-level request field, which is convenient if one
31
+ # wants to extract parameters from either the URL or HTTP template into the
32
+ # request fields and also want access to the raw HTTP body.
33
+ #
34
+ # Example:
35
+ #
36
+ # message GetResourceRequest {
37
+ # // A unique request id.
38
+ # string request_id = 1;
39
+ #
40
+ # // The raw HTTP body is bound to this field.
41
+ # google.api.HttpBody http_body = 2;
42
+ # }
43
+ #
44
+ # service ResourceService {
45
+ # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
46
+ # rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);
47
+ # }
48
+ #
49
+ # Example with streaming methods:
50
+ #
51
+ # service CaldavService {
52
+ # rpc GetCalendar(stream google.api.HttpBody)
53
+ # returns (stream google.api.HttpBody);
54
+ # rpc UpdateCalendar(stream google.api.HttpBody)
55
+ # returns (stream google.api.HttpBody);
56
+ # }
57
+ #
58
+ # Use of this type only changes how the request and response bodies are
59
+ # handled, all other features will continue to work unchanged.
60
+ # @!attribute [rw] content_type
61
+ # @return [::String]
62
+ # The HTTP Content-Type string representing the content type of the body.
63
+ # @!attribute [rw] data
64
+ # @return [::String]
65
+ # HTTP body binary data.
66
+ # @!attribute [rw] extensions
67
+ # @return [::Array<::Google::Protobuf::Any>]
68
+ # Application specific response metadata. Must be set in the first response
69
+ # for streaming APIs.
70
+ class HttpBody
71
+ include ::Google::Protobuf::MessageExts
72
+ extend ::Google::Protobuf::MessageExts::ClassMethods
73
+ end
74
+ end
75
+ 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