@@ -34,10 +34,12 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
3434 * Retrieves a list of all backups of the given PostgreSQL cluster.
3535 * @summary List backups of cluster
3636 * @param {string } clusterId The unique ID of the cluster.
37+ * @param {number } [limit] The maximum number of elements to return. Use together with \'offset\' for pagination.
38+ * @param {number } [offset] The first element to return. Use together with \'limit\' for pagination.
3739 * @param {* } [options] Override http request option.
3840 * @throws {RequiredError }
3941 */
40- clusterBackupsGet : async ( clusterId : string , options : any = { } ) : Promise < RequestArgs > => {
42+ clusterBackupsGet : async ( clusterId : string , limit ?: number , offset ?: number , options : any = { } ) : Promise < RequestArgs > => {
4143 if ( clusterId === null || clusterId === undefined ) {
4244 throw new RequiredError ( 'clusterId' , 'Required parameter clusterId was null or undefined when calling clusterBackupsGet.' ) ;
4345 }
@@ -68,6 +70,20 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
6870 localVarHeaderParameter [ "Authorization" ] = "Bearer " + localVarApiKeyValue ;
6971 }
7072
73+ if ( ( limit === undefined ) && ( configuration !== undefined ) ) {
74+ limit = configuration . getDefaultParamValue ( 'limit' ) ;
75+ }
76+ if ( limit !== undefined ) {
77+ localVarQueryParameter [ 'limit' ] = limit ;
78+ }
79+
80+ if ( ( offset === undefined ) && ( configuration !== undefined ) ) {
81+ offset = configuration . getDefaultParamValue ( 'offset' ) ;
82+ }
83+ if ( offset !== undefined ) {
84+ localVarQueryParameter [ 'offset' ] = offset ;
85+ }
86+
7187
7288
7389 localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ;
@@ -147,10 +163,12 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
147163 /**
148164 * Retrieves a list of all PostgreSQL cluster backups.
149165 * @summary List cluster backups
166+ * @param {number } [limit] The maximum number of elements to return. Use together with \'offset\' for pagination.
167+ * @param {number } [offset] The first element to return. Use together with \'limit\' for pagination.
150168 * @param {* } [options] Override http request option.
151169 * @throws {RequiredError }
152170 */
153- clustersBackupsGet : async ( options : any = { } ) : Promise < RequestArgs > => {
171+ clustersBackupsGet : async ( limit ?: number , offset ?: number , options : any = { } ) : Promise < RequestArgs > => {
154172 const localVarPath = `/clusters/backups` ;
155173 // use dummy base URL string because the URL constructor only accepts absolute URLs.
156174 const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ;
@@ -177,6 +195,20 @@ export const BackupsApiAxiosParamCreator = function (configuration?: Configurati
177195 localVarHeaderParameter [ "Authorization" ] = "Bearer " + localVarApiKeyValue ;
178196 }
179197
198+ if ( ( limit === undefined ) && ( configuration !== undefined ) ) {
199+ limit = configuration . getDefaultParamValue ( 'limit' ) ;
200+ }
201+ if ( limit !== undefined ) {
202+ localVarQueryParameter [ 'limit' ] = limit ;
203+ }
204+
205+ if ( ( offset === undefined ) && ( configuration !== undefined ) ) {
206+ offset = configuration . getDefaultParamValue ( 'offset' ) ;
207+ }
208+ if ( offset !== undefined ) {
209+ localVarQueryParameter [ 'offset' ] = offset ;
210+ }
211+
180212
181213
182214 localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ;
@@ -209,11 +241,13 @@ export const BackupsApiFp = function(configuration?: Configuration) {
209241 * Retrieves a list of all backups of the given PostgreSQL cluster.
210242 * @summary List backups of cluster
211243 * @param {string } clusterId The unique ID of the cluster.
244+ * @param {number } [limit] The maximum number of elements to return. Use together with \'offset\' for pagination.
245+ * @param {number } [offset] The first element to return. Use together with \'limit\' for pagination.
212246 * @param {* } [options] Override http request option.
213247 * @throws {RequiredError }
214248 */
215- async clusterBackupsGet ( clusterId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < ClusterBackupList > > {
216- const axiosArgs = await BackupsApiAxiosParamCreator ( configuration ) . clusterBackupsGet ( clusterId , options ) ;
249+ async clusterBackupsGet ( clusterId : string , limit ?: number , offset ?: number , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < ClusterBackupList > > {
250+ const axiosArgs = await BackupsApiAxiosParamCreator ( configuration ) . clusterBackupsGet ( clusterId , limit , offset , options ) ;
217251 return runRequest ( axiosArgs , configuration ) ;
218252 } ,
219253 /**
@@ -230,11 +264,13 @@ export const BackupsApiFp = function(configuration?: Configuration) {
230264 /**
231265 * Retrieves a list of all PostgreSQL cluster backups.
232266 * @summary List cluster backups
267+ * @param {number } [limit] The maximum number of elements to return. Use together with \'offset\' for pagination.
268+ * @param {number } [offset] The first element to return. Use together with \'limit\' for pagination.
233269 * @param {* } [options] Override http request option.
234270 * @throws {RequiredError }
235271 */
236- async clustersBackupsGet ( options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < ClusterBackupList > > {
237- const axiosArgs = await BackupsApiAxiosParamCreator ( configuration ) . clustersBackupsGet ( options ) ;
272+ async clustersBackupsGet ( limit ?: number , offset ?: number , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < ClusterBackupList > > {
273+ const axiosArgs = await BackupsApiAxiosParamCreator ( configuration ) . clustersBackupsGet ( limit , offset , options ) ;
238274 return runRequest ( axiosArgs , configuration ) ;
239275 } ,
240276 }
@@ -250,11 +286,13 @@ export const BackupsApiFactory = function (configuration?: Configuration, basePa
250286 * Retrieves a list of all backups of the given PostgreSQL cluster.
251287 * @summary List backups of cluster
252288 * @param {string } clusterId The unique ID of the cluster.
289+ * @param {number } [limit] The maximum number of elements to return. Use together with \'offset\' for pagination.
290+ * @param {number } [offset] The first element to return. Use together with \'limit\' for pagination.
253291 * @param {* } [options] Override http request option.
254292 * @throws {RequiredError }
255293 */
256- clusterBackupsGet ( clusterId : string , options ?: any ) : AxiosPromise < ClusterBackupList > {
257- return BackupsApiFp ( configuration ) . clusterBackupsGet ( clusterId , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
294+ clusterBackupsGet ( clusterId : string , limit ?: number , offset ?: number , options ?: any ) : AxiosPromise < ClusterBackupList > {
295+ return BackupsApiFp ( configuration ) . clusterBackupsGet ( clusterId , limit , offset , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
258296 } ,
259297 /**
260298 * Retrieve a PostgreSQL cluster backup by using its ID. This value can be found when you GET a list of PostgreSQL cluster backups.
@@ -269,11 +307,13 @@ export const BackupsApiFactory = function (configuration?: Configuration, basePa
269307 /**
270308 * Retrieves a list of all PostgreSQL cluster backups.
271309 * @summary List cluster backups
310+ * @param {number } [limit] The maximum number of elements to return. Use together with \'offset\' for pagination.
311+ * @param {number } [offset] The first element to return. Use together with \'limit\' for pagination.
272312 * @param {* } [options] Override http request option.
273313 * @throws {RequiredError }
274314 */
275- clustersBackupsGet ( options ?: any ) : AxiosPromise < ClusterBackupList > {
276- return BackupsApiFp ( configuration ) . clustersBackupsGet ( options ) . then ( ( request ) => request ( axios , basePath ) ) ;
315+ clustersBackupsGet ( limit ?: number , offset ?: number , options ?: any ) : AxiosPromise < ClusterBackupList > {
316+ return BackupsApiFp ( configuration ) . clustersBackupsGet ( limit , offset , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
277317 } ,
278318 } ;
279319} ;
@@ -290,6 +330,20 @@ export interface BackupsApiClusterBackupsGetRequest {
290330 * @memberof BackupsApiClusterBackupsGet
291331 */
292332 readonly clusterId : string
333+
334+ /**
335+ * The maximum number of elements to return. Use together with \'offset\' for pagination.
336+ * @type {number }
337+ * @memberof BackupsApiClusterBackupsGet
338+ */
339+ readonly limit ?: number
340+
341+ /**
342+ * The first element to return. Use together with \'limit\' for pagination.
343+ * @type {number }
344+ * @memberof BackupsApiClusterBackupsGet
345+ */
346+ readonly offset ?: number
293347}
294348
295349/**
@@ -306,6 +360,27 @@ export interface BackupsApiClustersBackupsFindByIdRequest {
306360 readonly backupId : string
307361}
308362
363+ /**
364+ * Request parameters for clustersBackupsGet operation in BackupsApi.
365+ * @export
366+ * @interface BackupsApiClustersBackupsGetRequest
367+ */
368+ export interface BackupsApiClustersBackupsGetRequest {
369+ /**
370+ * The maximum number of elements to return. Use together with \'offset\' for pagination.
371+ * @type {number }
372+ * @memberof BackupsApiClustersBackupsGet
373+ */
374+ readonly limit ?: number
375+
376+ /**
377+ * The first element to return. Use together with \'limit\' for pagination.
378+ * @type {number }
379+ * @memberof BackupsApiClustersBackupsGet
380+ */
381+ readonly offset ?: number
382+ }
383+
309384/**
310385 * BackupsApi - object-oriented interface
311386 * @export
@@ -322,7 +397,7 @@ export class BackupsApi extends BaseAPI {
322397 * @memberof BackupsApi
323398 */
324399 public clusterBackupsGet ( requestParameters : BackupsApiClusterBackupsGetRequest , options ?: any ) {
325- return BackupsApiFp ( this . configuration ) . clusterBackupsGet ( requestParameters . clusterId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
400+ return BackupsApiFp ( this . configuration ) . clusterBackupsGet ( requestParameters . clusterId , requestParameters . limit , requestParameters . offset , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
326401 }
327402
328403 /**
@@ -340,11 +415,12 @@ export class BackupsApi extends BaseAPI {
340415 /**
341416 * Retrieves a list of all PostgreSQL cluster backups.
342417 * @summary List cluster backups
418+ * @param {BackupsApiClustersBackupsGetRequest } requestParameters Request parameters.
343419 * @param {* } [options] Override http request option.
344420 * @throws {RequiredError }
345421 * @memberof BackupsApi
346422 */
347- public clustersBackupsGet ( options ?: any ) {
348- return BackupsApiFp ( this . configuration ) . clustersBackupsGet ( options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
423+ public clustersBackupsGet ( requestParameters : BackupsApiClustersBackupsGetRequest = { } , options ?: any ) {
424+ return BackupsApiFp ( this . configuration ) . clustersBackupsGet ( requestParameters . limit , requestParameters . offset , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
349425 }
350426}
0 commit comments