google-cloud-dataform-v1beta1 1.1.0 → 1.2.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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dataform/v1beta1/bindings_override.rb +1 -1
  3. data/lib/google/cloud/dataform/v1beta1/dataform/client.rb +515 -1
  4. data/lib/google/cloud/dataform/v1beta1/dataform/credentials.rb +1 -1
  5. data/lib/google/cloud/dataform/v1beta1/dataform/paths.rb +1 -1
  6. data/lib/google/cloud/dataform/v1beta1/dataform/rest/client.rb +480 -1
  7. data/lib/google/cloud/dataform/v1beta1/dataform/rest/service_stub.rb +309 -1
  8. data/lib/google/cloud/dataform/v1beta1/dataform/rest.rb +1 -1
  9. data/lib/google/cloud/dataform/v1beta1/dataform.rb +1 -1
  10. data/lib/google/cloud/dataform/v1beta1/dataform_pb.rb +12 -1
  11. data/lib/google/cloud/dataform/v1beta1/dataform_services_pb.rb +11 -1
  12. data/lib/google/cloud/dataform/v1beta1/rest.rb +1 -1
  13. data/lib/google/cloud/dataform/v1beta1/version.rb +1 -1
  14. data/lib/google/cloud/dataform/v1beta1.rb +1 -1
  15. data/lib/google-cloud-dataform-v1beta1.rb +1 -1
  16. data/proto_docs/google/api/client.rb +1 -1
  17. data/proto_docs/google/api/field_behavior.rb +1 -1
  18. data/proto_docs/google/api/launch_stage.rb +1 -1
  19. data/proto_docs/google/api/resource.rb +1 -1
  20. data/proto_docs/google/cloud/dataform/v1beta1/dataform.rb +193 -1
  21. data/proto_docs/google/protobuf/any.rb +1 -1
  22. data/proto_docs/google/protobuf/duration.rb +1 -1
  23. data/proto_docs/google/protobuf/empty.rb +1 -1
  24. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  25. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  26. data/proto_docs/google/rpc/status.rb +1 -1
  27. data/proto_docs/google/type/expr.rb +1 -1
  28. data/proto_docs/google/type/interval.rb +1 -1
  29. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a41ce39d56cdea59fd2e451befa67b5f8531cdc31cc5002399192c7e2f1d6e4
4
- data.tar.gz: c6924d5eb9fa31a7d4efd0e9efbf02b78f9695158f9f6c8b457e64c3e6b95879
3
+ metadata.gz: e209d3bca1f459ff60e40665218f0917862018441117c8db8448dd43a7e47903
4
+ data.tar.gz: c36e034552874f3d11df645cb67368650d4cbe775c166bd44ba782ff58b6b2d2
5
5
  SHA512:
6
- metadata.gz: b6d80e22af5a8a173e4b7033af030fb9f3b6370dcf5bfe8d963b33ffa72c8a8958e54ed7def7efac47b408c9fc600ae2473cd7ce7337d383d79754ec516db903
7
- data.tar.gz: 125a35647b9ee3a9142c3fc4d7641038db728eb01a501673f49c4e4996090cce7eeabc19742ec17674e61b8f8c2a3693ff9510de7491c5298759f9be41874aff
6
+ metadata.gz: 5f16bc5a5ed9b0bcfff9aaa947e85ade2ebef3d1ab54be30b40d1f639c77634c57281cbd72fd53242b2b25bf7646fc45bb4df02b6cb2ebaf9549829dee875ccd
7
+ data.tar.gz: 92ab358619196bfc6ca61958614ac001268a8092585324d513fd0454ec5aeec9c93dd3f66dcc731828844c3e22d0b2d961f59604df01a6f5d30d0d8bbd70d47f
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2023 Google LLC
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.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2022 Google LLC
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.
@@ -3509,6 +3509,485 @@ module Google
3509
3509
  raise ::Google::Cloud::Error.from_error(e)
3510
3510
  end
3511
3511
 
3512
+ ##
3513
+ # Syncs the refs of a Workspace.
3514
+ #
3515
+ # @overload sync_workspace_refs(request, options = nil)
3516
+ # Pass arguments to `sync_workspace_refs` via a request object, either of type
3517
+ # {::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest} or an equivalent Hash.
3518
+ #
3519
+ # @param request [::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest, ::Hash]
3520
+ # A request object representing the call parameters. Required. To specify no
3521
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3522
+ # @param options [::Gapic::CallOptions, ::Hash]
3523
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3524
+ #
3525
+ # @overload sync_workspace_refs(name: nil, remote_branch_name: nil, deepen: nil)
3526
+ # Pass arguments to `sync_workspace_refs` via keyword arguments. Note that at
3527
+ # least one keyword argument is required. To specify no parameters, or to keep all
3528
+ # the default parameter values, pass an empty Hash as a request object (see above).
3529
+ #
3530
+ # @param name [::String]
3531
+ # Required. The workspace resource name.
3532
+ # Format:
3533
+ # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
3534
+ # @param remote_branch_name [::String]
3535
+ # Optional. The name of the branch in the Git remote to which the refs should
3536
+ # be fetched for. If left unset, all remote branches will be fetched.
3537
+ # @param deepen [::Integer]
3538
+ # Optional. Can be used to deepen the commit history of shallow clones.
3539
+ # Git documentation:
3540
+ # https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---deependepth
3541
+ #
3542
+ # @yield [response, operation] Access the result along with the RPC operation
3543
+ # @yieldparam response [::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsResponse]
3544
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3545
+ #
3546
+ # @return [::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsResponse]
3547
+ #
3548
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3549
+ #
3550
+ # @example Basic example
3551
+ # require "google/cloud/dataform/v1beta1"
3552
+ #
3553
+ # # Create a client object. The client can be reused for multiple calls.
3554
+ # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new
3555
+ #
3556
+ # # Create a request. To set request fields, pass in keyword arguments.
3557
+ # request = Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest.new
3558
+ #
3559
+ # # Call the sync_workspace_refs method.
3560
+ # result = client.sync_workspace_refs request
3561
+ #
3562
+ # # The returned object is of type Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsResponse.
3563
+ # p result
3564
+ #
3565
+ def sync_workspace_refs request, options = nil
3566
+ raise ::ArgumentError, "request must be provided" if request.nil?
3567
+
3568
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::SyncWorkspaceRefsRequest
3569
+
3570
+ # Converts hash and nil to an options object
3571
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3572
+
3573
+ # Customize the options with defaults
3574
+ metadata = @config.rpcs.sync_workspace_refs.metadata.to_h
3575
+
3576
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3577
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3578
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3579
+ gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION
3580
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3581
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3582
+
3583
+ header_params = {}
3584
+ if request.name
3585
+ header_params["name"] = request.name
3586
+ end
3587
+
3588
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3589
+ metadata[:"x-goog-request-params"] ||= request_params_header
3590
+
3591
+ options.apply_defaults timeout: @config.rpcs.sync_workspace_refs.timeout,
3592
+ metadata: metadata,
3593
+ retry_policy: @config.rpcs.sync_workspace_refs.retry_policy
3594
+
3595
+ options.apply_defaults timeout: @config.timeout,
3596
+ metadata: @config.metadata,
3597
+ retry_policy: @config.retry_policy
3598
+
3599
+ @dataform_stub.call_rpc :sync_workspace_refs, request, options: options do |response, operation|
3600
+ yield response, operation if block_given?
3601
+ end
3602
+ rescue ::GRPC::BadStatus => e
3603
+ raise ::Google::Cloud::Error.from_error(e)
3604
+ end
3605
+
3606
+ ##
3607
+ # Fetches branches in a Workspace.
3608
+ #
3609
+ # @overload fetch_workspace_branches(request, options = nil)
3610
+ # Pass arguments to `fetch_workspace_branches` via a request object, either of type
3611
+ # {::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest} or an equivalent Hash.
3612
+ #
3613
+ # @param request [::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest, ::Hash]
3614
+ # A request object representing the call parameters. Required. To specify no
3615
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3616
+ # @param options [::Gapic::CallOptions, ::Hash]
3617
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3618
+ #
3619
+ # @overload fetch_workspace_branches(name: nil, filter: nil, page_size: nil, page_token: nil)
3620
+ # Pass arguments to `fetch_workspace_branches` via keyword arguments. Note that at
3621
+ # least one keyword argument is required. To specify no parameters, or to keep all
3622
+ # the default parameter values, pass an empty Hash as a request object (see above).
3623
+ #
3624
+ # @param name [::String]
3625
+ # Required. The workspace resource name.
3626
+ # Format:
3627
+ # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
3628
+ # @param filter [::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest::BranchFilter]
3629
+ # Optional. Filter for the returned list.
3630
+ # @param page_size [::Integer]
3631
+ # Optional. Maximum number of branches to return. The server may return fewer
3632
+ # items than requested. If unspecified, the server will pick an appropriate
3633
+ # default. The maximum value is 1000; values above 1000 will be coerced to
3634
+ # 1000.
3635
+ # @param page_token [::String]
3636
+ # Optional. Page token received from a previous `FetchWorkspaceBranches`
3637
+ # call. Provide this to retrieve the subsequent page.
3638
+ #
3639
+ # When paginating, all other parameters provided to `FetchWorkspaceBranches`,
3640
+ # with the exception of `page_size`, must match the call that provided the
3641
+ # page token.
3642
+ #
3643
+ # @yield [response, operation] Access the result along with the RPC operation
3644
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::BranchMetadata>]
3645
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3646
+ #
3647
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::BranchMetadata>]
3648
+ #
3649
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3650
+ #
3651
+ # @example Basic example
3652
+ # require "google/cloud/dataform/v1beta1"
3653
+ #
3654
+ # # Create a client object. The client can be reused for multiple calls.
3655
+ # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new
3656
+ #
3657
+ # # Create a request. To set request fields, pass in keyword arguments.
3658
+ # request = Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest.new
3659
+ #
3660
+ # # Call the fetch_workspace_branches method.
3661
+ # result = client.fetch_workspace_branches request
3662
+ #
3663
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3664
+ # # over elements, and API calls will be issued to fetch pages as needed.
3665
+ # result.each do |item|
3666
+ # # Each element is of type ::Google::Cloud::Dataform::V1beta1::BranchMetadata.
3667
+ # p item
3668
+ # end
3669
+ #
3670
+ def fetch_workspace_branches request, options = nil
3671
+ raise ::ArgumentError, "request must be provided" if request.nil?
3672
+
3673
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::FetchWorkspaceBranchesRequest
3674
+
3675
+ # Converts hash and nil to an options object
3676
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3677
+
3678
+ # Customize the options with defaults
3679
+ metadata = @config.rpcs.fetch_workspace_branches.metadata.to_h
3680
+
3681
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3682
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3683
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3684
+ gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION
3685
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3686
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3687
+
3688
+ header_params = {}
3689
+ if request.name
3690
+ header_params["name"] = request.name
3691
+ end
3692
+
3693
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3694
+ metadata[:"x-goog-request-params"] ||= request_params_header
3695
+
3696
+ options.apply_defaults timeout: @config.rpcs.fetch_workspace_branches.timeout,
3697
+ metadata: metadata,
3698
+ retry_policy: @config.rpcs.fetch_workspace_branches.retry_policy
3699
+
3700
+ options.apply_defaults timeout: @config.timeout,
3701
+ metadata: @config.metadata,
3702
+ retry_policy: @config.retry_policy
3703
+
3704
+ @dataform_stub.call_rpc :fetch_workspace_branches, request, options: options do |response, operation|
3705
+ response = ::Gapic::PagedEnumerable.new @dataform_stub, :fetch_workspace_branches, request, response, operation, options
3706
+ yield response, operation if block_given?
3707
+ throw :response, response
3708
+ end
3709
+ rescue ::GRPC::BadStatus => e
3710
+ raise ::Google::Cloud::Error.from_error(e)
3711
+ end
3712
+
3713
+ ##
3714
+ # Deletes a branch in a Workspace.
3715
+ #
3716
+ # @overload delete_branch(request, options = nil)
3717
+ # Pass arguments to `delete_branch` via a request object, either of type
3718
+ # {::Google::Cloud::Dataform::V1beta1::DeleteBranchRequest} or an equivalent Hash.
3719
+ #
3720
+ # @param request [::Google::Cloud::Dataform::V1beta1::DeleteBranchRequest, ::Hash]
3721
+ # A request object representing the call parameters. Required. To specify no
3722
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3723
+ # @param options [::Gapic::CallOptions, ::Hash]
3724
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3725
+ #
3726
+ # @overload delete_branch(name: nil, branch: nil, force: nil)
3727
+ # Pass arguments to `delete_branch` via keyword arguments. Note that at
3728
+ # least one keyword argument is required. To specify no parameters, or to keep all
3729
+ # the default parameter values, pass an empty Hash as a request object (see above).
3730
+ #
3731
+ # @param name [::String]
3732
+ # Required. The workspace resource name.
3733
+ # Format:
3734
+ # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
3735
+ # @param branch [::String]
3736
+ # Required. The name of the branch in the Git repository to delete.
3737
+ # @param force [::Boolean]
3738
+ # Optional. If set to true, any non-pushed commits on the branch will be
3739
+ # deleted. Upstream branch name will be the same as the branch to delete.
3740
+ #
3741
+ # @yield [response, operation] Access the result along with the RPC operation
3742
+ # @yieldparam response [::Google::Cloud::Dataform::V1beta1::DeleteBranchResponse]
3743
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3744
+ #
3745
+ # @return [::Google::Cloud::Dataform::V1beta1::DeleteBranchResponse]
3746
+ #
3747
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3748
+ #
3749
+ # @example Basic example
3750
+ # require "google/cloud/dataform/v1beta1"
3751
+ #
3752
+ # # Create a client object. The client can be reused for multiple calls.
3753
+ # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new
3754
+ #
3755
+ # # Create a request. To set request fields, pass in keyword arguments.
3756
+ # request = Google::Cloud::Dataform::V1beta1::DeleteBranchRequest.new
3757
+ #
3758
+ # # Call the delete_branch method.
3759
+ # result = client.delete_branch request
3760
+ #
3761
+ # # The returned object is of type Google::Cloud::Dataform::V1beta1::DeleteBranchResponse.
3762
+ # p result
3763
+ #
3764
+ def delete_branch request, options = nil
3765
+ raise ::ArgumentError, "request must be provided" if request.nil?
3766
+
3767
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::DeleteBranchRequest
3768
+
3769
+ # Converts hash and nil to an options object
3770
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3771
+
3772
+ # Customize the options with defaults
3773
+ metadata = @config.rpcs.delete_branch.metadata.to_h
3774
+
3775
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3776
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3777
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3778
+ gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION
3779
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3780
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3781
+
3782
+ header_params = {}
3783
+ if request.name
3784
+ header_params["name"] = request.name
3785
+ end
3786
+
3787
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3788
+ metadata[:"x-goog-request-params"] ||= request_params_header
3789
+
3790
+ options.apply_defaults timeout: @config.rpcs.delete_branch.timeout,
3791
+ metadata: metadata,
3792
+ retry_policy: @config.rpcs.delete_branch.retry_policy
3793
+
3794
+ options.apply_defaults timeout: @config.timeout,
3795
+ metadata: @config.metadata,
3796
+ retry_policy: @config.retry_policy
3797
+
3798
+ @dataform_stub.call_rpc :delete_branch, request, options: options do |response, operation|
3799
+ yield response, operation if block_given?
3800
+ end
3801
+ rescue ::GRPC::BadStatus => e
3802
+ raise ::Google::Cloud::Error.from_error(e)
3803
+ end
3804
+
3805
+ ##
3806
+ # Checkout a branch in a Workspace.
3807
+ #
3808
+ # @overload checkout_workspace_branch(request, options = nil)
3809
+ # Pass arguments to `checkout_workspace_branch` via a request object, either of type
3810
+ # {::Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest} or an equivalent Hash.
3811
+ #
3812
+ # @param request [::Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest, ::Hash]
3813
+ # A request object representing the call parameters. Required. To specify no
3814
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3815
+ # @param options [::Gapic::CallOptions, ::Hash]
3816
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3817
+ #
3818
+ # @overload checkout_workspace_branch(name: nil, branch: nil, create_if_not_exists: nil, source_branch: nil)
3819
+ # Pass arguments to `checkout_workspace_branch` via keyword arguments. Note that at
3820
+ # least one keyword argument is required. To specify no parameters, or to keep all
3821
+ # the default parameter values, pass an empty Hash as a request object (see above).
3822
+ #
3823
+ # @param name [::String]
3824
+ # Required. The workspace resource name.
3825
+ # Format:
3826
+ # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
3827
+ # @param branch [::String]
3828
+ # Required. The name of the branch in the Git repository to which the
3829
+ # workspace should be checked out.
3830
+ # @param create_if_not_exists [::Boolean]
3831
+ # Optional. If set to true and the branch does not exist, it will be created.
3832
+ # Otherwise, an error will be thrown.
3833
+ # @param source_branch [::String]
3834
+ # Optional. The name of the branch in the Git repository from which the new
3835
+ # branch should be created. If left unset, the workspace's current branch
3836
+ # name will be used. Accepts only branch names from FetchWorkspaceBranches
3837
+ # response, and can only be set if `create_if_not_exists` is true. Oherwise,
3838
+ # an error will be thrown.
3839
+ #
3840
+ # @yield [response, operation] Access the result along with the RPC operation
3841
+ # @yieldparam response [::Google::Protobuf::Empty]
3842
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3843
+ #
3844
+ # @return [::Google::Protobuf::Empty]
3845
+ #
3846
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3847
+ #
3848
+ # @example Basic example
3849
+ # require "google/cloud/dataform/v1beta1"
3850
+ #
3851
+ # # Create a client object. The client can be reused for multiple calls.
3852
+ # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new
3853
+ #
3854
+ # # Create a request. To set request fields, pass in keyword arguments.
3855
+ # request = Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest.new
3856
+ #
3857
+ # # Call the checkout_workspace_branch method.
3858
+ # result = client.checkout_workspace_branch request
3859
+ #
3860
+ # # The returned object is of type Google::Protobuf::Empty.
3861
+ # p result
3862
+ #
3863
+ def checkout_workspace_branch request, options = nil
3864
+ raise ::ArgumentError, "request must be provided" if request.nil?
3865
+
3866
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::CheckoutWorkspaceBranchRequest
3867
+
3868
+ # Converts hash and nil to an options object
3869
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3870
+
3871
+ # Customize the options with defaults
3872
+ metadata = @config.rpcs.checkout_workspace_branch.metadata.to_h
3873
+
3874
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3875
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3876
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3877
+ gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION
3878
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3879
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3880
+
3881
+ header_params = {}
3882
+ if request.name
3883
+ header_params["name"] = request.name
3884
+ end
3885
+
3886
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3887
+ metadata[:"x-goog-request-params"] ||= request_params_header
3888
+
3889
+ options.apply_defaults timeout: @config.rpcs.checkout_workspace_branch.timeout,
3890
+ metadata: metadata,
3891
+ retry_policy: @config.rpcs.checkout_workspace_branch.retry_policy
3892
+
3893
+ options.apply_defaults timeout: @config.timeout,
3894
+ metadata: @config.metadata,
3895
+ retry_policy: @config.retry_policy
3896
+
3897
+ @dataform_stub.call_rpc :checkout_workspace_branch, request, options: options do |response, operation|
3898
+ yield response, operation if block_given?
3899
+ end
3900
+ rescue ::GRPC::BadStatus => e
3901
+ raise ::Google::Cloud::Error.from_error(e)
3902
+ end
3903
+
3904
+ ##
3905
+ # Fetches the current branch of a Workspace.
3906
+ #
3907
+ # @overload fetch_current_workspace_branch(request, options = nil)
3908
+ # Pass arguments to `fetch_current_workspace_branch` via a request object, either of type
3909
+ # {::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest} or an equivalent Hash.
3910
+ #
3911
+ # @param request [::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest, ::Hash]
3912
+ # A request object representing the call parameters. Required. To specify no
3913
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3914
+ # @param options [::Gapic::CallOptions, ::Hash]
3915
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3916
+ #
3917
+ # @overload fetch_current_workspace_branch(name: nil)
3918
+ # Pass arguments to `fetch_current_workspace_branch` via keyword arguments. Note that at
3919
+ # least one keyword argument is required. To specify no parameters, or to keep all
3920
+ # the default parameter values, pass an empty Hash as a request object (see above).
3921
+ #
3922
+ # @param name [::String]
3923
+ # Required. The workspace resource name.
3924
+ # Format:
3925
+ # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/workspaces/\\{workspace}
3926
+ #
3927
+ # @yield [response, operation] Access the result along with the RPC operation
3928
+ # @yieldparam response [::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchResponse]
3929
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3930
+ #
3931
+ # @return [::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchResponse]
3932
+ #
3933
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3934
+ #
3935
+ # @example Basic example
3936
+ # require "google/cloud/dataform/v1beta1"
3937
+ #
3938
+ # # Create a client object. The client can be reused for multiple calls.
3939
+ # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new
3940
+ #
3941
+ # # Create a request. To set request fields, pass in keyword arguments.
3942
+ # request = Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest.new
3943
+ #
3944
+ # # Call the fetch_current_workspace_branch method.
3945
+ # result = client.fetch_current_workspace_branch request
3946
+ #
3947
+ # # The returned object is of type Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchResponse.
3948
+ # p result
3949
+ #
3950
+ def fetch_current_workspace_branch request, options = nil
3951
+ raise ::ArgumentError, "request must be provided" if request.nil?
3952
+
3953
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::FetchCurrentWorkspaceBranchRequest
3954
+
3955
+ # Converts hash and nil to an options object
3956
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3957
+
3958
+ # Customize the options with defaults
3959
+ metadata = @config.rpcs.fetch_current_workspace_branch.metadata.to_h
3960
+
3961
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3962
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3963
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3964
+ gapic_version: ::Google::Cloud::Dataform::V1beta1::VERSION
3965
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3966
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3967
+
3968
+ header_params = {}
3969
+ if request.name
3970
+ header_params["name"] = request.name
3971
+ end
3972
+
3973
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3974
+ metadata[:"x-goog-request-params"] ||= request_params_header
3975
+
3976
+ options.apply_defaults timeout: @config.rpcs.fetch_current_workspace_branch.timeout,
3977
+ metadata: metadata,
3978
+ retry_policy: @config.rpcs.fetch_current_workspace_branch.retry_policy
3979
+
3980
+ options.apply_defaults timeout: @config.timeout,
3981
+ metadata: @config.metadata,
3982
+ retry_policy: @config.retry_policy
3983
+
3984
+ @dataform_stub.call_rpc :fetch_current_workspace_branch, request, options: options do |response, operation|
3985
+ yield response, operation if block_given?
3986
+ end
3987
+ rescue ::GRPC::BadStatus => e
3988
+ raise ::Google::Cloud::Error.from_error(e)
3989
+ end
3990
+
3512
3991
  ##
3513
3992
  # Pushes Git commits from a Workspace to the Repository's remote.
3514
3993
  #
@@ -7563,6 +8042,31 @@ module Google
7563
8042
  #
7564
8043
  attr_reader :pull_git_commits
7565
8044
  ##
8045
+ # RPC-specific configuration for `sync_workspace_refs`
8046
+ # @return [::Gapic::Config::Method]
8047
+ #
8048
+ attr_reader :sync_workspace_refs
8049
+ ##
8050
+ # RPC-specific configuration for `fetch_workspace_branches`
8051
+ # @return [::Gapic::Config::Method]
8052
+ #
8053
+ attr_reader :fetch_workspace_branches
8054
+ ##
8055
+ # RPC-specific configuration for `delete_branch`
8056
+ # @return [::Gapic::Config::Method]
8057
+ #
8058
+ attr_reader :delete_branch
8059
+ ##
8060
+ # RPC-specific configuration for `checkout_workspace_branch`
8061
+ # @return [::Gapic::Config::Method]
8062
+ #
8063
+ attr_reader :checkout_workspace_branch
8064
+ ##
8065
+ # RPC-specific configuration for `fetch_current_workspace_branch`
8066
+ # @return [::Gapic::Config::Method]
8067
+ #
8068
+ attr_reader :fetch_current_workspace_branch
8069
+ ##
7566
8070
  # RPC-specific configuration for `push_git_commits`
7567
8071
  # @return [::Gapic::Config::Method]
7568
8072
  #
@@ -7833,6 +8337,16 @@ module Google
7833
8337
  @install_npm_packages = ::Gapic::Config::Method.new install_npm_packages_config
7834
8338
  pull_git_commits_config = parent_rpcs.pull_git_commits if parent_rpcs.respond_to? :pull_git_commits
7835
8339
  @pull_git_commits = ::Gapic::Config::Method.new pull_git_commits_config
8340
+ sync_workspace_refs_config = parent_rpcs.sync_workspace_refs if parent_rpcs.respond_to? :sync_workspace_refs
8341
+ @sync_workspace_refs = ::Gapic::Config::Method.new sync_workspace_refs_config
8342
+ fetch_workspace_branches_config = parent_rpcs.fetch_workspace_branches if parent_rpcs.respond_to? :fetch_workspace_branches
8343
+ @fetch_workspace_branches = ::Gapic::Config::Method.new fetch_workspace_branches_config
8344
+ delete_branch_config = parent_rpcs.delete_branch if parent_rpcs.respond_to? :delete_branch
8345
+ @delete_branch = ::Gapic::Config::Method.new delete_branch_config
8346
+ checkout_workspace_branch_config = parent_rpcs.checkout_workspace_branch if parent_rpcs.respond_to? :checkout_workspace_branch
8347
+ @checkout_workspace_branch = ::Gapic::Config::Method.new checkout_workspace_branch_config
8348
+ fetch_current_workspace_branch_config = parent_rpcs.fetch_current_workspace_branch if parent_rpcs.respond_to? :fetch_current_workspace_branch
8349
+ @fetch_current_workspace_branch = ::Gapic::Config::Method.new fetch_current_workspace_branch_config
7836
8350
  push_git_commits_config = parent_rpcs.push_git_commits if parent_rpcs.respond_to? :push_git_commits
7837
8351
  @push_git_commits = ::Gapic::Config::Method.new push_git_commits_config
7838
8352
  fetch_file_git_statuses_config = parent_rpcs.fetch_file_git_statuses if parent_rpcs.respond_to? :fetch_file_git_statuses
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2022 Google LLC
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.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2022 Google LLC
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.