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