google-cloud-deploy-v1 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -152,6 +152,34 @@ module Google
152
152
  initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
153
153
  }
154
154
 
155
+ default_config.rpcs.create_automation.timeout = 60.0
156
+
157
+ default_config.rpcs.update_automation.timeout = 60.0
158
+
159
+ default_config.rpcs.delete_automation.timeout = 60.0
160
+
161
+ default_config.rpcs.get_automation.timeout = 60.0
162
+ default_config.rpcs.get_automation.retry_policy = {
163
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
164
+ }
165
+
166
+ default_config.rpcs.list_automations.timeout = 60.0
167
+ default_config.rpcs.list_automations.retry_policy = {
168
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
169
+ }
170
+
171
+ default_config.rpcs.get_automation_run.timeout = 60.0
172
+ default_config.rpcs.get_automation_run.retry_policy = {
173
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
174
+ }
175
+
176
+ default_config.rpcs.list_automation_runs.timeout = 60.0
177
+ default_config.rpcs.list_automation_runs.retry_policy = {
178
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
179
+ }
180
+
181
+ default_config.rpcs.cancel_automation_run.timeout = 60.0
182
+
155
183
  default_config
156
184
  end
157
185
  yield @configure if block_given?
@@ -292,7 +320,7 @@ module Google
292
320
  #
293
321
  # @param parent [::String]
294
322
  # Required. The parent, which owns this collection of pipelines. Format must
295
- # be projects/\\{project_id}/locations/\\{location_name}.
323
+ # be `projects/{project_id}/locations/{location_name}`.
296
324
  # @param page_size [::Integer]
297
325
  # The maximum number of pipelines to return. The service may return
298
326
  # fewer than this value. If unspecified, at most 50 pipelines will
@@ -399,7 +427,7 @@ module Google
399
427
  #
400
428
  # @param name [::String]
401
429
  # Required. Name of the `DeliveryPipeline`. Format must be
402
- # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}.
430
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
403
431
  #
404
432
  # @yield [response, operation] Access the result along with the RPC operation
405
433
  # @yieldparam response [::Google::Cloud::Deploy::V1::DeliveryPipeline]
@@ -485,7 +513,8 @@ module Google
485
513
  #
486
514
  # @param parent [::String]
487
515
  # Required. The parent collection in which the `DeliveryPipeline` should be
488
- # created. Format should be projects/\\{project_id}/locations/\\{location_name}.
516
+ # created. Format should be
517
+ # `projects/{project_id}/locations/{location_name}`.
489
518
  # @param delivery_pipeline_id [::String]
490
519
  # Required. ID of the `DeliveryPipeline`.
491
520
  # @param delivery_pipeline [::Google::Cloud::Deploy::V1::DeliveryPipeline, ::Hash]
@@ -719,7 +748,7 @@ module Google
719
748
  #
720
749
  # @param name [::String]
721
750
  # Required. The name of the `DeliveryPipeline` to delete. Format should be
722
- # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}.
751
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
723
752
  # @param request_id [::String]
724
753
  # Optional. A request ID to identify requests. Specify a unique request ID
725
754
  # so that if you must retry your request, the server will know to ignore
@@ -841,7 +870,7 @@ module Google
841
870
  #
842
871
  # @param parent [::String]
843
872
  # Required. The parent, which owns this collection of targets. Format must be
844
- # projects/\\{project_id}/locations/\\{location_name}.
873
+ # `projects/{project_id}/locations/{location_name}`.
845
874
  # @param page_size [::Integer]
846
875
  # Optional. The maximum number of `Target` objects to return. The service may
847
876
  # return fewer than this value. If unspecified, at most 50 `Target` objects
@@ -929,6 +958,109 @@ module Google
929
958
  raise ::Google::Cloud::Error.from_error(e)
930
959
  end
931
960
 
961
+ ##
962
+ # Creates a `Rollout` to roll back the specified target.
963
+ #
964
+ # @overload rollback_target(request, options = nil)
965
+ # Pass arguments to `rollback_target` via a request object, either of type
966
+ # {::Google::Cloud::Deploy::V1::RollbackTargetRequest} or an equivalent Hash.
967
+ #
968
+ # @param request [::Google::Cloud::Deploy::V1::RollbackTargetRequest, ::Hash]
969
+ # A request object representing the call parameters. Required. To specify no
970
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
971
+ # @param options [::Gapic::CallOptions, ::Hash]
972
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
973
+ #
974
+ # @overload rollback_target(name: nil, target_id: nil, rollout_id: nil, release_id: nil, rollout_to_roll_back: nil, rollback_config: nil, validate_only: nil)
975
+ # Pass arguments to `rollback_target` via keyword arguments. Note that at
976
+ # least one keyword argument is required. To specify no parameters, or to keep all
977
+ # the default parameter values, pass an empty Hash as a request object (see above).
978
+ #
979
+ # @param name [::String]
980
+ # Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
981
+ # created. Format should be
982
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
983
+ # @param target_id [::String]
984
+ # Required. ID of the `Target` that is being rolled back.
985
+ # @param rollout_id [::String]
986
+ # Required. ID of the rollback `Rollout` to create.
987
+ # @param release_id [::String]
988
+ # Optional. ID of the `Release` to roll back to. If this isn't specified, the
989
+ # previous successful `Rollout` to the specified target will be used to
990
+ # determine the `Release`.
991
+ # @param rollout_to_roll_back [::String]
992
+ # Optional. If provided, this must be the latest `Rollout` that is on the
993
+ # `Target`.
994
+ # @param rollback_config [::Google::Cloud::Deploy::V1::RollbackTargetConfig, ::Hash]
995
+ # Optional. Configs for the rollback `Rollout`.
996
+ # @param validate_only [::Boolean]
997
+ # Optional. If set to true, the request is validated and the user is provided
998
+ # with a `RollbackTargetResponse`.
999
+ #
1000
+ # @yield [response, operation] Access the result along with the RPC operation
1001
+ # @yieldparam response [::Google::Cloud::Deploy::V1::RollbackTargetResponse]
1002
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1003
+ #
1004
+ # @return [::Google::Cloud::Deploy::V1::RollbackTargetResponse]
1005
+ #
1006
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1007
+ #
1008
+ # @example Basic example
1009
+ # require "google/cloud/deploy/v1"
1010
+ #
1011
+ # # Create a client object. The client can be reused for multiple calls.
1012
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1013
+ #
1014
+ # # Create a request. To set request fields, pass in keyword arguments.
1015
+ # request = Google::Cloud::Deploy::V1::RollbackTargetRequest.new
1016
+ #
1017
+ # # Call the rollback_target method.
1018
+ # result = client.rollback_target request
1019
+ #
1020
+ # # The returned object is of type Google::Cloud::Deploy::V1::RollbackTargetResponse.
1021
+ # p result
1022
+ #
1023
+ def rollback_target request, options = nil
1024
+ raise ::ArgumentError, "request must be provided" if request.nil?
1025
+
1026
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::RollbackTargetRequest
1027
+
1028
+ # Converts hash and nil to an options object
1029
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1030
+
1031
+ # Customize the options with defaults
1032
+ metadata = @config.rpcs.rollback_target.metadata.to_h
1033
+
1034
+ # Set x-goog-api-client and x-goog-user-project headers
1035
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1036
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1037
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1038
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1039
+
1040
+ header_params = {}
1041
+ if request.name
1042
+ header_params["name"] = request.name
1043
+ end
1044
+
1045
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1046
+ metadata[:"x-goog-request-params"] ||= request_params_header
1047
+
1048
+ options.apply_defaults timeout: @config.rpcs.rollback_target.timeout,
1049
+ metadata: metadata,
1050
+ retry_policy: @config.rpcs.rollback_target.retry_policy
1051
+
1052
+ options.apply_defaults timeout: @config.timeout,
1053
+ metadata: @config.metadata,
1054
+ retry_policy: @config.retry_policy
1055
+
1056
+ @cloud_deploy_stub.call_rpc :rollback_target, request, options: options do |response, operation|
1057
+ yield response, operation if block_given?
1058
+ return response
1059
+ end
1060
+ rescue ::GRPC::BadStatus => e
1061
+ raise ::Google::Cloud::Error.from_error(e)
1062
+ end
1063
+
932
1064
  ##
933
1065
  # Gets details of a single Target.
934
1066
  #
@@ -949,7 +1081,7 @@ module Google
949
1081
  #
950
1082
  # @param name [::String]
951
1083
  # Required. Name of the `Target`. Format must be
952
- # projects/\\{project_id}/locations/\\{location_name}/targets/\\{target_name}.
1084
+ # `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
953
1085
  #
954
1086
  # @yield [response, operation] Access the result along with the RPC operation
955
1087
  # @yieldparam response [::Google::Cloud::Deploy::V1::Target]
@@ -1036,7 +1168,7 @@ module Google
1036
1168
  # @param parent [::String]
1037
1169
  # Required. The parent collection in which the `Target` should be created.
1038
1170
  # Format should be
1039
- # projects/\\{project_id}/locations/\\{location_name}.
1171
+ # `projects/{project_id}/locations/{location_name}`.
1040
1172
  # @param target_id [::String]
1041
1173
  # Required. ID of the `Target`.
1042
1174
  # @param target [::Google::Cloud::Deploy::V1::Target, ::Hash]
@@ -1270,7 +1402,7 @@ module Google
1270
1402
  #
1271
1403
  # @param name [::String]
1272
1404
  # Required. The name of the `Target` to delete. Format should be
1273
- # projects/\\{project_id}/locations/\\{location_name}/targets/\\{target_name}.
1405
+ # `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
1274
1406
  # @param request_id [::String]
1275
1407
  # Optional. A request ID to identify requests. Specify a unique request ID
1276
1408
  # so that if you must retry your request, the server will know to ignore
@@ -1496,7 +1628,7 @@ module Google
1496
1628
  #
1497
1629
  # @param name [::String]
1498
1630
  # Required. Name of the `Release`. Format must be
1499
- # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}/releases/\\{release_name}.
1631
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
1500
1632
  #
1501
1633
  # @yield [response, operation] Access the result along with the RPC operation
1502
1634
  # @yieldparam response [::Google::Cloud::Deploy::V1::Release]
@@ -1583,7 +1715,7 @@ module Google
1583
1715
  # @param parent [::String]
1584
1716
  # Required. The parent collection in which the `Release` should be created.
1585
1717
  # Format should be
1586
- # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}.
1718
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
1587
1719
  # @param release_id [::String]
1588
1720
  # Required. ID of the `Release`.
1589
1721
  # @param release [::Google::Cloud::Deploy::V1::Release, ::Hash]
@@ -1698,8 +1830,7 @@ module Google
1698
1830
  #
1699
1831
  # @param name [::String]
1700
1832
  # Required. Name of the Release. Format is
1701
- # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
1702
- # releases/\\{release}.
1833
+ # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
1703
1834
  #
1704
1835
  # @yield [response, operation] Access the result along with the RPC operation
1705
1836
  # @yieldparam response [::Google::Cloud::Deploy::V1::AbandonReleaseResponse]
@@ -1785,8 +1916,7 @@ module Google
1785
1916
  #
1786
1917
  # @param name [::String]
1787
1918
  # Required. Name of the Rollout. Format is
1788
- # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
1789
- # releases/\\{release}/rollouts/\\{rollout}.
1919
+ # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
1790
1920
  # @param approved [::Boolean]
1791
1921
  # Required. True = approve; false = reject
1792
1922
  #
@@ -1874,8 +2004,7 @@ module Google
1874
2004
  #
1875
2005
  # @param name [::String]
1876
2006
  # Required. Name of the Rollout. Format is
1877
- # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
1878
- # releases/\\{release}/rollouts/\\{rollout}.
2007
+ # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
1879
2008
  # @param phase_id [::String]
1880
2009
  # Required. The phase ID to advance the `Rollout` to.
1881
2010
  #
@@ -1963,8 +2092,7 @@ module Google
1963
2092
  #
1964
2093
  # @param name [::String]
1965
2094
  # Required. Name of the Rollout. Format is
1966
- # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
1967
- # releases/\\{release}/rollouts/\\{rollout}.
2095
+ # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
1968
2096
  #
1969
2097
  # @yield [response, operation] Access the result along with the RPC operation
1970
2098
  # @yieldparam response [::Google::Cloud::Deploy::V1::CancelRolloutResponse]
@@ -2157,7 +2285,7 @@ module Google
2157
2285
  #
2158
2286
  # @param name [::String]
2159
2287
  # Required. Name of the `Rollout`. Format must be
2160
- # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}/releases/\\{release_name}/rollouts/\\{rollout_name}.
2288
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
2161
2289
  #
2162
2290
  # @yield [response, operation] Access the result along with the RPC operation
2163
2291
  # @yieldparam response [::Google::Cloud::Deploy::V1::Rollout]
@@ -2244,7 +2372,7 @@ module Google
2244
2372
  # @param parent [::String]
2245
2373
  # Required. The parent collection in which the `Rollout` should be created.
2246
2374
  # Format should be
2247
- # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}/releases/\\{release_name}.
2375
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
2248
2376
  # @param rollout_id [::String]
2249
2377
  # Required. ID of the `Rollout`.
2250
2378
  # @param rollout [::Google::Cloud::Deploy::V1::Rollout, ::Hash]
@@ -2362,8 +2490,7 @@ module Google
2362
2490
  #
2363
2491
  # @param rollout [::String]
2364
2492
  # Required. Name of the Rollout. Format is
2365
- # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
2366
- # releases/\\{release}/rollouts/\\{rollout}.
2493
+ # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
2367
2494
  # @param phase_id [::String]
2368
2495
  # Required. The phase ID the Job to ignore belongs to.
2369
2496
  # @param job_id [::String]
@@ -2453,8 +2580,7 @@ module Google
2453
2580
  #
2454
2581
  # @param rollout [::String]
2455
2582
  # Required. Name of the Rollout. Format is
2456
- # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
2457
- # releases/\\{release}/rollouts/\\{rollout}.
2583
+ # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
2458
2584
  # @param phase_id [::String]
2459
2585
  # Required. The phase ID the Job to retry belongs to.
2460
2586
  # @param job_id [::String]
@@ -2651,7 +2777,7 @@ module Google
2651
2777
  #
2652
2778
  # @param name [::String]
2653
2779
  # Required. Name of the `JobRun`. Format must be
2654
- # projects/\\{project_id}/locations/\\{location_name}/deliveryPipelines/\\{pipeline_name}/releases/\\{release_name}/rollouts/\\{rollout_name}/jobRuns/\\{job_run_name}.
2780
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
2655
2781
  #
2656
2782
  # @yield [response, operation] Access the result along with the RPC operation
2657
2783
  # @yieldparam response [::Google::Cloud::Deploy::V1::JobRun]
@@ -2737,8 +2863,7 @@ module Google
2737
2863
  #
2738
2864
  # @param name [::String]
2739
2865
  # Required. Name of the `JobRun`. Format must be
2740
- # projects/\\{project}/locations/\\{location}/deliveryPipelines/\\{deliveryPipeline}/
2741
- # releases/\\{release}/rollouts/\\{rollout}/jobRuns/\\{jobRun}.
2866
+ # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
2742
2867
  #
2743
2868
  # @yield [response, operation] Access the result along with the RPC operation
2744
2869
  # @yieldparam response [::Google::Cloud::Deploy::V1::TerminateJobRunResponse]
@@ -2890,129 +3015,960 @@ module Google
2890
3015
  end
2891
3016
 
2892
3017
  ##
2893
- # Configuration class for the CloudDeploy API.
3018
+ # Creates a new Automation in a given project and location.
2894
3019
  #
2895
- # This class represents the configuration for CloudDeploy,
2896
- # providing control over timeouts, retry behavior, logging, transport
2897
- # parameters, and other low-level controls. Certain parameters can also be
2898
- # applied individually to specific RPCs. See
2899
- # {::Google::Cloud::Deploy::V1::CloudDeploy::Client::Configuration::Rpcs}
2900
- # for a list of RPCs that can be configured independently.
3020
+ # @overload create_automation(request, options = nil)
3021
+ # Pass arguments to `create_automation` via a request object, either of type
3022
+ # {::Google::Cloud::Deploy::V1::CreateAutomationRequest} or an equivalent Hash.
2901
3023
  #
2902
- # Configuration can be applied globally to all clients, or to a single client
2903
- # on construction.
3024
+ # @param request [::Google::Cloud::Deploy::V1::CreateAutomationRequest, ::Hash]
3025
+ # A request object representing the call parameters. Required. To specify no
3026
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3027
+ # @param options [::Gapic::CallOptions, ::Hash]
3028
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2904
3029
  #
2905
- # @example
3030
+ # @overload create_automation(parent: nil, automation_id: nil, automation: nil, request_id: nil, validate_only: nil)
3031
+ # Pass arguments to `create_automation` via keyword arguments. Note that at
3032
+ # least one keyword argument is required. To specify no parameters, or to keep all
3033
+ # the default parameter values, pass an empty Hash as a request object (see above).
2906
3034
  #
2907
- # # Modify the global config, setting the timeout for
2908
- # # list_delivery_pipelines to 20 seconds,
2909
- # # and all remaining timeouts to 10 seconds.
2910
- # ::Google::Cloud::Deploy::V1::CloudDeploy::Client.configure do |config|
2911
- # config.timeout = 10.0
2912
- # config.rpcs.list_delivery_pipelines.timeout = 20.0
2913
- # end
3035
+ # @param parent [::String]
3036
+ # Required. The parent collection in which the `Automation` should be
3037
+ # created. Format should be
3038
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
3039
+ # @param automation_id [::String]
3040
+ # Required. ID of the `Automation`.
3041
+ # @param automation [::Google::Cloud::Deploy::V1::Automation, ::Hash]
3042
+ # Required. The `Automation` to create.
3043
+ # @param request_id [::String]
3044
+ # Optional. A request ID to identify requests. Specify a unique request ID
3045
+ # so that if you must retry your request, the server will know to ignore
3046
+ # the request if it has already been completed. The server will guarantee
3047
+ # that for at least 60 minutes since the first request.
2914
3048
  #
2915
- # # Apply the above configuration only to a new client.
2916
- # client = ::Google::Cloud::Deploy::V1::CloudDeploy::Client.new do |config|
2917
- # config.timeout = 10.0
2918
- # config.rpcs.list_delivery_pipelines.timeout = 20.0
2919
- # end
3049
+ # For example, consider a situation where you make an initial request and the
3050
+ # request times out. If you make the request again with the same request ID,
3051
+ # the server can check if original operation with the same request ID was
3052
+ # received, and if so, will ignore the second request. This prevents clients
3053
+ # from accidentally creating duplicate commitments.
2920
3054
  #
2921
- # @!attribute [rw] endpoint
2922
- # The hostname or hostname:port of the service endpoint.
2923
- # Defaults to `"clouddeploy.googleapis.com"`.
2924
- # @return [::String]
2925
- # @!attribute [rw] credentials
2926
- # Credentials to send with calls. You may provide any of the following types:
2927
- # * (`String`) The path to a service account key file in JSON format
2928
- # * (`Hash`) A service account key as a Hash
2929
- # * (`Google::Auth::Credentials`) A googleauth credentials object
2930
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2931
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2932
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2933
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2934
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2935
- # * (`nil`) indicating no credentials
2936
- # @return [::Object]
2937
- # @!attribute [rw] scope
2938
- # The OAuth scopes
2939
- # @return [::Array<::String>]
2940
- # @!attribute [rw] lib_name
2941
- # The library name as recorded in instrumentation and logging
2942
- # @return [::String]
2943
- # @!attribute [rw] lib_version
2944
- # The library version as recorded in instrumentation and logging
2945
- # @return [::String]
2946
- # @!attribute [rw] channel_args
2947
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2948
- # `GRPC::Core::Channel` object is provided as the credential.
2949
- # @return [::Hash]
2950
- # @!attribute [rw] interceptors
2951
- # An array of interceptors that are run before calls are executed.
2952
- # @return [::Array<::GRPC::ClientInterceptor>]
2953
- # @!attribute [rw] timeout
2954
- # The call timeout in seconds.
2955
- # @return [::Numeric]
2956
- # @!attribute [rw] metadata
2957
- # Additional gRPC headers to be sent with the call.
2958
- # @return [::Hash{::Symbol=>::String}]
2959
- # @!attribute [rw] retry_policy
2960
- # The retry policy. The value is a hash with the following keys:
2961
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2962
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2963
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2964
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2965
- # trigger a retry.
2966
- # @return [::Hash]
2967
- # @!attribute [rw] quota_project
2968
- # A separate project against which to charge quota.
2969
- # @return [::String]
3055
+ # The request ID must be a valid UUID with the exception that zero UUID is
3056
+ # not supported (00000000-0000-0000-0000-000000000000).
3057
+ # @param validate_only [::Boolean]
3058
+ # Optional. If set to true, the request is validated and the user is provided
3059
+ # with an expected result, but no actual change is made.
2970
3060
  #
2971
- class Configuration
2972
- extend ::Gapic::Config
3061
+ # @yield [response, operation] Access the result along with the RPC operation
3062
+ # @yieldparam response [::Gapic::Operation]
3063
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3064
+ #
3065
+ # @return [::Gapic::Operation]
3066
+ #
3067
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3068
+ #
3069
+ # @example Basic example
3070
+ # require "google/cloud/deploy/v1"
3071
+ #
3072
+ # # Create a client object. The client can be reused for multiple calls.
3073
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3074
+ #
3075
+ # # Create a request. To set request fields, pass in keyword arguments.
3076
+ # request = Google::Cloud::Deploy::V1::CreateAutomationRequest.new
3077
+ #
3078
+ # # Call the create_automation method.
3079
+ # result = client.create_automation request
3080
+ #
3081
+ # # The returned object is of type Gapic::Operation. You can use it to
3082
+ # # check the status of an operation, cancel it, or wait for results.
3083
+ # # Here is how to wait for a response.
3084
+ # result.wait_until_done! timeout: 60
3085
+ # if result.response?
3086
+ # p result.response
3087
+ # else
3088
+ # puts "No response received."
3089
+ # end
3090
+ #
3091
+ def create_automation request, options = nil
3092
+ raise ::ArgumentError, "request must be provided" if request.nil?
2973
3093
 
2974
- DEFAULT_ENDPOINT = "clouddeploy.googleapis.com"
3094
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateAutomationRequest
2975
3095
 
2976
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2977
- config_attr :credentials, nil do |value|
2978
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2979
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2980
- allowed.any? { |klass| klass === value }
2981
- end
2982
- config_attr :scope, nil, ::String, ::Array, nil
2983
- config_attr :lib_name, nil, ::String, nil
2984
- config_attr :lib_version, nil, ::String, nil
2985
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2986
- config_attr :interceptors, nil, ::Array, nil
2987
- config_attr :timeout, nil, ::Numeric, nil
2988
- config_attr :metadata, nil, ::Hash, nil
2989
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2990
- config_attr :quota_project, nil, ::String, nil
3096
+ # Converts hash and nil to an options object
3097
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2991
3098
 
2992
- # @private
2993
- def initialize parent_config = nil
2994
- @parent_config = parent_config unless parent_config.nil?
3099
+ # Customize the options with defaults
3100
+ metadata = @config.rpcs.create_automation.metadata.to_h
2995
3101
 
2996
- yield self if block_given?
2997
- end
3102
+ # Set x-goog-api-client and x-goog-user-project headers
3103
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3104
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3105
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3106
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2998
3107
 
2999
- ##
3000
- # Configurations for individual RPCs
3001
- # @return [Rpcs]
3002
- #
3003
- def rpcs
3004
- @rpcs ||= begin
3005
- parent_rpcs = nil
3006
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3007
- Rpcs.new parent_rpcs
3008
- end
3108
+ header_params = {}
3109
+ if request.parent
3110
+ header_params["parent"] = request.parent
3009
3111
  end
3010
3112
 
3011
- ##
3012
- # Configuration for the channel pool
3013
- # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
3014
- #
3015
- def channel_pool
3113
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3114
+ metadata[:"x-goog-request-params"] ||= request_params_header
3115
+
3116
+ options.apply_defaults timeout: @config.rpcs.create_automation.timeout,
3117
+ metadata: metadata,
3118
+ retry_policy: @config.rpcs.create_automation.retry_policy
3119
+
3120
+ options.apply_defaults timeout: @config.timeout,
3121
+ metadata: @config.metadata,
3122
+ retry_policy: @config.retry_policy
3123
+
3124
+ @cloud_deploy_stub.call_rpc :create_automation, request, options: options do |response, operation|
3125
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3126
+ yield response, operation if block_given?
3127
+ return response
3128
+ end
3129
+ rescue ::GRPC::BadStatus => e
3130
+ raise ::Google::Cloud::Error.from_error(e)
3131
+ end
3132
+
3133
+ ##
3134
+ # Updates the parameters of a single Automation resource.
3135
+ #
3136
+ # @overload update_automation(request, options = nil)
3137
+ # Pass arguments to `update_automation` via a request object, either of type
3138
+ # {::Google::Cloud::Deploy::V1::UpdateAutomationRequest} or an equivalent Hash.
3139
+ #
3140
+ # @param request [::Google::Cloud::Deploy::V1::UpdateAutomationRequest, ::Hash]
3141
+ # A request object representing the call parameters. Required. To specify no
3142
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3143
+ # @param options [::Gapic::CallOptions, ::Hash]
3144
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3145
+ #
3146
+ # @overload update_automation(update_mask: nil, automation: nil, request_id: nil, allow_missing: nil, validate_only: nil)
3147
+ # Pass arguments to `update_automation` via keyword arguments. Note that at
3148
+ # least one keyword argument is required. To specify no parameters, or to keep all
3149
+ # the default parameter values, pass an empty Hash as a request object (see above).
3150
+ #
3151
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3152
+ # Required. Field mask is used to specify the fields to be overwritten in the
3153
+ # `Automation` resource by the update.
3154
+ # The fields specified in the update_mask are relative to the resource, not
3155
+ # the full request. A field will be overwritten if it is in the mask. If the
3156
+ # user does not provide a mask then all fields will be overwritten.
3157
+ # @param automation [::Google::Cloud::Deploy::V1::Automation, ::Hash]
3158
+ # Required. The `Automation` to update.
3159
+ # @param request_id [::String]
3160
+ # Optional. A request ID to identify requests. Specify a unique request ID
3161
+ # so that if you must retry your request, the server will know to ignore
3162
+ # the request if it has already been completed. The server will guarantee
3163
+ # that for at least 60 minutes since the first request.
3164
+ #
3165
+ # For example, consider a situation where you make an initial request and the
3166
+ # request times out. If you make the request again with the same request ID,
3167
+ # the server can check if original operation with the same request ID was
3168
+ # received, and if so, will ignore the second request. This prevents clients
3169
+ # from accidentally creating duplicate commitments.
3170
+ #
3171
+ # The request ID must be a valid UUID with the exception that zero UUID is
3172
+ # not supported (00000000-0000-0000-0000-000000000000).
3173
+ # @param allow_missing [::Boolean]
3174
+ # Optional. If set to true, updating a `Automation` that does not exist will
3175
+ # result in the creation of a new `Automation`.
3176
+ # @param validate_only [::Boolean]
3177
+ # Optional. If set to true, the request is validated and the user is provided
3178
+ # with an expected result, but no actual change is made.
3179
+ #
3180
+ # @yield [response, operation] Access the result along with the RPC operation
3181
+ # @yieldparam response [::Gapic::Operation]
3182
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3183
+ #
3184
+ # @return [::Gapic::Operation]
3185
+ #
3186
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3187
+ #
3188
+ # @example Basic example
3189
+ # require "google/cloud/deploy/v1"
3190
+ #
3191
+ # # Create a client object. The client can be reused for multiple calls.
3192
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3193
+ #
3194
+ # # Create a request. To set request fields, pass in keyword arguments.
3195
+ # request = Google::Cloud::Deploy::V1::UpdateAutomationRequest.new
3196
+ #
3197
+ # # Call the update_automation method.
3198
+ # result = client.update_automation request
3199
+ #
3200
+ # # The returned object is of type Gapic::Operation. You can use it to
3201
+ # # check the status of an operation, cancel it, or wait for results.
3202
+ # # Here is how to wait for a response.
3203
+ # result.wait_until_done! timeout: 60
3204
+ # if result.response?
3205
+ # p result.response
3206
+ # else
3207
+ # puts "No response received."
3208
+ # end
3209
+ #
3210
+ def update_automation request, options = nil
3211
+ raise ::ArgumentError, "request must be provided" if request.nil?
3212
+
3213
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateAutomationRequest
3214
+
3215
+ # Converts hash and nil to an options object
3216
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3217
+
3218
+ # Customize the options with defaults
3219
+ metadata = @config.rpcs.update_automation.metadata.to_h
3220
+
3221
+ # Set x-goog-api-client and x-goog-user-project headers
3222
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3223
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3224
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3225
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3226
+
3227
+ header_params = {}
3228
+ if request.automation&.name
3229
+ header_params["automation.name"] = request.automation.name
3230
+ end
3231
+
3232
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3233
+ metadata[:"x-goog-request-params"] ||= request_params_header
3234
+
3235
+ options.apply_defaults timeout: @config.rpcs.update_automation.timeout,
3236
+ metadata: metadata,
3237
+ retry_policy: @config.rpcs.update_automation.retry_policy
3238
+
3239
+ options.apply_defaults timeout: @config.timeout,
3240
+ metadata: @config.metadata,
3241
+ retry_policy: @config.retry_policy
3242
+
3243
+ @cloud_deploy_stub.call_rpc :update_automation, request, options: options do |response, operation|
3244
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3245
+ yield response, operation if block_given?
3246
+ return response
3247
+ end
3248
+ rescue ::GRPC::BadStatus => e
3249
+ raise ::Google::Cloud::Error.from_error(e)
3250
+ end
3251
+
3252
+ ##
3253
+ # Deletes a single Automation resource.
3254
+ #
3255
+ # @overload delete_automation(request, options = nil)
3256
+ # Pass arguments to `delete_automation` via a request object, either of type
3257
+ # {::Google::Cloud::Deploy::V1::DeleteAutomationRequest} or an equivalent Hash.
3258
+ #
3259
+ # @param request [::Google::Cloud::Deploy::V1::DeleteAutomationRequest, ::Hash]
3260
+ # A request object representing the call parameters. Required. To specify no
3261
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3262
+ # @param options [::Gapic::CallOptions, ::Hash]
3263
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3264
+ #
3265
+ # @overload delete_automation(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil)
3266
+ # Pass arguments to `delete_automation` via keyword arguments. Note that at
3267
+ # least one keyword argument is required. To specify no parameters, or to keep all
3268
+ # the default parameter values, pass an empty Hash as a request object (see above).
3269
+ #
3270
+ # @param name [::String]
3271
+ # Required. The name of the `Automation` to delete. Format should be
3272
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
3273
+ # @param request_id [::String]
3274
+ # Optional. A request ID to identify requests. Specify a unique request ID
3275
+ # so that if you must retry your request, the server will know to ignore
3276
+ # the request if it has already been completed. The server will guarantee
3277
+ # that for at least 60 minutes after the first request.
3278
+ #
3279
+ # For example, consider a situation where you make an initial request and the
3280
+ # request times out. If you make the request again with the same request ID,
3281
+ # the server can check if original operation with the same request ID was
3282
+ # received, and if so, will ignore the second request. This prevents clients
3283
+ # from accidentally creating duplicate commitments.
3284
+ #
3285
+ # The request ID must be a valid UUID with the exception that zero UUID is
3286
+ # not supported (00000000-0000-0000-0000-000000000000).
3287
+ # @param allow_missing [::Boolean]
3288
+ # Optional. If set to true, then deleting an already deleted or non-existing
3289
+ # `Automation` will succeed.
3290
+ # @param validate_only [::Boolean]
3291
+ # Optional. If set, validate the request and verify whether the resource
3292
+ # exists, but do not actually post it.
3293
+ # @param etag [::String]
3294
+ # Optional. The weak etag of the request.
3295
+ # This checksum is computed by the server based on the value of other
3296
+ # fields, and may be sent on update and delete requests to ensure the
3297
+ # client has an up-to-date value before proceeding.
3298
+ #
3299
+ # @yield [response, operation] Access the result along with the RPC operation
3300
+ # @yieldparam response [::Gapic::Operation]
3301
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3302
+ #
3303
+ # @return [::Gapic::Operation]
3304
+ #
3305
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3306
+ #
3307
+ # @example Basic example
3308
+ # require "google/cloud/deploy/v1"
3309
+ #
3310
+ # # Create a client object. The client can be reused for multiple calls.
3311
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3312
+ #
3313
+ # # Create a request. To set request fields, pass in keyword arguments.
3314
+ # request = Google::Cloud::Deploy::V1::DeleteAutomationRequest.new
3315
+ #
3316
+ # # Call the delete_automation method.
3317
+ # result = client.delete_automation request
3318
+ #
3319
+ # # The returned object is of type Gapic::Operation. You can use it to
3320
+ # # check the status of an operation, cancel it, or wait for results.
3321
+ # # Here is how to wait for a response.
3322
+ # result.wait_until_done! timeout: 60
3323
+ # if result.response?
3324
+ # p result.response
3325
+ # else
3326
+ # puts "No response received."
3327
+ # end
3328
+ #
3329
+ def delete_automation request, options = nil
3330
+ raise ::ArgumentError, "request must be provided" if request.nil?
3331
+
3332
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteAutomationRequest
3333
+
3334
+ # Converts hash and nil to an options object
3335
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3336
+
3337
+ # Customize the options with defaults
3338
+ metadata = @config.rpcs.delete_automation.metadata.to_h
3339
+
3340
+ # Set x-goog-api-client and x-goog-user-project headers
3341
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3342
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3343
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3344
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3345
+
3346
+ header_params = {}
3347
+ if request.name
3348
+ header_params["name"] = request.name
3349
+ end
3350
+
3351
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3352
+ metadata[:"x-goog-request-params"] ||= request_params_header
3353
+
3354
+ options.apply_defaults timeout: @config.rpcs.delete_automation.timeout,
3355
+ metadata: metadata,
3356
+ retry_policy: @config.rpcs.delete_automation.retry_policy
3357
+
3358
+ options.apply_defaults timeout: @config.timeout,
3359
+ metadata: @config.metadata,
3360
+ retry_policy: @config.retry_policy
3361
+
3362
+ @cloud_deploy_stub.call_rpc :delete_automation, request, options: options do |response, operation|
3363
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3364
+ yield response, operation if block_given?
3365
+ return response
3366
+ end
3367
+ rescue ::GRPC::BadStatus => e
3368
+ raise ::Google::Cloud::Error.from_error(e)
3369
+ end
3370
+
3371
+ ##
3372
+ # Gets details of a single Automation.
3373
+ #
3374
+ # @overload get_automation(request, options = nil)
3375
+ # Pass arguments to `get_automation` via a request object, either of type
3376
+ # {::Google::Cloud::Deploy::V1::GetAutomationRequest} or an equivalent Hash.
3377
+ #
3378
+ # @param request [::Google::Cloud::Deploy::V1::GetAutomationRequest, ::Hash]
3379
+ # A request object representing the call parameters. Required. To specify no
3380
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3381
+ # @param options [::Gapic::CallOptions, ::Hash]
3382
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3383
+ #
3384
+ # @overload get_automation(name: nil)
3385
+ # Pass arguments to `get_automation` via keyword arguments. Note that at
3386
+ # least one keyword argument is required. To specify no parameters, or to keep all
3387
+ # the default parameter values, pass an empty Hash as a request object (see above).
3388
+ #
3389
+ # @param name [::String]
3390
+ # Required. Name of the `Automation`. Format must be
3391
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
3392
+ #
3393
+ # @yield [response, operation] Access the result along with the RPC operation
3394
+ # @yieldparam response [::Google::Cloud::Deploy::V1::Automation]
3395
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3396
+ #
3397
+ # @return [::Google::Cloud::Deploy::V1::Automation]
3398
+ #
3399
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3400
+ #
3401
+ # @example Basic example
3402
+ # require "google/cloud/deploy/v1"
3403
+ #
3404
+ # # Create a client object. The client can be reused for multiple calls.
3405
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3406
+ #
3407
+ # # Create a request. To set request fields, pass in keyword arguments.
3408
+ # request = Google::Cloud::Deploy::V1::GetAutomationRequest.new
3409
+ #
3410
+ # # Call the get_automation method.
3411
+ # result = client.get_automation request
3412
+ #
3413
+ # # The returned object is of type Google::Cloud::Deploy::V1::Automation.
3414
+ # p result
3415
+ #
3416
+ def get_automation request, options = nil
3417
+ raise ::ArgumentError, "request must be provided" if request.nil?
3418
+
3419
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetAutomationRequest
3420
+
3421
+ # Converts hash and nil to an options object
3422
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3423
+
3424
+ # Customize the options with defaults
3425
+ metadata = @config.rpcs.get_automation.metadata.to_h
3426
+
3427
+ # Set x-goog-api-client and x-goog-user-project headers
3428
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3429
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3430
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3431
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3432
+
3433
+ header_params = {}
3434
+ if request.name
3435
+ header_params["name"] = request.name
3436
+ end
3437
+
3438
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3439
+ metadata[:"x-goog-request-params"] ||= request_params_header
3440
+
3441
+ options.apply_defaults timeout: @config.rpcs.get_automation.timeout,
3442
+ metadata: metadata,
3443
+ retry_policy: @config.rpcs.get_automation.retry_policy
3444
+
3445
+ options.apply_defaults timeout: @config.timeout,
3446
+ metadata: @config.metadata,
3447
+ retry_policy: @config.retry_policy
3448
+
3449
+ @cloud_deploy_stub.call_rpc :get_automation, request, options: options do |response, operation|
3450
+ yield response, operation if block_given?
3451
+ return response
3452
+ end
3453
+ rescue ::GRPC::BadStatus => e
3454
+ raise ::Google::Cloud::Error.from_error(e)
3455
+ end
3456
+
3457
+ ##
3458
+ # Lists Automations in a given project and location.
3459
+ #
3460
+ # @overload list_automations(request, options = nil)
3461
+ # Pass arguments to `list_automations` via a request object, either of type
3462
+ # {::Google::Cloud::Deploy::V1::ListAutomationsRequest} or an equivalent Hash.
3463
+ #
3464
+ # @param request [::Google::Cloud::Deploy::V1::ListAutomationsRequest, ::Hash]
3465
+ # A request object representing the call parameters. Required. To specify no
3466
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3467
+ # @param options [::Gapic::CallOptions, ::Hash]
3468
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3469
+ #
3470
+ # @overload list_automations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3471
+ # Pass arguments to `list_automations` via keyword arguments. Note that at
3472
+ # least one keyword argument is required. To specify no parameters, or to keep all
3473
+ # the default parameter values, pass an empty Hash as a request object (see above).
3474
+ #
3475
+ # @param parent [::String]
3476
+ # Required. The parent, which owns this collection of automations. Format
3477
+ # must be
3478
+ # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
3479
+ # @param page_size [::Integer]
3480
+ # The maximum number of automations to return. The service may return
3481
+ # fewer than this value. If unspecified, at most 50 automations will
3482
+ # be returned. The maximum value is 1000; values above 1000 will be set
3483
+ # to 1000.
3484
+ # @param page_token [::String]
3485
+ # A page token, received from a previous `ListAutomations` call.
3486
+ # Provide this to retrieve the subsequent page.
3487
+ #
3488
+ # When paginating, all other provided parameters match
3489
+ # the call that provided the page token.
3490
+ # @param filter [::String]
3491
+ # Filter automations to be returned. All fields can be used in the
3492
+ # filter.
3493
+ # @param order_by [::String]
3494
+ # Field to sort by.
3495
+ #
3496
+ # @yield [response, operation] Access the result along with the RPC operation
3497
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Automation>]
3498
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3499
+ #
3500
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Automation>]
3501
+ #
3502
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3503
+ #
3504
+ # @example Basic example
3505
+ # require "google/cloud/deploy/v1"
3506
+ #
3507
+ # # Create a client object. The client can be reused for multiple calls.
3508
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3509
+ #
3510
+ # # Create a request. To set request fields, pass in keyword arguments.
3511
+ # request = Google::Cloud::Deploy::V1::ListAutomationsRequest.new
3512
+ #
3513
+ # # Call the list_automations method.
3514
+ # result = client.list_automations request
3515
+ #
3516
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3517
+ # # over elements, and API calls will be issued to fetch pages as needed.
3518
+ # result.each do |item|
3519
+ # # Each element is of type ::Google::Cloud::Deploy::V1::Automation.
3520
+ # p item
3521
+ # end
3522
+ #
3523
+ def list_automations request, options = nil
3524
+ raise ::ArgumentError, "request must be provided" if request.nil?
3525
+
3526
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListAutomationsRequest
3527
+
3528
+ # Converts hash and nil to an options object
3529
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3530
+
3531
+ # Customize the options with defaults
3532
+ metadata = @config.rpcs.list_automations.metadata.to_h
3533
+
3534
+ # Set x-goog-api-client and x-goog-user-project headers
3535
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3536
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3537
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3538
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3539
+
3540
+ header_params = {}
3541
+ if request.parent
3542
+ header_params["parent"] = request.parent
3543
+ end
3544
+
3545
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3546
+ metadata[:"x-goog-request-params"] ||= request_params_header
3547
+
3548
+ options.apply_defaults timeout: @config.rpcs.list_automations.timeout,
3549
+ metadata: metadata,
3550
+ retry_policy: @config.rpcs.list_automations.retry_policy
3551
+
3552
+ options.apply_defaults timeout: @config.timeout,
3553
+ metadata: @config.metadata,
3554
+ retry_policy: @config.retry_policy
3555
+
3556
+ @cloud_deploy_stub.call_rpc :list_automations, request, options: options do |response, operation|
3557
+ response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_automations, request, response, operation, options
3558
+ yield response, operation if block_given?
3559
+ return response
3560
+ end
3561
+ rescue ::GRPC::BadStatus => e
3562
+ raise ::Google::Cloud::Error.from_error(e)
3563
+ end
3564
+
3565
+ ##
3566
+ # Gets details of a single AutomationRun.
3567
+ #
3568
+ # @overload get_automation_run(request, options = nil)
3569
+ # Pass arguments to `get_automation_run` via a request object, either of type
3570
+ # {::Google::Cloud::Deploy::V1::GetAutomationRunRequest} or an equivalent Hash.
3571
+ #
3572
+ # @param request [::Google::Cloud::Deploy::V1::GetAutomationRunRequest, ::Hash]
3573
+ # A request object representing the call parameters. Required. To specify no
3574
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3575
+ # @param options [::Gapic::CallOptions, ::Hash]
3576
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3577
+ #
3578
+ # @overload get_automation_run(name: nil)
3579
+ # Pass arguments to `get_automation_run` via keyword arguments. Note that at
3580
+ # least one keyword argument is required. To specify no parameters, or to keep all
3581
+ # the default parameter values, pass an empty Hash as a request object (see above).
3582
+ #
3583
+ # @param name [::String]
3584
+ # Required. Name of the `AutomationRun`. Format must be
3585
+ # `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
3586
+ #
3587
+ # @yield [response, operation] Access the result along with the RPC operation
3588
+ # @yieldparam response [::Google::Cloud::Deploy::V1::AutomationRun]
3589
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3590
+ #
3591
+ # @return [::Google::Cloud::Deploy::V1::AutomationRun]
3592
+ #
3593
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3594
+ #
3595
+ # @example Basic example
3596
+ # require "google/cloud/deploy/v1"
3597
+ #
3598
+ # # Create a client object. The client can be reused for multiple calls.
3599
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3600
+ #
3601
+ # # Create a request. To set request fields, pass in keyword arguments.
3602
+ # request = Google::Cloud::Deploy::V1::GetAutomationRunRequest.new
3603
+ #
3604
+ # # Call the get_automation_run method.
3605
+ # result = client.get_automation_run request
3606
+ #
3607
+ # # The returned object is of type Google::Cloud::Deploy::V1::AutomationRun.
3608
+ # p result
3609
+ #
3610
+ def get_automation_run request, options = nil
3611
+ raise ::ArgumentError, "request must be provided" if request.nil?
3612
+
3613
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetAutomationRunRequest
3614
+
3615
+ # Converts hash and nil to an options object
3616
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3617
+
3618
+ # Customize the options with defaults
3619
+ metadata = @config.rpcs.get_automation_run.metadata.to_h
3620
+
3621
+ # Set x-goog-api-client and x-goog-user-project headers
3622
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3623
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3624
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3625
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3626
+
3627
+ header_params = {}
3628
+ if request.name
3629
+ header_params["name"] = request.name
3630
+ end
3631
+
3632
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3633
+ metadata[:"x-goog-request-params"] ||= request_params_header
3634
+
3635
+ options.apply_defaults timeout: @config.rpcs.get_automation_run.timeout,
3636
+ metadata: metadata,
3637
+ retry_policy: @config.rpcs.get_automation_run.retry_policy
3638
+
3639
+ options.apply_defaults timeout: @config.timeout,
3640
+ metadata: @config.metadata,
3641
+ retry_policy: @config.retry_policy
3642
+
3643
+ @cloud_deploy_stub.call_rpc :get_automation_run, request, options: options do |response, operation|
3644
+ yield response, operation if block_given?
3645
+ return response
3646
+ end
3647
+ rescue ::GRPC::BadStatus => e
3648
+ raise ::Google::Cloud::Error.from_error(e)
3649
+ end
3650
+
3651
+ ##
3652
+ # Lists AutomationRuns in a given project and location.
3653
+ #
3654
+ # @overload list_automation_runs(request, options = nil)
3655
+ # Pass arguments to `list_automation_runs` via a request object, either of type
3656
+ # {::Google::Cloud::Deploy::V1::ListAutomationRunsRequest} or an equivalent Hash.
3657
+ #
3658
+ # @param request [::Google::Cloud::Deploy::V1::ListAutomationRunsRequest, ::Hash]
3659
+ # A request object representing the call parameters. Required. To specify no
3660
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3661
+ # @param options [::Gapic::CallOptions, ::Hash]
3662
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3663
+ #
3664
+ # @overload list_automation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3665
+ # Pass arguments to `list_automation_runs` via keyword arguments. Note that at
3666
+ # least one keyword argument is required. To specify no parameters, or to keep all
3667
+ # the default parameter values, pass an empty Hash as a request object (see above).
3668
+ #
3669
+ # @param parent [::String]
3670
+ # Required. The parent, which owns this collection of automationRuns. Format
3671
+ # must be
3672
+ # `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
3673
+ # @param page_size [::Integer]
3674
+ # The maximum number of automationRuns to return. The service may return
3675
+ # fewer than this value. If unspecified, at most 50 automationRuns will
3676
+ # be returned. The maximum value is 1000; values above 1000 will be set
3677
+ # to 1000.
3678
+ # @param page_token [::String]
3679
+ # A page token, received from a previous `ListAutomationRuns` call.
3680
+ # Provide this to retrieve the subsequent page.
3681
+ #
3682
+ # When paginating, all other provided parameters match
3683
+ # the call that provided the page token.
3684
+ # @param filter [::String]
3685
+ # Filter automationRuns to be returned. All fields can be used in the
3686
+ # filter.
3687
+ # @param order_by [::String]
3688
+ # Field to sort by.
3689
+ #
3690
+ # @yield [response, operation] Access the result along with the RPC operation
3691
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::AutomationRun>]
3692
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3693
+ #
3694
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::AutomationRun>]
3695
+ #
3696
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3697
+ #
3698
+ # @example Basic example
3699
+ # require "google/cloud/deploy/v1"
3700
+ #
3701
+ # # Create a client object. The client can be reused for multiple calls.
3702
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3703
+ #
3704
+ # # Create a request. To set request fields, pass in keyword arguments.
3705
+ # request = Google::Cloud::Deploy::V1::ListAutomationRunsRequest.new
3706
+ #
3707
+ # # Call the list_automation_runs method.
3708
+ # result = client.list_automation_runs request
3709
+ #
3710
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3711
+ # # over elements, and API calls will be issued to fetch pages as needed.
3712
+ # result.each do |item|
3713
+ # # Each element is of type ::Google::Cloud::Deploy::V1::AutomationRun.
3714
+ # p item
3715
+ # end
3716
+ #
3717
+ def list_automation_runs request, options = nil
3718
+ raise ::ArgumentError, "request must be provided" if request.nil?
3719
+
3720
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListAutomationRunsRequest
3721
+
3722
+ # Converts hash and nil to an options object
3723
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3724
+
3725
+ # Customize the options with defaults
3726
+ metadata = @config.rpcs.list_automation_runs.metadata.to_h
3727
+
3728
+ # Set x-goog-api-client and x-goog-user-project headers
3729
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3730
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3731
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3732
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3733
+
3734
+ header_params = {}
3735
+ if request.parent
3736
+ header_params["parent"] = request.parent
3737
+ end
3738
+
3739
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3740
+ metadata[:"x-goog-request-params"] ||= request_params_header
3741
+
3742
+ options.apply_defaults timeout: @config.rpcs.list_automation_runs.timeout,
3743
+ metadata: metadata,
3744
+ retry_policy: @config.rpcs.list_automation_runs.retry_policy
3745
+
3746
+ options.apply_defaults timeout: @config.timeout,
3747
+ metadata: @config.metadata,
3748
+ retry_policy: @config.retry_policy
3749
+
3750
+ @cloud_deploy_stub.call_rpc :list_automation_runs, request, options: options do |response, operation|
3751
+ response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_automation_runs, request, response, operation, options
3752
+ yield response, operation if block_given?
3753
+ return response
3754
+ end
3755
+ rescue ::GRPC::BadStatus => e
3756
+ raise ::Google::Cloud::Error.from_error(e)
3757
+ end
3758
+
3759
+ ##
3760
+ # Cancels an AutomationRun. The `state` of the `AutomationRun` after
3761
+ # cancelling is `CANCELLED`. `CancelAutomationRun` can be called on
3762
+ # AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun
3763
+ # in a different state returns an `FAILED_PRECONDITION` error.
3764
+ #
3765
+ # @overload cancel_automation_run(request, options = nil)
3766
+ # Pass arguments to `cancel_automation_run` via a request object, either of type
3767
+ # {::Google::Cloud::Deploy::V1::CancelAutomationRunRequest} or an equivalent Hash.
3768
+ #
3769
+ # @param request [::Google::Cloud::Deploy::V1::CancelAutomationRunRequest, ::Hash]
3770
+ # A request object representing the call parameters. Required. To specify no
3771
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3772
+ # @param options [::Gapic::CallOptions, ::Hash]
3773
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3774
+ #
3775
+ # @overload cancel_automation_run(name: nil)
3776
+ # Pass arguments to `cancel_automation_run` via keyword arguments. Note that at
3777
+ # least one keyword argument is required. To specify no parameters, or to keep all
3778
+ # the default parameter values, pass an empty Hash as a request object (see above).
3779
+ #
3780
+ # @param name [::String]
3781
+ # Required. Name of the `AutomationRun`. Format is
3782
+ # `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
3783
+ #
3784
+ # @yield [response, operation] Access the result along with the RPC operation
3785
+ # @yieldparam response [::Google::Cloud::Deploy::V1::CancelAutomationRunResponse]
3786
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3787
+ #
3788
+ # @return [::Google::Cloud::Deploy::V1::CancelAutomationRunResponse]
3789
+ #
3790
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3791
+ #
3792
+ # @example Basic example
3793
+ # require "google/cloud/deploy/v1"
3794
+ #
3795
+ # # Create a client object. The client can be reused for multiple calls.
3796
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3797
+ #
3798
+ # # Create a request. To set request fields, pass in keyword arguments.
3799
+ # request = Google::Cloud::Deploy::V1::CancelAutomationRunRequest.new
3800
+ #
3801
+ # # Call the cancel_automation_run method.
3802
+ # result = client.cancel_automation_run request
3803
+ #
3804
+ # # The returned object is of type Google::Cloud::Deploy::V1::CancelAutomationRunResponse.
3805
+ # p result
3806
+ #
3807
+ def cancel_automation_run request, options = nil
3808
+ raise ::ArgumentError, "request must be provided" if request.nil?
3809
+
3810
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CancelAutomationRunRequest
3811
+
3812
+ # Converts hash and nil to an options object
3813
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3814
+
3815
+ # Customize the options with defaults
3816
+ metadata = @config.rpcs.cancel_automation_run.metadata.to_h
3817
+
3818
+ # Set x-goog-api-client and x-goog-user-project headers
3819
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3820
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3821
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3822
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3823
+
3824
+ header_params = {}
3825
+ if request.name
3826
+ header_params["name"] = request.name
3827
+ end
3828
+
3829
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3830
+ metadata[:"x-goog-request-params"] ||= request_params_header
3831
+
3832
+ options.apply_defaults timeout: @config.rpcs.cancel_automation_run.timeout,
3833
+ metadata: metadata,
3834
+ retry_policy: @config.rpcs.cancel_automation_run.retry_policy
3835
+
3836
+ options.apply_defaults timeout: @config.timeout,
3837
+ metadata: @config.metadata,
3838
+ retry_policy: @config.retry_policy
3839
+
3840
+ @cloud_deploy_stub.call_rpc :cancel_automation_run, request, options: options do |response, operation|
3841
+ yield response, operation if block_given?
3842
+ return response
3843
+ end
3844
+ rescue ::GRPC::BadStatus => e
3845
+ raise ::Google::Cloud::Error.from_error(e)
3846
+ end
3847
+
3848
+ ##
3849
+ # Configuration class for the CloudDeploy API.
3850
+ #
3851
+ # This class represents the configuration for CloudDeploy,
3852
+ # providing control over timeouts, retry behavior, logging, transport
3853
+ # parameters, and other low-level controls. Certain parameters can also be
3854
+ # applied individually to specific RPCs. See
3855
+ # {::Google::Cloud::Deploy::V1::CloudDeploy::Client::Configuration::Rpcs}
3856
+ # for a list of RPCs that can be configured independently.
3857
+ #
3858
+ # Configuration can be applied globally to all clients, or to a single client
3859
+ # on construction.
3860
+ #
3861
+ # @example
3862
+ #
3863
+ # # Modify the global config, setting the timeout for
3864
+ # # list_delivery_pipelines to 20 seconds,
3865
+ # # and all remaining timeouts to 10 seconds.
3866
+ # ::Google::Cloud::Deploy::V1::CloudDeploy::Client.configure do |config|
3867
+ # config.timeout = 10.0
3868
+ # config.rpcs.list_delivery_pipelines.timeout = 20.0
3869
+ # end
3870
+ #
3871
+ # # Apply the above configuration only to a new client.
3872
+ # client = ::Google::Cloud::Deploy::V1::CloudDeploy::Client.new do |config|
3873
+ # config.timeout = 10.0
3874
+ # config.rpcs.list_delivery_pipelines.timeout = 20.0
3875
+ # end
3876
+ #
3877
+ # @!attribute [rw] endpoint
3878
+ # The hostname or hostname:port of the service endpoint.
3879
+ # Defaults to `"clouddeploy.googleapis.com"`.
3880
+ # @return [::String]
3881
+ # @!attribute [rw] credentials
3882
+ # Credentials to send with calls. You may provide any of the following types:
3883
+ # * (`String`) The path to a service account key file in JSON format
3884
+ # * (`Hash`) A service account key as a Hash
3885
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3886
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3887
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3888
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3889
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3890
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3891
+ # * (`nil`) indicating no credentials
3892
+ # @return [::Object]
3893
+ # @!attribute [rw] scope
3894
+ # The OAuth scopes
3895
+ # @return [::Array<::String>]
3896
+ # @!attribute [rw] lib_name
3897
+ # The library name as recorded in instrumentation and logging
3898
+ # @return [::String]
3899
+ # @!attribute [rw] lib_version
3900
+ # The library version as recorded in instrumentation and logging
3901
+ # @return [::String]
3902
+ # @!attribute [rw] channel_args
3903
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
3904
+ # `GRPC::Core::Channel` object is provided as the credential.
3905
+ # @return [::Hash]
3906
+ # @!attribute [rw] interceptors
3907
+ # An array of interceptors that are run before calls are executed.
3908
+ # @return [::Array<::GRPC::ClientInterceptor>]
3909
+ # @!attribute [rw] timeout
3910
+ # The call timeout in seconds.
3911
+ # @return [::Numeric]
3912
+ # @!attribute [rw] metadata
3913
+ # Additional gRPC headers to be sent with the call.
3914
+ # @return [::Hash{::Symbol=>::String}]
3915
+ # @!attribute [rw] retry_policy
3916
+ # The retry policy. The value is a hash with the following keys:
3917
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3918
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3919
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3920
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3921
+ # trigger a retry.
3922
+ # @return [::Hash]
3923
+ # @!attribute [rw] quota_project
3924
+ # A separate project against which to charge quota.
3925
+ # @return [::String]
3926
+ #
3927
+ class Configuration
3928
+ extend ::Gapic::Config
3929
+
3930
+ DEFAULT_ENDPOINT = "clouddeploy.googleapis.com"
3931
+
3932
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3933
+ config_attr :credentials, nil do |value|
3934
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3935
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
3936
+ allowed.any? { |klass| klass === value }
3937
+ end
3938
+ config_attr :scope, nil, ::String, ::Array, nil
3939
+ config_attr :lib_name, nil, ::String, nil
3940
+ config_attr :lib_version, nil, ::String, nil
3941
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
3942
+ config_attr :interceptors, nil, ::Array, nil
3943
+ config_attr :timeout, nil, ::Numeric, nil
3944
+ config_attr :metadata, nil, ::Hash, nil
3945
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3946
+ config_attr :quota_project, nil, ::String, nil
3947
+
3948
+ # @private
3949
+ def initialize parent_config = nil
3950
+ @parent_config = parent_config unless parent_config.nil?
3951
+
3952
+ yield self if block_given?
3953
+ end
3954
+
3955
+ ##
3956
+ # Configurations for individual RPCs
3957
+ # @return [Rpcs]
3958
+ #
3959
+ def rpcs
3960
+ @rpcs ||= begin
3961
+ parent_rpcs = nil
3962
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3963
+ Rpcs.new parent_rpcs
3964
+ end
3965
+ end
3966
+
3967
+ ##
3968
+ # Configuration for the channel pool
3969
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
3970
+ #
3971
+ def channel_pool
3016
3972
  @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
3017
3973
  end
3018
3974
 
@@ -3065,6 +4021,11 @@ module Google
3065
4021
  #
3066
4022
  attr_reader :list_targets
3067
4023
  ##
4024
+ # RPC-specific configuration for `rollback_target`
4025
+ # @return [::Gapic::Config::Method]
4026
+ #
4027
+ attr_reader :rollback_target
4028
+ ##
3068
4029
  # RPC-specific configuration for `get_target`
3069
4030
  # @return [::Gapic::Config::Method]
3070
4031
  #
@@ -3164,6 +4125,46 @@ module Google
3164
4125
  # @return [::Gapic::Config::Method]
3165
4126
  #
3166
4127
  attr_reader :get_config
4128
+ ##
4129
+ # RPC-specific configuration for `create_automation`
4130
+ # @return [::Gapic::Config::Method]
4131
+ #
4132
+ attr_reader :create_automation
4133
+ ##
4134
+ # RPC-specific configuration for `update_automation`
4135
+ # @return [::Gapic::Config::Method]
4136
+ #
4137
+ attr_reader :update_automation
4138
+ ##
4139
+ # RPC-specific configuration for `delete_automation`
4140
+ # @return [::Gapic::Config::Method]
4141
+ #
4142
+ attr_reader :delete_automation
4143
+ ##
4144
+ # RPC-specific configuration for `get_automation`
4145
+ # @return [::Gapic::Config::Method]
4146
+ #
4147
+ attr_reader :get_automation
4148
+ ##
4149
+ # RPC-specific configuration for `list_automations`
4150
+ # @return [::Gapic::Config::Method]
4151
+ #
4152
+ attr_reader :list_automations
4153
+ ##
4154
+ # RPC-specific configuration for `get_automation_run`
4155
+ # @return [::Gapic::Config::Method]
4156
+ #
4157
+ attr_reader :get_automation_run
4158
+ ##
4159
+ # RPC-specific configuration for `list_automation_runs`
4160
+ # @return [::Gapic::Config::Method]
4161
+ #
4162
+ attr_reader :list_automation_runs
4163
+ ##
4164
+ # RPC-specific configuration for `cancel_automation_run`
4165
+ # @return [::Gapic::Config::Method]
4166
+ #
4167
+ attr_reader :cancel_automation_run
3167
4168
 
3168
4169
  # @private
3169
4170
  def initialize parent_rpcs = nil
@@ -3179,6 +4180,8 @@ module Google
3179
4180
  @delete_delivery_pipeline = ::Gapic::Config::Method.new delete_delivery_pipeline_config
3180
4181
  list_targets_config = parent_rpcs.list_targets if parent_rpcs.respond_to? :list_targets
3181
4182
  @list_targets = ::Gapic::Config::Method.new list_targets_config
4183
+ rollback_target_config = parent_rpcs.rollback_target if parent_rpcs.respond_to? :rollback_target
4184
+ @rollback_target = ::Gapic::Config::Method.new rollback_target_config
3182
4185
  get_target_config = parent_rpcs.get_target if parent_rpcs.respond_to? :get_target
3183
4186
  @get_target = ::Gapic::Config::Method.new get_target_config
3184
4187
  create_target_config = parent_rpcs.create_target if parent_rpcs.respond_to? :create_target
@@ -3219,6 +4222,22 @@ module Google
3219
4222
  @terminate_job_run = ::Gapic::Config::Method.new terminate_job_run_config
3220
4223
  get_config_config = parent_rpcs.get_config if parent_rpcs.respond_to? :get_config
3221
4224
  @get_config = ::Gapic::Config::Method.new get_config_config
4225
+ create_automation_config = parent_rpcs.create_automation if parent_rpcs.respond_to? :create_automation
4226
+ @create_automation = ::Gapic::Config::Method.new create_automation_config
4227
+ update_automation_config = parent_rpcs.update_automation if parent_rpcs.respond_to? :update_automation
4228
+ @update_automation = ::Gapic::Config::Method.new update_automation_config
4229
+ delete_automation_config = parent_rpcs.delete_automation if parent_rpcs.respond_to? :delete_automation
4230
+ @delete_automation = ::Gapic::Config::Method.new delete_automation_config
4231
+ get_automation_config = parent_rpcs.get_automation if parent_rpcs.respond_to? :get_automation
4232
+ @get_automation = ::Gapic::Config::Method.new get_automation_config
4233
+ list_automations_config = parent_rpcs.list_automations if parent_rpcs.respond_to? :list_automations
4234
+ @list_automations = ::Gapic::Config::Method.new list_automations_config
4235
+ get_automation_run_config = parent_rpcs.get_automation_run if parent_rpcs.respond_to? :get_automation_run
4236
+ @get_automation_run = ::Gapic::Config::Method.new get_automation_run_config
4237
+ list_automation_runs_config = parent_rpcs.list_automation_runs if parent_rpcs.respond_to? :list_automation_runs
4238
+ @list_automation_runs = ::Gapic::Config::Method.new list_automation_runs_config
4239
+ cancel_automation_run_config = parent_rpcs.cancel_automation_run if parent_rpcs.respond_to? :cancel_automation_run
4240
+ @cancel_automation_run = ::Gapic::Config::Method.new cancel_automation_run_config
3222
4241
 
3223
4242
  yield self if block_given?
3224
4243
  end