google-cloud-billing-v1 0.15.1 → 0.16.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60bbb8a8ff06c3cb068a6b9632bba498f6bde40438945e34eb73c7e6667e2d77
4
- data.tar.gz: f59f1346597386a1f607ca2dd61468b355e10633adda7a7fe1756a11556118b1
3
+ metadata.gz: 4959fad25fe257b8cbf31e2cdc2fdc13ff545b6ef75ecbd5b4a1bfbbc572a33e
4
+ data.tar.gz: f1f22f4980810353d991b66c6581c5e5eafe05c723bfc9f80f0046f4a570cf48
5
5
  SHA512:
6
- metadata.gz: 19c25b82e249cd2a79ce39fb9e32d86075f94fc6746459082abc334b64ec4dfdc2a2f71542ef06f249cfa0f2ec63de715e51c6712938861a80a568dc3125c47b
7
- data.tar.gz: 6c95b05e6dc50db58e95ac3f0d786a0f65cbe8941a8ded0544a3d1bdbbf2d83ef96db2f4b9e6340216bbe6cc0c9674c1b363a9402b4f641ea0e01560a9b80827
6
+ metadata.gz: 7a2defca11d741faee7d86b4366391092770445f27763f9894d356eef8a11141fa8d6906ec6bc5f2cb5b26dd6b2ad2cbb988b2f9bcd07638ca6f4e9189cd310c
7
+ data.tar.gz: ccdf6b3c0591eda8aae8e8f3ed6b80c9103c51b41425959801e1a8e3a6765c68d0909147a2f4d8cfd7e09be9c7e38fab2bdd6ec973b73ae874911c698eb1805f
@@ -296,7 +296,7 @@ module Google
296
296
  # @param options [::Gapic::CallOptions, ::Hash]
297
297
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
298
298
  #
299
- # @overload list_billing_accounts(page_size: nil, page_token: nil, filter: nil)
299
+ # @overload list_billing_accounts(page_size: nil, page_token: nil, filter: nil, parent: nil)
300
300
  # Pass arguments to `list_billing_accounts` via keyword arguments. Note that at
301
301
  # least one keyword argument is required. To specify no parameters, or to keep all
302
302
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -313,8 +313,16 @@ module Google
313
313
  # This only supports filtering for
314
314
  # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
315
315
  # single provided parent billing account.
316
- # (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF").
316
+ # (for example,
317
+ # `master_billing_account=billingAccounts/012345-678901-ABCDEF`).
317
318
  # Boolean algebra and other fields are not currently supported.
319
+ # @param parent [::String]
320
+ # Optional. The parent resource to list billing accounts from.
321
+ # Format:
322
+ # - `organizations/{organization_id}`, for example,
323
+ # `organizations/12345678`
324
+ # - `billingAccounts/{billing_account_id}`, for example,
325
+ # `billingAccounts/012345-567890-ABCDEF`
318
326
  #
319
327
  # @yield [response, operation] Access the result along with the RPC operation
320
328
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>]
@@ -500,7 +508,7 @@ module Google
500
508
  # @param options [::Gapic::CallOptions, ::Hash]
501
509
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
502
510
  #
503
- # @overload create_billing_account(billing_account: nil)
511
+ # @overload create_billing_account(billing_account: nil, parent: nil)
504
512
  # Pass arguments to `create_billing_account` via keyword arguments. Note that at
505
513
  # least one keyword argument is required. To specify no parameters, or to keep all
506
514
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -510,6 +518,13 @@ module Google
510
518
  # Currently CreateBillingAccount only supports subaccount creation, so
511
519
  # any created billing accounts must be under a provided parent billing
512
520
  # account.
521
+ # @param parent [::String]
522
+ # Optional. The parent to create a billing account from.
523
+ # Format:
524
+ # - `organizations/{organization_id}`, for example,
525
+ # `organizations/12345678`
526
+ # - `billingAccounts/{billing_account_id}`, for example,
527
+ # `billingAccounts/012345-567890-ABCDEF`
513
528
  #
514
529
  # @yield [response, operation] Access the result along with the RPC operation
515
530
  # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
@@ -773,7 +788,8 @@ module Google
773
788
  # account, even if the charge occurred before the new billing account was
774
789
  # assigned to the project.
775
790
  #
776
- # The current authenticated user must have ownership privileges for both the
791
+ # The current authenticated user must have ownership privileges for both
792
+ # the
777
793
  # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
778
794
  # ) and the [billing
779
795
  # account](https://cloud.google.com/billing/docs/how-to/billing-access).
@@ -1166,6 +1182,98 @@ module Google
1166
1182
  raise ::Google::Cloud::Error.from_error(e)
1167
1183
  end
1168
1184
 
1185
+ ##
1186
+ # Changes which parent organization a billing account belongs to.
1187
+ #
1188
+ # @overload move_billing_account(request, options = nil)
1189
+ # Pass arguments to `move_billing_account` via a request object, either of type
1190
+ # {::Google::Cloud::Billing::V1::MoveBillingAccountRequest} or an equivalent Hash.
1191
+ #
1192
+ # @param request [::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Hash]
1193
+ # A request object representing the call parameters. Required. To specify no
1194
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1195
+ # @param options [::Gapic::CallOptions, ::Hash]
1196
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1197
+ #
1198
+ # @overload move_billing_account(name: nil, destination_parent: nil)
1199
+ # Pass arguments to `move_billing_account` via keyword arguments. Note that at
1200
+ # least one keyword argument is required. To specify no parameters, or to keep all
1201
+ # the default parameter values, pass an empty Hash as a request object (see above).
1202
+ #
1203
+ # @param name [::String]
1204
+ # Required. The resource name of the billing account to move.
1205
+ # Must be of the form `billingAccounts/{billing_account_id}`.
1206
+ # The specified billing account cannot be a subaccount, since a subaccount
1207
+ # always belongs to the same organization as its parent account.
1208
+ # @param destination_parent [::String]
1209
+ # Required. The resource name of the Organization to reparent
1210
+ # the billing account under.
1211
+ # Must be of the form `organizations/{organization_id}`.
1212
+ #
1213
+ # @yield [response, operation] Access the result along with the RPC operation
1214
+ # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
1215
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1216
+ #
1217
+ # @return [::Google::Cloud::Billing::V1::BillingAccount]
1218
+ #
1219
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1220
+ #
1221
+ # @example Basic example
1222
+ # require "google/cloud/billing/v1"
1223
+ #
1224
+ # # Create a client object. The client can be reused for multiple calls.
1225
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
1226
+ #
1227
+ # # Create a request. To set request fields, pass in keyword arguments.
1228
+ # request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new
1229
+ #
1230
+ # # Call the move_billing_account method.
1231
+ # result = client.move_billing_account request
1232
+ #
1233
+ # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount.
1234
+ # p result
1235
+ #
1236
+ def move_billing_account request, options = nil
1237
+ raise ::ArgumentError, "request must be provided" if request.nil?
1238
+
1239
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::MoveBillingAccountRequest
1240
+
1241
+ # Converts hash and nil to an options object
1242
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1243
+
1244
+ # Customize the options with defaults
1245
+ metadata = @config.rpcs.move_billing_account.metadata.to_h
1246
+
1247
+ # Set x-goog-api-client and x-goog-user-project headers
1248
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1249
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1250
+ gapic_version: ::Google::Cloud::Billing::V1::VERSION
1251
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1252
+
1253
+ header_params = {}
1254
+ if request.name
1255
+ header_params["name"] = request.name
1256
+ end
1257
+
1258
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1259
+ metadata[:"x-goog-request-params"] ||= request_params_header
1260
+
1261
+ options.apply_defaults timeout: @config.rpcs.move_billing_account.timeout,
1262
+ metadata: metadata,
1263
+ retry_policy: @config.rpcs.move_billing_account.retry_policy
1264
+
1265
+ options.apply_defaults timeout: @config.timeout,
1266
+ metadata: @config.metadata,
1267
+ retry_policy: @config.retry_policy
1268
+
1269
+ @cloud_billing_stub.call_rpc :move_billing_account, request, options: options do |response, operation|
1270
+ yield response, operation if block_given?
1271
+ return response
1272
+ end
1273
+ rescue ::GRPC::BadStatus => e
1274
+ raise ::Google::Cloud::Error.from_error(e)
1275
+ end
1276
+
1169
1277
  ##
1170
1278
  # Configuration class for the CloudBilling API.
1171
1279
  #
@@ -1361,6 +1469,11 @@ module Google
1361
1469
  # @return [::Gapic::Config::Method]
1362
1470
  #
1363
1471
  attr_reader :test_iam_permissions
1472
+ ##
1473
+ # RPC-specific configuration for `move_billing_account`
1474
+ # @return [::Gapic::Config::Method]
1475
+ #
1476
+ attr_reader :move_billing_account
1364
1477
 
1365
1478
  # @private
1366
1479
  def initialize parent_rpcs = nil
@@ -1384,6 +1497,8 @@ module Google
1384
1497
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1385
1498
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1386
1499
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1500
+ move_billing_account_config = parent_rpcs.move_billing_account if parent_rpcs.respond_to? :move_billing_account
1501
+ @move_billing_account = ::Gapic::Config::Method.new move_billing_account_config
1387
1502
 
1388
1503
  yield self if block_given?
1389
1504
  end
@@ -27,15 +27,51 @@ module Google
27
27
  ##
28
28
  # Create a fully-qualified BillingAccount resource string.
29
29
  #
30
+ # @overload billing_account_path(billing_account:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `billingAccounts/{billing_account}`
34
+ #
35
+ # @param billing_account [String]
36
+ #
37
+ # @overload billing_account_path(organization:, billing_account:)
38
+ # The resource will be in the following format:
39
+ #
40
+ # `organizations/{organization}/billingAccounts/{billing_account}`
41
+ #
42
+ # @param organization [String]
43
+ # @param billing_account [String]
44
+ #
45
+ # @return [::String]
46
+ def billing_account_path **args
47
+ resources = {
48
+ "billing_account" => (proc do |billing_account:|
49
+ "billingAccounts/#{billing_account}"
50
+ end),
51
+ "billing_account:organization" => (proc do |organization:, billing_account:|
52
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
53
+
54
+ "organizations/#{organization}/billingAccounts/#{billing_account}"
55
+ end)
56
+ }
57
+
58
+ resource = resources[args.keys.sort.join(":")]
59
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
60
+ resource.call(**args)
61
+ end
62
+
63
+ ##
64
+ # Create a fully-qualified Organization resource string.
65
+ #
30
66
  # The resource will be in the following format:
31
67
  #
32
- # `billingAccounts/{billing_account}`
68
+ # `organizations/{organization}`
33
69
  #
34
- # @param billing_account [String]
70
+ # @param organization [String]
35
71
  #
36
72
  # @return [::String]
37
- def billing_account_path billing_account:
38
- "billingAccounts/#{billing_account}"
73
+ def organization_path organization:
74
+ "organizations/#{organization}"
39
75
  end
40
76
 
41
77
  ##
@@ -279,7 +279,7 @@ module Google
279
279
  # @param options [::Gapic::CallOptions, ::Hash]
280
280
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
281
281
  #
282
- # @overload list_billing_accounts(page_size: nil, page_token: nil, filter: nil)
282
+ # @overload list_billing_accounts(page_size: nil, page_token: nil, filter: nil, parent: nil)
283
283
  # Pass arguments to `list_billing_accounts` via keyword arguments. Note that at
284
284
  # least one keyword argument is required. To specify no parameters, or to keep all
285
285
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -296,8 +296,16 @@ module Google
296
296
  # This only supports filtering for
297
297
  # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
298
298
  # single provided parent billing account.
299
- # (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF").
299
+ # (for example,
300
+ # `master_billing_account=billingAccounts/012345-678901-ABCDEF`).
300
301
  # Boolean algebra and other fields are not currently supported.
302
+ # @param parent [::String]
303
+ # Optional. The parent resource to list billing accounts from.
304
+ # Format:
305
+ # - `organizations/{organization_id}`, for example,
306
+ # `organizations/12345678`
307
+ # - `billingAccounts/{billing_account_id}`, for example,
308
+ # `billingAccounts/012345-567890-ABCDEF`
301
309
  # @yield [result, operation] Access the result along with the TransportOperation object
302
310
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>]
303
311
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -477,7 +485,7 @@ module Google
477
485
  # @param options [::Gapic::CallOptions, ::Hash]
478
486
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
479
487
  #
480
- # @overload create_billing_account(billing_account: nil)
488
+ # @overload create_billing_account(billing_account: nil, parent: nil)
481
489
  # Pass arguments to `create_billing_account` via keyword arguments. Note that at
482
490
  # least one keyword argument is required. To specify no parameters, or to keep all
483
491
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -487,6 +495,13 @@ module Google
487
495
  # Currently CreateBillingAccount only supports subaccount creation, so
488
496
  # any created billing accounts must be under a provided parent billing
489
497
  # account.
498
+ # @param parent [::String]
499
+ # Optional. The parent to create a billing account from.
500
+ # Format:
501
+ # - `organizations/{organization_id}`, for example,
502
+ # `organizations/12345678`
503
+ # - `billingAccounts/{billing_account_id}`, for example,
504
+ # `billingAccounts/012345-567890-ABCDEF`
490
505
  # @yield [result, operation] Access the result along with the TransportOperation object
491
506
  # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount]
492
507
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -737,7 +752,8 @@ module Google
737
752
  # account, even if the charge occurred before the new billing account was
738
753
  # assigned to the project.
739
754
  #
740
- # The current authenticated user must have ownership privileges for both the
755
+ # The current authenticated user must have ownership privileges for both
756
+ # the
741
757
  # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
742
758
  # ) and the [billing
743
759
  # account](https://cloud.google.com/billing/docs/how-to/billing-access).
@@ -1102,6 +1118,91 @@ module Google
1102
1118
  raise ::Google::Cloud::Error.from_error(e)
1103
1119
  end
1104
1120
 
1121
+ ##
1122
+ # Changes which parent organization a billing account belongs to.
1123
+ #
1124
+ # @overload move_billing_account(request, options = nil)
1125
+ # Pass arguments to `move_billing_account` via a request object, either of type
1126
+ # {::Google::Cloud::Billing::V1::MoveBillingAccountRequest} or an equivalent Hash.
1127
+ #
1128
+ # @param request [::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Hash]
1129
+ # A request object representing the call parameters. Required. To specify no
1130
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1131
+ # @param options [::Gapic::CallOptions, ::Hash]
1132
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1133
+ #
1134
+ # @overload move_billing_account(name: nil, destination_parent: nil)
1135
+ # Pass arguments to `move_billing_account` via keyword arguments. Note that at
1136
+ # least one keyword argument is required. To specify no parameters, or to keep all
1137
+ # the default parameter values, pass an empty Hash as a request object (see above).
1138
+ #
1139
+ # @param name [::String]
1140
+ # Required. The resource name of the billing account to move.
1141
+ # Must be of the form `billingAccounts/{billing_account_id}`.
1142
+ # The specified billing account cannot be a subaccount, since a subaccount
1143
+ # always belongs to the same organization as its parent account.
1144
+ # @param destination_parent [::String]
1145
+ # Required. The resource name of the Organization to reparent
1146
+ # the billing account under.
1147
+ # Must be of the form `organizations/{organization_id}`.
1148
+ # @yield [result, operation] Access the result along with the TransportOperation object
1149
+ # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount]
1150
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1151
+ #
1152
+ # @return [::Google::Cloud::Billing::V1::BillingAccount]
1153
+ #
1154
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1155
+ #
1156
+ # @example Basic example
1157
+ # require "google/cloud/billing/v1"
1158
+ #
1159
+ # # Create a client object. The client can be reused for multiple calls.
1160
+ # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new
1161
+ #
1162
+ # # Create a request. To set request fields, pass in keyword arguments.
1163
+ # request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new
1164
+ #
1165
+ # # Call the move_billing_account method.
1166
+ # result = client.move_billing_account request
1167
+ #
1168
+ # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount.
1169
+ # p result
1170
+ #
1171
+ def move_billing_account request, options = nil
1172
+ raise ::ArgumentError, "request must be provided" if request.nil?
1173
+
1174
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::MoveBillingAccountRequest
1175
+
1176
+ # Converts hash and nil to an options object
1177
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1178
+
1179
+ # Customize the options with defaults
1180
+ call_metadata = @config.rpcs.move_billing_account.metadata.to_h
1181
+
1182
+ # Set x-goog-api-client and x-goog-user-project headers
1183
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1184
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1185
+ gapic_version: ::Google::Cloud::Billing::V1::VERSION,
1186
+ transports_version_send: [:rest]
1187
+
1188
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1189
+
1190
+ options.apply_defaults timeout: @config.rpcs.move_billing_account.timeout,
1191
+ metadata: call_metadata,
1192
+ retry_policy: @config.rpcs.move_billing_account.retry_policy
1193
+
1194
+ options.apply_defaults timeout: @config.timeout,
1195
+ metadata: @config.metadata,
1196
+ retry_policy: @config.retry_policy
1197
+
1198
+ @cloud_billing_stub.move_billing_account request, options do |result, operation|
1199
+ yield result, operation if block_given?
1200
+ return result
1201
+ end
1202
+ rescue ::Gapic::Rest::Error => e
1203
+ raise ::Google::Cloud::Error.from_error(e)
1204
+ end
1205
+
1105
1206
  ##
1106
1207
  # Configuration class for the CloudBilling REST API.
1107
1208
  #
@@ -1277,6 +1378,11 @@ module Google
1277
1378
  # @return [::Gapic::Config::Method]
1278
1379
  #
1279
1380
  attr_reader :test_iam_permissions
1381
+ ##
1382
+ # RPC-specific configuration for `move_billing_account`
1383
+ # @return [::Gapic::Config::Method]
1384
+ #
1385
+ attr_reader :move_billing_account
1280
1386
 
1281
1387
  # @private
1282
1388
  def initialize parent_rpcs = nil
@@ -1300,6 +1406,8 @@ module Google
1300
1406
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1301
1407
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1302
1408
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1409
+ move_billing_account_config = parent_rpcs.move_billing_account if parent_rpcs.respond_to? :move_billing_account
1410
+ @move_billing_account = ::Gapic::Config::Method.new move_billing_account_config
1303
1411
 
1304
1412
  yield self if block_given?
1305
1413
  end
@@ -420,6 +420,44 @@ module Google
420
420
  result
421
421
  end
422
422
 
423
+ ##
424
+ # Baseline implementation for the move_billing_account REST call
425
+ #
426
+ # @param request_pb [::Google::Cloud::Billing::V1::MoveBillingAccountRequest]
427
+ # A request object representing the call parameters. Required.
428
+ # @param options [::Gapic::CallOptions]
429
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
430
+ #
431
+ # @yield [result, operation] Access the result along with the TransportOperation object
432
+ # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount]
433
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
434
+ #
435
+ # @return [::Google::Cloud::Billing::V1::BillingAccount]
436
+ # A result object deserialized from the server's reply
437
+ def move_billing_account request_pb, options = nil
438
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
439
+
440
+ verb, uri, query_string_params, body = ServiceStub.transcode_move_billing_account_request request_pb
441
+ query_string_params = if query_string_params.any?
442
+ query_string_params.to_h { |p| p.split "=", 2 }
443
+ else
444
+ {}
445
+ end
446
+
447
+ response = @client_stub.make_http_request(
448
+ verb,
449
+ uri: uri,
450
+ body: body || "",
451
+ params: query_string_params,
452
+ options: options
453
+ )
454
+ operation = ::Gapic::Rest::TransportOperation.new response
455
+ result = ::Google::Cloud::Billing::V1::BillingAccount.decode_json response.body, ignore_unknown_fields: true
456
+
457
+ yield result, operation if block_given?
458
+ result
459
+ end
460
+
423
461
  ##
424
462
  # @private
425
463
  #
@@ -457,6 +495,20 @@ module Google
457
495
  uri_template: "/v1/billingAccounts",
458
496
  matches: []
459
497
  )
498
+ .with_bindings(
499
+ uri_method: :get,
500
+ uri_template: "/v1/{parent}/billingAccounts",
501
+ matches: [
502
+ ["parent", %r{^organizations/[^/]+/?$}, false]
503
+ ]
504
+ )
505
+ .with_bindings(
506
+ uri_method: :get,
507
+ uri_template: "/v1/{parent}/subAccounts",
508
+ matches: [
509
+ ["parent", %r{^billingAccounts/[^/]+/?$}, false]
510
+ ]
511
+ )
460
512
  transcoder.transcode request_pb
461
513
  end
462
514
 
@@ -499,6 +551,22 @@ module Google
499
551
  body: "billing_account",
500
552
  matches: []
501
553
  )
554
+ .with_bindings(
555
+ uri_method: :post,
556
+ uri_template: "/v1/{parent}/billingAccounts",
557
+ body: "billing_account",
558
+ matches: [
559
+ ["parent", %r{^organizations/[^/]+/?$}, false]
560
+ ]
561
+ )
562
+ .with_bindings(
563
+ uri_method: :post,
564
+ uri_template: "/v1/{parent}/subAccounts",
565
+ body: "billing_account",
566
+ matches: [
567
+ ["parent", %r{^billingAccounts/[^/]+/?$}, false]
568
+ ]
569
+ )
502
570
  transcoder.transcode request_pb
503
571
  end
504
572
 
@@ -630,6 +698,36 @@ module Google
630
698
  )
631
699
  transcoder.transcode request_pb
632
700
  end
701
+
702
+ ##
703
+ # @private
704
+ #
705
+ # GRPC transcoding helper method for the move_billing_account REST call
706
+ #
707
+ # @param request_pb [::Google::Cloud::Billing::V1::MoveBillingAccountRequest]
708
+ # A request object representing the call parameters. Required.
709
+ # @return [Array(String, [String, nil], Hash{String => String})]
710
+ # Uri, Body, Query string parameters
711
+ def self.transcode_move_billing_account_request request_pb
712
+ transcoder = Gapic::Rest::GrpcTranscoder.new
713
+ .with_bindings(
714
+ uri_method: :post,
715
+ uri_template: "/v1/{name}:move",
716
+ body: "*",
717
+ matches: [
718
+ ["name", %r{^billingAccounts/[^/]+/?$}, false]
719
+ ]
720
+ )
721
+ .with_bindings(
722
+ uri_method: :get,
723
+ uri_template: "/v1/{destination_parent}/{name}:move",
724
+ matches: [
725
+ ["destination_parent", %r{^organizations/[^/]+/?$}, false],
726
+ ["name", %r{^billingAccounts/[^/]+/?$}, false]
727
+ ]
728
+ )
729
+ transcoder.transcode request_pb
730
+ end
633
731
  end
634
732
  end
635
733
  end
@@ -13,7 +13,7 @@ require 'google/iam/v1/policy_pb'
13
13
  require 'google/protobuf/field_mask_pb'
14
14
 
15
15
 
16
- descriptor_data = "\n+google/cloud/billing/v1/cloud_billing.proto\x12\x17google.cloud.billing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a google/protobuf/field_mask.proto\"\x9b\x01\n\x0e\x42illingAccount\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\x04open\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x1e\n\x16master_billing_account\x18\x04 \x01(\t\"\xd1\x01\n\x12ProjectBillingInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x62illing_account_name\x18\x03 \x01(\t\x12\x1c\n\x0f\x62illing_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03:S\xea\x41P\n.cloudbilling.googleapis.com/ProjectBillingInfo\x12\x1eprojects/{project}/billingInfo\"\\\n\x18GetBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\"S\n\x1aListBillingAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\"y\n\x1bListBillingAccountsResponse\x12\x41\n\x10\x62illing_accounts\x18\x01 \x03(\x0b\x32\'.google.cloud.billing.v1.BillingAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"d\n\x1b\x43reateBillingAccountRequest\x12\x45\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\"\xcf\x01\n\x1bUpdateBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12=\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x88\x01\n\x1dListProjectBillingInfoRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1eListProjectBillingInfoResponse\x12I\n\x14project_billing_info\x18\x01 \x03(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1cGetProjectBillingInfoRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"\x7f\n\x1fUpdateProjectBillingInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\x14project_billing_info\x18\x02 \x01(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo2\xb2\x0f\n\x0c\x43loudBilling\x12\x9c\x01\n\x11GetBillingAccount\x12\x31.google.cloud.billing.v1.GetBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"+\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=billingAccounts/*}\xda\x41\x04name\x12\xa0\x01\n\x13ListBillingAccounts\x12\x33.google.cloud.billing.v1.ListBillingAccountsRequest\x1a\x34.google.cloud.billing.v1.ListBillingAccountsResponse\"\x1e\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/billingAccounts\xda\x41\x00\x12\xb3\x01\n\x14UpdateBillingAccount\x12\x34.google.cloud.billing.v1.UpdateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"<\x82\xd3\xe4\x93\x02\'2\x1c/v1/{name=billingAccounts/*}:\x07\x61\x63\x63ount\xda\x41\x0cname,account\x12\xb5\x01\n\x14\x43reateBillingAccount\x12\x34.google.cloud.billing.v1.CreateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\">\x82\xd3\xe4\x93\x02&\"\x13/v1/billingAccounts:\x0f\x62illing_account\xda\x41\x0f\x62illing_account\x12\xbf\x01\n\x16ListProjectBillingInfo\x12\x36.google.cloud.billing.v1.ListProjectBillingInfoRequest\x1a\x37.google.cloud.billing.v1.ListProjectBillingInfoResponse\"4\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=billingAccounts/*}/projects\xda\x41\x04name\x12\xad\x01\n\x15GetProjectBillingInfo\x12\x35.google.cloud.billing.v1.GetProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"0\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*}/billingInfo\xda\x41\x04name\x12\xde\x01\n\x18UpdateProjectBillingInfo\x12\x38.google.cloud.billing.v1.UpdateProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"[\x82\xd3\xe4\x93\x02\x39\x1a!/v1/{name=projects/*}/billingInfo:\x14project_billing_info\xda\x41\x19name,project_billing_info\x12\x8b\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"@\x82\xd3\xe4\x93\x02/\x12-/v1/{resource=billingAccounts/*}:getIamPolicy\xda\x41\x08resource\x12\x95\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"J\x82\xd3\xe4\x93\x02\x32\"-/v1/{resource=billingAccounts/*}:setIamPolicy:\x01*\xda\x41\x0fresource,policy\x12\xc0\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"U\x82\xd3\xe4\x93\x02\x38\"3/v1/{resource=billingAccounts/*}:testIamPermissions:\x01*\xda\x41\x14resource,permissions\x1a\xb5\x01\xca\x41\x1b\x63loudbilling.googleapis.com\xd2\x41\x93\x01https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-billing.readonly,https://www.googleapis.com/auth/cloud-platformBi\n\x1b\x63om.google.cloud.billing.v1B\x11\x43loudBillingProtoP\x01Z5cloud.google.com/go/billing/apiv1/billingpb;billingpbb\x06proto3"
16
+ descriptor_data = "\n+google/cloud/billing/v1/cloud_billing.proto\x12\x17google.cloud.billing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a google/protobuf/field_mask.proto\"\xe7\x02\n\x0e\x42illingAccount\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\x04open\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x1e\n\x16master_billing_account\x18\x04 \x01(\t\x12\x13\n\x06parent\x18\x06 \x01(\tB\x03\xe0\x41\x03:\xb4\x01\xea\x41\xb0\x01\n*cloudbilling.googleapis.com/BillingAccount\x12!billingAccounts/{billing_account}\x12>organizations/{organization}/billingAccounts/{billing_account}*\x0f\x62illingAccounts2\x0e\x62illingAccount\"\xd1\x01\n\x12ProjectBillingInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x62illing_account_name\x18\x03 \x01(\t\x12\x1c\n\x0f\x62illing_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03:S\xea\x41P\n.cloudbilling.googleapis.com/ProjectBillingInfo\x12\x1eprojects/{project}/billingInfo\"\\\n\x18GetBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\"h\n\x1aListBillingAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x13\n\x06parent\x18\x04 \x01(\tB\x03\xe0\x41\x01\"y\n\x1bListBillingAccountsResponse\x12\x41\n\x10\x62illing_accounts\x18\x01 \x03(\x0b\x32\'.google.cloud.billing.v1.BillingAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x1b\x43reateBillingAccountRequest\x12\x45\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\x12\x13\n\x06parent\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xcf\x01\n\x1bUpdateBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12=\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x88\x01\n\x1dListProjectBillingInfoRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1eListProjectBillingInfoResponse\x12I\n\x14project_billing_info\x18\x01 \x03(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1cGetProjectBillingInfoRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"\x7f\n\x1fUpdateProjectBillingInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\x14project_billing_info\x18\x02 \x01(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo\"\xb3\x01\n\x19MoveBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12T\n\x12\x64\x65stination_parent\x18\x02 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization2\xa1\x13\n\x0c\x43loudBilling\x12\x9c\x01\n\x11GetBillingAccount\x12\x31.google.cloud.billing.v1.GetBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"+\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=billingAccounts/*}\xda\x41\x04name\x12\x88\x02\n\x13ListBillingAccounts\x12\x33.google.cloud.billing.v1.ListBillingAccountsRequest\x1a\x34.google.cloud.billing.v1.ListBillingAccountsResponse\"\x85\x01\x82\xd3\xe4\x93\x02s\x12\x13/v1/billingAccountsZ.\x12,/v1/{parent=organizations/*}/billingAccountsZ,\x12*/v1/{parent=billingAccounts/*}/subAccounts\xda\x41\x00\xda\x41\x06parent\x12\xb3\x01\n\x14UpdateBillingAccount\x12\x34.google.cloud.billing.v1.UpdateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"<\x82\xd3\xe4\x93\x02\'2\x1c/v1/{name=billingAccounts/*}:\x07\x61\x63\x63ount\xda\x41\x0cname,account\x12\xd0\x02\n\x14\x43reateBillingAccount\x12\x34.google.cloud.billing.v1.CreateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"\xd8\x01\x82\xd3\xe4\x93\x02\xa6\x01\"\x13/v1/billingAccounts:\x0f\x62illing_accountZ?\",/v1/{parent=organizations/*}/billingAccounts:\x0f\x62illing_accountZ=\"*/v1/{parent=billingAccounts/*}/subAccounts:\x0f\x62illing_account\xda\x41\x0f\x62illing_account\xda\x41\x16\x62illing_account,parent\x12\xbf\x01\n\x16ListProjectBillingInfo\x12\x36.google.cloud.billing.v1.ListProjectBillingInfoRequest\x1a\x37.google.cloud.billing.v1.ListProjectBillingInfoResponse\"4\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=billingAccounts/*}/projects\xda\x41\x04name\x12\xad\x01\n\x15GetProjectBillingInfo\x12\x35.google.cloud.billing.v1.GetProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"0\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*}/billingInfo\xda\x41\x04name\x12\xde\x01\n\x18UpdateProjectBillingInfo\x12\x38.google.cloud.billing.v1.UpdateProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"[\x82\xd3\xe4\x93\x02\x39\x1a!/v1/{name=projects/*}/billingInfo:\x14project_billing_info\xda\x41\x19name,project_billing_info\x12\x8b\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"@\x82\xd3\xe4\x93\x02/\x12-/v1/{resource=billingAccounts/*}:getIamPolicy\xda\x41\x08resource\x12\x95\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"J\x82\xd3\xe4\x93\x02\x32\"-/v1/{resource=billingAccounts/*}:setIamPolicy:\x01*\xda\x41\x0fresource,policy\x12\xc0\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"U\x82\xd3\xe4\x93\x02\x38\"3/v1/{resource=billingAccounts/*}:testIamPermissions:\x01*\xda\x41\x14resource,permissions\x12\xe9\x01\n\x12MoveBillingAccount\x12\x32.google.cloud.billing.v1.MoveBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"v\x82\xd3\xe4\x93\x02p\"!/v1/{name=billingAccounts/*}:move:\x01*ZH\x12\x46/v1/{destination_parent=organizations/*}/{name=billingAccounts/*}:move\x1a\xb5\x01\xca\x41\x1b\x63loudbilling.googleapis.com\xd2\x41\x93\x01https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-billing.readonly,https://www.googleapis.com/auth/cloud-platformB\x80\x02\n\x1b\x63om.google.cloud.billing.v1B\x11\x43loudBillingProtoP\x01Z5cloud.google.com/go/billing/apiv1/billingpb;billingpb\xea\x41\x41\n+cloudresourcemanager.googleapis.com/Project\x12\x12projects/{project}\xea\x41P\n0cloudresourcemanager.googleapis.com/Organization\x12\x1corganizations/{organization}b\x06proto3"
17
17
 
18
18
  pool = Google::Protobuf::DescriptorPool.generated_pool
19
19
 
@@ -55,6 +55,7 @@ module Google
55
55
  ListProjectBillingInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListProjectBillingInfoResponse").msgclass
56
56
  GetProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GetProjectBillingInfoRequest").msgclass
57
57
  UpdateProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.UpdateProjectBillingInfoRequest").msgclass
58
+ MoveBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.MoveBillingAccountRequest").msgclass
58
59
  end
59
60
  end
60
61
  end
@@ -89,7 +89,8 @@ module Google
89
89
  # account, even if the charge occurred before the new billing account was
90
90
  # assigned to the project.
91
91
  #
92
- # The current authenticated user must have ownership privileges for both the
92
+ # The current authenticated user must have ownership privileges for both
93
+ # the
93
94
  # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
94
95
  # ) and the [billing
95
96
  # account](https://cloud.google.com/billing/docs/how-to/billing-access).
@@ -123,6 +124,8 @@ module Google
123
124
  # the resource and a set of permissions as input and returns the subset of
124
125
  # the input permissions that the caller is allowed for that resource.
125
126
  rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
127
+ # Changes which parent organization a billing account belongs to.
128
+ rpc :MoveBillingAccount, ::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount
126
129
  end
127
130
 
128
131
  Stub = Service.rpc_stub_class
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Billing
23
23
  module V1
24
- VERSION = "0.15.1"
24
+ VERSION = "0.16.0"
25
25
  end
26
26
  end
27
27
  end
@@ -304,6 +304,19 @@ module Google
304
304
  # seconds: 360 # 6 minutes
305
305
  # total_poll_timeout:
306
306
  # seconds: 54000 # 90 minutes
307
+ # @!attribute [rw] auto_populated_fields
308
+ # @return [::Array<::String>]
309
+ # List of top-level fields of the request message, that should be
310
+ # automatically populated by the client libraries based on their
311
+ # (google.api.field_info).format. Currently supported format: UUID4.
312
+ #
313
+ # Example of a YAML configuration:
314
+ #
315
+ # publishing:
316
+ # method_settings:
317
+ # - selector: google.example.v1.ExampleService.CreateExample
318
+ # auto_populated_fields:
319
+ # - request_id
307
320
  class MethodSettings
308
321
  include ::Google::Protobuf::MessageExts
309
322
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -47,6 +47,16 @@ module Google
47
47
  # will be the resource name of the parent billing account that it is being
48
48
  # resold through.
49
49
  # Otherwise this will be empty.
50
+ # @!attribute [r] parent
51
+ # @return [::String]
52
+ # Output only. The billing account's parent resource identifier.
53
+ # Use the `MoveBillingAccount` method to update the account's parent resource
54
+ # if it is a organization.
55
+ # Format:
56
+ # - `organizations/{organization_id}`, for example,
57
+ # `organizations/12345678`
58
+ # - `billingAccounts/{billing_account_id}`, for example,
59
+ # `billingAccounts/012345-567890-ABCDEF`
50
60
  class BillingAccount
51
61
  include ::Google::Protobuf::MessageExts
52
62
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -107,8 +117,17 @@ module Google
107
117
  # This only supports filtering for
108
118
  # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
109
119
  # single provided parent billing account.
110
- # (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF").
120
+ # (for example,
121
+ # `master_billing_account=billingAccounts/012345-678901-ABCDEF`).
111
122
  # Boolean algebra and other fields are not currently supported.
123
+ # @!attribute [rw] parent
124
+ # @return [::String]
125
+ # Optional. The parent resource to list billing accounts from.
126
+ # Format:
127
+ # - `organizations/{organization_id}`, for example,
128
+ # `organizations/12345678`
129
+ # - `billingAccounts/{billing_account_id}`, for example,
130
+ # `billingAccounts/012345-567890-ABCDEF`
112
131
  class ListBillingAccountsRequest
113
132
  include ::Google::Protobuf::MessageExts
114
133
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -135,6 +154,14 @@ module Google
135
154
  # Currently CreateBillingAccount only supports subaccount creation, so
136
155
  # any created billing accounts must be under a provided parent billing
137
156
  # account.
157
+ # @!attribute [rw] parent
158
+ # @return [::String]
159
+ # Optional. The parent to create a billing account from.
160
+ # Format:
161
+ # - `organizations/{organization_id}`, for example,
162
+ # `organizations/12345678`
163
+ # - `billingAccounts/{billing_account_id}`, for example,
164
+ # `billingAccounts/012345-567890-ABCDEF`
138
165
  class CreateBillingAccountRequest
139
166
  include ::Google::Protobuf::MessageExts
140
167
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -217,6 +244,23 @@ module Google
217
244
  include ::Google::Protobuf::MessageExts
218
245
  extend ::Google::Protobuf::MessageExts::ClassMethods
219
246
  end
247
+
248
+ # Request message for `MoveBillingAccount` RPC.
249
+ # @!attribute [rw] name
250
+ # @return [::String]
251
+ # Required. The resource name of the billing account to move.
252
+ # Must be of the form `billingAccounts/{billing_account_id}`.
253
+ # The specified billing account cannot be a subaccount, since a subaccount
254
+ # always belongs to the same organization as its parent account.
255
+ # @!attribute [rw] destination_parent
256
+ # @return [::String]
257
+ # Required. The resource name of the Organization to reparent
258
+ # the billing account under.
259
+ # Must be of the form `organizations/{organization_id}`.
260
+ class MoveBillingAccountRequest
261
+ include ::Google::Protobuf::MessageExts
262
+ extend ::Google::Protobuf::MessageExts::ClassMethods
263
+ end
220
264
  end
221
265
  end
222
266
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-billing-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-26 00:00:00.000000000 Z
11
+ date: 2023-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common