google-cloud-developer_connect-v1 1.4.1 → 1.5.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: 79f8e71884391a746d7da638312aba3ba9fbeab14d062e4116b56c18e778adb0
4
- data.tar.gz: 0d5aaaf2f35b49a4558e81bdcc34f717e1fe1df406c996488aa041af523c9d05
3
+ metadata.gz: b0071854570fb33fa23ef83aec2bad37aae16b95492ebe0b7c8ff8810659abf1
4
+ data.tar.gz: da55ddf47333247eb802904c8df1c41ec768154e11eea1cd52de2b787201e233
5
5
  SHA512:
6
- metadata.gz: 9b9c998387722824ab3265c075d79deae1248f08eab34513e79506166106fd1bd6bda73a4b351d9763b887b03d6c06da9594dd6aa9d4a55cc441ea22459ddcbd
7
- data.tar.gz: 190a00591fef1cd0b872d97ed6814c0b85d32240c5d7a03b7bd8cc525a1cb06156a753205494966b3e84b0e6b32b0ec93db19f97b635bf966de22cbb35dbc132
6
+ metadata.gz: 2874d51cff2c9e04671dfe86859e6e2b73e826dfe2385b025523c11c7bbb80679ca6148f1d1384d05286730366f8b4ab8526243057e83292ece1e2664a0bffa0
7
+ data.tar.gz: 3c25c6cc20c202124acdfc270ec6dfdf7d36ad1f02c8971bee85a7892a92919e0771da5d1d82d5d4e201467bc8a71957d0b1582ca1f911541306aa57fdc18be7
@@ -814,8 +814,9 @@ module Google
814
814
  # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer
815
815
  # Connect will configure the Git Repository to send webhook events to
816
816
  # Developer Connect. Connections that use Firebase GitHub Application will
817
- # have events forwarded to the Firebase service. All other Connections will
818
- # have events forwarded to Cloud Build.
817
+ # have events forwarded to the Firebase service. Connections that use Gemini
818
+ # Code Assist will have events forwarded to Gemini Code Assist service. All
819
+ # other Connections will have events forwarded to Cloud Build.
819
820
  #
820
821
  # @overload create_git_repository_link(request, options = nil)
821
822
  # Pass arguments to `create_git_repository_link` via a request object, either of type
@@ -2697,6 +2698,186 @@ module Google
2697
2698
  raise ::Google::Cloud::Error.from_error(e)
2698
2699
  end
2699
2700
 
2701
+ ##
2702
+ # Starts OAuth flow for an account connector.
2703
+ #
2704
+ # @overload start_o_auth(request, options = nil)
2705
+ # Pass arguments to `start_o_auth` via a request object, either of type
2706
+ # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash.
2707
+ #
2708
+ # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash]
2709
+ # A request object representing the call parameters. Required. To specify no
2710
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2711
+ # @param options [::Gapic::CallOptions, ::Hash]
2712
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2713
+ #
2714
+ # @overload start_o_auth(account_connector: nil)
2715
+ # Pass arguments to `start_o_auth` via keyword arguments. Note that at
2716
+ # least one keyword argument is required. To specify no parameters, or to keep all
2717
+ # the default parameter values, pass an empty Hash as a request object (see above).
2718
+ #
2719
+ # @param account_connector [::String]
2720
+ # Required. The resource name of the AccountConnector in the format
2721
+ # `projects/*/locations/*/accountConnectors/*`.
2722
+ #
2723
+ # @yield [response, operation] Access the result along with the RPC operation
2724
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse]
2725
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2726
+ #
2727
+ # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse]
2728
+ #
2729
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2730
+ #
2731
+ # @example Basic example
2732
+ # require "google/cloud/developer_connect/v1"
2733
+ #
2734
+ # # Create a client object. The client can be reused for multiple calls.
2735
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2736
+ #
2737
+ # # Create a request. To set request fields, pass in keyword arguments.
2738
+ # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new
2739
+ #
2740
+ # # Call the start_o_auth method.
2741
+ # result = client.start_o_auth request
2742
+ #
2743
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.
2744
+ # p result
2745
+ #
2746
+ def start_o_auth request, options = nil
2747
+ raise ::ArgumentError, "request must be provided" if request.nil?
2748
+
2749
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest
2750
+
2751
+ # Converts hash and nil to an options object
2752
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2753
+
2754
+ # Customize the options with defaults
2755
+ metadata = @config.rpcs.start_o_auth.metadata.to_h
2756
+
2757
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2758
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2759
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2760
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2761
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2762
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2763
+
2764
+ header_params = {}
2765
+ if request.account_connector
2766
+ header_params["account_connector"] = request.account_connector
2767
+ end
2768
+
2769
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2770
+ metadata[:"x-goog-request-params"] ||= request_params_header
2771
+
2772
+ options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout,
2773
+ metadata: metadata,
2774
+ retry_policy: @config.rpcs.start_o_auth.retry_policy
2775
+
2776
+ options.apply_defaults timeout: @config.timeout,
2777
+ metadata: @config.metadata,
2778
+ retry_policy: @config.retry_policy
2779
+
2780
+ @developer_connect_stub.call_rpc :start_o_auth, request, options: options do |response, operation|
2781
+ yield response, operation if block_given?
2782
+ end
2783
+ rescue ::GRPC::BadStatus => e
2784
+ raise ::Google::Cloud::Error.from_error(e)
2785
+ end
2786
+
2787
+ ##
2788
+ # Finishes OAuth flow for an account connector.
2789
+ #
2790
+ # @overload finish_o_auth(request, options = nil)
2791
+ # Pass arguments to `finish_o_auth` via a request object, either of type
2792
+ # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash.
2793
+ #
2794
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash]
2795
+ # A request object representing the call parameters. Required. To specify no
2796
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2797
+ # @param options [::Gapic::CallOptions, ::Hash]
2798
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2799
+ #
2800
+ # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil)
2801
+ # Pass arguments to `finish_o_auth` via keyword arguments. Note that at
2802
+ # least one keyword argument is required. To specify no parameters, or to keep all
2803
+ # the default parameter values, pass an empty Hash as a request object (see above).
2804
+ #
2805
+ # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash]
2806
+ # The params returned by non-Google OAuth 2.0 flow redirect.
2807
+ #
2808
+ # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2809
+ # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash]
2810
+ # The params returned by Google OAuth flow redirects.
2811
+ #
2812
+ # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2813
+ # @param account_connector [::String]
2814
+ # Required. The resource name of the AccountConnector in the format
2815
+ # `projects/*/locations/*/accountConnectors/*`.
2816
+ #
2817
+ # @yield [response, operation] Access the result along with the RPC operation
2818
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse]
2819
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2820
+ #
2821
+ # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse]
2822
+ #
2823
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2824
+ #
2825
+ # @example Basic example
2826
+ # require "google/cloud/developer_connect/v1"
2827
+ #
2828
+ # # Create a client object. The client can be reused for multiple calls.
2829
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2830
+ #
2831
+ # # Create a request. To set request fields, pass in keyword arguments.
2832
+ # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new
2833
+ #
2834
+ # # Call the finish_o_auth method.
2835
+ # result = client.finish_o_auth request
2836
+ #
2837
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.
2838
+ # p result
2839
+ #
2840
+ def finish_o_auth request, options = nil
2841
+ raise ::ArgumentError, "request must be provided" if request.nil?
2842
+
2843
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest
2844
+
2845
+ # Converts hash and nil to an options object
2846
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2847
+
2848
+ # Customize the options with defaults
2849
+ metadata = @config.rpcs.finish_o_auth.metadata.to_h
2850
+
2851
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2852
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2853
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2854
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2855
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2856
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2857
+
2858
+ header_params = {}
2859
+ if request.account_connector
2860
+ header_params["account_connector"] = request.account_connector
2861
+ end
2862
+
2863
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2864
+ metadata[:"x-goog-request-params"] ||= request_params_header
2865
+
2866
+ options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout,
2867
+ metadata: metadata,
2868
+ retry_policy: @config.rpcs.finish_o_auth.retry_policy
2869
+
2870
+ options.apply_defaults timeout: @config.timeout,
2871
+ metadata: @config.metadata,
2872
+ retry_policy: @config.retry_policy
2873
+
2874
+ @developer_connect_stub.call_rpc :finish_o_auth, request, options: options do |response, operation|
2875
+ yield response, operation if block_given?
2876
+ end
2877
+ rescue ::GRPC::BadStatus => e
2878
+ raise ::Google::Cloud::Error.from_error(e)
2879
+ end
2880
+
2700
2881
  ##
2701
2882
  # Configuration class for the DeveloperConnect API.
2702
2883
  #
@@ -3000,6 +3181,16 @@ module Google
3000
3181
  # @return [::Gapic::Config::Method]
3001
3182
  #
3002
3183
  attr_reader :delete_self
3184
+ ##
3185
+ # RPC-specific configuration for `start_o_auth`
3186
+ # @return [::Gapic::Config::Method]
3187
+ #
3188
+ attr_reader :start_o_auth
3189
+ ##
3190
+ # RPC-specific configuration for `finish_o_auth`
3191
+ # @return [::Gapic::Config::Method]
3192
+ #
3193
+ attr_reader :finish_o_auth
3003
3194
 
3004
3195
  # @private
3005
3196
  def initialize parent_rpcs = nil
@@ -3051,6 +3242,10 @@ module Google
3051
3242
  @fetch_self = ::Gapic::Config::Method.new fetch_self_config
3052
3243
  delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self
3053
3244
  @delete_self = ::Gapic::Config::Method.new delete_self_config
3245
+ start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth
3246
+ @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config
3247
+ finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth
3248
+ @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config
3054
3249
 
3055
3250
  yield self if block_given?
3056
3251
  end
@@ -104,6 +104,25 @@ module Google
104
104
  "projects/#{project}/locations/#{location}/connections/#{connection}/gitRepositoryLinks/#{git_repository_link}"
105
105
  end
106
106
 
107
+ ##
108
+ # Create a fully-qualified Instance resource string.
109
+ #
110
+ # The resource will be in the following format:
111
+ #
112
+ # `projects/{project}/locations/{location}/instances/{instance}`
113
+ #
114
+ # @param project [String]
115
+ # @param location [String]
116
+ # @param instance [String]
117
+ #
118
+ # @return [::String]
119
+ def instance_path project:, location:, instance:
120
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
121
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
122
+
123
+ "projects/#{project}/locations/#{location}/instances/#{instance}"
124
+ end
125
+
107
126
  ##
108
127
  # Create a fully-qualified Location resource string.
109
128
  #
@@ -124,20 +143,46 @@ module Google
124
143
  ##
125
144
  # Create a fully-qualified SecretVersion resource string.
126
145
  #
127
- # The resource will be in the following format:
146
+ # @overload secret_version_path(project:, secret:, secret_version:)
147
+ # The resource will be in the following format:
128
148
  #
129
- # `projects/{project}/secrets/{secret}/versions/{secret_version}`
149
+ # `projects/{project}/secrets/{secret}/versions/{secret_version}`
130
150
  #
131
- # @param project [String]
132
- # @param secret [String]
133
- # @param secret_version [String]
151
+ # @param project [String]
152
+ # @param secret [String]
153
+ # @param secret_version [String]
154
+ #
155
+ # @overload secret_version_path(project:, location:, secret:, secret_version:)
156
+ # The resource will be in the following format:
157
+ #
158
+ # `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}`
159
+ #
160
+ # @param project [String]
161
+ # @param location [String]
162
+ # @param secret [String]
163
+ # @param secret_version [String]
134
164
  #
135
165
  # @return [::String]
136
- def secret_version_path project:, secret:, secret_version:
137
- raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
138
- raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
139
-
140
- "projects/#{project}/secrets/#{secret}/versions/#{secret_version}"
166
+ def secret_version_path **args
167
+ resources = {
168
+ "project:secret:secret_version" => (proc do |project:, secret:, secret_version:|
169
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
170
+ raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
171
+
172
+ "projects/#{project}/secrets/#{secret}/versions/#{secret_version}"
173
+ end),
174
+ "location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:|
175
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
176
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
177
+ raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
178
+
179
+ "projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}"
180
+ end)
181
+ }
182
+
183
+ resource = resources[args.keys.sort.join(":")]
184
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
185
+ resource.call(**args)
141
186
  end
142
187
 
143
188
  ##
@@ -773,8 +773,9 @@ module Google
773
773
  # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer
774
774
  # Connect will configure the Git Repository to send webhook events to
775
775
  # Developer Connect. Connections that use Firebase GitHub Application will
776
- # have events forwarded to the Firebase service. All other Connections will
777
- # have events forwarded to Cloud Build.
776
+ # have events forwarded to the Firebase service. Connections that use Gemini
777
+ # Code Assist will have events forwarded to Gemini Code Assist service. All
778
+ # other Connections will have events forwarded to Cloud Build.
778
779
  #
779
780
  # @overload create_git_repository_link(request, options = nil)
780
781
  # Pass arguments to `create_git_repository_link` via a request object, either of type
@@ -2523,6 +2524,172 @@ module Google
2523
2524
  raise ::Google::Cloud::Error.from_error(e)
2524
2525
  end
2525
2526
 
2527
+ ##
2528
+ # Starts OAuth flow for an account connector.
2529
+ #
2530
+ # @overload start_o_auth(request, options = nil)
2531
+ # Pass arguments to `start_o_auth` via a request object, either of type
2532
+ # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash.
2533
+ #
2534
+ # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash]
2535
+ # A request object representing the call parameters. Required. To specify no
2536
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2537
+ # @param options [::Gapic::CallOptions, ::Hash]
2538
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2539
+ #
2540
+ # @overload start_o_auth(account_connector: nil)
2541
+ # Pass arguments to `start_o_auth` via keyword arguments. Note that at
2542
+ # least one keyword argument is required. To specify no parameters, or to keep all
2543
+ # the default parameter values, pass an empty Hash as a request object (see above).
2544
+ #
2545
+ # @param account_connector [::String]
2546
+ # Required. The resource name of the AccountConnector in the format
2547
+ # `projects/*/locations/*/accountConnectors/*`.
2548
+ # @yield [result, operation] Access the result along with the TransportOperation object
2549
+ # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse]
2550
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2551
+ #
2552
+ # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse]
2553
+ #
2554
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2555
+ #
2556
+ # @example Basic example
2557
+ # require "google/cloud/developer_connect/v1"
2558
+ #
2559
+ # # Create a client object. The client can be reused for multiple calls.
2560
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2561
+ #
2562
+ # # Create a request. To set request fields, pass in keyword arguments.
2563
+ # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new
2564
+ #
2565
+ # # Call the start_o_auth method.
2566
+ # result = client.start_o_auth request
2567
+ #
2568
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.
2569
+ # p result
2570
+ #
2571
+ def start_o_auth request, options = nil
2572
+ raise ::ArgumentError, "request must be provided" if request.nil?
2573
+
2574
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest
2575
+
2576
+ # Converts hash and nil to an options object
2577
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2578
+
2579
+ # Customize the options with defaults
2580
+ call_metadata = @config.rpcs.start_o_auth.metadata.to_h
2581
+
2582
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2583
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2584
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2585
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2586
+ transports_version_send: [:rest]
2587
+
2588
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2589
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2590
+
2591
+ options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout,
2592
+ metadata: call_metadata,
2593
+ retry_policy: @config.rpcs.start_o_auth.retry_policy
2594
+
2595
+ options.apply_defaults timeout: @config.timeout,
2596
+ metadata: @config.metadata,
2597
+ retry_policy: @config.retry_policy
2598
+
2599
+ @developer_connect_stub.start_o_auth request, options do |result, operation|
2600
+ yield result, operation if block_given?
2601
+ end
2602
+ rescue ::Gapic::Rest::Error => e
2603
+ raise ::Google::Cloud::Error.from_error(e)
2604
+ end
2605
+
2606
+ ##
2607
+ # Finishes OAuth flow for an account connector.
2608
+ #
2609
+ # @overload finish_o_auth(request, options = nil)
2610
+ # Pass arguments to `finish_o_auth` via a request object, either of type
2611
+ # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash.
2612
+ #
2613
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash]
2614
+ # A request object representing the call parameters. Required. To specify no
2615
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2616
+ # @param options [::Gapic::CallOptions, ::Hash]
2617
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2618
+ #
2619
+ # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil)
2620
+ # Pass arguments to `finish_o_auth` via keyword arguments. Note that at
2621
+ # least one keyword argument is required. To specify no parameters, or to keep all
2622
+ # the default parameter values, pass an empty Hash as a request object (see above).
2623
+ #
2624
+ # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash]
2625
+ # The params returned by non-Google OAuth 2.0 flow redirect.
2626
+ #
2627
+ # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2628
+ # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash]
2629
+ # The params returned by Google OAuth flow redirects.
2630
+ #
2631
+ # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2632
+ # @param account_connector [::String]
2633
+ # Required. The resource name of the AccountConnector in the format
2634
+ # `projects/*/locations/*/accountConnectors/*`.
2635
+ # @yield [result, operation] Access the result along with the TransportOperation object
2636
+ # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse]
2637
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2638
+ #
2639
+ # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse]
2640
+ #
2641
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2642
+ #
2643
+ # @example Basic example
2644
+ # require "google/cloud/developer_connect/v1"
2645
+ #
2646
+ # # Create a client object. The client can be reused for multiple calls.
2647
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2648
+ #
2649
+ # # Create a request. To set request fields, pass in keyword arguments.
2650
+ # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new
2651
+ #
2652
+ # # Call the finish_o_auth method.
2653
+ # result = client.finish_o_auth request
2654
+ #
2655
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.
2656
+ # p result
2657
+ #
2658
+ def finish_o_auth request, options = nil
2659
+ raise ::ArgumentError, "request must be provided" if request.nil?
2660
+
2661
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest
2662
+
2663
+ # Converts hash and nil to an options object
2664
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2665
+
2666
+ # Customize the options with defaults
2667
+ call_metadata = @config.rpcs.finish_o_auth.metadata.to_h
2668
+
2669
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2670
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2671
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2672
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2673
+ transports_version_send: [:rest]
2674
+
2675
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2676
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2677
+
2678
+ options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout,
2679
+ metadata: call_metadata,
2680
+ retry_policy: @config.rpcs.finish_o_auth.retry_policy
2681
+
2682
+ options.apply_defaults timeout: @config.timeout,
2683
+ metadata: @config.metadata,
2684
+ retry_policy: @config.retry_policy
2685
+
2686
+ @developer_connect_stub.finish_o_auth request, options do |result, operation|
2687
+ yield result, operation if block_given?
2688
+ end
2689
+ rescue ::Gapic::Rest::Error => e
2690
+ raise ::Google::Cloud::Error.from_error(e)
2691
+ end
2692
+
2526
2693
  ##
2527
2694
  # Configuration class for the DeveloperConnect REST API.
2528
2695
  #
@@ -2796,6 +2963,16 @@ module Google
2796
2963
  # @return [::Gapic::Config::Method]
2797
2964
  #
2798
2965
  attr_reader :delete_self
2966
+ ##
2967
+ # RPC-specific configuration for `start_o_auth`
2968
+ # @return [::Gapic::Config::Method]
2969
+ #
2970
+ attr_reader :start_o_auth
2971
+ ##
2972
+ # RPC-specific configuration for `finish_o_auth`
2973
+ # @return [::Gapic::Config::Method]
2974
+ #
2975
+ attr_reader :finish_o_auth
2799
2976
 
2800
2977
  # @private
2801
2978
  def initialize parent_rpcs = nil
@@ -2847,6 +3024,10 @@ module Google
2847
3024
  @fetch_self = ::Gapic::Config::Method.new fetch_self_config
2848
3025
  delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self
2849
3026
  @delete_self = ::Gapic::Config::Method.new delete_self_config
3027
+ start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth
3028
+ @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config
3029
+ finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth
3030
+ @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config
2850
3031
 
2851
3032
  yield self if block_given?
2852
3033
  end