google-cloud-build-v1 0.1.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 925fdc728c1585a26756e4fa936a639074322824f7f5beea7ad87d8d8fdc0ad1
4
- data.tar.gz: 678f72a6266bc67377a0fdc52ce392721e211fb7ef22b8c7da9406f44549b49b
3
+ metadata.gz: 3913835b4f5322f7bc2c8e39d0a056f5e6583a4dca0ef9a7ccf0bbd1ab7e467c
4
+ data.tar.gz: 887fe149fed8598c4c49aac37eb92da177aac7988185848aa719be5382d6962b
5
5
  SHA512:
6
- metadata.gz: a54b40e6384e9920cdb9caa90f3310c17a54cb8a26cad16ff4ed82ec611db3a15b990eeb61a264b4385d060317529a84d57ec1dadd8ef6919eab19d6ff55a297
7
- data.tar.gz: 131c5bbf3c6f1afc857f431d7e8cbea05eb3ceda37a91abdc8ef5c99c5660cebc25081bcbf4aef5cbfff3a70844e372dbd905281f31d03017ff29bbc1d0c6438
6
+ metadata.gz: 8331f37a78d169ea07177655ebf28a19a8ad5a6567a3e586f7f2b8676c6d8e62bed7633faea143772397368a2dd0aba05cebda8df60ddfa447c7de2289898cc0
7
+ data.tar.gz: 337b33d43edfb7a58b7abb39be04f955affe9aabd8689ed2d9c8003ae2525c728b0fde98aadad707506ed5c64d12c0bee8dcbd0af0f877437b4934f115d89b9c
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/cloud/build/v1/_helpers" if ::File.file? helper_path
@@ -23,6 +23,7 @@ require "gapic/config/method"
23
23
  require "google/cloud/build/v1/version"
24
24
 
25
25
  require "google/cloud/build/v1/cloud_build/credentials"
26
+ require "google/cloud/build/v1/cloud_build/paths"
26
27
  require "google/cloud/build/v1/cloud_build/operations"
27
28
  require "google/cloud/build/v1/cloud_build/client"
28
29
 
@@ -37,6 +37,8 @@ module Google
37
37
  # determine the status of the build.
38
38
  #
39
39
  class Client
40
+ include Paths
41
+
40
42
  # @private
41
43
  attr_reader :cloud_build_stub
42
44
 
@@ -77,7 +79,7 @@ module Google
77
79
  initial_delay: 0.1,
78
80
  max_delay: 60.0,
79
81
  multiplier: 1.3,
80
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
82
+ retry_codes: [14, 4]
81
83
  }
82
84
 
83
85
  default_config.rpcs.list_builds.timeout = 600.0
@@ -85,7 +87,7 @@ module Google
85
87
  initial_delay: 0.1,
86
88
  max_delay: 60.0,
87
89
  multiplier: 1.3,
88
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
90
+ retry_codes: [14, 4]
89
91
  }
90
92
 
91
93
  default_config.rpcs.cancel_build.timeout = 600.0
@@ -99,7 +101,7 @@ module Google
99
101
  initial_delay: 0.1,
100
102
  max_delay: 60.0,
101
103
  multiplier: 1.3,
102
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
104
+ retry_codes: [14, 4]
103
105
  }
104
106
 
105
107
  default_config.rpcs.list_build_triggers.timeout = 600.0
@@ -107,7 +109,7 @@ module Google
107
109
  initial_delay: 0.1,
108
110
  max_delay: 60.0,
109
111
  multiplier: 1.3,
110
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
112
+ retry_codes: [14, 4]
111
113
  }
112
114
 
113
115
  default_config.rpcs.delete_build_trigger.timeout = 600.0
@@ -115,13 +117,35 @@ module Google
115
117
  initial_delay: 0.1,
116
118
  max_delay: 60.0,
117
119
  multiplier: 1.3,
118
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
120
+ retry_codes: [14, 4]
119
121
  }
120
122
 
121
123
  default_config.rpcs.update_build_trigger.timeout = 600.0
122
124
 
123
125
  default_config.rpcs.run_build_trigger.timeout = 600.0
124
126
 
127
+ default_config.rpcs.create_worker_pool.timeout = 600.0
128
+
129
+ default_config.rpcs.get_worker_pool.timeout = 600.0
130
+ default_config.rpcs.get_worker_pool.retry_policy = {
131
+ initial_delay: 0.1,
132
+ max_delay: 60.0,
133
+ multiplier: 1.3,
134
+ retry_codes: [14, 4]
135
+ }
136
+
137
+ default_config.rpcs.delete_worker_pool.timeout = 600.0
138
+
139
+ default_config.rpcs.update_worker_pool.timeout = 600.0
140
+
141
+ default_config.rpcs.list_worker_pools.timeout = 600.0
142
+ default_config.rpcs.list_worker_pools.retry_policy = {
143
+ initial_delay: 0.1,
144
+ max_delay: 60.0,
145
+ multiplier: 1.3,
146
+ retry_codes: [14, 4]
147
+ }
148
+
125
149
  default_config
126
150
  end
127
151
  yield @configure if block_given?
@@ -230,11 +254,14 @@ module Google
230
254
  # @param options [::Gapic::CallOptions, ::Hash]
231
255
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
232
256
  #
233
- # @overload create_build(project_id: nil, build: nil)
257
+ # @overload create_build(parent: nil, project_id: nil, build: nil)
234
258
  # Pass arguments to `create_build` via keyword arguments. Note that at
235
259
  # least one keyword argument is required. To specify no parameters, or to keep all
236
260
  # the default parameter values, pass an empty Hash as a request object (see above).
237
261
  #
262
+ # @param parent [::String]
263
+ # The parent resource where this build will be created.
264
+ # Format: `projects/{project}/locations/{location}`
238
265
  # @param project_id [::String]
239
266
  # Required. ID of the project.
240
267
  # @param build [::Google::Cloud::Build::V1::Build, ::Hash]
@@ -302,11 +329,14 @@ module Google
302
329
  # @param options [::Gapic::CallOptions, ::Hash]
303
330
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
304
331
  #
305
- # @overload get_build(project_id: nil, id: nil)
332
+ # @overload get_build(name: nil, project_id: nil, id: nil)
306
333
  # Pass arguments to `get_build` via keyword arguments. Note that at
307
334
  # least one keyword argument is required. To specify no parameters, or to keep all
308
335
  # the default parameter values, pass an empty Hash as a request object (see above).
309
336
  #
337
+ # @param name [::String]
338
+ # The name of the `Build` to retrieve.
339
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
310
340
  # @param project_id [::String]
311
341
  # Required. ID of the project.
312
342
  # @param id [::String]
@@ -374,11 +404,14 @@ module Google
374
404
  # @param options [::Gapic::CallOptions, ::Hash]
375
405
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
376
406
  #
377
- # @overload list_builds(project_id: nil, page_size: nil, page_token: nil, filter: nil)
407
+ # @overload list_builds(parent: nil, project_id: nil, page_size: nil, page_token: nil, filter: nil)
378
408
  # Pass arguments to `list_builds` via keyword arguments. Note that at
379
409
  # least one keyword argument is required. To specify no parameters, or to keep all
380
410
  # the default parameter values, pass an empty Hash as a request object (see above).
381
411
  #
412
+ # @param parent [::String]
413
+ # The parent of the collection of `Builds`.
414
+ # Format: `projects/{project}/locations/location`
382
415
  # @param project_id [::String]
383
416
  # Required. ID of the project.
384
417
  # @param page_size [::Integer]
@@ -447,11 +480,14 @@ module Google
447
480
  # @param options [::Gapic::CallOptions, ::Hash]
448
481
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
449
482
  #
450
- # @overload cancel_build(project_id: nil, id: nil)
483
+ # @overload cancel_build(name: nil, project_id: nil, id: nil)
451
484
  # Pass arguments to `cancel_build` via keyword arguments. Note that at
452
485
  # least one keyword argument is required. To specify no parameters, or to keep all
453
486
  # the default parameter values, pass an empty Hash as a request object (see above).
454
487
  #
488
+ # @param name [::String]
489
+ # The name of the `Build` to retrieve.
490
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
455
491
  # @param project_id [::String]
456
492
  # Required. ID of the project.
457
493
  # @param id [::String]
@@ -542,11 +578,14 @@ module Google
542
578
  # @param options [::Gapic::CallOptions, ::Hash]
543
579
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
544
580
  #
545
- # @overload retry_build(project_id: nil, id: nil)
581
+ # @overload retry_build(name: nil, project_id: nil, id: nil)
546
582
  # Pass arguments to `retry_build` via keyword arguments. Note that at
547
583
  # least one keyword argument is required. To specify no parameters, or to keep all
548
584
  # the default parameter values, pass an empty Hash as a request object (see above).
549
585
  #
586
+ # @param name [::String]
587
+ # The name of the `Build` to retry.
588
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
550
589
  # @param project_id [::String]
551
590
  # Required. ID of the project.
552
591
  # @param id [::String]
@@ -1285,7 +1324,7 @@ module Google
1285
1324
  end
1286
1325
 
1287
1326
  ##
1288
- # List project's `WorkerPool`s.
1327
+ # List project's `WorkerPools`.
1289
1328
  #
1290
1329
  # This API is experimental.
1291
1330
  #
@@ -1431,7 +1470,7 @@ module Google
1431
1470
 
1432
1471
  config_attr :endpoint, "cloudbuild.googleapis.com", ::String
1433
1472
  config_attr :credentials, nil do |value|
1434
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1473
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1435
1474
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1436
1475
  allowed.any? { |klass| klass === value }
1437
1476
  end
@@ -1471,7 +1510,7 @@ module Google
1471
1510
  # Each configuration object is of type `Gapic::Config::Method` and includes
1472
1511
  # the following configuration fields:
1473
1512
  #
1474
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
1513
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1475
1514
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1476
1515
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1477
1516
  # include the following keys:
@@ -475,7 +475,7 @@ module Google
475
475
 
476
476
  config_attr :endpoint, "cloudbuild.googleapis.com", ::String
477
477
  config_attr :credentials, nil do |value|
478
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
478
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
479
479
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
480
480
  allowed.any? { |klass| klass === value }
481
481
  end
@@ -515,7 +515,7 @@ module Google
515
515
  # Each configuration object is of type `Gapic::Config::Method` and includes
516
516
  # the following configuration fields:
517
517
  #
518
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
518
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
519
519
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
520
520
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
521
521
  # include the following keys:
@@ -0,0 +1,139 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Cloud
22
+ module Build
23
+ module V1
24
+ module CloudBuild
25
+ # Path helper methods for the CloudBuild API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Build resource string.
29
+ #
30
+ # @overload build_path(project:, build:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/builds/{build}`
34
+ #
35
+ # @param project [String]
36
+ # @param build [String]
37
+ #
38
+ # @overload build_path(project:, location:, build:)
39
+ # The resource will be in the following format:
40
+ #
41
+ # `projects/{project}/locations/{location}/builds/{build}`
42
+ #
43
+ # @param project [String]
44
+ # @param location [String]
45
+ # @param build [String]
46
+ #
47
+ # @return [::String]
48
+ def build_path **args
49
+ resources = {
50
+ "build:project" => (proc do |project:, build:|
51
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
52
+
53
+ "projects/#{project}/builds/#{build}"
54
+ end),
55
+ "build:location:project" => (proc do |project:, location:, build:|
56
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
57
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
58
+
59
+ "projects/#{project}/locations/#{location}/builds/#{build}"
60
+ end)
61
+ }
62
+
63
+ resource = resources[args.keys.sort.join(":")]
64
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
65
+ resource.call(**args)
66
+ end
67
+
68
+ ##
69
+ # Create a fully-qualified BuildTrigger resource string.
70
+ #
71
+ # The resource will be in the following format:
72
+ #
73
+ # `projects/{project}/triggers/{trigger}`
74
+ #
75
+ # @param project [String]
76
+ # @param trigger [String]
77
+ #
78
+ # @return [::String]
79
+ def build_trigger_path project:, trigger:
80
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
81
+
82
+ "projects/#{project}/triggers/#{trigger}"
83
+ end
84
+
85
+ ##
86
+ # Create a fully-qualified Location resource string.
87
+ #
88
+ # The resource will be in the following format:
89
+ #
90
+ # `projects/{project}/locations/{location}`
91
+ #
92
+ # @param project [String]
93
+ # @param location [String]
94
+ #
95
+ # @return [::String]
96
+ def location_path project:, location:
97
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
98
+
99
+ "projects/#{project}/locations/#{location}"
100
+ end
101
+
102
+ ##
103
+ # Create a fully-qualified Project resource string.
104
+ #
105
+ # The resource will be in the following format:
106
+ #
107
+ # `projects/{project}`
108
+ #
109
+ # @param project [String]
110
+ #
111
+ # @return [::String]
112
+ def project_path project:
113
+ "projects/#{project}"
114
+ end
115
+
116
+ ##
117
+ # Create a fully-qualified ServiceAccount resource string.
118
+ #
119
+ # The resource will be in the following format:
120
+ #
121
+ # `projects/{project}/serviceAccounts/{service_account}`
122
+ #
123
+ # @param project [String]
124
+ # @param service_account [String]
125
+ #
126
+ # @return [::String]
127
+ def service_account_path project:, service_account:
128
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
129
+
130
+ "projects/#{project}/serviceAccounts/#{service_account}"
131
+ end
132
+
133
+ extend self
134
+ end
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Build
23
23
  module V1
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.1"
25
25
  end
26
26
  end
27
27
  end
@@ -6,13 +6,16 @@ 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/resource_pb'
9
10
  require 'google/longrunning/operations_pb'
10
11
  require 'google/protobuf/duration_pb'
11
12
  require 'google/protobuf/empty_pb'
13
+ require 'google/protobuf/field_mask_pb'
12
14
  require 'google/protobuf/timestamp_pb'
13
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
16
  add_file("google/devtools/cloudbuild/v1/cloudbuild.proto", :syntax => :proto3) do
15
17
  add_message "google.devtools.cloudbuild.v1.RetryBuildRequest" do
18
+ optional :name, :string, 3
16
19
  optional :project_id, :string, 1
17
20
  optional :id, :string, 2
18
21
  end
@@ -81,6 +84,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
81
84
  repeated :file_hash, :message, 2, "google.devtools.cloudbuild.v1.FileHashes"
82
85
  end
83
86
  add_message "google.devtools.cloudbuild.v1.Build" do
87
+ optional :name, :string, 45
84
88
  optional :id, :string, 1
85
89
  optional :project_id, :string, 16
86
90
  optional :status, :enum, 2, "google.devtools.cloudbuild.v1.Build.Status"
@@ -104,6 +108,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
104
108
  repeated :tags, :string, 31
105
109
  repeated :secrets, :message, 32, "google.devtools.cloudbuild.v1.Secret"
106
110
  map :timing, :string, :message, 33, "google.devtools.cloudbuild.v1.TimeSpan"
111
+ optional :service_account, :string, 42
107
112
  end
108
113
  add_enum "google.devtools.cloudbuild.v1.Build.Status" do
109
114
  value :STATUS_UNKNOWN, 0
@@ -154,14 +159,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
154
159
  map :secret_env, :string, :bytes, 3
155
160
  end
156
161
  add_message "google.devtools.cloudbuild.v1.CreateBuildRequest" do
162
+ optional :parent, :string, 4
157
163
  optional :project_id, :string, 1
158
164
  optional :build, :message, 2, "google.devtools.cloudbuild.v1.Build"
159
165
  end
160
166
  add_message "google.devtools.cloudbuild.v1.GetBuildRequest" do
167
+ optional :name, :string, 4
161
168
  optional :project_id, :string, 1
162
169
  optional :id, :string, 2
163
170
  end
164
171
  add_message "google.devtools.cloudbuild.v1.ListBuildsRequest" do
172
+ optional :parent, :string, 9
165
173
  optional :project_id, :string, 1
166
174
  optional :page_size, :int32, 2
167
175
  optional :page_token, :string, 3
@@ -172,6 +180,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
172
180
  optional :next_page_token, :string, 2
173
181
  end
174
182
  add_message "google.devtools.cloudbuild.v1.CancelBuildRequest" do
183
+ optional :name, :string, 4
175
184
  optional :project_id, :string, 1
176
185
  optional :id, :string, 2
177
186
  end
@@ -251,6 +260,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
251
260
  optional :machine_type, :enum, 3, "google.devtools.cloudbuild.v1.BuildOptions.MachineType"
252
261
  optional :disk_size_gb, :int64, 6
253
262
  optional :substitution_option, :enum, 4, "google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption"
263
+ optional :dynamic_substitutions, :bool, 17
254
264
  optional :log_streaming_option, :enum, 5, "google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption"
255
265
  optional :worker_pool, :string, 7
256
266
  optional :logging, :enum, 11, "google.devtools.cloudbuild.v1.BuildOptions.LoggingMode"
@@ -280,6 +290,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
280
290
  value :LOGGING_UNSPECIFIED, 0
281
291
  value :LEGACY, 1
282
292
  value :GCS_ONLY, 2
293
+ value :STACKDRIVER_ONLY, 3
294
+ value :CLOUD_LOGGING_ONLY, 5
295
+ value :NONE, 4
283
296
  end
284
297
  add_message "google.devtools.cloudbuild.v1.WorkerPool" do
285
298
  optional :name, :string, 14
@@ -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,49 @@ 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
111
  # Creates a `WorkerPool` to run the builds, and returns the new worker pool.
112
112
  #
113
113
  # This API is experimental.
114
- rpc :CreateWorkerPool, Google::Cloud::Build::V1::CreateWorkerPoolRequest, Google::Cloud::Build::V1::WorkerPool
114
+ rpc :CreateWorkerPool, ::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool
115
115
  # Returns information about a `WorkerPool`.
116
116
  #
117
117
  # This API is experimental.
118
- rpc :GetWorkerPool, Google::Cloud::Build::V1::GetWorkerPoolRequest, Google::Cloud::Build::V1::WorkerPool
118
+ rpc :GetWorkerPool, ::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool
119
119
  # Deletes a `WorkerPool` by its project ID and WorkerPool name.
120
120
  #
121
121
  # This API is experimental.
122
- rpc :DeleteWorkerPool, Google::Cloud::Build::V1::DeleteWorkerPoolRequest, Google::Protobuf::Empty
122
+ rpc :DeleteWorkerPool, ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Google::Protobuf::Empty
123
123
  # Update a `WorkerPool`.
124
124
  #
125
125
  # This API is experimental.
126
- rpc :UpdateWorkerPool, Google::Cloud::Build::V1::UpdateWorkerPoolRequest, Google::Cloud::Build::V1::WorkerPool
127
- # List project's `WorkerPool`s.
126
+ rpc :UpdateWorkerPool, ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool
127
+ # List project's `WorkerPools`.
128
128
  #
129
129
  # This API is experimental.
130
- rpc :ListWorkerPools, Google::Cloud::Build::V1::ListWorkerPoolsRequest, Google::Cloud::Build::V1::ListWorkerPoolsResponse
130
+ rpc :ListWorkerPools, ::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Google::Cloud::Build::V1::ListWorkerPoolsResponse
131
131
  end
132
132
 
133
133
  Stub = Service.rpc_stub_class
@@ -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
@@ -22,6 +22,10 @@ module Google
22
22
  module Build
23
23
  module V1
24
24
  # Specifies a build to retry.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # The name of the `Build` to retry.
28
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
25
29
  # @!attribute [rw] project_id
26
30
  # @return [::String]
27
31
  # Required. ID of the project.
@@ -228,7 +232,7 @@ module Google
228
232
  # @!attribute [r] timing
229
233
  # @return [::Google::Cloud::Build::V1::TimeSpan]
230
234
  # Output only. Stores timing information for executing this build step.
231
- # @!attribute [rw] pull_timing
235
+ # @!attribute [r] pull_timing
232
236
  # @return [::Google::Cloud::Build::V1::TimeSpan]
233
237
  # Output only. Stores timing information for pulling this build step's
234
238
  # builder image only.
@@ -237,7 +241,7 @@ module Google
237
241
  # Time limit for executing this build step. If not defined, the step has no
238
242
  # time limit and will be allowed to continue to run until either it completes
239
243
  # or the build itself times out.
240
- # @!attribute [rw] status
244
+ # @!attribute [r] status
241
245
  # @return [::Google::Cloud::Build::V1::Build::Status]
242
246
  # Output only. Status of the build step. At this time, build step status is
243
247
  # only updated on build completion; step status is not updated in real-time
@@ -328,16 +332,21 @@ module Google
328
332
  # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
329
333
  # resolved from the specified branch or tag.
330
334
  # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
335
+ # @!attribute [r] name
336
+ # @return [::String]
337
+ # Output only. The 'Build' name with format:
338
+ # `projects/{project}/locations/{location}/builds/{build}`, where \\{build}
339
+ # is a unique identifier generated by the service.
331
340
  # @!attribute [r] id
332
341
  # @return [::String]
333
342
  # Output only. Unique identifier of the build.
334
343
  # @!attribute [r] project_id
335
344
  # @return [::String]
336
345
  # Output only. ID of the project.
337
- # @!attribute [rw] status
346
+ # @!attribute [r] status
338
347
  # @return [::Google::Cloud::Build::V1::Build::Status]
339
348
  # Output only. Status of the build.
340
- # @!attribute [rw] status_detail
349
+ # @!attribute [r] status_detail
341
350
  # @return [::String]
342
351
  # Output only. Customer-readable message about the current status.
343
352
  # @!attribute [rw] source
@@ -367,6 +376,8 @@ module Google
367
376
  # granularity. If this amount of time elapses, work on the build will cease
368
377
  # and the build status will be `TIMEOUT`.
369
378
  #
379
+ # `timeout` starts ticking from `startTime`.
380
+ #
370
381
  # Default time is ten minutes.
371
382
  # @!attribute [rw] images
372
383
  # @return [::Array<::String>]
@@ -397,10 +408,10 @@ module Google
397
408
  # [Bucket Name
398
409
  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
399
410
  # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
400
- # @!attribute [rw] source_provenance
411
+ # @!attribute [r] source_provenance
401
412
  # @return [::Google::Cloud::Build::V1::SourceProvenance]
402
413
  # Output only. A permanent fixed identifier for source.
403
- # @!attribute [rw] build_trigger_id
414
+ # @!attribute [r] build_trigger_id
404
415
  # @return [::String]
405
416
  # Output only. The ID of the `BuildTrigger` that triggered this build, if it
406
417
  # was triggered automatically.
@@ -430,6 +441,13 @@ module Google
430
441
  #
431
442
  # If the build does not specify source or images,
432
443
  # these keys will not be included.
444
+ # @!attribute [rw] service_account
445
+ # @return [::String]
446
+ # IAM service account whose credentials will be used at build runtime.
447
+ # Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
448
+ # ACCOUNT can be email address or uniqueId of the service account.
449
+ #
450
+ # This field is in alpha and is not publicly available.
433
451
  class Build
434
452
  include ::Google::Protobuf::MessageExts
435
453
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -526,7 +544,7 @@ module Google
526
544
  # @!attribute [rw] paths
527
545
  # @return [::Array<::String>]
528
546
  # Path globs used to match files in the build's workspace.
529
- # @!attribute [rw] timing
547
+ # @!attribute [r] timing
530
548
  # @return [::Google::Cloud::Build::V1::TimeSpan]
531
549
  # Output only. Stores timing information for pushing all artifact objects.
532
550
  class ArtifactObjects
@@ -654,6 +672,10 @@ module Google
654
672
  end
655
673
 
656
674
  # Request to create a new build.
675
+ # @!attribute [rw] parent
676
+ # @return [::String]
677
+ # The parent resource where this build will be created.
678
+ # Format: `projects/{project}/locations/{location}`
657
679
  # @!attribute [rw] project_id
658
680
  # @return [::String]
659
681
  # Required. ID of the project.
@@ -666,6 +688,10 @@ module Google
666
688
  end
667
689
 
668
690
  # Request to get a build.
691
+ # @!attribute [rw] name
692
+ # @return [::String]
693
+ # The name of the `Build` to retrieve.
694
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
669
695
  # @!attribute [rw] project_id
670
696
  # @return [::String]
671
697
  # Required. ID of the project.
@@ -678,6 +704,10 @@ module Google
678
704
  end
679
705
 
680
706
  # Request to list builds.
707
+ # @!attribute [rw] parent
708
+ # @return [::String]
709
+ # The parent of the collection of `Builds`.
710
+ # Format: `projects/{project}/locations/location`
681
711
  # @!attribute [rw] project_id
682
712
  # @return [::String]
683
713
  # Required. ID of the project.
@@ -708,6 +738,10 @@ module Google
708
738
  end
709
739
 
710
740
  # Request to cancel an ongoing build.
741
+ # @!attribute [rw] name
742
+ # @return [::String]
743
+ # The name of the `Build` to retrieve.
744
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
711
745
  # @!attribute [rw] project_id
712
746
  # @return [::String]
713
747
  # Required. ID of the project.
@@ -765,12 +799,11 @@ module Google
765
799
  # Output only. Time when the trigger was created.
766
800
  # @!attribute [rw] disabled
767
801
  # @return [::Boolean]
768
- # If true, the trigger will never result in a build.
802
+ # If true, the trigger will never automatically execute a build.
769
803
  # @!attribute [rw] substitutions
770
804
  # @return [::Google::Protobuf::Map{::String => ::String}]
771
805
  # Substitutions for Build resource. The keys must match the following
772
- # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
773
- # keys in bindings.
806
+ # regular expression: `^_[A-Z0-9_]+$`.
774
807
  # @!attribute [rw] ignored_files
775
808
  # @return [::Array<::String>]
776
809
  # ignored_files and included_files are file glob matches using
@@ -843,8 +876,8 @@ module Google
843
876
  # RE2 and described at https://github.com/google/re2/wiki/Syntax
844
877
  # @!attribute [rw] comment_control
845
878
  # @return [::Google::Cloud::Build::V1::PullRequestFilter::CommentControl]
846
- # Whether to block builds on a "/gcbrun" comment from a repository admin or
847
- # collaborator.
879
+ # Configure builds to run whether a repository owner or collaborator need to
880
+ # comment `/gcbrun`.
848
881
  # @!attribute [rw] invert_regex
849
882
  # @return [::Boolean]
850
883
  # If true, branches that do NOT match the git_ref will trigger a build.
@@ -985,6 +1018,16 @@ module Google
985
1018
  # @return [::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption]
986
1019
  # Option to specify behavior when there is an error in the substitution
987
1020
  # checks.
1021
+ #
1022
+ # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
1023
+ # be overridden in the build configuration file.
1024
+ # @!attribute [rw] dynamic_substitutions
1025
+ # @return [::Boolean]
1026
+ # Option to specify whether or not to apply bash style string
1027
+ # operations to the substitutions.
1028
+ #
1029
+ # NOTE: this is always enabled for triggered builds and cannot be
1030
+ # overridden in the build configuration file.
988
1031
  # @!attribute [rw] log_streaming_option
989
1032
  # @return [::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption]
990
1033
  # Option to define build log streaming behavior to Google Cloud
@@ -992,13 +1035,13 @@ module Google
992
1035
  # @!attribute [rw] worker_pool
993
1036
  # @return [::String]
994
1037
  # Option to specify a `WorkerPool` for the build.
995
- # Format: projects/\\{project}/workerPools/\\{workerPool}
1038
+ # Format: projects/\\{project}/locations/\\{location}/workerPools/\\{workerPool}
996
1039
  #
997
1040
  # This field is experimental.
998
1041
  # @!attribute [rw] logging
999
1042
  # @return [::Google::Cloud::Build::V1::BuildOptions::LoggingMode]
1000
- # Option to specify the logging mode, which determines where the logs are
1001
- # stored.
1043
+ # Option to specify the logging mode, which determines if and where build
1044
+ # logs are stored.
1002
1045
  # @!attribute [rw] env
1003
1046
  # @return [::Array<::String>]
1004
1047
  # A list of global environment variable definitions that will exist for all
@@ -1037,7 +1080,9 @@ module Google
1037
1080
  VERIFIED = 1
1038
1081
  end
1039
1082
 
1040
- # Supported VM sizes.
1083
+ # Supported Compute Engine machine types.
1084
+ # For more information, see [Machine
1085
+ # types](https://cloud.google.com/compute/docs/machine-types).
1041
1086
  module MachineType
1042
1087
  # Standard machine type.
1043
1088
  UNSPECIFIED = 0
@@ -1078,11 +1123,23 @@ module Google
1078
1123
  # rely on the default logging behavior as it may change in the future.
1079
1124
  LOGGING_UNSPECIFIED = 0
1080
1125
 
1081
- # Stackdriver logging and Cloud Storage logging are enabled.
1126
+ # Cloud Logging and Cloud Storage logging are enabled.
1082
1127
  LEGACY = 1
1083
1128
 
1084
1129
  # Only Cloud Storage logging is enabled.
1085
1130
  GCS_ONLY = 2
1131
+
1132
+ # This option is the same as CLOUD_LOGGING_ONLY.
1133
+ STACKDRIVER_ONLY = 3
1134
+
1135
+ # Only Cloud Logging is enabled. Note that logs for both the Cloud Console
1136
+ # UI and Cloud SDK are based on Cloud Storage logs, so neither will provide
1137
+ # logs if this option is chosen.
1138
+ CLOUD_LOGGING_ONLY = 5
1139
+
1140
+ # Turn off all logging. No build logs will be captured.
1141
+ # Next ID: 6
1142
+ NONE = 4
1086
1143
  end
1087
1144
  end
1088
1145
 
@@ -1276,7 +1333,7 @@ module Google
1276
1333
  extend ::Google::Protobuf::MessageExts::ClassMethods
1277
1334
  end
1278
1335
 
1279
- # Request to list `WorkerPool`s.
1336
+ # Request to list `WorkerPools`.
1280
1337
  # @!attribute [rw] parent
1281
1338
  # @return [::String]
1282
1339
  # ID of the parent project.
@@ -0,0 +1,229 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Protobuf
22
+ # `FieldMask` represents a set of symbolic field paths, for example:
23
+ #
24
+ # paths: "f.a"
25
+ # paths: "f.b.d"
26
+ #
27
+ # Here `f` represents a field in some root message, `a` and `b`
28
+ # fields in the message found in `f`, and `d` a field found in the
29
+ # message in `f.b`.
30
+ #
31
+ # Field masks are used to specify a subset of fields that should be
32
+ # returned by a get operation or modified by an update operation.
33
+ # Field masks also have a custom JSON encoding (see below).
34
+ #
35
+ # # Field Masks in Projections
36
+ #
37
+ # When used in the context of a projection, a response message or
38
+ # sub-message is filtered by the API to only contain those fields as
39
+ # specified in the mask. For example, if the mask in the previous
40
+ # example is applied to a response message as follows:
41
+ #
42
+ # f {
43
+ # a : 22
44
+ # b {
45
+ # d : 1
46
+ # x : 2
47
+ # }
48
+ # y : 13
49
+ # }
50
+ # z: 8
51
+ #
52
+ # The result will not contain specific values for fields x,y and z
53
+ # (their value will be set to the default, and omitted in proto text
54
+ # output):
55
+ #
56
+ #
57
+ # f {
58
+ # a : 22
59
+ # b {
60
+ # d : 1
61
+ # }
62
+ # }
63
+ #
64
+ # A repeated field is not allowed except at the last position of a
65
+ # paths string.
66
+ #
67
+ # If a FieldMask object is not present in a get operation, the
68
+ # operation applies to all fields (as if a FieldMask of all fields
69
+ # had been specified).
70
+ #
71
+ # Note that a field mask does not necessarily apply to the
72
+ # top-level response message. In case of a REST get operation, the
73
+ # field mask applies directly to the response, but in case of a REST
74
+ # list operation, the mask instead applies to each individual message
75
+ # in the returned resource list. In case of a REST custom method,
76
+ # other definitions may be used. Where the mask applies will be
77
+ # clearly documented together with its declaration in the API. In
78
+ # any case, the effect on the returned resource/resources is required
79
+ # behavior for APIs.
80
+ #
81
+ # # Field Masks in Update Operations
82
+ #
83
+ # A field mask in update operations specifies which fields of the
84
+ # targeted resource are going to be updated. The API is required
85
+ # to only change the values of the fields as specified in the mask
86
+ # and leave the others untouched. If a resource is passed in to
87
+ # describe the updated values, the API ignores the values of all
88
+ # fields not covered by the mask.
89
+ #
90
+ # If a repeated field is specified for an update operation, new values will
91
+ # be appended to the existing repeated field in the target resource. Note that
92
+ # a repeated field is only allowed in the last position of a `paths` string.
93
+ #
94
+ # If a sub-message is specified in the last position of the field mask for an
95
+ # update operation, then new value will be merged into the existing sub-message
96
+ # in the target resource.
97
+ #
98
+ # For example, given the target message:
99
+ #
100
+ # f {
101
+ # b {
102
+ # d: 1
103
+ # x: 2
104
+ # }
105
+ # c: [1]
106
+ # }
107
+ #
108
+ # And an update message:
109
+ #
110
+ # f {
111
+ # b {
112
+ # d: 10
113
+ # }
114
+ # c: [2]
115
+ # }
116
+ #
117
+ # then if the field mask is:
118
+ #
119
+ # paths: ["f.b", "f.c"]
120
+ #
121
+ # then the result will be:
122
+ #
123
+ # f {
124
+ # b {
125
+ # d: 10
126
+ # x: 2
127
+ # }
128
+ # c: [1, 2]
129
+ # }
130
+ #
131
+ # An implementation may provide options to override this default behavior for
132
+ # repeated and message fields.
133
+ #
134
+ # In order to reset a field's value to the default, the field must
135
+ # be in the mask and set to the default value in the provided resource.
136
+ # Hence, in order to reset all fields of a resource, provide a default
137
+ # instance of the resource and set all fields in the mask, or do
138
+ # not provide a mask as described below.
139
+ #
140
+ # If a field mask is not present on update, the operation applies to
141
+ # all fields (as if a field mask of all fields has been specified).
142
+ # Note that in the presence of schema evolution, this may mean that
143
+ # fields the client does not know and has therefore not filled into
144
+ # the request will be reset to their default. If this is unwanted
145
+ # behavior, a specific service may require a client to always specify
146
+ # a field mask, producing an error if not.
147
+ #
148
+ # As with get operations, the location of the resource which
149
+ # describes the updated values in the request message depends on the
150
+ # operation kind. In any case, the effect of the field mask is
151
+ # required to be honored by the API.
152
+ #
153
+ # ## Considerations for HTTP REST
154
+ #
155
+ # The HTTP kind of an update operation which uses a field mask must
156
+ # be set to PATCH instead of PUT in order to satisfy HTTP semantics
157
+ # (PUT must only be used for full updates).
158
+ #
159
+ # # JSON Encoding of Field Masks
160
+ #
161
+ # In JSON, a field mask is encoded as a single string where paths are
162
+ # separated by a comma. Fields name in each path are converted
163
+ # to/from lower-camel naming conventions.
164
+ #
165
+ # As an example, consider the following message declarations:
166
+ #
167
+ # message Profile {
168
+ # User user = 1;
169
+ # Photo photo = 2;
170
+ # }
171
+ # message User {
172
+ # string display_name = 1;
173
+ # string address = 2;
174
+ # }
175
+ #
176
+ # In proto a field mask for `Profile` may look as such:
177
+ #
178
+ # mask {
179
+ # paths: "user.display_name"
180
+ # paths: "photo"
181
+ # }
182
+ #
183
+ # In JSON, the same mask is represented as below:
184
+ #
185
+ # {
186
+ # mask: "user.displayName,photo"
187
+ # }
188
+ #
189
+ # # Field Masks and Oneof Fields
190
+ #
191
+ # Field masks treat fields in oneofs just as regular fields. Consider the
192
+ # following message:
193
+ #
194
+ # message SampleMessage {
195
+ # oneof test_oneof {
196
+ # string name = 4;
197
+ # SubMessage sub_message = 9;
198
+ # }
199
+ # }
200
+ #
201
+ # The field mask can be:
202
+ #
203
+ # mask {
204
+ # paths: "name"
205
+ # }
206
+ #
207
+ # Or:
208
+ #
209
+ # mask {
210
+ # paths: "sub_message"
211
+ # }
212
+ #
213
+ # Note that oneof type names ("test_oneof" in this case) cannot be used in
214
+ # paths.
215
+ #
216
+ # ## Field Mask Verification
217
+ #
218
+ # The implementation of any API method which has a FieldMask type field in the
219
+ # request should verify the included field paths, and return an
220
+ # `INVALID_ARGUMENT` error if any path is unmappable.
221
+ # @!attribute [rw] paths
222
+ # @return [::Array<::String>]
223
+ # The set of field mask paths.
224
+ class FieldMask
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
228
+ end
229
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-build-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-29 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -169,6 +169,7 @@ files:
169
169
  - lib/google/cloud/build/v1/cloud_build/client.rb
170
170
  - lib/google/cloud/build/v1/cloud_build/credentials.rb
171
171
  - lib/google/cloud/build/v1/cloud_build/operations.rb
172
+ - lib/google/cloud/build/v1/cloud_build/paths.rb
172
173
  - lib/google/cloud/build/v1/version.rb
173
174
  - lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb
174
175
  - lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb
@@ -180,6 +181,7 @@ files:
180
181
  - proto_docs/google/protobuf/any.rb
181
182
  - proto_docs/google/protobuf/duration.rb
182
183
  - proto_docs/google/protobuf/empty.rb
184
+ - proto_docs/google/protobuf/field_mask.rb
183
185
  - proto_docs/google/protobuf/timestamp.rb
184
186
  - proto_docs/google/rpc/status.rb
185
187
  homepage: https://github.com/googleapis/google-cloud-ruby
@@ -201,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
203
  - !ruby/object:Gem::Version
202
204
  version: '0'
203
205
  requirements: []
204
- rubygems_version: 3.1.3
206
+ rubygems_version: 3.2.6
205
207
  signing_key:
206
208
  specification_version: 4
207
209
  summary: API Client library for the Cloud Build V1 API