google-cloud-deploy-v1 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fc0df10e6ef2d043b481fe38229f494b94935a3767e761d61d0a3996584261c
4
- data.tar.gz: 628707ade05ce04c31bdf69f6e9c600f064580eeead685344cfd28acc7eb3c6e
3
+ metadata.gz: 7d6992fda5c811f860e8476ac2fe5c14d2ffd73f130eaead7d14e9a1040b4911
4
+ data.tar.gz: 76f38ebcf72c5b09216cbf494d98f14d0a024ca3c00acadff8a0d4bbaf942e9f
5
5
  SHA512:
6
- metadata.gz: 1ce10c032daaaec525d4570b22a8ca8b6b4db55eeea70c59fdeb48fd42d35298bc649fbaab1f493deb1cdab5120858ba71a5334ae755ef6999314839aa4386d2
7
- data.tar.gz: 0fb9817ee239fd553a890e4f1d6c386e8d29d74292bfc76169f85fbd96450533d3085b91f74122f39fc4602a7ea329711c2f6dafdc21722ef85c563cf5977f49
6
+ metadata.gz: 3dfa76976efe058f57bf6796f95df21736c27e153c8f88426363d0ec91e3946338fda2620aca9b5f4e02a052251b913addb39cb91d2b426850c46e3ba50c8c85
7
+ data.tar.gz: '091f836fd0c44aca09c657ec513ccfea39116eb55af59281532a2048565a159f62908722397c05b6524c880325728d3d8c239d06aa0927a944d5d9c3dc5c801f'
@@ -99,6 +99,22 @@ module Google
99
99
 
100
100
  default_config.rpcs.delete_target.timeout = 60.0
101
101
 
102
+ default_config.rpcs.list_custom_target_types.timeout = 60.0
103
+ default_config.rpcs.list_custom_target_types.retry_policy = {
104
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
105
+ }
106
+
107
+ default_config.rpcs.get_custom_target_type.timeout = 60.0
108
+ default_config.rpcs.get_custom_target_type.retry_policy = {
109
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
110
+ }
111
+
112
+ default_config.rpcs.create_custom_target_type.timeout = 60.0
113
+
114
+ default_config.rpcs.update_custom_target_type.timeout = 60.0
115
+
116
+ default_config.rpcs.delete_custom_target_type.timeout = 60.0
117
+
102
118
  default_config.rpcs.list_releases.timeout = 60.0
103
119
  default_config.rpcs.list_releases.retry_policy = {
104
120
  initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
@@ -1500,6 +1516,553 @@ module Google
1500
1516
  raise ::Google::Cloud::Error.from_error(e)
1501
1517
  end
1502
1518
 
1519
+ ##
1520
+ # Lists CustomTargetTypes in a given project and location.
1521
+ #
1522
+ # @overload list_custom_target_types(request, options = nil)
1523
+ # Pass arguments to `list_custom_target_types` via a request object, either of type
1524
+ # {::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest} or an equivalent Hash.
1525
+ #
1526
+ # @param request [::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest, ::Hash]
1527
+ # A request object representing the call parameters. Required. To specify no
1528
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1529
+ # @param options [::Gapic::CallOptions, ::Hash]
1530
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1531
+ #
1532
+ # @overload list_custom_target_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1533
+ # Pass arguments to `list_custom_target_types` via keyword arguments. Note that at
1534
+ # least one keyword argument is required. To specify no parameters, or to keep all
1535
+ # the default parameter values, pass an empty Hash as a request object (see above).
1536
+ #
1537
+ # @param parent [::String]
1538
+ # Required. The parent that owns this collection of custom target types.
1539
+ # Format must be `projects/{project_id}/locations/{location_name}`.
1540
+ # @param page_size [::Integer]
1541
+ # Optional. The maximum number of `CustomTargetType` objects to return. The
1542
+ # service may return fewer than this value. If unspecified, at most 50
1543
+ # `CustomTargetType` objects will be returned. The maximum value is 1000;
1544
+ # values above 1000 will be set to 1000.
1545
+ # @param page_token [::String]
1546
+ # Optional. A page token, received from a previous `ListCustomTargetTypes`
1547
+ # call. Provide this to retrieve the subsequent page.
1548
+ #
1549
+ # When paginating, all other provided parameters match
1550
+ # the call that provided the page token.
1551
+ # @param filter [::String]
1552
+ # Optional. Filter custom target types to be returned. See
1553
+ # https://google.aip.dev/160 for more details.
1554
+ # @param order_by [::String]
1555
+ # Optional. Field to sort by. See https://google.aip.dev/132#ordering for
1556
+ # more details.
1557
+ #
1558
+ # @yield [response, operation] Access the result along with the RPC operation
1559
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::CustomTargetType>]
1560
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1561
+ #
1562
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::CustomTargetType>]
1563
+ #
1564
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1565
+ #
1566
+ # @example Basic example
1567
+ # require "google/cloud/deploy/v1"
1568
+ #
1569
+ # # Create a client object. The client can be reused for multiple calls.
1570
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1571
+ #
1572
+ # # Create a request. To set request fields, pass in keyword arguments.
1573
+ # request = Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest.new
1574
+ #
1575
+ # # Call the list_custom_target_types method.
1576
+ # result = client.list_custom_target_types request
1577
+ #
1578
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1579
+ # # over elements, and API calls will be issued to fetch pages as needed.
1580
+ # result.each do |item|
1581
+ # # Each element is of type ::Google::Cloud::Deploy::V1::CustomTargetType.
1582
+ # p item
1583
+ # end
1584
+ #
1585
+ def list_custom_target_types request, options = nil
1586
+ raise ::ArgumentError, "request must be provided" if request.nil?
1587
+
1588
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest
1589
+
1590
+ # Converts hash and nil to an options object
1591
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1592
+
1593
+ # Customize the options with defaults
1594
+ metadata = @config.rpcs.list_custom_target_types.metadata.to_h
1595
+
1596
+ # Set x-goog-api-client and x-goog-user-project headers
1597
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1598
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1599
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1600
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1601
+
1602
+ header_params = {}
1603
+ if request.parent
1604
+ header_params["parent"] = request.parent
1605
+ end
1606
+
1607
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1608
+ metadata[:"x-goog-request-params"] ||= request_params_header
1609
+
1610
+ options.apply_defaults timeout: @config.rpcs.list_custom_target_types.timeout,
1611
+ metadata: metadata,
1612
+ retry_policy: @config.rpcs.list_custom_target_types.retry_policy
1613
+
1614
+ options.apply_defaults timeout: @config.timeout,
1615
+ metadata: @config.metadata,
1616
+ retry_policy: @config.retry_policy
1617
+
1618
+ @cloud_deploy_stub.call_rpc :list_custom_target_types, request, options: options do |response, operation|
1619
+ response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_custom_target_types, request, response, operation, options
1620
+ yield response, operation if block_given?
1621
+ return response
1622
+ end
1623
+ rescue ::GRPC::BadStatus => e
1624
+ raise ::Google::Cloud::Error.from_error(e)
1625
+ end
1626
+
1627
+ ##
1628
+ # Gets details of a single CustomTargetType.
1629
+ #
1630
+ # @overload get_custom_target_type(request, options = nil)
1631
+ # Pass arguments to `get_custom_target_type` via a request object, either of type
1632
+ # {::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest} or an equivalent Hash.
1633
+ #
1634
+ # @param request [::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest, ::Hash]
1635
+ # A request object representing the call parameters. Required. To specify no
1636
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1637
+ # @param options [::Gapic::CallOptions, ::Hash]
1638
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1639
+ #
1640
+ # @overload get_custom_target_type(name: nil)
1641
+ # Pass arguments to `get_custom_target_type` via keyword arguments. Note that at
1642
+ # least one keyword argument is required. To specify no parameters, or to keep all
1643
+ # the default parameter values, pass an empty Hash as a request object (see above).
1644
+ #
1645
+ # @param name [::String]
1646
+ # Required. Name of the `CustomTargetType`. Format must be
1647
+ # `projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.
1648
+ #
1649
+ # @yield [response, operation] Access the result along with the RPC operation
1650
+ # @yieldparam response [::Google::Cloud::Deploy::V1::CustomTargetType]
1651
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1652
+ #
1653
+ # @return [::Google::Cloud::Deploy::V1::CustomTargetType]
1654
+ #
1655
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1656
+ #
1657
+ # @example Basic example
1658
+ # require "google/cloud/deploy/v1"
1659
+ #
1660
+ # # Create a client object. The client can be reused for multiple calls.
1661
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1662
+ #
1663
+ # # Create a request. To set request fields, pass in keyword arguments.
1664
+ # request = Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest.new
1665
+ #
1666
+ # # Call the get_custom_target_type method.
1667
+ # result = client.get_custom_target_type request
1668
+ #
1669
+ # # The returned object is of type Google::Cloud::Deploy::V1::CustomTargetType.
1670
+ # p result
1671
+ #
1672
+ def get_custom_target_type request, options = nil
1673
+ raise ::ArgumentError, "request must be provided" if request.nil?
1674
+
1675
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest
1676
+
1677
+ # Converts hash and nil to an options object
1678
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1679
+
1680
+ # Customize the options with defaults
1681
+ metadata = @config.rpcs.get_custom_target_type.metadata.to_h
1682
+
1683
+ # Set x-goog-api-client and x-goog-user-project headers
1684
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1685
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1686
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1687
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1688
+
1689
+ header_params = {}
1690
+ if request.name
1691
+ header_params["name"] = request.name
1692
+ end
1693
+
1694
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1695
+ metadata[:"x-goog-request-params"] ||= request_params_header
1696
+
1697
+ options.apply_defaults timeout: @config.rpcs.get_custom_target_type.timeout,
1698
+ metadata: metadata,
1699
+ retry_policy: @config.rpcs.get_custom_target_type.retry_policy
1700
+
1701
+ options.apply_defaults timeout: @config.timeout,
1702
+ metadata: @config.metadata,
1703
+ retry_policy: @config.retry_policy
1704
+
1705
+ @cloud_deploy_stub.call_rpc :get_custom_target_type, request, options: options do |response, operation|
1706
+ yield response, operation if block_given?
1707
+ return response
1708
+ end
1709
+ rescue ::GRPC::BadStatus => e
1710
+ raise ::Google::Cloud::Error.from_error(e)
1711
+ end
1712
+
1713
+ ##
1714
+ # Creates a new CustomTargetType in a given project and location.
1715
+ #
1716
+ # @overload create_custom_target_type(request, options = nil)
1717
+ # Pass arguments to `create_custom_target_type` via a request object, either of type
1718
+ # {::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest} or an equivalent Hash.
1719
+ #
1720
+ # @param request [::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest, ::Hash]
1721
+ # A request object representing the call parameters. Required. To specify no
1722
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1723
+ # @param options [::Gapic::CallOptions, ::Hash]
1724
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1725
+ #
1726
+ # @overload create_custom_target_type(parent: nil, custom_target_type_id: nil, custom_target_type: nil, request_id: nil, validate_only: nil)
1727
+ # Pass arguments to `create_custom_target_type` via keyword arguments. Note that at
1728
+ # least one keyword argument is required. To specify no parameters, or to keep all
1729
+ # the default parameter values, pass an empty Hash as a request object (see above).
1730
+ #
1731
+ # @param parent [::String]
1732
+ # Required. The parent collection in which the `CustomTargetType` should be
1733
+ # created in. Format should be
1734
+ # `projects/{project_id}/locations/{location_name}`.
1735
+ # @param custom_target_type_id [::String]
1736
+ # Required. ID of the `CustomTargetType`.
1737
+ # @param custom_target_type [::Google::Cloud::Deploy::V1::CustomTargetType, ::Hash]
1738
+ # Required. The `CustomTargetType` to create.
1739
+ # @param request_id [::String]
1740
+ # Optional. A request ID to identify requests. Specify a unique request ID
1741
+ # so that if you must retry your request, the server will know to ignore
1742
+ # the request if it has already been completed. The server will guarantee
1743
+ # that for at least 60 minutes since the first request.
1744
+ #
1745
+ # For example, consider a situation where you make an initial request and the
1746
+ # request times out. If you make the request again with the same request ID,
1747
+ # the server can check if original operation with the same request ID was
1748
+ # received, and if so, will ignore the second request. This prevents clients
1749
+ # from accidentally creating duplicate commitments.
1750
+ #
1751
+ # The request ID must be a valid UUID with the exception that zero UUID is
1752
+ # not supported (00000000-0000-0000-0000-000000000000).
1753
+ # @param validate_only [::Boolean]
1754
+ # Optional. If set to true, the request is validated and the user is provided
1755
+ # with an expected result, but no actual change is made.
1756
+ #
1757
+ # @yield [response, operation] Access the result along with the RPC operation
1758
+ # @yieldparam response [::Gapic::Operation]
1759
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1760
+ #
1761
+ # @return [::Gapic::Operation]
1762
+ #
1763
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1764
+ #
1765
+ # @example Basic example
1766
+ # require "google/cloud/deploy/v1"
1767
+ #
1768
+ # # Create a client object. The client can be reused for multiple calls.
1769
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1770
+ #
1771
+ # # Create a request. To set request fields, pass in keyword arguments.
1772
+ # request = Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest.new
1773
+ #
1774
+ # # Call the create_custom_target_type method.
1775
+ # result = client.create_custom_target_type request
1776
+ #
1777
+ # # The returned object is of type Gapic::Operation. You can use it to
1778
+ # # check the status of an operation, cancel it, or wait for results.
1779
+ # # Here is how to wait for a response.
1780
+ # result.wait_until_done! timeout: 60
1781
+ # if result.response?
1782
+ # p result.response
1783
+ # else
1784
+ # puts "No response received."
1785
+ # end
1786
+ #
1787
+ def create_custom_target_type request, options = nil
1788
+ raise ::ArgumentError, "request must be provided" if request.nil?
1789
+
1790
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest
1791
+
1792
+ # Converts hash and nil to an options object
1793
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1794
+
1795
+ # Customize the options with defaults
1796
+ metadata = @config.rpcs.create_custom_target_type.metadata.to_h
1797
+
1798
+ # Set x-goog-api-client and x-goog-user-project headers
1799
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1800
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1801
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1802
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1803
+
1804
+ header_params = {}
1805
+ if request.parent
1806
+ header_params["parent"] = request.parent
1807
+ end
1808
+
1809
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1810
+ metadata[:"x-goog-request-params"] ||= request_params_header
1811
+
1812
+ options.apply_defaults timeout: @config.rpcs.create_custom_target_type.timeout,
1813
+ metadata: metadata,
1814
+ retry_policy: @config.rpcs.create_custom_target_type.retry_policy
1815
+
1816
+ options.apply_defaults timeout: @config.timeout,
1817
+ metadata: @config.metadata,
1818
+ retry_policy: @config.retry_policy
1819
+
1820
+ @cloud_deploy_stub.call_rpc :create_custom_target_type, request, options: options do |response, operation|
1821
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1822
+ yield response, operation if block_given?
1823
+ return response
1824
+ end
1825
+ rescue ::GRPC::BadStatus => e
1826
+ raise ::Google::Cloud::Error.from_error(e)
1827
+ end
1828
+
1829
+ ##
1830
+ # Updates a single CustomTargetType.
1831
+ #
1832
+ # @overload update_custom_target_type(request, options = nil)
1833
+ # Pass arguments to `update_custom_target_type` via a request object, either of type
1834
+ # {::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest} or an equivalent Hash.
1835
+ #
1836
+ # @param request [::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest, ::Hash]
1837
+ # A request object representing the call parameters. Required. To specify no
1838
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1839
+ # @param options [::Gapic::CallOptions, ::Hash]
1840
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1841
+ #
1842
+ # @overload update_custom_target_type(update_mask: nil, custom_target_type: nil, request_id: nil, allow_missing: nil, validate_only: nil)
1843
+ # Pass arguments to `update_custom_target_type` via keyword arguments. Note that at
1844
+ # least one keyword argument is required. To specify no parameters, or to keep all
1845
+ # the default parameter values, pass an empty Hash as a request object (see above).
1846
+ #
1847
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1848
+ # Required. Field mask is used to specify the fields to be overwritten in the
1849
+ # `CustomTargetType` resource by the update.
1850
+ # The fields specified in the update_mask are relative to the resource, not
1851
+ # the full request. A field will be overwritten if it is in the mask. If the
1852
+ # user does not provide a mask then all fields will be overwritten.
1853
+ # @param custom_target_type [::Google::Cloud::Deploy::V1::CustomTargetType, ::Hash]
1854
+ # Required. The `CustomTargetType` to update.
1855
+ # @param request_id [::String]
1856
+ # Optional. A request ID to identify requests. Specify a unique request ID
1857
+ # so that if you must retry your request, the server will know to ignore
1858
+ # the request if it has already been completed. The server will guarantee
1859
+ # that for at least 60 minutes since the first request.
1860
+ #
1861
+ # For example, consider a situation where you make an initial request and the
1862
+ # request times out. If you make the request again with the same request ID,
1863
+ # the server can check if original operation with the same request ID was
1864
+ # received, and if so, will ignore the second request. This prevents clients
1865
+ # from accidentally creating duplicate commitments.
1866
+ #
1867
+ # The request ID must be a valid UUID with the exception that zero UUID is
1868
+ # not supported (00000000-0000-0000-0000-000000000000).
1869
+ # @param allow_missing [::Boolean]
1870
+ # Optional. If set to true, updating a `CustomTargetType` that does not exist
1871
+ # will result in the creation of a new `CustomTargetType`.
1872
+ # @param validate_only [::Boolean]
1873
+ # Optional. If set to true, the request is validated and the user is provided
1874
+ # with an expected result, but no actual change is made.
1875
+ #
1876
+ # @yield [response, operation] Access the result along with the RPC operation
1877
+ # @yieldparam response [::Gapic::Operation]
1878
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1879
+ #
1880
+ # @return [::Gapic::Operation]
1881
+ #
1882
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1883
+ #
1884
+ # @example Basic example
1885
+ # require "google/cloud/deploy/v1"
1886
+ #
1887
+ # # Create a client object. The client can be reused for multiple calls.
1888
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1889
+ #
1890
+ # # Create a request. To set request fields, pass in keyword arguments.
1891
+ # request = Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest.new
1892
+ #
1893
+ # # Call the update_custom_target_type method.
1894
+ # result = client.update_custom_target_type request
1895
+ #
1896
+ # # The returned object is of type Gapic::Operation. You can use it to
1897
+ # # check the status of an operation, cancel it, or wait for results.
1898
+ # # Here is how to wait for a response.
1899
+ # result.wait_until_done! timeout: 60
1900
+ # if result.response?
1901
+ # p result.response
1902
+ # else
1903
+ # puts "No response received."
1904
+ # end
1905
+ #
1906
+ def update_custom_target_type request, options = nil
1907
+ raise ::ArgumentError, "request must be provided" if request.nil?
1908
+
1909
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest
1910
+
1911
+ # Converts hash and nil to an options object
1912
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1913
+
1914
+ # Customize the options with defaults
1915
+ metadata = @config.rpcs.update_custom_target_type.metadata.to_h
1916
+
1917
+ # Set x-goog-api-client and x-goog-user-project headers
1918
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1919
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1920
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1921
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1922
+
1923
+ header_params = {}
1924
+ if request.custom_target_type&.name
1925
+ header_params["custom_target_type.name"] = request.custom_target_type.name
1926
+ end
1927
+
1928
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1929
+ metadata[:"x-goog-request-params"] ||= request_params_header
1930
+
1931
+ options.apply_defaults timeout: @config.rpcs.update_custom_target_type.timeout,
1932
+ metadata: metadata,
1933
+ retry_policy: @config.rpcs.update_custom_target_type.retry_policy
1934
+
1935
+ options.apply_defaults timeout: @config.timeout,
1936
+ metadata: @config.metadata,
1937
+ retry_policy: @config.retry_policy
1938
+
1939
+ @cloud_deploy_stub.call_rpc :update_custom_target_type, request, options: options do |response, operation|
1940
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1941
+ yield response, operation if block_given?
1942
+ return response
1943
+ end
1944
+ rescue ::GRPC::BadStatus => e
1945
+ raise ::Google::Cloud::Error.from_error(e)
1946
+ end
1947
+
1948
+ ##
1949
+ # Deletes a single CustomTargetType.
1950
+ #
1951
+ # @overload delete_custom_target_type(request, options = nil)
1952
+ # Pass arguments to `delete_custom_target_type` via a request object, either of type
1953
+ # {::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest} or an equivalent Hash.
1954
+ #
1955
+ # @param request [::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest, ::Hash]
1956
+ # A request object representing the call parameters. Required. To specify no
1957
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1958
+ # @param options [::Gapic::CallOptions, ::Hash]
1959
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1960
+ #
1961
+ # @overload delete_custom_target_type(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil)
1962
+ # Pass arguments to `delete_custom_target_type` via keyword arguments. Note that at
1963
+ # least one keyword argument is required. To specify no parameters, or to keep all
1964
+ # the default parameter values, pass an empty Hash as a request object (see above).
1965
+ #
1966
+ # @param name [::String]
1967
+ # Required. The name of the `CustomTargetType` to delete. Format must be
1968
+ # `projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.
1969
+ # @param request_id [::String]
1970
+ # Optional. A request ID to identify requests. Specify a unique request ID
1971
+ # so that if you must retry your request, the server will know to ignore
1972
+ # the request if it has already been completed. The server will guarantee
1973
+ # that for at least 60 minutes after the first request.
1974
+ #
1975
+ # For example, consider a situation where you make an initial request and the
1976
+ # request times out. If you make the request again with the same request ID,
1977
+ # the server can check if original operation with the same request ID was
1978
+ # received, and if so, will ignore the second request. This prevents clients
1979
+ # from accidentally creating duplicate commitments.
1980
+ #
1981
+ # The request ID must be a valid UUID with the exception that zero UUID is
1982
+ # not supported (00000000-0000-0000-0000-000000000000).
1983
+ # @param allow_missing [::Boolean]
1984
+ # Optional. If set to true, then deleting an already deleted or non-existing
1985
+ # `CustomTargetType` will succeed.
1986
+ # @param validate_only [::Boolean]
1987
+ # Optional. If set to true, the request is validated but no actual change is
1988
+ # made.
1989
+ # @param etag [::String]
1990
+ # Optional. This checksum is computed by the server based on the value of
1991
+ # other fields, and may be sent on update and delete requests to ensure the
1992
+ # client has an up-to-date value before proceeding.
1993
+ #
1994
+ # @yield [response, operation] Access the result along with the RPC operation
1995
+ # @yieldparam response [::Gapic::Operation]
1996
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1997
+ #
1998
+ # @return [::Gapic::Operation]
1999
+ #
2000
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2001
+ #
2002
+ # @example Basic example
2003
+ # require "google/cloud/deploy/v1"
2004
+ #
2005
+ # # Create a client object. The client can be reused for multiple calls.
2006
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
2007
+ #
2008
+ # # Create a request. To set request fields, pass in keyword arguments.
2009
+ # request = Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest.new
2010
+ #
2011
+ # # Call the delete_custom_target_type method.
2012
+ # result = client.delete_custom_target_type request
2013
+ #
2014
+ # # The returned object is of type Gapic::Operation. You can use it to
2015
+ # # check the status of an operation, cancel it, or wait for results.
2016
+ # # Here is how to wait for a response.
2017
+ # result.wait_until_done! timeout: 60
2018
+ # if result.response?
2019
+ # p result.response
2020
+ # else
2021
+ # puts "No response received."
2022
+ # end
2023
+ #
2024
+ def delete_custom_target_type request, options = nil
2025
+ raise ::ArgumentError, "request must be provided" if request.nil?
2026
+
2027
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest
2028
+
2029
+ # Converts hash and nil to an options object
2030
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2031
+
2032
+ # Customize the options with defaults
2033
+ metadata = @config.rpcs.delete_custom_target_type.metadata.to_h
2034
+
2035
+ # Set x-goog-api-client and x-goog-user-project headers
2036
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2037
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2038
+ gapic_version: ::Google::Cloud::Deploy::V1::VERSION
2039
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2040
+
2041
+ header_params = {}
2042
+ if request.name
2043
+ header_params["name"] = request.name
2044
+ end
2045
+
2046
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2047
+ metadata[:"x-goog-request-params"] ||= request_params_header
2048
+
2049
+ options.apply_defaults timeout: @config.rpcs.delete_custom_target_type.timeout,
2050
+ metadata: metadata,
2051
+ retry_policy: @config.rpcs.delete_custom_target_type.retry_policy
2052
+
2053
+ options.apply_defaults timeout: @config.timeout,
2054
+ metadata: @config.metadata,
2055
+ retry_policy: @config.retry_policy
2056
+
2057
+ @cloud_deploy_stub.call_rpc :delete_custom_target_type, request, options: options do |response, operation|
2058
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2059
+ yield response, operation if block_given?
2060
+ return response
2061
+ end
2062
+ rescue ::GRPC::BadStatus => e
2063
+ raise ::Google::Cloud::Error.from_error(e)
2064
+ end
2065
+
1503
2066
  ##
1504
2067
  # Lists Releases in a given project and location.
1505
2068
  #
@@ -3473,8 +4036,8 @@ module Google
3473
4036
  # the default parameter values, pass an empty Hash as a request object (see above).
3474
4037
  #
3475
4038
  # @param parent [::String]
3476
- # Required. The parent, which owns this collection of automations. Format
3477
- # must be
4039
+ # Required. The parent `Delivery Pipeline`, which owns this collection of
4040
+ # automations. Format must be
3478
4041
  # `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
3479
4042
  # @param page_size [::Integer]
3480
4043
  # The maximum number of automations to return. The service may return
@@ -3667,8 +4230,8 @@ module Google
3667
4230
  # the default parameter values, pass an empty Hash as a request object (see above).
3668
4231
  #
3669
4232
  # @param parent [::String]
3670
- # Required. The parent, which owns this collection of automationRuns. Format
3671
- # must be
4233
+ # Required. The parent `Delivery Pipeline`, which owns this collection of
4234
+ # automationRuns. Format must be
3672
4235
  # `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
3673
4236
  # @param page_size [::Integer]
3674
4237
  # The maximum number of automationRuns to return. The service may return
@@ -4046,6 +4609,31 @@ module Google
4046
4609
  #
4047
4610
  attr_reader :delete_target
4048
4611
  ##
4612
+ # RPC-specific configuration for `list_custom_target_types`
4613
+ # @return [::Gapic::Config::Method]
4614
+ #
4615
+ attr_reader :list_custom_target_types
4616
+ ##
4617
+ # RPC-specific configuration for `get_custom_target_type`
4618
+ # @return [::Gapic::Config::Method]
4619
+ #
4620
+ attr_reader :get_custom_target_type
4621
+ ##
4622
+ # RPC-specific configuration for `create_custom_target_type`
4623
+ # @return [::Gapic::Config::Method]
4624
+ #
4625
+ attr_reader :create_custom_target_type
4626
+ ##
4627
+ # RPC-specific configuration for `update_custom_target_type`
4628
+ # @return [::Gapic::Config::Method]
4629
+ #
4630
+ attr_reader :update_custom_target_type
4631
+ ##
4632
+ # RPC-specific configuration for `delete_custom_target_type`
4633
+ # @return [::Gapic::Config::Method]
4634
+ #
4635
+ attr_reader :delete_custom_target_type
4636
+ ##
4049
4637
  # RPC-specific configuration for `list_releases`
4050
4638
  # @return [::Gapic::Config::Method]
4051
4639
  #
@@ -4190,6 +4778,16 @@ module Google
4190
4778
  @update_target = ::Gapic::Config::Method.new update_target_config
4191
4779
  delete_target_config = parent_rpcs.delete_target if parent_rpcs.respond_to? :delete_target
4192
4780
  @delete_target = ::Gapic::Config::Method.new delete_target_config
4781
+ list_custom_target_types_config = parent_rpcs.list_custom_target_types if parent_rpcs.respond_to? :list_custom_target_types
4782
+ @list_custom_target_types = ::Gapic::Config::Method.new list_custom_target_types_config
4783
+ get_custom_target_type_config = parent_rpcs.get_custom_target_type if parent_rpcs.respond_to? :get_custom_target_type
4784
+ @get_custom_target_type = ::Gapic::Config::Method.new get_custom_target_type_config
4785
+ create_custom_target_type_config = parent_rpcs.create_custom_target_type if parent_rpcs.respond_to? :create_custom_target_type
4786
+ @create_custom_target_type = ::Gapic::Config::Method.new create_custom_target_type_config
4787
+ update_custom_target_type_config = parent_rpcs.update_custom_target_type if parent_rpcs.respond_to? :update_custom_target_type
4788
+ @update_custom_target_type = ::Gapic::Config::Method.new update_custom_target_type_config
4789
+ delete_custom_target_type_config = parent_rpcs.delete_custom_target_type if parent_rpcs.respond_to? :delete_custom_target_type
4790
+ @delete_custom_target_type = ::Gapic::Config::Method.new delete_custom_target_type_config
4193
4791
  list_releases_config = parent_rpcs.list_releases if parent_rpcs.respond_to? :list_releases
4194
4792
  @list_releases = ::Gapic::Config::Method.new list_releases_config
4195
4793
  get_release_config = parent_rpcs.get_release if parent_rpcs.respond_to? :get_release