google-cloud-vmware_engine-v1 0.3.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,6 +93,13 @@ module Google
93
93
  initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
94
  }
95
95
 
96
+ default_config.rpcs.get_subnet.timeout = 120.0
97
+ default_config.rpcs.get_subnet.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.update_subnet.timeout = 60.0
102
+
96
103
  default_config.rpcs.list_node_types.timeout = 120.0
97
104
  default_config.rpcs.list_node_types.retry_policy = {
98
105
  initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
@@ -143,6 +150,21 @@ module Google
143
150
  initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
144
151
  }
145
152
 
153
+ default_config.rpcs.get_private_connection.timeout = 120.0
154
+ default_config.rpcs.get_private_connection.retry_policy = {
155
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
156
+ }
157
+
158
+ default_config.rpcs.list_private_connections.timeout = 120.0
159
+ default_config.rpcs.list_private_connections.retry_policy = {
160
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
161
+ }
162
+
163
+ default_config.rpcs.list_private_connection_peering_routes.timeout = 120.0
164
+ default_config.rpcs.list_private_connection_peering_routes.retry_policy = {
165
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
166
+ }
167
+
146
168
  default_config
147
169
  end
148
170
  yield @configure if block_given?
@@ -235,7 +257,8 @@ module Google
235
257
  credentials: credentials,
236
258
  endpoint: @config.endpoint,
237
259
  channel_args: @config.channel_args,
238
- interceptors: @config.interceptors
260
+ interceptors: @config.interceptors,
261
+ channel_pool_config: @config.channel_pool
239
262
  )
240
263
  end
241
264
 
@@ -1608,6 +1631,199 @@ module Google
1608
1631
  raise ::Google::Cloud::Error.from_error(e)
1609
1632
  end
1610
1633
 
1634
+ ##
1635
+ # Gets details of a single subnet.
1636
+ #
1637
+ # @overload get_subnet(request, options = nil)
1638
+ # Pass arguments to `get_subnet` via a request object, either of type
1639
+ # {::Google::Cloud::VmwareEngine::V1::GetSubnetRequest} or an equivalent Hash.
1640
+ #
1641
+ # @param request [::Google::Cloud::VmwareEngine::V1::GetSubnetRequest, ::Hash]
1642
+ # A request object representing the call parameters. Required. To specify no
1643
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1644
+ # @param options [::Gapic::CallOptions, ::Hash]
1645
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1646
+ #
1647
+ # @overload get_subnet(name: nil)
1648
+ # Pass arguments to `get_subnet` via keyword arguments. Note that at
1649
+ # least one keyword argument is required. To specify no parameters, or to keep all
1650
+ # the default parameter values, pass an empty Hash as a request object (see above).
1651
+ #
1652
+ # @param name [::String]
1653
+ # Required. The resource name of the subnet to retrieve.
1654
+ # Resource names are schemeless URIs that follow the conventions in
1655
+ # https://cloud.google.com/apis/design/resource_names.
1656
+ # For example:
1657
+ # `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
1658
+ #
1659
+ # @yield [response, operation] Access the result along with the RPC operation
1660
+ # @yieldparam response [::Google::Cloud::VmwareEngine::V1::Subnet]
1661
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1662
+ #
1663
+ # @return [::Google::Cloud::VmwareEngine::V1::Subnet]
1664
+ #
1665
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1666
+ #
1667
+ # @example Basic example
1668
+ # require "google/cloud/vmware_engine/v1"
1669
+ #
1670
+ # # Create a client object. The client can be reused for multiple calls.
1671
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
1672
+ #
1673
+ # # Create a request. To set request fields, pass in keyword arguments.
1674
+ # request = Google::Cloud::VmwareEngine::V1::GetSubnetRequest.new
1675
+ #
1676
+ # # Call the get_subnet method.
1677
+ # result = client.get_subnet request
1678
+ #
1679
+ # # The returned object is of type Google::Cloud::VmwareEngine::V1::Subnet.
1680
+ # p result
1681
+ #
1682
+ def get_subnet request, options = nil
1683
+ raise ::ArgumentError, "request must be provided" if request.nil?
1684
+
1685
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::GetSubnetRequest
1686
+
1687
+ # Converts hash and nil to an options object
1688
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1689
+
1690
+ # Customize the options with defaults
1691
+ metadata = @config.rpcs.get_subnet.metadata.to_h
1692
+
1693
+ # Set x-goog-api-client and x-goog-user-project headers
1694
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1695
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1696
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
1697
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1698
+
1699
+ header_params = {}
1700
+ if request.name
1701
+ header_params["name"] = request.name
1702
+ end
1703
+
1704
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1705
+ metadata[:"x-goog-request-params"] ||= request_params_header
1706
+
1707
+ options.apply_defaults timeout: @config.rpcs.get_subnet.timeout,
1708
+ metadata: metadata,
1709
+ retry_policy: @config.rpcs.get_subnet.retry_policy
1710
+
1711
+ options.apply_defaults timeout: @config.timeout,
1712
+ metadata: @config.metadata,
1713
+ retry_policy: @config.retry_policy
1714
+
1715
+ @vmware_engine_stub.call_rpc :get_subnet, request, options: options do |response, operation|
1716
+ yield response, operation if block_given?
1717
+ return response
1718
+ end
1719
+ rescue ::GRPC::BadStatus => e
1720
+ raise ::Google::Cloud::Error.from_error(e)
1721
+ end
1722
+
1723
+ ##
1724
+ # Updates the parameters of a single subnet. Only fields specified in
1725
+ # `update_mask` are applied.
1726
+ #
1727
+ # *Note*: This API is synchronous and always returns a successful
1728
+ # `google.longrunning.Operation` (LRO). The returned LRO will only have
1729
+ # `done` and `response` fields.
1730
+ #
1731
+ # @overload update_subnet(request, options = nil)
1732
+ # Pass arguments to `update_subnet` via a request object, either of type
1733
+ # {::Google::Cloud::VmwareEngine::V1::UpdateSubnetRequest} or an equivalent Hash.
1734
+ #
1735
+ # @param request [::Google::Cloud::VmwareEngine::V1::UpdateSubnetRequest, ::Hash]
1736
+ # A request object representing the call parameters. Required. To specify no
1737
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1738
+ # @param options [::Gapic::CallOptions, ::Hash]
1739
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1740
+ #
1741
+ # @overload update_subnet(update_mask: nil, subnet: nil)
1742
+ # Pass arguments to `update_subnet` via keyword arguments. Note that at
1743
+ # least one keyword argument is required. To specify no parameters, or to keep all
1744
+ # the default parameter values, pass an empty Hash as a request object (see above).
1745
+ #
1746
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1747
+ # Required. Field mask is used to specify the fields to be overwritten in the
1748
+ # `Subnet` resource by the update.
1749
+ # The fields specified in the `update_mask` are relative to the resource, not
1750
+ # the full request. A field will be overwritten if it is in the mask. If the
1751
+ # user does not provide a mask then all fields will be overwritten.
1752
+ # @param subnet [::Google::Cloud::VmwareEngine::V1::Subnet, ::Hash]
1753
+ # Required. Subnet description.
1754
+ #
1755
+ # @yield [response, operation] Access the result along with the RPC operation
1756
+ # @yieldparam response [::Gapic::Operation]
1757
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1758
+ #
1759
+ # @return [::Gapic::Operation]
1760
+ #
1761
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1762
+ #
1763
+ # @example Basic example
1764
+ # require "google/cloud/vmware_engine/v1"
1765
+ #
1766
+ # # Create a client object. The client can be reused for multiple calls.
1767
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
1768
+ #
1769
+ # # Create a request. To set request fields, pass in keyword arguments.
1770
+ # request = Google::Cloud::VmwareEngine::V1::UpdateSubnetRequest.new
1771
+ #
1772
+ # # Call the update_subnet method.
1773
+ # result = client.update_subnet request
1774
+ #
1775
+ # # The returned object is of type Gapic::Operation. You can use it to
1776
+ # # check the status of an operation, cancel it, or wait for results.
1777
+ # # Here is how to wait for a response.
1778
+ # result.wait_until_done! timeout: 60
1779
+ # if result.response?
1780
+ # p result.response
1781
+ # else
1782
+ # puts "No response received."
1783
+ # end
1784
+ #
1785
+ def update_subnet request, options = nil
1786
+ raise ::ArgumentError, "request must be provided" if request.nil?
1787
+
1788
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::UpdateSubnetRequest
1789
+
1790
+ # Converts hash and nil to an options object
1791
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1792
+
1793
+ # Customize the options with defaults
1794
+ metadata = @config.rpcs.update_subnet.metadata.to_h
1795
+
1796
+ # Set x-goog-api-client and x-goog-user-project headers
1797
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1798
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1799
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
1800
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1801
+
1802
+ header_params = {}
1803
+ if request.subnet&.name
1804
+ header_params["subnet.name"] = request.subnet.name
1805
+ end
1806
+
1807
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1808
+ metadata[:"x-goog-request-params"] ||= request_params_header
1809
+
1810
+ options.apply_defaults timeout: @config.rpcs.update_subnet.timeout,
1811
+ metadata: metadata,
1812
+ retry_policy: @config.rpcs.update_subnet.retry_policy
1813
+
1814
+ options.apply_defaults timeout: @config.timeout,
1815
+ metadata: @config.metadata,
1816
+ retry_policy: @config.retry_policy
1817
+
1818
+ @vmware_engine_stub.call_rpc :update_subnet, request, options: options do |response, operation|
1819
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1820
+ yield response, operation if block_given?
1821
+ return response
1822
+ end
1823
+ rescue ::GRPC::BadStatus => e
1824
+ raise ::Google::Cloud::Error.from_error(e)
1825
+ end
1826
+
1611
1827
  ##
1612
1828
  # Lists node types
1613
1829
  #
@@ -3749,51 +3965,738 @@ module Google
3749
3965
  end
3750
3966
 
3751
3967
  ##
3752
- # Configuration class for the VmwareEngine API.
3968
+ # Creates a new private connection that can be used for accessing private
3969
+ # Clouds.
3753
3970
  #
3754
- # This class represents the configuration for VmwareEngine,
3755
- # providing control over timeouts, retry behavior, logging, transport
3756
- # parameters, and other low-level controls. Certain parameters can also be
3757
- # applied individually to specific RPCs. See
3758
- # {::Google::Cloud::VmwareEngine::V1::VmwareEngine::Client::Configuration::Rpcs}
3759
- # for a list of RPCs that can be configured independently.
3971
+ # @overload create_private_connection(request, options = nil)
3972
+ # Pass arguments to `create_private_connection` via a request object, either of type
3973
+ # {::Google::Cloud::VmwareEngine::V1::CreatePrivateConnectionRequest} or an equivalent Hash.
3760
3974
  #
3761
- # Configuration can be applied globally to all clients, or to a single client
3762
- # on construction.
3975
+ # @param request [::Google::Cloud::VmwareEngine::V1::CreatePrivateConnectionRequest, ::Hash]
3976
+ # A request object representing the call parameters. Required. To specify no
3977
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3978
+ # @param options [::Gapic::CallOptions, ::Hash]
3979
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3763
3980
  #
3764
- # @example
3981
+ # @overload create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil)
3982
+ # Pass arguments to `create_private_connection` via keyword arguments. Note that at
3983
+ # least one keyword argument is required. To specify no parameters, or to keep all
3984
+ # the default parameter values, pass an empty Hash as a request object (see above).
3765
3985
  #
3766
- # # Modify the global config, setting the timeout for
3767
- # # list_private_clouds to 20 seconds,
3768
- # # and all remaining timeouts to 10 seconds.
3769
- # ::Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.configure do |config|
3770
- # config.timeout = 10.0
3771
- # config.rpcs.list_private_clouds.timeout = 20.0
3772
- # end
3986
+ # @param parent [::String]
3987
+ # Required. The resource name of the location to create the new private
3988
+ # connection in. Private connection is a regional resource.
3989
+ # Resource names are schemeless URIs that follow the conventions in
3990
+ # https://cloud.google.com/apis/design/resource_names. For example:
3991
+ # `projects/my-project/locations/us-central1`
3992
+ # @param private_connection_id [::String]
3993
+ # Required. The user-provided identifier of the new private connection.
3994
+ # This identifier must be unique among private connection resources
3995
+ # within the parent and becomes the final token in the name URI. The
3996
+ # identifier must meet the following requirements:
3773
3997
  #
3774
- # # Apply the above configuration only to a new client.
3775
- # client = ::Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new do |config|
3776
- # config.timeout = 10.0
3777
- # config.rpcs.list_private_clouds.timeout = 20.0
3998
+ # * Only contains 1-63 alphanumeric characters and hyphens
3999
+ # * Begins with an alphabetical character
4000
+ # * Ends with a non-hyphen character
4001
+ # * Not formatted as a UUID
4002
+ # * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4003
+ # (section 3.5)
4004
+ # @param private_connection [::Google::Cloud::VmwareEngine::V1::PrivateConnection, ::Hash]
4005
+ # Required. The initial description of the new private connection.
4006
+ # @param request_id [::String]
4007
+ # Optional. A request ID to identify requests. Specify a unique request ID
4008
+ # so that if you must retry your request, the server will know to ignore
4009
+ # the request if it has already been completed. The server guarantees that a
4010
+ # request doesn't result in creation of duplicate commitments for at least 60
4011
+ # minutes.
4012
+ #
4013
+ # For example, consider a situation where you make an initial request and the
4014
+ # request times out. If you make the request again with the same request
4015
+ # ID, the server can check if original operation with the same request ID
4016
+ # was received, and if so, will ignore the second request. This prevents
4017
+ # clients from accidentally creating duplicate commitments.
4018
+ #
4019
+ # The request ID must be a valid UUID with the exception that zero UUID is
4020
+ # not supported (00000000-0000-0000-0000-000000000000).
4021
+ #
4022
+ # @yield [response, operation] Access the result along with the RPC operation
4023
+ # @yieldparam response [::Gapic::Operation]
4024
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4025
+ #
4026
+ # @return [::Gapic::Operation]
4027
+ #
4028
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4029
+ #
4030
+ # @example Basic example
4031
+ # require "google/cloud/vmware_engine/v1"
4032
+ #
4033
+ # # Create a client object. The client can be reused for multiple calls.
4034
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
4035
+ #
4036
+ # # Create a request. To set request fields, pass in keyword arguments.
4037
+ # request = Google::Cloud::VmwareEngine::V1::CreatePrivateConnectionRequest.new
4038
+ #
4039
+ # # Call the create_private_connection method.
4040
+ # result = client.create_private_connection request
4041
+ #
4042
+ # # The returned object is of type Gapic::Operation. You can use it to
4043
+ # # check the status of an operation, cancel it, or wait for results.
4044
+ # # Here is how to wait for a response.
4045
+ # result.wait_until_done! timeout: 60
4046
+ # if result.response?
4047
+ # p result.response
4048
+ # else
4049
+ # puts "No response received."
3778
4050
  # end
3779
4051
  #
3780
- # @!attribute [rw] endpoint
3781
- # The hostname or hostname:port of the service endpoint.
3782
- # Defaults to `"vmwareengine.googleapis.com"`.
3783
- # @return [::String]
3784
- # @!attribute [rw] credentials
3785
- # Credentials to send with calls. You may provide any of the following types:
3786
- # * (`String`) The path to a service account key file in JSON format
3787
- # * (`Hash`) A service account key as a Hash
3788
- # * (`Google::Auth::Credentials`) A googleauth credentials object
3789
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3790
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3791
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3792
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3793
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3794
- # * (`nil`) indicating no credentials
3795
- # @return [::Object]
3796
- # @!attribute [rw] scope
4052
+ def create_private_connection request, options = nil
4053
+ raise ::ArgumentError, "request must be provided" if request.nil?
4054
+
4055
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::CreatePrivateConnectionRequest
4056
+
4057
+ # Converts hash and nil to an options object
4058
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4059
+
4060
+ # Customize the options with defaults
4061
+ metadata = @config.rpcs.create_private_connection.metadata.to_h
4062
+
4063
+ # Set x-goog-api-client and x-goog-user-project headers
4064
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4065
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4066
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
4067
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4068
+
4069
+ header_params = {}
4070
+ if request.parent
4071
+ header_params["parent"] = request.parent
4072
+ end
4073
+
4074
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4075
+ metadata[:"x-goog-request-params"] ||= request_params_header
4076
+
4077
+ options.apply_defaults timeout: @config.rpcs.create_private_connection.timeout,
4078
+ metadata: metadata,
4079
+ retry_policy: @config.rpcs.create_private_connection.retry_policy
4080
+
4081
+ options.apply_defaults timeout: @config.timeout,
4082
+ metadata: @config.metadata,
4083
+ retry_policy: @config.retry_policy
4084
+
4085
+ @vmware_engine_stub.call_rpc :create_private_connection, request, options: options do |response, operation|
4086
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4087
+ yield response, operation if block_given?
4088
+ return response
4089
+ end
4090
+ rescue ::GRPC::BadStatus => e
4091
+ raise ::Google::Cloud::Error.from_error(e)
4092
+ end
4093
+
4094
+ ##
4095
+ # Retrieves a `PrivateConnection` resource by its resource name. The resource
4096
+ # contains details of the private connection, such as connected
4097
+ # network, routing mode and state.
4098
+ #
4099
+ # @overload get_private_connection(request, options = nil)
4100
+ # Pass arguments to `get_private_connection` via a request object, either of type
4101
+ # {::Google::Cloud::VmwareEngine::V1::GetPrivateConnectionRequest} or an equivalent Hash.
4102
+ #
4103
+ # @param request [::Google::Cloud::VmwareEngine::V1::GetPrivateConnectionRequest, ::Hash]
4104
+ # A request object representing the call parameters. Required. To specify no
4105
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4106
+ # @param options [::Gapic::CallOptions, ::Hash]
4107
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4108
+ #
4109
+ # @overload get_private_connection(name: nil)
4110
+ # Pass arguments to `get_private_connection` via keyword arguments. Note that at
4111
+ # least one keyword argument is required. To specify no parameters, or to keep all
4112
+ # the default parameter values, pass an empty Hash as a request object (see above).
4113
+ #
4114
+ # @param name [::String]
4115
+ # Required. The resource name of the private connection to retrieve.
4116
+ # Resource names are schemeless URIs that follow the conventions in
4117
+ # https://cloud.google.com/apis/design/resource_names.
4118
+ # For example:
4119
+ # `projects/my-project/locations/us-central1/privateConnections/my-connection`
4120
+ #
4121
+ # @yield [response, operation] Access the result along with the RPC operation
4122
+ # @yieldparam response [::Google::Cloud::VmwareEngine::V1::PrivateConnection]
4123
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4124
+ #
4125
+ # @return [::Google::Cloud::VmwareEngine::V1::PrivateConnection]
4126
+ #
4127
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4128
+ #
4129
+ # @example Basic example
4130
+ # require "google/cloud/vmware_engine/v1"
4131
+ #
4132
+ # # Create a client object. The client can be reused for multiple calls.
4133
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
4134
+ #
4135
+ # # Create a request. To set request fields, pass in keyword arguments.
4136
+ # request = Google::Cloud::VmwareEngine::V1::GetPrivateConnectionRequest.new
4137
+ #
4138
+ # # Call the get_private_connection method.
4139
+ # result = client.get_private_connection request
4140
+ #
4141
+ # # The returned object is of type Google::Cloud::VmwareEngine::V1::PrivateConnection.
4142
+ # p result
4143
+ #
4144
+ def get_private_connection request, options = nil
4145
+ raise ::ArgumentError, "request must be provided" if request.nil?
4146
+
4147
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::GetPrivateConnectionRequest
4148
+
4149
+ # Converts hash and nil to an options object
4150
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4151
+
4152
+ # Customize the options with defaults
4153
+ metadata = @config.rpcs.get_private_connection.metadata.to_h
4154
+
4155
+ # Set x-goog-api-client and x-goog-user-project headers
4156
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4157
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4158
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
4159
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4160
+
4161
+ header_params = {}
4162
+ if request.name
4163
+ header_params["name"] = request.name
4164
+ end
4165
+
4166
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4167
+ metadata[:"x-goog-request-params"] ||= request_params_header
4168
+
4169
+ options.apply_defaults timeout: @config.rpcs.get_private_connection.timeout,
4170
+ metadata: metadata,
4171
+ retry_policy: @config.rpcs.get_private_connection.retry_policy
4172
+
4173
+ options.apply_defaults timeout: @config.timeout,
4174
+ metadata: @config.metadata,
4175
+ retry_policy: @config.retry_policy
4176
+
4177
+ @vmware_engine_stub.call_rpc :get_private_connection, request, options: options do |response, operation|
4178
+ yield response, operation if block_given?
4179
+ return response
4180
+ end
4181
+ rescue ::GRPC::BadStatus => e
4182
+ raise ::Google::Cloud::Error.from_error(e)
4183
+ end
4184
+
4185
+ ##
4186
+ # Lists `PrivateConnection` resources in a given project and location.
4187
+ #
4188
+ # @overload list_private_connections(request, options = nil)
4189
+ # Pass arguments to `list_private_connections` via a request object, either of type
4190
+ # {::Google::Cloud::VmwareEngine::V1::ListPrivateConnectionsRequest} or an equivalent Hash.
4191
+ #
4192
+ # @param request [::Google::Cloud::VmwareEngine::V1::ListPrivateConnectionsRequest, ::Hash]
4193
+ # A request object representing the call parameters. Required. To specify no
4194
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4195
+ # @param options [::Gapic::CallOptions, ::Hash]
4196
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4197
+ #
4198
+ # @overload list_private_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
4199
+ # Pass arguments to `list_private_connections` via keyword arguments. Note that at
4200
+ # least one keyword argument is required. To specify no parameters, or to keep all
4201
+ # the default parameter values, pass an empty Hash as a request object (see above).
4202
+ #
4203
+ # @param parent [::String]
4204
+ # Required. The resource name of the location to query for
4205
+ # private connections. Resource names are schemeless URIs that follow the
4206
+ # conventions in https://cloud.google.com/apis/design/resource_names. For
4207
+ # example: `projects/my-project/locations/us-central1`
4208
+ # @param page_size [::Integer]
4209
+ # The maximum number of private connections to return in one page.
4210
+ # The maximum value is coerced to 1000.
4211
+ # The default value of this field is 500.
4212
+ # @param page_token [::String]
4213
+ # A page token, received from a previous `ListPrivateConnections` call.
4214
+ # Provide this to retrieve the subsequent page.
4215
+ #
4216
+ # When paginating, all other parameters provided to
4217
+ # `ListPrivateConnections` must match the call that provided the page
4218
+ # token.
4219
+ # @param filter [::String]
4220
+ # A filter expression that matches resources returned in the response.
4221
+ # The expression must specify the field name, a comparison
4222
+ # operator, and the value that you want to use for filtering. The value
4223
+ # must be a string, a number, or a boolean. The comparison operator
4224
+ # must be `=`, `!=`, `>`, or `<`.
4225
+ #
4226
+ # For example, if you are filtering a list of private connections, you can
4227
+ # exclude the ones named `example-connection` by specifying
4228
+ # `name != "example-connection"`.
4229
+ #
4230
+ # To filter on multiple expressions, provide each separate expression within
4231
+ # parentheses. For example:
4232
+ # ```
4233
+ # (name = "example-connection")
4234
+ # (createTime > "2022-09-22T08:15:10.40Z")
4235
+ # ```
4236
+ #
4237
+ # By default, each expression is an `AND` expression. However, you
4238
+ # can include `AND` and `OR` expressions explicitly.
4239
+ # For example:
4240
+ # ```
4241
+ # (name = "example-connection-1") AND
4242
+ # (createTime > "2021-04-12T08:15:10.40Z") OR
4243
+ # (name = "example-connection-2")
4244
+ # ```
4245
+ # @param order_by [::String]
4246
+ # Sorts list results by a certain order. By default, returned results
4247
+ # are ordered by `name` in ascending order.
4248
+ # You can also sort results in descending order based on the `name` value
4249
+ # using `orderBy="name desc"`.
4250
+ # Currently, only ordering by `name` is supported.
4251
+ #
4252
+ # @yield [response, operation] Access the result along with the RPC operation
4253
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VmwareEngine::V1::PrivateConnection>]
4254
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4255
+ #
4256
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::VmwareEngine::V1::PrivateConnection>]
4257
+ #
4258
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4259
+ #
4260
+ # @example Basic example
4261
+ # require "google/cloud/vmware_engine/v1"
4262
+ #
4263
+ # # Create a client object. The client can be reused for multiple calls.
4264
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
4265
+ #
4266
+ # # Create a request. To set request fields, pass in keyword arguments.
4267
+ # request = Google::Cloud::VmwareEngine::V1::ListPrivateConnectionsRequest.new
4268
+ #
4269
+ # # Call the list_private_connections method.
4270
+ # result = client.list_private_connections request
4271
+ #
4272
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4273
+ # # over elements, and API calls will be issued to fetch pages as needed.
4274
+ # result.each do |item|
4275
+ # # Each element is of type ::Google::Cloud::VmwareEngine::V1::PrivateConnection.
4276
+ # p item
4277
+ # end
4278
+ #
4279
+ def list_private_connections request, options = nil
4280
+ raise ::ArgumentError, "request must be provided" if request.nil?
4281
+
4282
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::ListPrivateConnectionsRequest
4283
+
4284
+ # Converts hash and nil to an options object
4285
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4286
+
4287
+ # Customize the options with defaults
4288
+ metadata = @config.rpcs.list_private_connections.metadata.to_h
4289
+
4290
+ # Set x-goog-api-client and x-goog-user-project headers
4291
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4292
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4293
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
4294
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4295
+
4296
+ header_params = {}
4297
+ if request.parent
4298
+ header_params["parent"] = request.parent
4299
+ end
4300
+
4301
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4302
+ metadata[:"x-goog-request-params"] ||= request_params_header
4303
+
4304
+ options.apply_defaults timeout: @config.rpcs.list_private_connections.timeout,
4305
+ metadata: metadata,
4306
+ retry_policy: @config.rpcs.list_private_connections.retry_policy
4307
+
4308
+ options.apply_defaults timeout: @config.timeout,
4309
+ metadata: @config.metadata,
4310
+ retry_policy: @config.retry_policy
4311
+
4312
+ @vmware_engine_stub.call_rpc :list_private_connections, request, options: options do |response, operation|
4313
+ response = ::Gapic::PagedEnumerable.new @vmware_engine_stub, :list_private_connections, request, response, operation, options
4314
+ yield response, operation if block_given?
4315
+ return response
4316
+ end
4317
+ rescue ::GRPC::BadStatus => e
4318
+ raise ::Google::Cloud::Error.from_error(e)
4319
+ end
4320
+
4321
+ ##
4322
+ # Modifies a `PrivateConnection` resource. Only `description` and
4323
+ # `routing_mode` fields can be updated. Only fields specified in `updateMask`
4324
+ # are applied.
4325
+ #
4326
+ # @overload update_private_connection(request, options = nil)
4327
+ # Pass arguments to `update_private_connection` via a request object, either of type
4328
+ # {::Google::Cloud::VmwareEngine::V1::UpdatePrivateConnectionRequest} or an equivalent Hash.
4329
+ #
4330
+ # @param request [::Google::Cloud::VmwareEngine::V1::UpdatePrivateConnectionRequest, ::Hash]
4331
+ # A request object representing the call parameters. Required. To specify no
4332
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4333
+ # @param options [::Gapic::CallOptions, ::Hash]
4334
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4335
+ #
4336
+ # @overload update_private_connection(private_connection: nil, update_mask: nil, request_id: nil)
4337
+ # Pass arguments to `update_private_connection` via keyword arguments. Note that at
4338
+ # least one keyword argument is required. To specify no parameters, or to keep all
4339
+ # the default parameter values, pass an empty Hash as a request object (see above).
4340
+ #
4341
+ # @param private_connection [::Google::Cloud::VmwareEngine::V1::PrivateConnection, ::Hash]
4342
+ # Required. Private connection description.
4343
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4344
+ # Required. Field mask is used to specify the fields to be overwritten in the
4345
+ # `PrivateConnection` resource by the update.
4346
+ # The fields specified in the `update_mask` are relative to the resource, not
4347
+ # the full request. A field will be overwritten if it is in the mask. If the
4348
+ # user does not provide a mask then all fields will be overwritten.
4349
+ # @param request_id [::String]
4350
+ # Optional. A request ID to identify requests. Specify a unique request ID
4351
+ # so that if you must retry your request, the server will know to ignore
4352
+ # the request if it has already been completed. The server guarantees that a
4353
+ # request doesn't result in creation of duplicate commitments for at least 60
4354
+ # minutes.
4355
+ #
4356
+ # For example, consider a situation where you make an initial request and the
4357
+ # request times out. If you make the request again with the same request
4358
+ # ID, the server can check if original operation with the same request ID
4359
+ # was received, and if so, will ignore the second request. This prevents
4360
+ # clients from accidentally creating duplicate commitments.
4361
+ #
4362
+ # The request ID must be a valid UUID with the exception that zero UUID is
4363
+ # not supported (00000000-0000-0000-0000-000000000000).
4364
+ #
4365
+ # @yield [response, operation] Access the result along with the RPC operation
4366
+ # @yieldparam response [::Gapic::Operation]
4367
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4368
+ #
4369
+ # @return [::Gapic::Operation]
4370
+ #
4371
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4372
+ #
4373
+ # @example Basic example
4374
+ # require "google/cloud/vmware_engine/v1"
4375
+ #
4376
+ # # Create a client object. The client can be reused for multiple calls.
4377
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
4378
+ #
4379
+ # # Create a request. To set request fields, pass in keyword arguments.
4380
+ # request = Google::Cloud::VmwareEngine::V1::UpdatePrivateConnectionRequest.new
4381
+ #
4382
+ # # Call the update_private_connection method.
4383
+ # result = client.update_private_connection request
4384
+ #
4385
+ # # The returned object is of type Gapic::Operation. You can use it to
4386
+ # # check the status of an operation, cancel it, or wait for results.
4387
+ # # Here is how to wait for a response.
4388
+ # result.wait_until_done! timeout: 60
4389
+ # if result.response?
4390
+ # p result.response
4391
+ # else
4392
+ # puts "No response received."
4393
+ # end
4394
+ #
4395
+ def update_private_connection request, options = nil
4396
+ raise ::ArgumentError, "request must be provided" if request.nil?
4397
+
4398
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::UpdatePrivateConnectionRequest
4399
+
4400
+ # Converts hash and nil to an options object
4401
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4402
+
4403
+ # Customize the options with defaults
4404
+ metadata = @config.rpcs.update_private_connection.metadata.to_h
4405
+
4406
+ # Set x-goog-api-client and x-goog-user-project headers
4407
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4408
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4409
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
4410
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4411
+
4412
+ header_params = {}
4413
+ if request.private_connection&.name
4414
+ header_params["private_connection.name"] = request.private_connection.name
4415
+ end
4416
+
4417
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4418
+ metadata[:"x-goog-request-params"] ||= request_params_header
4419
+
4420
+ options.apply_defaults timeout: @config.rpcs.update_private_connection.timeout,
4421
+ metadata: metadata,
4422
+ retry_policy: @config.rpcs.update_private_connection.retry_policy
4423
+
4424
+ options.apply_defaults timeout: @config.timeout,
4425
+ metadata: @config.metadata,
4426
+ retry_policy: @config.retry_policy
4427
+
4428
+ @vmware_engine_stub.call_rpc :update_private_connection, request, options: options do |response, operation|
4429
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4430
+ yield response, operation if block_given?
4431
+ return response
4432
+ end
4433
+ rescue ::GRPC::BadStatus => e
4434
+ raise ::Google::Cloud::Error.from_error(e)
4435
+ end
4436
+
4437
+ ##
4438
+ # Deletes a `PrivateConnection` resource. When a private connection is
4439
+ # deleted for a VMware Engine network, the connected network becomes
4440
+ # inaccessible to that VMware Engine network.
4441
+ #
4442
+ # @overload delete_private_connection(request, options = nil)
4443
+ # Pass arguments to `delete_private_connection` via a request object, either of type
4444
+ # {::Google::Cloud::VmwareEngine::V1::DeletePrivateConnectionRequest} or an equivalent Hash.
4445
+ #
4446
+ # @param request [::Google::Cloud::VmwareEngine::V1::DeletePrivateConnectionRequest, ::Hash]
4447
+ # A request object representing the call parameters. Required. To specify no
4448
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4449
+ # @param options [::Gapic::CallOptions, ::Hash]
4450
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4451
+ #
4452
+ # @overload delete_private_connection(name: nil, request_id: nil)
4453
+ # Pass arguments to `delete_private_connection` via keyword arguments. Note that at
4454
+ # least one keyword argument is required. To specify no parameters, or to keep all
4455
+ # the default parameter values, pass an empty Hash as a request object (see above).
4456
+ #
4457
+ # @param name [::String]
4458
+ # Required. The resource name of the private connection to be deleted.
4459
+ # Resource names are schemeless URIs that follow the conventions in
4460
+ # https://cloud.google.com/apis/design/resource_names.
4461
+ # For example:
4462
+ # `projects/my-project/locations/us-central1/privateConnections/my-connection`
4463
+ # @param request_id [::String]
4464
+ # Optional. A request ID to identify requests. Specify a unique request ID
4465
+ # so that if you must retry your request, the server will know to ignore
4466
+ # the request if it has already been completed. The server guarantees that a
4467
+ # request doesn't result in creation of duplicate commitments for at least 60
4468
+ # minutes.
4469
+ #
4470
+ # For example, consider a situation where you make an initial request and the
4471
+ # request times out. If you make the request again with the same request
4472
+ # ID, the server can check if original operation with the same request ID
4473
+ # was received, and if so, will ignore the second request. This prevents
4474
+ # clients from accidentally creating duplicate commitments.
4475
+ #
4476
+ # The request ID must be a valid UUID with the exception that zero UUID is
4477
+ # not supported (00000000-0000-0000-0000-000000000000).
4478
+ #
4479
+ # @yield [response, operation] Access the result along with the RPC operation
4480
+ # @yieldparam response [::Gapic::Operation]
4481
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4482
+ #
4483
+ # @return [::Gapic::Operation]
4484
+ #
4485
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4486
+ #
4487
+ # @example Basic example
4488
+ # require "google/cloud/vmware_engine/v1"
4489
+ #
4490
+ # # Create a client object. The client can be reused for multiple calls.
4491
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
4492
+ #
4493
+ # # Create a request. To set request fields, pass in keyword arguments.
4494
+ # request = Google::Cloud::VmwareEngine::V1::DeletePrivateConnectionRequest.new
4495
+ #
4496
+ # # Call the delete_private_connection method.
4497
+ # result = client.delete_private_connection request
4498
+ #
4499
+ # # The returned object is of type Gapic::Operation. You can use it to
4500
+ # # check the status of an operation, cancel it, or wait for results.
4501
+ # # Here is how to wait for a response.
4502
+ # result.wait_until_done! timeout: 60
4503
+ # if result.response?
4504
+ # p result.response
4505
+ # else
4506
+ # puts "No response received."
4507
+ # end
4508
+ #
4509
+ def delete_private_connection request, options = nil
4510
+ raise ::ArgumentError, "request must be provided" if request.nil?
4511
+
4512
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::DeletePrivateConnectionRequest
4513
+
4514
+ # Converts hash and nil to an options object
4515
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4516
+
4517
+ # Customize the options with defaults
4518
+ metadata = @config.rpcs.delete_private_connection.metadata.to_h
4519
+
4520
+ # Set x-goog-api-client and x-goog-user-project headers
4521
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4522
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4523
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
4524
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4525
+
4526
+ header_params = {}
4527
+ if request.name
4528
+ header_params["name"] = request.name
4529
+ end
4530
+
4531
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4532
+ metadata[:"x-goog-request-params"] ||= request_params_header
4533
+
4534
+ options.apply_defaults timeout: @config.rpcs.delete_private_connection.timeout,
4535
+ metadata: metadata,
4536
+ retry_policy: @config.rpcs.delete_private_connection.retry_policy
4537
+
4538
+ options.apply_defaults timeout: @config.timeout,
4539
+ metadata: @config.metadata,
4540
+ retry_policy: @config.retry_policy
4541
+
4542
+ @vmware_engine_stub.call_rpc :delete_private_connection, request, options: options do |response, operation|
4543
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4544
+ yield response, operation if block_given?
4545
+ return response
4546
+ end
4547
+ rescue ::GRPC::BadStatus => e
4548
+ raise ::Google::Cloud::Error.from_error(e)
4549
+ end
4550
+
4551
+ ##
4552
+ # Lists the private connection routes exchanged over a peering connection.
4553
+ #
4554
+ # @overload list_private_connection_peering_routes(request, options = nil)
4555
+ # Pass arguments to `list_private_connection_peering_routes` via a request object, either of type
4556
+ # {::Google::Cloud::VmwareEngine::V1::ListPrivateConnectionPeeringRoutesRequest} or an equivalent Hash.
4557
+ #
4558
+ # @param request [::Google::Cloud::VmwareEngine::V1::ListPrivateConnectionPeeringRoutesRequest, ::Hash]
4559
+ # A request object representing the call parameters. Required. To specify no
4560
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4561
+ # @param options [::Gapic::CallOptions, ::Hash]
4562
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4563
+ #
4564
+ # @overload list_private_connection_peering_routes(parent: nil, page_size: nil, page_token: nil)
4565
+ # Pass arguments to `list_private_connection_peering_routes` via keyword arguments. Note that at
4566
+ # least one keyword argument is required. To specify no parameters, or to keep all
4567
+ # the default parameter values, pass an empty Hash as a request object (see above).
4568
+ #
4569
+ # @param parent [::String]
4570
+ # Required. The resource name of the private connection to retrieve peering
4571
+ # routes from. Resource names are schemeless URIs that follow the conventions
4572
+ # in https://cloud.google.com/apis/design/resource_names. For example:
4573
+ # `projects/my-project/locations/us-west1/privateConnections/my-connection`
4574
+ # @param page_size [::Integer]
4575
+ # The maximum number of peering routes to return in one page.
4576
+ # The service may return fewer than this value.
4577
+ # The maximum value is coerced to 1000.
4578
+ # The default value of this field is 500.
4579
+ # @param page_token [::String]
4580
+ # A page token, received from a previous `ListPrivateConnectionPeeringRoutes`
4581
+ # call. Provide this to retrieve the subsequent page. When paginating, all
4582
+ # other parameters provided to `ListPrivateConnectionPeeringRoutes` must
4583
+ # match the call that provided the page token.
4584
+ #
4585
+ # @yield [response, operation] Access the result along with the RPC operation
4586
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VmwareEngine::V1::PeeringRoute>]
4587
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4588
+ #
4589
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::VmwareEngine::V1::PeeringRoute>]
4590
+ #
4591
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4592
+ #
4593
+ # @example Basic example
4594
+ # require "google/cloud/vmware_engine/v1"
4595
+ #
4596
+ # # Create a client object. The client can be reused for multiple calls.
4597
+ # client = Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new
4598
+ #
4599
+ # # Create a request. To set request fields, pass in keyword arguments.
4600
+ # request = Google::Cloud::VmwareEngine::V1::ListPrivateConnectionPeeringRoutesRequest.new
4601
+ #
4602
+ # # Call the list_private_connection_peering_routes method.
4603
+ # result = client.list_private_connection_peering_routes request
4604
+ #
4605
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4606
+ # # over elements, and API calls will be issued to fetch pages as needed.
4607
+ # result.each do |item|
4608
+ # # Each element is of type ::Google::Cloud::VmwareEngine::V1::PeeringRoute.
4609
+ # p item
4610
+ # end
4611
+ #
4612
+ def list_private_connection_peering_routes request, options = nil
4613
+ raise ::ArgumentError, "request must be provided" if request.nil?
4614
+
4615
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VmwareEngine::V1::ListPrivateConnectionPeeringRoutesRequest
4616
+
4617
+ # Converts hash and nil to an options object
4618
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4619
+
4620
+ # Customize the options with defaults
4621
+ metadata = @config.rpcs.list_private_connection_peering_routes.metadata.to_h
4622
+
4623
+ # Set x-goog-api-client and x-goog-user-project headers
4624
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4625
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4626
+ gapic_version: ::Google::Cloud::VmwareEngine::V1::VERSION
4627
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4628
+
4629
+ header_params = {}
4630
+ if request.parent
4631
+ header_params["parent"] = request.parent
4632
+ end
4633
+
4634
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4635
+ metadata[:"x-goog-request-params"] ||= request_params_header
4636
+
4637
+ options.apply_defaults timeout: @config.rpcs.list_private_connection_peering_routes.timeout,
4638
+ metadata: metadata,
4639
+ retry_policy: @config.rpcs.list_private_connection_peering_routes.retry_policy
4640
+
4641
+ options.apply_defaults timeout: @config.timeout,
4642
+ metadata: @config.metadata,
4643
+ retry_policy: @config.retry_policy
4644
+
4645
+ @vmware_engine_stub.call_rpc :list_private_connection_peering_routes, request, options: options do |response, operation|
4646
+ response = ::Gapic::PagedEnumerable.new @vmware_engine_stub, :list_private_connection_peering_routes, request, response, operation, options
4647
+ yield response, operation if block_given?
4648
+ return response
4649
+ end
4650
+ rescue ::GRPC::BadStatus => e
4651
+ raise ::Google::Cloud::Error.from_error(e)
4652
+ end
4653
+
4654
+ ##
4655
+ # Configuration class for the VmwareEngine API.
4656
+ #
4657
+ # This class represents the configuration for VmwareEngine,
4658
+ # providing control over timeouts, retry behavior, logging, transport
4659
+ # parameters, and other low-level controls. Certain parameters can also be
4660
+ # applied individually to specific RPCs. See
4661
+ # {::Google::Cloud::VmwareEngine::V1::VmwareEngine::Client::Configuration::Rpcs}
4662
+ # for a list of RPCs that can be configured independently.
4663
+ #
4664
+ # Configuration can be applied globally to all clients, or to a single client
4665
+ # on construction.
4666
+ #
4667
+ # @example
4668
+ #
4669
+ # # Modify the global config, setting the timeout for
4670
+ # # list_private_clouds to 20 seconds,
4671
+ # # and all remaining timeouts to 10 seconds.
4672
+ # ::Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.configure do |config|
4673
+ # config.timeout = 10.0
4674
+ # config.rpcs.list_private_clouds.timeout = 20.0
4675
+ # end
4676
+ #
4677
+ # # Apply the above configuration only to a new client.
4678
+ # client = ::Google::Cloud::VmwareEngine::V1::VmwareEngine::Client.new do |config|
4679
+ # config.timeout = 10.0
4680
+ # config.rpcs.list_private_clouds.timeout = 20.0
4681
+ # end
4682
+ #
4683
+ # @!attribute [rw] endpoint
4684
+ # The hostname or hostname:port of the service endpoint.
4685
+ # Defaults to `"vmwareengine.googleapis.com"`.
4686
+ # @return [::String]
4687
+ # @!attribute [rw] credentials
4688
+ # Credentials to send with calls. You may provide any of the following types:
4689
+ # * (`String`) The path to a service account key file in JSON format
4690
+ # * (`Hash`) A service account key as a Hash
4691
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
4692
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
4693
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
4694
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
4695
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
4696
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
4697
+ # * (`nil`) indicating no credentials
4698
+ # @return [::Object]
4699
+ # @!attribute [rw] scope
3797
4700
  # The OAuth scopes
3798
4701
  # @return [::Array<::String>]
3799
4702
  # @!attribute [rw] lib_name
@@ -3867,6 +4770,14 @@ module Google
3867
4770
  end
3868
4771
  end
3869
4772
 
4773
+ ##
4774
+ # Configuration for the channel pool
4775
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
4776
+ #
4777
+ def channel_pool
4778
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
4779
+ end
4780
+
3870
4781
  ##
3871
4782
  # Configuration RPC class for the VmwareEngine API.
3872
4783
  #
@@ -3946,6 +4857,16 @@ module Google
3946
4857
  #
3947
4858
  attr_reader :list_subnets
3948
4859
  ##
4860
+ # RPC-specific configuration for `get_subnet`
4861
+ # @return [::Gapic::Config::Method]
4862
+ #
4863
+ attr_reader :get_subnet
4864
+ ##
4865
+ # RPC-specific configuration for `update_subnet`
4866
+ # @return [::Gapic::Config::Method]
4867
+ #
4868
+ attr_reader :update_subnet
4869
+ ##
3949
4870
  # RPC-specific configuration for `list_node_types`
3950
4871
  # @return [::Gapic::Config::Method]
3951
4872
  #
@@ -4040,6 +4961,36 @@ module Google
4040
4961
  # @return [::Gapic::Config::Method]
4041
4962
  #
4042
4963
  attr_reader :list_vmware_engine_networks
4964
+ ##
4965
+ # RPC-specific configuration for `create_private_connection`
4966
+ # @return [::Gapic::Config::Method]
4967
+ #
4968
+ attr_reader :create_private_connection
4969
+ ##
4970
+ # RPC-specific configuration for `get_private_connection`
4971
+ # @return [::Gapic::Config::Method]
4972
+ #
4973
+ attr_reader :get_private_connection
4974
+ ##
4975
+ # RPC-specific configuration for `list_private_connections`
4976
+ # @return [::Gapic::Config::Method]
4977
+ #
4978
+ attr_reader :list_private_connections
4979
+ ##
4980
+ # RPC-specific configuration for `update_private_connection`
4981
+ # @return [::Gapic::Config::Method]
4982
+ #
4983
+ attr_reader :update_private_connection
4984
+ ##
4985
+ # RPC-specific configuration for `delete_private_connection`
4986
+ # @return [::Gapic::Config::Method]
4987
+ #
4988
+ attr_reader :delete_private_connection
4989
+ ##
4990
+ # RPC-specific configuration for `list_private_connection_peering_routes`
4991
+ # @return [::Gapic::Config::Method]
4992
+ #
4993
+ attr_reader :list_private_connection_peering_routes
4043
4994
 
4044
4995
  # @private
4045
4996
  def initialize parent_rpcs = nil
@@ -4067,6 +5018,10 @@ module Google
4067
5018
  @delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
4068
5019
  list_subnets_config = parent_rpcs.list_subnets if parent_rpcs.respond_to? :list_subnets
4069
5020
  @list_subnets = ::Gapic::Config::Method.new list_subnets_config
5021
+ get_subnet_config = parent_rpcs.get_subnet if parent_rpcs.respond_to? :get_subnet
5022
+ @get_subnet = ::Gapic::Config::Method.new get_subnet_config
5023
+ update_subnet_config = parent_rpcs.update_subnet if parent_rpcs.respond_to? :update_subnet
5024
+ @update_subnet = ::Gapic::Config::Method.new update_subnet_config
4070
5025
  list_node_types_config = parent_rpcs.list_node_types if parent_rpcs.respond_to? :list_node_types
4071
5026
  @list_node_types = ::Gapic::Config::Method.new list_node_types_config
4072
5027
  get_node_type_config = parent_rpcs.get_node_type if parent_rpcs.respond_to? :get_node_type
@@ -4105,6 +5060,18 @@ module Google
4105
5060
  @get_vmware_engine_network = ::Gapic::Config::Method.new get_vmware_engine_network_config
4106
5061
  list_vmware_engine_networks_config = parent_rpcs.list_vmware_engine_networks if parent_rpcs.respond_to? :list_vmware_engine_networks
4107
5062
  @list_vmware_engine_networks = ::Gapic::Config::Method.new list_vmware_engine_networks_config
5063
+ create_private_connection_config = parent_rpcs.create_private_connection if parent_rpcs.respond_to? :create_private_connection
5064
+ @create_private_connection = ::Gapic::Config::Method.new create_private_connection_config
5065
+ get_private_connection_config = parent_rpcs.get_private_connection if parent_rpcs.respond_to? :get_private_connection
5066
+ @get_private_connection = ::Gapic::Config::Method.new get_private_connection_config
5067
+ list_private_connections_config = parent_rpcs.list_private_connections if parent_rpcs.respond_to? :list_private_connections
5068
+ @list_private_connections = ::Gapic::Config::Method.new list_private_connections_config
5069
+ update_private_connection_config = parent_rpcs.update_private_connection if parent_rpcs.respond_to? :update_private_connection
5070
+ @update_private_connection = ::Gapic::Config::Method.new update_private_connection_config
5071
+ delete_private_connection_config = parent_rpcs.delete_private_connection if parent_rpcs.respond_to? :delete_private_connection
5072
+ @delete_private_connection = ::Gapic::Config::Method.new delete_private_connection_config
5073
+ list_private_connection_peering_routes_config = parent_rpcs.list_private_connection_peering_routes if parent_rpcs.respond_to? :list_private_connection_peering_routes
5074
+ @list_private_connection_peering_routes = ::Gapic::Config::Method.new list_private_connection_peering_routes_config
4108
5075
 
4109
5076
  yield self if block_given?
4110
5077
  end