Skip to content

Commit c7b5bb9

Browse files
yoshi-automationsofisl
authored andcommitted
feat(netapp): update the API
#### netapp:v1beta1 The following keys were added: - resources.projects.resources.locations.resources.volumes.methods.restore.description - resources.projects.resources.locations.resources.volumes.methods.restore.flatPath - resources.projects.resources.locations.resources.volumes.methods.restore.httpMethod - resources.projects.resources.locations.resources.volumes.methods.restore.id - resources.projects.resources.locations.resources.volumes.methods.restore.parameterOrder - resources.projects.resources.locations.resources.volumes.methods.restore.parameters.name.description - resources.projects.resources.locations.resources.volumes.methods.restore.parameters.name.location - resources.projects.resources.locations.resources.volumes.methods.restore.parameters.name.pattern - resources.projects.resources.locations.resources.volumes.methods.restore.parameters.name.required - resources.projects.resources.locations.resources.volumes.methods.restore.parameters.name.type - resources.projects.resources.locations.resources.volumes.methods.restore.path - resources.projects.resources.locations.resources.volumes.methods.restore.request.$ref - resources.projects.resources.locations.resources.volumes.methods.restore.response.$ref - resources.projects.resources.locations.resources.volumes.methods.restore.scopes - schemas.RestoreBackupFilesRequest.description - schemas.RestoreBackupFilesRequest.id - schemas.RestoreBackupFilesRequest.properties.backup.description - schemas.RestoreBackupFilesRequest.properties.backup.type - schemas.RestoreBackupFilesRequest.properties.fileList.description - schemas.RestoreBackupFilesRequest.properties.fileList.items.type - schemas.RestoreBackupFilesRequest.properties.fileList.type - schemas.RestoreBackupFilesRequest.properties.restoreDestinationPath.description - schemas.RestoreBackupFilesRequest.properties.restoreDestinationPath.type - schemas.RestoreBackupFilesRequest.type
1 parent b42712e commit c7b5bb9

File tree

2 files changed

+231
-1
lines changed

2 files changed

+231
-1
lines changed

discovery/netapp-v1beta1.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,34 @@
15921592
"https://www.googleapis.com/auth/cloud-platform"
15931593
]
15941594
},
1595+
"restore": {
1596+
"description": "Restore files from a backup to a volume.",
1597+
"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}:restore",
1598+
"httpMethod": "POST",
1599+
"id": "netapp.projects.locations.volumes.restore",
1600+
"parameterOrder": [
1601+
"name"
1602+
],
1603+
"parameters": {
1604+
"name": {
1605+
"description": "Required. The volume resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`",
1606+
"location": "path",
1607+
"pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$",
1608+
"required": true,
1609+
"type": "string"
1610+
}
1611+
},
1612+
"path": "v1beta1/{+name}:restore",
1613+
"request": {
1614+
"$ref": "RestoreBackupFilesRequest"
1615+
},
1616+
"response": {
1617+
"$ref": "Operation"
1618+
},
1619+
"scopes": [
1620+
"https://www.googleapis.com/auth/cloud-platform"
1621+
]
1622+
},
15951623
"revert": {
15961624
"description": "Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.",
15971625
"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}:revert",
@@ -2270,7 +2298,7 @@
22702298
}
22712299
}
22722300
},
2273-
"revision": "20250616",
2301+
"revision": "20250630",
22742302
"rootUrl": "https://netapp.googleapis.com/",
22752303
"schemas": {
22762304
"ActiveDirectory": {
@@ -3836,6 +3864,28 @@
38363864
},
38373865
"type": "object"
38383866
},
3867+
"RestoreBackupFilesRequest": {
3868+
"description": "RestoreBackupFilesRequest restores files from a backup to a volume.",
3869+
"id": "RestoreBackupFilesRequest",
3870+
"properties": {
3871+
"backup": {
3872+
"description": "Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`",
3873+
"type": "string"
3874+
},
3875+
"fileList": {
3876+
"description": "Required. List of files to be restored in the form of their absolute path as in source volume.",
3877+
"items": {
3878+
"type": "string"
3879+
},
3880+
"type": "array"
3881+
},
3882+
"restoreDestinationPath": {
3883+
"description": "Required. Absolute directory path in the destination volume.",
3884+
"type": "string"
3885+
}
3886+
},
3887+
"type": "object"
3888+
},
38393889
"RestoreParameters": {
38403890
"description": "The RestoreParameters if volume is created from a snapshot or backup.",
38413891
"id": "RestoreParameters",

src/apis/netapp/v1beta1.ts

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,23 @@ export namespace netapp_v1beta1 {
11021102
*/
11031103
transferStats?: Schema$TransferStats;
11041104
}
1105+
/**
1106+
* RestoreBackupFilesRequest restores files from a backup to a volume.
1107+
*/
1108+
export interface Schema$RestoreBackupFilesRequest {
1109+
/**
1110+
* Required. The backup resource name, in the format `projects/{project_id\}/locations/{location\}/backupVaults/{backup_vault_id\}/backups/{backup_id\}`
1111+
*/
1112+
backup?: string | null;
1113+
/**
1114+
* Required. List of files to be restored in the form of their absolute path as in source volume.
1115+
*/
1116+
fileList?: string[] | null;
1117+
/**
1118+
* Required. Absolute directory path in the destination volume.
1119+
*/
1120+
restoreDestinationPath?: string | null;
1121+
}
11051122
/**
11061123
* The RestoreParameters if volume is created from a snapshot or backup.
11071124
*/
@@ -9183,6 +9200,157 @@ export namespace netapp_v1beta1 {
91839200
}
91849201
}
91859202

9203+
/**
9204+
* Restore files from a backup to a volume.
9205+
* @example
9206+
* ```js
9207+
* // Before running the sample:
9208+
* // - Enable the API at:
9209+
* // https://console.developers.google.com/apis/api/netapp.googleapis.com
9210+
* // - Login into gcloud by running:
9211+
* // ```sh
9212+
* // $ gcloud auth application-default login
9213+
* // ```
9214+
* // - Install the npm module by running:
9215+
* // ```sh
9216+
* // $ npm install googleapis
9217+
* // ```
9218+
*
9219+
* const {google} = require('googleapis');
9220+
* const netapp = google.netapp('v1beta1');
9221+
*
9222+
* async function main() {
9223+
* const auth = new google.auth.GoogleAuth({
9224+
* // Scopes can be specified either as an array or as a single, space-delimited string.
9225+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9226+
* });
9227+
*
9228+
* // Acquire an auth client, and bind it to all future calls
9229+
* const authClient = await auth.getClient();
9230+
* google.options({auth: authClient});
9231+
*
9232+
* // Do the magic
9233+
* const res = await netapp.projects.locations.volumes.restore({
9234+
* // Required. The volume resource name, in the format `projects/{project_id\}/locations/{location\}/volumes/{volume_id\}`
9235+
* name: 'projects/my-project/locations/my-location/volumes/my-volume',
9236+
*
9237+
* // Request body metadata
9238+
* requestBody: {
9239+
* // request body parameters
9240+
* // {
9241+
* // "backup": "my_backup",
9242+
* // "fileList": [],
9243+
* // "restoreDestinationPath": "my_restoreDestinationPath"
9244+
* // }
9245+
* },
9246+
* });
9247+
* console.log(res.data);
9248+
*
9249+
* // Example response
9250+
* // {
9251+
* // "done": false,
9252+
* // "error": {},
9253+
* // "metadata": {},
9254+
* // "name": "my_name",
9255+
* // "response": {}
9256+
* // }
9257+
* }
9258+
*
9259+
* main().catch(e => {
9260+
* console.error(e);
9261+
* throw e;
9262+
* });
9263+
*
9264+
* ```
9265+
*
9266+
* @param params - Parameters for request
9267+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9268+
* @param callback - Optional callback that handles the response.
9269+
* @returns A promise if used with async/await, or void if used with a callback.
9270+
*/
9271+
restore(
9272+
params: Params$Resource$Projects$Locations$Volumes$Restore,
9273+
options: StreamMethodOptions
9274+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
9275+
restore(
9276+
params?: Params$Resource$Projects$Locations$Volumes$Restore,
9277+
options?: MethodOptions
9278+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
9279+
restore(
9280+
params: Params$Resource$Projects$Locations$Volumes$Restore,
9281+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
9282+
callback: BodyResponseCallback<Readable>
9283+
): void;
9284+
restore(
9285+
params: Params$Resource$Projects$Locations$Volumes$Restore,
9286+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
9287+
callback: BodyResponseCallback<Schema$Operation>
9288+
): void;
9289+
restore(
9290+
params: Params$Resource$Projects$Locations$Volumes$Restore,
9291+
callback: BodyResponseCallback<Schema$Operation>
9292+
): void;
9293+
restore(callback: BodyResponseCallback<Schema$Operation>): void;
9294+
restore(
9295+
paramsOrCallback?:
9296+
| Params$Resource$Projects$Locations$Volumes$Restore
9297+
| BodyResponseCallback<Schema$Operation>
9298+
| BodyResponseCallback<Readable>,
9299+
optionsOrCallback?:
9300+
| MethodOptions
9301+
| StreamMethodOptions
9302+
| BodyResponseCallback<Schema$Operation>
9303+
| BodyResponseCallback<Readable>,
9304+
callback?:
9305+
| BodyResponseCallback<Schema$Operation>
9306+
| BodyResponseCallback<Readable>
9307+
):
9308+
| void
9309+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
9310+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
9311+
let params = (paramsOrCallback ||
9312+
{}) as Params$Resource$Projects$Locations$Volumes$Restore;
9313+
let options = (optionsOrCallback || {}) as MethodOptions;
9314+
9315+
if (typeof paramsOrCallback === 'function') {
9316+
callback = paramsOrCallback;
9317+
params = {} as Params$Resource$Projects$Locations$Volumes$Restore;
9318+
options = {};
9319+
}
9320+
9321+
if (typeof optionsOrCallback === 'function') {
9322+
callback = optionsOrCallback;
9323+
options = {};
9324+
}
9325+
9326+
const rootUrl = options.rootUrl || 'https://netapp.googleapis.com/';
9327+
const parameters = {
9328+
options: Object.assign(
9329+
{
9330+
url: (rootUrl + '/v1beta1/{+name}:restore').replace(
9331+
/([^:]\/)\/+/g,
9332+
'$1'
9333+
),
9334+
method: 'POST',
9335+
apiVersion: '',
9336+
},
9337+
options
9338+
),
9339+
params,
9340+
requiredParams: ['name'],
9341+
pathParams: ['name'],
9342+
context: this.context,
9343+
};
9344+
if (callback) {
9345+
createAPIRequest<Schema$Operation>(
9346+
parameters,
9347+
callback as BodyResponseCallback<unknown>
9348+
);
9349+
} else {
9350+
return createAPIRequest<Schema$Operation>(parameters);
9351+
}
9352+
}
9353+
91869354
/**
91879355
* Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.
91889356
* @example
@@ -9406,6 +9574,18 @@ export namespace netapp_v1beta1 {
94069574
*/
94079575
requestBody?: Schema$Volume;
94089576
}
9577+
export interface Params$Resource$Projects$Locations$Volumes$Restore
9578+
extends StandardParameters {
9579+
/**
9580+
* Required. The volume resource name, in the format `projects/{project_id\}/locations/{location\}/volumes/{volume_id\}`
9581+
*/
9582+
name?: string;
9583+
9584+
/**
9585+
* Request body metadata
9586+
*/
9587+
requestBody?: Schema$RestoreBackupFilesRequest;
9588+
}
94099589
export interface Params$Resource$Projects$Locations$Volumes$Revert
94109590
extends StandardParameters {
94119591
/**

0 commit comments

Comments
 (0)