google-cloud-config_service-v1 0.2.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1809,6 +1809,523 @@ module Google
1809
1809
  raise ::Google::Cloud::Error.from_error(e)
1810
1810
  end
1811
1811
 
1812
+ ##
1813
+ # Creates a {::Google::Cloud::ConfigService::V1::Preview Preview}.
1814
+ #
1815
+ # @overload create_preview(request, options = nil)
1816
+ # Pass arguments to `create_preview` via a request object, either of type
1817
+ # {::Google::Cloud::ConfigService::V1::CreatePreviewRequest} or an equivalent Hash.
1818
+ #
1819
+ # @param request [::Google::Cloud::ConfigService::V1::CreatePreviewRequest, ::Hash]
1820
+ # A request object representing the call parameters. Required. To specify no
1821
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1822
+ # @param options [::Gapic::CallOptions, ::Hash]
1823
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1824
+ #
1825
+ # @overload create_preview(parent: nil, preview_id: nil, preview: nil, request_id: nil)
1826
+ # Pass arguments to `create_preview` via keyword arguments. Note that at
1827
+ # least one keyword argument is required. To specify no parameters, or to keep all
1828
+ # the default parameter values, pass an empty Hash as a request object (see above).
1829
+ #
1830
+ # @param parent [::String]
1831
+ # Required. The parent in whose context the Preview is created. The parent
1832
+ # value is in the format: 'projects/\\{project_id}/locations/\\{location}'.
1833
+ # @param preview_id [::String]
1834
+ # Optional. The preview ID.
1835
+ # @param preview [::Google::Cloud::ConfigService::V1::Preview, ::Hash]
1836
+ # Required. {::Google::Cloud::ConfigService::V1::Preview Preview} resource to be created.
1837
+ # @param request_id [::String]
1838
+ # Optional. An optional request ID to identify requests. Specify a unique
1839
+ # request ID so that if you must retry your request, the server will know to
1840
+ # ignore the request if it has already been completed. The server will
1841
+ # guarantee that for at least 60 minutes since the first request.
1842
+ #
1843
+ # For example, consider a situation where you make an initial request and the
1844
+ # request times out. If you make the request again with the same request ID,
1845
+ # the server can check if original operation with the same request ID was
1846
+ # received, and if so, will ignore the second request. This prevents clients
1847
+ # from accidentally creating duplicate commitments.
1848
+ #
1849
+ # The request ID must be a valid UUID with the exception that zero UUID is
1850
+ # not supported (00000000-0000-0000-0000-000000000000).
1851
+ #
1852
+ # @yield [response, operation] Access the result along with the RPC operation
1853
+ # @yieldparam response [::Gapic::Operation]
1854
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1855
+ #
1856
+ # @return [::Gapic::Operation]
1857
+ #
1858
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1859
+ #
1860
+ # @example Basic example
1861
+ # require "google/cloud/config_service/v1"
1862
+ #
1863
+ # # Create a client object. The client can be reused for multiple calls.
1864
+ # client = Google::Cloud::ConfigService::V1::Config::Client.new
1865
+ #
1866
+ # # Create a request. To set request fields, pass in keyword arguments.
1867
+ # request = Google::Cloud::ConfigService::V1::CreatePreviewRequest.new
1868
+ #
1869
+ # # Call the create_preview method.
1870
+ # result = client.create_preview request
1871
+ #
1872
+ # # The returned object is of type Gapic::Operation. You can use it to
1873
+ # # check the status of an operation, cancel it, or wait for results.
1874
+ # # Here is how to wait for a response.
1875
+ # result.wait_until_done! timeout: 60
1876
+ # if result.response?
1877
+ # p result.response
1878
+ # else
1879
+ # puts "No response received."
1880
+ # end
1881
+ #
1882
+ def create_preview request, options = nil
1883
+ raise ::ArgumentError, "request must be provided" if request.nil?
1884
+
1885
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::CreatePreviewRequest
1886
+
1887
+ # Converts hash and nil to an options object
1888
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1889
+
1890
+ # Customize the options with defaults
1891
+ metadata = @config.rpcs.create_preview.metadata.to_h
1892
+
1893
+ # Set x-goog-api-client and x-goog-user-project headers
1894
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1895
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1896
+ gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
1897
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1898
+
1899
+ header_params = {}
1900
+ if request.parent
1901
+ header_params["parent"] = request.parent
1902
+ end
1903
+
1904
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1905
+ metadata[:"x-goog-request-params"] ||= request_params_header
1906
+
1907
+ options.apply_defaults timeout: @config.rpcs.create_preview.timeout,
1908
+ metadata: metadata,
1909
+ retry_policy: @config.rpcs.create_preview.retry_policy
1910
+
1911
+ options.apply_defaults timeout: @config.timeout,
1912
+ metadata: @config.metadata,
1913
+ retry_policy: @config.retry_policy
1914
+
1915
+ @config_stub.call_rpc :create_preview, request, options: options do |response, operation|
1916
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1917
+ yield response, operation if block_given?
1918
+ return response
1919
+ end
1920
+ rescue ::GRPC::BadStatus => e
1921
+ raise ::Google::Cloud::Error.from_error(e)
1922
+ end
1923
+
1924
+ ##
1925
+ # Gets details about a {::Google::Cloud::ConfigService::V1::Preview Preview}.
1926
+ #
1927
+ # @overload get_preview(request, options = nil)
1928
+ # Pass arguments to `get_preview` via a request object, either of type
1929
+ # {::Google::Cloud::ConfigService::V1::GetPreviewRequest} or an equivalent Hash.
1930
+ #
1931
+ # @param request [::Google::Cloud::ConfigService::V1::GetPreviewRequest, ::Hash]
1932
+ # A request object representing the call parameters. Required. To specify no
1933
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1934
+ # @param options [::Gapic::CallOptions, ::Hash]
1935
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1936
+ #
1937
+ # @overload get_preview(name: nil)
1938
+ # Pass arguments to `get_preview` via keyword arguments. Note that at
1939
+ # least one keyword argument is required. To specify no parameters, or to keep all
1940
+ # the default parameter values, pass an empty Hash as a request object (see above).
1941
+ #
1942
+ # @param name [::String]
1943
+ # Required. The name of the preview. Format:
1944
+ # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'.
1945
+ #
1946
+ # @yield [response, operation] Access the result along with the RPC operation
1947
+ # @yieldparam response [::Google::Cloud::ConfigService::V1::Preview]
1948
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1949
+ #
1950
+ # @return [::Google::Cloud::ConfigService::V1::Preview]
1951
+ #
1952
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1953
+ #
1954
+ # @example Basic example
1955
+ # require "google/cloud/config_service/v1"
1956
+ #
1957
+ # # Create a client object. The client can be reused for multiple calls.
1958
+ # client = Google::Cloud::ConfigService::V1::Config::Client.new
1959
+ #
1960
+ # # Create a request. To set request fields, pass in keyword arguments.
1961
+ # request = Google::Cloud::ConfigService::V1::GetPreviewRequest.new
1962
+ #
1963
+ # # Call the get_preview method.
1964
+ # result = client.get_preview request
1965
+ #
1966
+ # # The returned object is of type Google::Cloud::ConfigService::V1::Preview.
1967
+ # p result
1968
+ #
1969
+ def get_preview request, options = nil
1970
+ raise ::ArgumentError, "request must be provided" if request.nil?
1971
+
1972
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetPreviewRequest
1973
+
1974
+ # Converts hash and nil to an options object
1975
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1976
+
1977
+ # Customize the options with defaults
1978
+ metadata = @config.rpcs.get_preview.metadata.to_h
1979
+
1980
+ # Set x-goog-api-client and x-goog-user-project headers
1981
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1982
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1983
+ gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
1984
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1985
+
1986
+ header_params = {}
1987
+ if request.name
1988
+ header_params["name"] = request.name
1989
+ end
1990
+
1991
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1992
+ metadata[:"x-goog-request-params"] ||= request_params_header
1993
+
1994
+ options.apply_defaults timeout: @config.rpcs.get_preview.timeout,
1995
+ metadata: metadata,
1996
+ retry_policy: @config.rpcs.get_preview.retry_policy
1997
+
1998
+ options.apply_defaults timeout: @config.timeout,
1999
+ metadata: @config.metadata,
2000
+ retry_policy: @config.retry_policy
2001
+
2002
+ @config_stub.call_rpc :get_preview, request, options: options do |response, operation|
2003
+ yield response, operation if block_given?
2004
+ return response
2005
+ end
2006
+ rescue ::GRPC::BadStatus => e
2007
+ raise ::Google::Cloud::Error.from_error(e)
2008
+ end
2009
+
2010
+ ##
2011
+ # Lists {::Google::Cloud::ConfigService::V1::Preview Preview}s in a given project and
2012
+ # location.
2013
+ #
2014
+ # @overload list_previews(request, options = nil)
2015
+ # Pass arguments to `list_previews` via a request object, either of type
2016
+ # {::Google::Cloud::ConfigService::V1::ListPreviewsRequest} or an equivalent Hash.
2017
+ #
2018
+ # @param request [::Google::Cloud::ConfigService::V1::ListPreviewsRequest, ::Hash]
2019
+ # A request object representing the call parameters. Required. To specify no
2020
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2021
+ # @param options [::Gapic::CallOptions, ::Hash]
2022
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2023
+ #
2024
+ # @overload list_previews(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2025
+ # Pass arguments to `list_previews` via keyword arguments. Note that at
2026
+ # least one keyword argument is required. To specify no parameters, or to keep all
2027
+ # the default parameter values, pass an empty Hash as a request object (see above).
2028
+ #
2029
+ # @param parent [::String]
2030
+ # Required. The parent in whose context the Previews are listed. The parent
2031
+ # value is in the format: 'projects/\\{project_id}/locations/\\{location}'.
2032
+ # @param page_size [::Integer]
2033
+ # Optional. When requesting a page of resources, 'page_size' specifies number
2034
+ # of resources to return. If unspecified or set to 0, all resources will be
2035
+ # returned.
2036
+ # @param page_token [::String]
2037
+ # Optional. Token returned by previous call to 'ListDeployments' which
2038
+ # specifies the position in the list from where to continue listing the
2039
+ # resources.
2040
+ # @param filter [::String]
2041
+ # Optional. Lists the Deployments that match the filter expression. A filter
2042
+ # expression filters the resources listed in the response. The expression
2043
+ # must be of the form '\\{field} \\{operator} \\{value}' where operators: '<', '>',
2044
+ # '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
2045
+ # operator which is roughly synonymous with equality). \\{field} can refer to a
2046
+ # proto or JSON field, or a synthetic field. Field names can be camelCase or
2047
+ # snake_case.
2048
+ #
2049
+ # Examples:
2050
+ # - Filter by name:
2051
+ # name = "projects/foo/locations/us-central1/deployments/bar
2052
+ #
2053
+ # - Filter by labels:
2054
+ # - Resources that have a key called 'foo'
2055
+ # labels.foo:*
2056
+ # - Resources that have a key called 'foo' whose value is 'bar'
2057
+ # labels.foo = bar
2058
+ #
2059
+ # - Filter by state:
2060
+ # - Deployments in CREATING state.
2061
+ # state=CREATING
2062
+ # @param order_by [::String]
2063
+ # Optional. Field to use to sort the list.
2064
+ #
2065
+ # @yield [response, operation] Access the result along with the RPC operation
2066
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::Preview>]
2067
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2068
+ #
2069
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::Preview>]
2070
+ #
2071
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2072
+ #
2073
+ # @example Basic example
2074
+ # require "google/cloud/config_service/v1"
2075
+ #
2076
+ # # Create a client object. The client can be reused for multiple calls.
2077
+ # client = Google::Cloud::ConfigService::V1::Config::Client.new
2078
+ #
2079
+ # # Create a request. To set request fields, pass in keyword arguments.
2080
+ # request = Google::Cloud::ConfigService::V1::ListPreviewsRequest.new
2081
+ #
2082
+ # # Call the list_previews method.
2083
+ # result = client.list_previews request
2084
+ #
2085
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2086
+ # # over elements, and API calls will be issued to fetch pages as needed.
2087
+ # result.each do |item|
2088
+ # # Each element is of type ::Google::Cloud::ConfigService::V1::Preview.
2089
+ # p item
2090
+ # end
2091
+ #
2092
+ def list_previews request, options = nil
2093
+ raise ::ArgumentError, "request must be provided" if request.nil?
2094
+
2095
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListPreviewsRequest
2096
+
2097
+ # Converts hash and nil to an options object
2098
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2099
+
2100
+ # Customize the options with defaults
2101
+ metadata = @config.rpcs.list_previews.metadata.to_h
2102
+
2103
+ # Set x-goog-api-client and x-goog-user-project headers
2104
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2105
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2106
+ gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
2107
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2108
+
2109
+ header_params = {}
2110
+ if request.parent
2111
+ header_params["parent"] = request.parent
2112
+ end
2113
+
2114
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2115
+ metadata[:"x-goog-request-params"] ||= request_params_header
2116
+
2117
+ options.apply_defaults timeout: @config.rpcs.list_previews.timeout,
2118
+ metadata: metadata,
2119
+ retry_policy: @config.rpcs.list_previews.retry_policy
2120
+
2121
+ options.apply_defaults timeout: @config.timeout,
2122
+ metadata: @config.metadata,
2123
+ retry_policy: @config.retry_policy
2124
+
2125
+ @config_stub.call_rpc :list_previews, request, options: options do |response, operation|
2126
+ response = ::Gapic::PagedEnumerable.new @config_stub, :list_previews, request, response, operation, options
2127
+ yield response, operation if block_given?
2128
+ return response
2129
+ end
2130
+ rescue ::GRPC::BadStatus => e
2131
+ raise ::Google::Cloud::Error.from_error(e)
2132
+ end
2133
+
2134
+ ##
2135
+ # Deletes a {::Google::Cloud::ConfigService::V1::Preview Preview}.
2136
+ #
2137
+ # @overload delete_preview(request, options = nil)
2138
+ # Pass arguments to `delete_preview` via a request object, either of type
2139
+ # {::Google::Cloud::ConfigService::V1::DeletePreviewRequest} or an equivalent Hash.
2140
+ #
2141
+ # @param request [::Google::Cloud::ConfigService::V1::DeletePreviewRequest, ::Hash]
2142
+ # A request object representing the call parameters. Required. To specify no
2143
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2144
+ # @param options [::Gapic::CallOptions, ::Hash]
2145
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2146
+ #
2147
+ # @overload delete_preview(name: nil, request_id: nil)
2148
+ # Pass arguments to `delete_preview` via keyword arguments. Note that at
2149
+ # least one keyword argument is required. To specify no parameters, or to keep all
2150
+ # the default parameter values, pass an empty Hash as a request object (see above).
2151
+ #
2152
+ # @param name [::String]
2153
+ # Required. The name of the Preview in the format:
2154
+ # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'.
2155
+ # @param request_id [::String]
2156
+ # Optional. An optional request ID to identify requests. Specify a unique
2157
+ # request ID so that if you must retry your request, the server will know to
2158
+ # ignore the request if it has already been completed. The server will
2159
+ # guarantee that for at least 60 minutes after the first request.
2160
+ #
2161
+ # For example, consider a situation where you make an initial request and the
2162
+ # request times out. If you make the request again with the same request ID,
2163
+ # the server can check if original operation with the same request ID was
2164
+ # received, and if so, will ignore the second request. This prevents clients
2165
+ # from accidentally creating duplicate commitments.
2166
+ #
2167
+ # The request ID must be a valid UUID with the exception that zero UUID is
2168
+ # not supported (00000000-0000-0000-0000-000000000000).
2169
+ #
2170
+ # @yield [response, operation] Access the result along with the RPC operation
2171
+ # @yieldparam response [::Gapic::Operation]
2172
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2173
+ #
2174
+ # @return [::Gapic::Operation]
2175
+ #
2176
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2177
+ #
2178
+ # @example Basic example
2179
+ # require "google/cloud/config_service/v1"
2180
+ #
2181
+ # # Create a client object. The client can be reused for multiple calls.
2182
+ # client = Google::Cloud::ConfigService::V1::Config::Client.new
2183
+ #
2184
+ # # Create a request. To set request fields, pass in keyword arguments.
2185
+ # request = Google::Cloud::ConfigService::V1::DeletePreviewRequest.new
2186
+ #
2187
+ # # Call the delete_preview method.
2188
+ # result = client.delete_preview request
2189
+ #
2190
+ # # The returned object is of type Gapic::Operation. You can use it to
2191
+ # # check the status of an operation, cancel it, or wait for results.
2192
+ # # Here is how to wait for a response.
2193
+ # result.wait_until_done! timeout: 60
2194
+ # if result.response?
2195
+ # p result.response
2196
+ # else
2197
+ # puts "No response received."
2198
+ # end
2199
+ #
2200
+ def delete_preview request, options = nil
2201
+ raise ::ArgumentError, "request must be provided" if request.nil?
2202
+
2203
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::DeletePreviewRequest
2204
+
2205
+ # Converts hash and nil to an options object
2206
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2207
+
2208
+ # Customize the options with defaults
2209
+ metadata = @config.rpcs.delete_preview.metadata.to_h
2210
+
2211
+ # Set x-goog-api-client and x-goog-user-project headers
2212
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2213
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2214
+ gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
2215
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2216
+
2217
+ header_params = {}
2218
+ if request.name
2219
+ header_params["name"] = request.name
2220
+ end
2221
+
2222
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2223
+ metadata[:"x-goog-request-params"] ||= request_params_header
2224
+
2225
+ options.apply_defaults timeout: @config.rpcs.delete_preview.timeout,
2226
+ metadata: metadata,
2227
+ retry_policy: @config.rpcs.delete_preview.retry_policy
2228
+
2229
+ options.apply_defaults timeout: @config.timeout,
2230
+ metadata: @config.metadata,
2231
+ retry_policy: @config.retry_policy
2232
+
2233
+ @config_stub.call_rpc :delete_preview, request, options: options do |response, operation|
2234
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2235
+ yield response, operation if block_given?
2236
+ return response
2237
+ end
2238
+ rescue ::GRPC::BadStatus => e
2239
+ raise ::Google::Cloud::Error.from_error(e)
2240
+ end
2241
+
2242
+ ##
2243
+ # Export {::Google::Cloud::ConfigService::V1::Preview Preview} results.
2244
+ #
2245
+ # @overload export_preview_result(request, options = nil)
2246
+ # Pass arguments to `export_preview_result` via a request object, either of type
2247
+ # {::Google::Cloud::ConfigService::V1::ExportPreviewResultRequest} or an equivalent Hash.
2248
+ #
2249
+ # @param request [::Google::Cloud::ConfigService::V1::ExportPreviewResultRequest, ::Hash]
2250
+ # A request object representing the call parameters. Required. To specify no
2251
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2252
+ # @param options [::Gapic::CallOptions, ::Hash]
2253
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2254
+ #
2255
+ # @overload export_preview_result(parent: nil)
2256
+ # Pass arguments to `export_preview_result` via keyword arguments. Note that at
2257
+ # least one keyword argument is required. To specify no parameters, or to keep all
2258
+ # the default parameter values, pass an empty Hash as a request object (see above).
2259
+ #
2260
+ # @param parent [::String]
2261
+ # Required. The preview whose results should be exported. The preview value
2262
+ # is in the format:
2263
+ # 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'.
2264
+ #
2265
+ # @yield [response, operation] Access the result along with the RPC operation
2266
+ # @yieldparam response [::Google::Cloud::ConfigService::V1::ExportPreviewResultResponse]
2267
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2268
+ #
2269
+ # @return [::Google::Cloud::ConfigService::V1::ExportPreviewResultResponse]
2270
+ #
2271
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2272
+ #
2273
+ # @example Basic example
2274
+ # require "google/cloud/config_service/v1"
2275
+ #
2276
+ # # Create a client object. The client can be reused for multiple calls.
2277
+ # client = Google::Cloud::ConfigService::V1::Config::Client.new
2278
+ #
2279
+ # # Create a request. To set request fields, pass in keyword arguments.
2280
+ # request = Google::Cloud::ConfigService::V1::ExportPreviewResultRequest.new
2281
+ #
2282
+ # # Call the export_preview_result method.
2283
+ # result = client.export_preview_result request
2284
+ #
2285
+ # # The returned object is of type Google::Cloud::ConfigService::V1::ExportPreviewResultResponse.
2286
+ # p result
2287
+ #
2288
+ def export_preview_result request, options = nil
2289
+ raise ::ArgumentError, "request must be provided" if request.nil?
2290
+
2291
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ExportPreviewResultRequest
2292
+
2293
+ # Converts hash and nil to an options object
2294
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2295
+
2296
+ # Customize the options with defaults
2297
+ metadata = @config.rpcs.export_preview_result.metadata.to_h
2298
+
2299
+ # Set x-goog-api-client and x-goog-user-project headers
2300
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2301
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2302
+ gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
2303
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2304
+
2305
+ header_params = {}
2306
+ if request.parent
2307
+ header_params["parent"] = request.parent
2308
+ end
2309
+
2310
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2311
+ metadata[:"x-goog-request-params"] ||= request_params_header
2312
+
2313
+ options.apply_defaults timeout: @config.rpcs.export_preview_result.timeout,
2314
+ metadata: metadata,
2315
+ retry_policy: @config.rpcs.export_preview_result.retry_policy
2316
+
2317
+ options.apply_defaults timeout: @config.timeout,
2318
+ metadata: @config.metadata,
2319
+ retry_policy: @config.retry_policy
2320
+
2321
+ @config_stub.call_rpc :export_preview_result, request, options: options do |response, operation|
2322
+ yield response, operation if block_given?
2323
+ return response
2324
+ end
2325
+ rescue ::GRPC::BadStatus => e
2326
+ raise ::Google::Cloud::Error.from_error(e)
2327
+ end
2328
+
1812
2329
  ##
1813
2330
  # Configuration class for the Config API.
1814
2331
  #
@@ -2042,6 +2559,31 @@ module Google
2042
2559
  # @return [::Gapic::Config::Method]
2043
2560
  #
2044
2561
  attr_reader :export_lock_info
2562
+ ##
2563
+ # RPC-specific configuration for `create_preview`
2564
+ # @return [::Gapic::Config::Method]
2565
+ #
2566
+ attr_reader :create_preview
2567
+ ##
2568
+ # RPC-specific configuration for `get_preview`
2569
+ # @return [::Gapic::Config::Method]
2570
+ #
2571
+ attr_reader :get_preview
2572
+ ##
2573
+ # RPC-specific configuration for `list_previews`
2574
+ # @return [::Gapic::Config::Method]
2575
+ #
2576
+ attr_reader :list_previews
2577
+ ##
2578
+ # RPC-specific configuration for `delete_preview`
2579
+ # @return [::Gapic::Config::Method]
2580
+ #
2581
+ attr_reader :delete_preview
2582
+ ##
2583
+ # RPC-specific configuration for `export_preview_result`
2584
+ # @return [::Gapic::Config::Method]
2585
+ #
2586
+ attr_reader :export_preview_result
2045
2587
 
2046
2588
  # @private
2047
2589
  def initialize parent_rpcs = nil
@@ -2077,6 +2619,16 @@ module Google
2077
2619
  @unlock_deployment = ::Gapic::Config::Method.new unlock_deployment_config
2078
2620
  export_lock_info_config = parent_rpcs.export_lock_info if parent_rpcs.respond_to? :export_lock_info
2079
2621
  @export_lock_info = ::Gapic::Config::Method.new export_lock_info_config
2622
+ create_preview_config = parent_rpcs.create_preview if parent_rpcs.respond_to? :create_preview
2623
+ @create_preview = ::Gapic::Config::Method.new create_preview_config
2624
+ get_preview_config = parent_rpcs.get_preview if parent_rpcs.respond_to? :get_preview
2625
+ @get_preview = ::Gapic::Config::Method.new get_preview_config
2626
+ list_previews_config = parent_rpcs.list_previews if parent_rpcs.respond_to? :list_previews
2627
+ @list_previews = ::Gapic::Config::Method.new list_previews_config
2628
+ delete_preview_config = parent_rpcs.delete_preview if parent_rpcs.respond_to? :delete_preview
2629
+ @delete_preview = ::Gapic::Config::Method.new delete_preview_config
2630
+ export_preview_result_config = parent_rpcs.export_preview_result if parent_rpcs.respond_to? :export_preview_result
2631
+ @export_preview_result = ::Gapic::Config::Method.new export_preview_result_config
2080
2632
 
2081
2633
  yield self if block_given?
2082
2634
  end
@@ -60,6 +60,25 @@ module Google
60
60
  "projects/#{project}/locations/#{location}"
61
61
  end
62
62
 
63
+ ##
64
+ # Create a fully-qualified Preview resource string.
65
+ #
66
+ # The resource will be in the following format:
67
+ #
68
+ # `projects/{project}/locations/{location}/previews/{preview}`
69
+ #
70
+ # @param project [String]
71
+ # @param location [String]
72
+ # @param preview [String]
73
+ #
74
+ # @return [::String]
75
+ def preview_path project:, location:, preview:
76
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
77
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
78
+
79
+ "projects/#{project}/locations/#{location}/previews/#{preview}"
80
+ end
81
+
63
82
  ##
64
83
  # Create a fully-qualified Resource resource string.
65
84
  #