google-cloud-dataform-v1beta1 1.1.0 → 1.3.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 +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +4 -4
- data/README.md +7 -8
- data/lib/google/cloud/dataform/v1beta1/bindings_override.rb +1 -1
- data/lib/google/cloud/dataform/v1beta1/dataform/client.rb +515 -1
- data/lib/google/cloud/dataform/v1beta1/dataform/credentials.rb +1 -1
- data/lib/google/cloud/dataform/v1beta1/dataform/paths.rb +1 -1
- data/lib/google/cloud/dataform/v1beta1/dataform/rest/client.rb +480 -1
- data/lib/google/cloud/dataform/v1beta1/dataform/rest/service_stub.rb +309 -1
- data/lib/google/cloud/dataform/v1beta1/dataform/rest.rb +1 -1
- data/lib/google/cloud/dataform/v1beta1/dataform.rb +1 -1
- data/lib/google/cloud/dataform/v1beta1/dataform_pb.rb +15 -1
- data/lib/google/cloud/dataform/v1beta1/dataform_services_pb.rb +11 -1
- data/lib/google/cloud/dataform/v1beta1/rest.rb +1 -1
- data/lib/google/cloud/dataform/v1beta1/version.rb +1 -1
- data/lib/google/cloud/dataform/v1beta1.rb +1 -1
- data/lib/google-cloud-dataform-v1beta1.rb +1 -2
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/cloud/dataform/v1beta1/dataform.rb +232 -1
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/rpc/status.rb +1 -1
- data/proto_docs/google/type/expr.rb +1 -1
- data/proto_docs/google/type/interval.rb +1 -1
- metadata +5 -17
- data/lib/google/longrunning/bindings_override.rb +0 -71
- data/lib/google/longrunning/operations/client.rb +0 -954
- data/lib/google/longrunning/operations/credentials.rb +0 -40
- data/lib/google/longrunning/operations/operations.rb +0 -839
- data/lib/google/longrunning/operations/rest/client.rb +0 -777
- data/lib/google/longrunning/operations/rest/operations.rb +0 -923
- data/lib/google/longrunning/operations/rest/service_stub.rb +0 -322
- data/lib/google/longrunning/operations/rest.rb +0 -57
- data/lib/google/longrunning/operations.rb +0 -59
- data/lib/google/longrunning/rest.rb +0 -34
- data/lib/google/longrunning.rb +0 -41
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -3265,6 +3265,450 @@ module Google
|
|
|
3265
3265
|
raise ::Google::Cloud::Error.from_error(e)
|
|
3266
3266
|
end
|
|
3267
3267
|
|
|
3268
|
+
##
|
|
3269
|
+
# Syncs the refs of a Workspace.
|
|
3270
|
+
#
|
|
3271
|
+
# @overload sync_workspace_refs(request, options = nil)
|
|
3272
|
+
# Pass arguments to `sync_workspace_refs` via a request object, either of type
|
|
3273
|
+
# {::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest} or an equivalent Hash.
|
|
3274
|
+
#
|
|
3275
|
+
# @param request [::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest, ::Hash]
|
|
3276
|
+
# A request object representing the call parameters. Required. To specify no
|
|
3277
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
3278
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
3279
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
3280
|
+
#
|
|
3281
|
+
# @overload sync_workspace_refs(name: nil, remote_branch_name: nil, deepen: nil)
|
|
3282
|
+
# Pass arguments to `sync_workspace_refs` via keyword arguments. Note that at
|
|
3283
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
3284
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
3285
|
+
#
|
|
3286
|
+
# @param name [::String]
|
|
3287
|
+
# Required. The workspace resource name.
|
|
3288
|
+
# Format:
|
|
3289
|
+
# projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
|
|
3290
|
+
# @param remote_branch_name [::String]
|
|
3291
|
+
# Optional. The name of the branch in the Git remote to which the refs should
|
|
3292
|
+
# be fetched for. If left unset, all remote branches will be fetched.
|
|
3293
|
+
# @param deepen [::Integer]
|
|
3294
|
+
# Optional. Can be used to deepen the commit history of shallow clones.
|
|
3295
|
+
# Git documentation:
|
|
3296
|
+
# https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---deependepth
|
|
3297
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
3298
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsResponse]
|
|
3299
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
3300
|
+
#
|
|
3301
|
+
# @return [::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsResponse]
|
|
3302
|
+
#
|
|
3303
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
3304
|
+
#
|
|
3305
|
+
# @example Basic example
|
|
3306
|
+
# require "google/cloud/dataform/v1beta1"
|
|
3307
|
+
#
|
|
3308
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
3309
|
+
# client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new
|
|
3310
|
+
#
|
|
3311
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
3312
|
+
# request = Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest.new
|
|
3313
|
+
#
|
|
3314
|
+
# # Call the sync_workspace_refs method.
|
|
3315
|
+
# result = client.sync_workspace_refs request
|
|
3316
|
+
#
|
|
3317
|
+
# # The returned object is of type Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsResponse.
|
|
3318
|
+
# p result
|
|
3319
|
+
#
|
|
3320
|
+
def sync_workspace_refs request, options = nil
|
|
3321
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
3322
|
+
|
|
3323
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest
|
|
3324
|
+
|
|
3325
|
+
# Converts hash and nil to an options object
|
|
3326
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
3327
|
+
|
|
3328
|
+
# Customize the options with defaults
|
|
3329
|
+
call_metadata = @config.rpcs.sync_workspace_refs.metadata.to_h
|
|
3330
|
+
|
|
3331
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
3332
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
3333
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
3334
|
+
gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION,
|
|
3335
|
+
transports_version_send: [:rest]
|
|
3336
|
+
|
|
3337
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
3338
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
3339
|
+
|
|
3340
|
+
options.apply_defaults timeout: @config.rpcs.sync_workspace_refs.timeout,
|
|
3341
|
+
metadata: call_metadata,
|
|
3342
|
+
retry_policy: @config.rpcs.sync_workspace_refs.retry_policy
|
|
3343
|
+
|
|
3344
|
+
options.apply_defaults timeout: @config.timeout,
|
|
3345
|
+
metadata: @config.metadata,
|
|
3346
|
+
retry_policy: @config.retry_policy
|
|
3347
|
+
|
|
3348
|
+
@dataform_stub.sync_workspace_refs request, options do |result, operation|
|
|
3349
|
+
yield result, operation if block_given?
|
|
3350
|
+
end
|
|
3351
|
+
rescue ::Gapic::Rest::Error => e
|
|
3352
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
3353
|
+
end
|
|
3354
|
+
|
|
3355
|
+
##
|
|
3356
|
+
# Fetches branches in a Workspace.
|
|
3357
|
+
#
|
|
3358
|
+
# @overload fetch_workspace_branches(request, options = nil)
|
|
3359
|
+
# Pass arguments to `fetch_workspace_branches` via a request object, either of type
|
|
3360
|
+
# {::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest} or an equivalent Hash.
|
|
3361
|
+
#
|
|
3362
|
+
# @param request [::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest, ::Hash]
|
|
3363
|
+
# A request object representing the call parameters. Required. To specify no
|
|
3364
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
3365
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
3366
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
3367
|
+
#
|
|
3368
|
+
# @overload fetch_workspace_branches(name: nil, filter: nil, page_size: nil, page_token: nil)
|
|
3369
|
+
# Pass arguments to `fetch_workspace_branches` via keyword arguments. Note that at
|
|
3370
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
3371
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
3372
|
+
#
|
|
3373
|
+
# @param name [::String]
|
|
3374
|
+
# Required. The workspace resource name.
|
|
3375
|
+
# Format:
|
|
3376
|
+
# projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
|
|
3377
|
+
# @param filter [::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest::BranchFilter]
|
|
3378
|
+
# Optional. Filter for the returned list.
|
|
3379
|
+
# @param page_size [::Integer]
|
|
3380
|
+
# Optional. Maximum number of branches to return. The server may return fewer
|
|
3381
|
+
# items than requested. If unspecified, the server will pick an appropriate
|
|
3382
|
+
# default. The maximum value is 1000; values above 1000 will be coerced to
|
|
3383
|
+
# 1000.
|
|
3384
|
+
# @param page_token [::String]
|
|
3385
|
+
# Optional. Page token received from a previous `FetchWorkspaceBranches`
|
|
3386
|
+
# call. Provide this to retrieve the subsequent page.
|
|
3387
|
+
#
|
|
3388
|
+
# When paginating, all other parameters provided to `FetchWorkspaceBranches`,
|
|
3389
|
+
# with the exception of `page_size`, must match the call that provided the
|
|
3390
|
+
# page token.
|
|
3391
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
3392
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::BranchMetadata>]
|
|
3393
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
3394
|
+
#
|
|
3395
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::BranchMetadata>]
|
|
3396
|
+
#
|
|
3397
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
3398
|
+
#
|
|
3399
|
+
# @example Basic example
|
|
3400
|
+
# require "google/cloud/dataform/v1beta1"
|
|
3401
|
+
#
|
|
3402
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
3403
|
+
# client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new
|
|
3404
|
+
#
|
|
3405
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
3406
|
+
# request = Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest.new
|
|
3407
|
+
#
|
|
3408
|
+
# # Call the fetch_workspace_branches method.
|
|
3409
|
+
# result = client.fetch_workspace_branches request
|
|
3410
|
+
#
|
|
3411
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
3412
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
3413
|
+
# result.each do |item|
|
|
3414
|
+
# # Each element is of type ::Google::Cloud::Dataform::V1beta1::BranchMetadata.
|
|
3415
|
+
# p item
|
|
3416
|
+
# end
|
|
3417
|
+
#
|
|
3418
|
+
def fetch_workspace_branches request, options = nil
|
|
3419
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
3420
|
+
|
|
3421
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest
|
|
3422
|
+
|
|
3423
|
+
# Converts hash and nil to an options object
|
|
3424
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
3425
|
+
|
|
3426
|
+
# Customize the options with defaults
|
|
3427
|
+
call_metadata = @config.rpcs.fetch_workspace_branches.metadata.to_h
|
|
3428
|
+
|
|
3429
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
3430
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
3431
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
3432
|
+
gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION,
|
|
3433
|
+
transports_version_send: [:rest]
|
|
3434
|
+
|
|
3435
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
3436
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
3437
|
+
|
|
3438
|
+
options.apply_defaults timeout: @config.rpcs.fetch_workspace_branches.timeout,
|
|
3439
|
+
metadata: call_metadata,
|
|
3440
|
+
retry_policy: @config.rpcs.fetch_workspace_branches.retry_policy
|
|
3441
|
+
|
|
3442
|
+
options.apply_defaults timeout: @config.timeout,
|
|
3443
|
+
metadata: @config.metadata,
|
|
3444
|
+
retry_policy: @config.retry_policy
|
|
3445
|
+
|
|
3446
|
+
@dataform_stub.fetch_workspace_branches request, options do |result, operation|
|
|
3447
|
+
result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :fetch_workspace_branches, "branches", request, result, options
|
|
3448
|
+
yield result, operation if block_given?
|
|
3449
|
+
throw :response, result
|
|
3450
|
+
end
|
|
3451
|
+
rescue ::Gapic::Rest::Error => e
|
|
3452
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
3453
|
+
end
|
|
3454
|
+
|
|
3455
|
+
##
|
|
3456
|
+
# Deletes a branch in a Workspace.
|
|
3457
|
+
#
|
|
3458
|
+
# @overload delete_branch(request, options = nil)
|
|
3459
|
+
# Pass arguments to `delete_branch` via a request object, either of type
|
|
3460
|
+
# {::Google::Cloud::Dataform::V1beta1::DeleteBranchRequest} or an equivalent Hash.
|
|
3461
|
+
#
|
|
3462
|
+
# @param request [::Google::Cloud::Dataform::V1beta1::DeleteBranchRequest, ::Hash]
|
|
3463
|
+
# A request object representing the call parameters. Required. To specify no
|
|
3464
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
3465
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
3466
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
3467
|
+
#
|
|
3468
|
+
# @overload delete_branch(name: nil, branch: nil, force: nil)
|
|
3469
|
+
# Pass arguments to `delete_branch` via keyword arguments. Note that at
|
|
3470
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
3471
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
3472
|
+
#
|
|
3473
|
+
# @param name [::String]
|
|
3474
|
+
# Required. The workspace resource name.
|
|
3475
|
+
# Format:
|
|
3476
|
+
# projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
|
|
3477
|
+
# @param branch [::String]
|
|
3478
|
+
# Required. The name of the branch in the Git repository to delete.
|
|
3479
|
+
# @param force [::Boolean]
|
|
3480
|
+
# Optional. If set to true, any non-pushed commits on the branch will be
|
|
3481
|
+
# deleted. Upstream branch name will be the same as the branch to delete.
|
|
3482
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
3483
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1beta1::DeleteBranchResponse]
|
|
3484
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
3485
|
+
#
|
|
3486
|
+
# @return [::Google::Cloud::Dataform::V1beta1::DeleteBranchResponse]
|
|
3487
|
+
#
|
|
3488
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
3489
|
+
#
|
|
3490
|
+
# @example Basic example
|
|
3491
|
+
# require "google/cloud/dataform/v1beta1"
|
|
3492
|
+
#
|
|
3493
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
3494
|
+
# client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new
|
|
3495
|
+
#
|
|
3496
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
3497
|
+
# request = Google::Cloud::Dataform::V1beta1::DeleteBranchRequest.new
|
|
3498
|
+
#
|
|
3499
|
+
# # Call the delete_branch method.
|
|
3500
|
+
# result = client.delete_branch request
|
|
3501
|
+
#
|
|
3502
|
+
# # The returned object is of type Google::Cloud::Dataform::V1beta1::DeleteBranchResponse.
|
|
3503
|
+
# p result
|
|
3504
|
+
#
|
|
3505
|
+
def delete_branch request, options = nil
|
|
3506
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
3507
|
+
|
|
3508
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::DeleteBranchRequest
|
|
3509
|
+
|
|
3510
|
+
# Converts hash and nil to an options object
|
|
3511
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
3512
|
+
|
|
3513
|
+
# Customize the options with defaults
|
|
3514
|
+
call_metadata = @config.rpcs.delete_branch.metadata.to_h
|
|
3515
|
+
|
|
3516
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
3517
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
3518
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
3519
|
+
gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION,
|
|
3520
|
+
transports_version_send: [:rest]
|
|
3521
|
+
|
|
3522
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
3523
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
3524
|
+
|
|
3525
|
+
options.apply_defaults timeout: @config.rpcs.delete_branch.timeout,
|
|
3526
|
+
metadata: call_metadata,
|
|
3527
|
+
retry_policy: @config.rpcs.delete_branch.retry_policy
|
|
3528
|
+
|
|
3529
|
+
options.apply_defaults timeout: @config.timeout,
|
|
3530
|
+
metadata: @config.metadata,
|
|
3531
|
+
retry_policy: @config.retry_policy
|
|
3532
|
+
|
|
3533
|
+
@dataform_stub.delete_branch request, options do |result, operation|
|
|
3534
|
+
yield result, operation if block_given?
|
|
3535
|
+
end
|
|
3536
|
+
rescue ::Gapic::Rest::Error => e
|
|
3537
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
3538
|
+
end
|
|
3539
|
+
|
|
3540
|
+
##
|
|
3541
|
+
# Checkout a branch in a Workspace.
|
|
3542
|
+
#
|
|
3543
|
+
# @overload checkout_workspace_branch(request, options = nil)
|
|
3544
|
+
# Pass arguments to `checkout_workspace_branch` via a request object, either of type
|
|
3545
|
+
# {::Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest} or an equivalent Hash.
|
|
3546
|
+
#
|
|
3547
|
+
# @param request [::Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest, ::Hash]
|
|
3548
|
+
# A request object representing the call parameters. Required. To specify no
|
|
3549
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
3550
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
3551
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
3552
|
+
#
|
|
3553
|
+
# @overload checkout_workspace_branch(name: nil, branch: nil, create_if_not_exists: nil, source_branch: nil)
|
|
3554
|
+
# Pass arguments to `checkout_workspace_branch` via keyword arguments. Note that at
|
|
3555
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
3556
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
3557
|
+
#
|
|
3558
|
+
# @param name [::String]
|
|
3559
|
+
# Required. The workspace resource name.
|
|
3560
|
+
# Format:
|
|
3561
|
+
# projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
|
|
3562
|
+
# @param branch [::String]
|
|
3563
|
+
# Required. The name of the branch in the Git repository to which the
|
|
3564
|
+
# workspace should be checked out.
|
|
3565
|
+
# @param create_if_not_exists [::Boolean]
|
|
3566
|
+
# Optional. If set to true and the branch does not exist, it will be created.
|
|
3567
|
+
# Otherwise, an error will be thrown.
|
|
3568
|
+
# @param source_branch [::String]
|
|
3569
|
+
# Optional. The name of the branch in the Git repository from which the new
|
|
3570
|
+
# branch should be created. If left unset, the workspace's current branch
|
|
3571
|
+
# name will be used. Accepts only branch names from FetchWorkspaceBranches
|
|
3572
|
+
# response, and can only be set if `create_if_not_exists` is true. Oherwise,
|
|
3573
|
+
# an error will be thrown.
|
|
3574
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
3575
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
|
3576
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
3577
|
+
#
|
|
3578
|
+
# @return [::Google::Protobuf::Empty]
|
|
3579
|
+
#
|
|
3580
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
3581
|
+
#
|
|
3582
|
+
# @example Basic example
|
|
3583
|
+
# require "google/cloud/dataform/v1beta1"
|
|
3584
|
+
#
|
|
3585
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
3586
|
+
# client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new
|
|
3587
|
+
#
|
|
3588
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
3589
|
+
# request = Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest.new
|
|
3590
|
+
#
|
|
3591
|
+
# # Call the checkout_workspace_branch method.
|
|
3592
|
+
# result = client.checkout_workspace_branch request
|
|
3593
|
+
#
|
|
3594
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
3595
|
+
# p result
|
|
3596
|
+
#
|
|
3597
|
+
def checkout_workspace_branch request, options = nil
|
|
3598
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
3599
|
+
|
|
3600
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest
|
|
3601
|
+
|
|
3602
|
+
# Converts hash and nil to an options object
|
|
3603
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
3604
|
+
|
|
3605
|
+
# Customize the options with defaults
|
|
3606
|
+
call_metadata = @config.rpcs.checkout_workspace_branch.metadata.to_h
|
|
3607
|
+
|
|
3608
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
3609
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
3610
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
3611
|
+
gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION,
|
|
3612
|
+
transports_version_send: [:rest]
|
|
3613
|
+
|
|
3614
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
3615
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
3616
|
+
|
|
3617
|
+
options.apply_defaults timeout: @config.rpcs.checkout_workspace_branch.timeout,
|
|
3618
|
+
metadata: call_metadata,
|
|
3619
|
+
retry_policy: @config.rpcs.checkout_workspace_branch.retry_policy
|
|
3620
|
+
|
|
3621
|
+
options.apply_defaults timeout: @config.timeout,
|
|
3622
|
+
metadata: @config.metadata,
|
|
3623
|
+
retry_policy: @config.retry_policy
|
|
3624
|
+
|
|
3625
|
+
@dataform_stub.checkout_workspace_branch request, options do |result, operation|
|
|
3626
|
+
yield result, operation if block_given?
|
|
3627
|
+
end
|
|
3628
|
+
rescue ::Gapic::Rest::Error => e
|
|
3629
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
3630
|
+
end
|
|
3631
|
+
|
|
3632
|
+
##
|
|
3633
|
+
# Fetches the current branch of a Workspace.
|
|
3634
|
+
#
|
|
3635
|
+
# @overload fetch_current_workspace_branch(request, options = nil)
|
|
3636
|
+
# Pass arguments to `fetch_current_workspace_branch` via a request object, either of type
|
|
3637
|
+
# {::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest} or an equivalent Hash.
|
|
3638
|
+
#
|
|
3639
|
+
# @param request [::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest, ::Hash]
|
|
3640
|
+
# A request object representing the call parameters. Required. To specify no
|
|
3641
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
3642
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
3643
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
3644
|
+
#
|
|
3645
|
+
# @overload fetch_current_workspace_branch(name: nil)
|
|
3646
|
+
# Pass arguments to `fetch_current_workspace_branch` via keyword arguments. Note that at
|
|
3647
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
3648
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
3649
|
+
#
|
|
3650
|
+
# @param name [::String]
|
|
3651
|
+
# Required. The workspace resource name.
|
|
3652
|
+
# Format:
|
|
3653
|
+
# projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
|
|
3654
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
3655
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchResponse]
|
|
3656
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
3657
|
+
#
|
|
3658
|
+
# @return [::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchResponse]
|
|
3659
|
+
#
|
|
3660
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
3661
|
+
#
|
|
3662
|
+
# @example Basic example
|
|
3663
|
+
# require "google/cloud/dataform/v1beta1"
|
|
3664
|
+
#
|
|
3665
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
3666
|
+
# client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new
|
|
3667
|
+
#
|
|
3668
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
3669
|
+
# request = Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest.new
|
|
3670
|
+
#
|
|
3671
|
+
# # Call the fetch_current_workspace_branch method.
|
|
3672
|
+
# result = client.fetch_current_workspace_branch request
|
|
3673
|
+
#
|
|
3674
|
+
# # The returned object is of type Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchResponse.
|
|
3675
|
+
# p result
|
|
3676
|
+
#
|
|
3677
|
+
def fetch_current_workspace_branch request, options = nil
|
|
3678
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
3679
|
+
|
|
3680
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest
|
|
3681
|
+
|
|
3682
|
+
# Converts hash and nil to an options object
|
|
3683
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
3684
|
+
|
|
3685
|
+
# Customize the options with defaults
|
|
3686
|
+
call_metadata = @config.rpcs.fetch_current_workspace_branch.metadata.to_h
|
|
3687
|
+
|
|
3688
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
3689
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
3690
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
3691
|
+
gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION,
|
|
3692
|
+
transports_version_send: [:rest]
|
|
3693
|
+
|
|
3694
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
3695
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
3696
|
+
|
|
3697
|
+
options.apply_defaults timeout: @config.rpcs.fetch_current_workspace_branch.timeout,
|
|
3698
|
+
metadata: call_metadata,
|
|
3699
|
+
retry_policy: @config.rpcs.fetch_current_workspace_branch.retry_policy
|
|
3700
|
+
|
|
3701
|
+
options.apply_defaults timeout: @config.timeout,
|
|
3702
|
+
metadata: @config.metadata,
|
|
3703
|
+
retry_policy: @config.retry_policy
|
|
3704
|
+
|
|
3705
|
+
@dataform_stub.fetch_current_workspace_branch request, options do |result, operation|
|
|
3706
|
+
yield result, operation if block_given?
|
|
3707
|
+
end
|
|
3708
|
+
rescue ::Gapic::Rest::Error => e
|
|
3709
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
3710
|
+
end
|
|
3711
|
+
|
|
3268
3712
|
##
|
|
3269
3713
|
# Pushes Git commits from a Workspace to the Repository's remote.
|
|
3270
3714
|
#
|
|
@@ -7009,6 +7453,31 @@ module Google
|
|
|
7009
7453
|
#
|
|
7010
7454
|
attr_reader :pull_git_commits
|
|
7011
7455
|
##
|
|
7456
|
+
# RPC-specific configuration for `sync_workspace_refs`
|
|
7457
|
+
# @return [::Gapic::Config::Method]
|
|
7458
|
+
#
|
|
7459
|
+
attr_reader :sync_workspace_refs
|
|
7460
|
+
##
|
|
7461
|
+
# RPC-specific configuration for `fetch_workspace_branches`
|
|
7462
|
+
# @return [::Gapic::Config::Method]
|
|
7463
|
+
#
|
|
7464
|
+
attr_reader :fetch_workspace_branches
|
|
7465
|
+
##
|
|
7466
|
+
# RPC-specific configuration for `delete_branch`
|
|
7467
|
+
# @return [::Gapic::Config::Method]
|
|
7468
|
+
#
|
|
7469
|
+
attr_reader :delete_branch
|
|
7470
|
+
##
|
|
7471
|
+
# RPC-specific configuration for `checkout_workspace_branch`
|
|
7472
|
+
# @return [::Gapic::Config::Method]
|
|
7473
|
+
#
|
|
7474
|
+
attr_reader :checkout_workspace_branch
|
|
7475
|
+
##
|
|
7476
|
+
# RPC-specific configuration for `fetch_current_workspace_branch`
|
|
7477
|
+
# @return [::Gapic::Config::Method]
|
|
7478
|
+
#
|
|
7479
|
+
attr_reader :fetch_current_workspace_branch
|
|
7480
|
+
##
|
|
7012
7481
|
# RPC-specific configuration for `push_git_commits`
|
|
7013
7482
|
# @return [::Gapic::Config::Method]
|
|
7014
7483
|
#
|
|
@@ -7279,6 +7748,16 @@ module Google
|
|
|
7279
7748
|
@install_npm_packages = ::Gapic::Config::Method.new install_npm_packages_config
|
|
7280
7749
|
pull_git_commits_config = parent_rpcs.pull_git_commits if parent_rpcs.respond_to? :pull_git_commits
|
|
7281
7750
|
@pull_git_commits = ::Gapic::Config::Method.new pull_git_commits_config
|
|
7751
|
+
sync_workspace_refs_config = parent_rpcs.sync_workspace_refs if parent_rpcs.respond_to? :sync_workspace_refs
|
|
7752
|
+
@sync_workspace_refs = ::Gapic::Config::Method.new sync_workspace_refs_config
|
|
7753
|
+
fetch_workspace_branches_config = parent_rpcs.fetch_workspace_branches if parent_rpcs.respond_to? :fetch_workspace_branches
|
|
7754
|
+
@fetch_workspace_branches = ::Gapic::Config::Method.new fetch_workspace_branches_config
|
|
7755
|
+
delete_branch_config = parent_rpcs.delete_branch if parent_rpcs.respond_to? :delete_branch
|
|
7756
|
+
@delete_branch = ::Gapic::Config::Method.new delete_branch_config
|
|
7757
|
+
checkout_workspace_branch_config = parent_rpcs.checkout_workspace_branch if parent_rpcs.respond_to? :checkout_workspace_branch
|
|
7758
|
+
@checkout_workspace_branch = ::Gapic::Config::Method.new checkout_workspace_branch_config
|
|
7759
|
+
fetch_current_workspace_branch_config = parent_rpcs.fetch_current_workspace_branch if parent_rpcs.respond_to? :fetch_current_workspace_branch
|
|
7760
|
+
@fetch_current_workspace_branch = ::Gapic::Config::Method.new fetch_current_workspace_branch_config
|
|
7282
7761
|
push_git_commits_config = parent_rpcs.push_git_commits if parent_rpcs.respond_to? :push_git_commits
|
|
7283
7762
|
@push_git_commits = ::Gapic::Config::Method.new push_git_commits_config
|
|
7284
7763
|
fetch_file_git_statuses_config = parent_rpcs.fetch_file_git_statuses if parent_rpcs.respond_to? :fetch_file_git_statuses
|