Skip to content

Commit b04810c

Browse files
yoshi-automationfeywind
authored andcommitted
feat(looker): update the API
#### looker:v1 The following keys were added: - resources.projects.resources.locations.resources.instances.methods.undelete.description - resources.projects.resources.locations.resources.instances.methods.undelete.flatPath - resources.projects.resources.locations.resources.instances.methods.undelete.httpMethod - resources.projects.resources.locations.resources.instances.methods.undelete.id - resources.projects.resources.locations.resources.instances.methods.undelete.parameterOrder - resources.projects.resources.locations.resources.instances.methods.undelete.parameters.name.description - resources.projects.resources.locations.resources.instances.methods.undelete.parameters.name.location - resources.projects.resources.locations.resources.instances.methods.undelete.parameters.name.pattern - resources.projects.resources.locations.resources.instances.methods.undelete.parameters.name.required - resources.projects.resources.locations.resources.instances.methods.undelete.parameters.name.type - resources.projects.resources.locations.resources.instances.methods.undelete.path - resources.projects.resources.locations.resources.instances.methods.undelete.request.$ref - resources.projects.resources.locations.resources.instances.methods.undelete.response.$ref - resources.projects.resources.locations.resources.instances.methods.undelete.scopes - schemas.Instance.properties.catalogIntegrationEnabled.description - schemas.Instance.properties.catalogIntegrationEnabled.type - schemas.Instance.properties.softDeleteReason.description - schemas.Instance.properties.softDeleteReason.enum - schemas.Instance.properties.softDeleteReason.enumDescriptions - schemas.Instance.properties.softDeleteReason.readOnly - schemas.Instance.properties.softDeleteReason.type - schemas.Instance.properties.suspendedTime.description - schemas.Instance.properties.suspendedTime.format - schemas.Instance.properties.suspendedTime.readOnly - schemas.Instance.properties.suspendedTime.type - schemas.UndeleteInstanceRequest.description - schemas.UndeleteInstanceRequest.id - schemas.UndeleteInstanceRequest.type
1 parent f9d42c7 commit b04810c

2 files changed

Lines changed: 245 additions & 1 deletion

File tree

‎discovery/looker-v1.json‎

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,34 @@
454454
"scopes": [
455455
"https://www.googleapis.com/auth/cloud-platform"
456456
]
457+
},
458+
"undelete": {
459+
"description": "Undeletes Looker instance.",
460+
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:undelete",
461+
"httpMethod": "POST",
462+
"id": "looker.projects.locations.instances.undelete",
463+
"parameterOrder": [
464+
"name"
465+
],
466+
"parameters": {
467+
"name": {
468+
"description": "Required. Format: projects/{project}/locations/{location}/instances/{instance}",
469+
"location": "path",
470+
"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
471+
"required": true,
472+
"type": "string"
473+
}
474+
},
475+
"path": "v1/{+name}:undelete",
476+
"request": {
477+
"$ref": "UndeleteInstanceRequest"
478+
},
479+
"response": {
480+
"$ref": "Operation"
481+
},
482+
"scopes": [
483+
"https://www.googleapis.com/auth/cloud-platform"
484+
]
457485
}
458486
},
459487
"resources": {
@@ -715,7 +743,7 @@
715743
}
716744
}
717745
},
718-
"revision": "20251203",
746+
"revision": "20260119",
719747
"rootUrl": "https://looker.googleapis.com/",
720748
"schemas": {
721749
"AdminSettings": {
@@ -983,6 +1011,10 @@
9831011
"$ref": "AdminSettings",
9841012
"description": "Looker Instance Admin settings."
9851013
},
1014+
"catalogIntegrationEnabled": {
1015+
"description": "Optional. Indicates whether catalog integration is enabled for the Looker instance.",
1016+
"type": "boolean"
1017+
},
9861018
"classType": {
9871019
"description": "Optional. Storage class of the instance.",
9881020
"enum": [
@@ -1153,6 +1185,23 @@
11531185
"readOnly": true,
11541186
"type": "boolean"
11551187
},
1188+
"softDeleteReason": {
1189+
"description": "Output only. The reason for the instance being in a soft-deleted state.",
1190+
"enum": [
1191+
"SOFT_DELETE_REASON_UNSPECIFIED",
1192+
"BILLING_ACCOUNT_ISSUE",
1193+
"TRIAL_EXPIRED",
1194+
"CUSTOMER_REQUEST"
1195+
],
1196+
"enumDescriptions": [
1197+
"Soft delete reason is unspecified. This is the default value.",
1198+
"Instance is soft deleted due to billing account issues.",
1199+
"Instance is soft deleted due to trial expiration.",
1200+
"Instance is soft deleted by the customer."
1201+
],
1202+
"readOnly": true,
1203+
"type": "string"
1204+
},
11561205
"state": {
11571206
"description": "Output only. The state of the instance.",
11581207
"enum": [
@@ -1180,6 +1229,12 @@
11801229
"readOnly": true,
11811230
"type": "string"
11821231
},
1232+
"suspendedTime": {
1233+
"description": "Output only. The time when the Looker instance was suspended (soft deleted).",
1234+
"format": "google-datetime",
1235+
"readOnly": true,
1236+
"type": "string"
1237+
},
11831238
"updateTime": {
11841239
"description": "Output only. The time when the Looker instance was last updated.",
11851240
"format": "google-datetime",
@@ -1670,6 +1725,12 @@
16701725
},
16711726
"type": "object"
16721727
},
1728+
"UndeleteInstanceRequest": {
1729+
"description": "Request options for undeleting an instance.",
1730+
"id": "UndeleteInstanceRequest",
1731+
"properties": {},
1732+
"type": "object"
1733+
},
16731734
"UserMetadata": {
16741735
"description": "Metadata about users for a Looker instance.",
16751736
"id": "UserMetadata",

‎src/apis/looker/v1.ts‎

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ export namespace looker_v1 {
307307
* Looker Instance Admin settings.
308308
*/
309309
adminSettings?: Schema$AdminSettings;
310+
/**
311+
* Optional. Indicates whether catalog integration is enabled for the Looker instance.
312+
*/
313+
catalogIntegrationEnabled?: boolean | null;
310314
/**
311315
* Optional. Storage class of the instance.
312316
*/
@@ -427,10 +431,18 @@ export namespace looker_v1 {
427431
* Output only. Reserved for future use.
428432
*/
429433
satisfiesPzs?: boolean | null;
434+
/**
435+
* Output only. The reason for the instance being in a soft-deleted state.
436+
*/
437+
softDeleteReason?: string | null;
430438
/**
431439
* Output only. The state of the instance.
432440
*/
433441
state?: string | null;
442+
/**
443+
* Output only. The time when the Looker instance was suspended (soft deleted).
444+
*/
445+
suspendedTime?: string | null;
434446
/**
435447
* Output only. The time when the Looker instance was last updated.
436448
*/
@@ -761,6 +773,10 @@ export namespace looker_v1 {
761773
*/
762774
seconds?: number | null;
763775
}
776+
/**
777+
* Request options for undeleting an instance.
778+
*/
779+
export interface Schema$UndeleteInstanceRequest {}
764780
/**
765781
* Metadata about users for a Looker instance.
766782
*/
@@ -1167,6 +1183,7 @@ export namespace looker_v1 {
11671183
* // request body parameters
11681184
* // {
11691185
* // "adminSettings": {},
1186+
* // "catalogIntegrationEnabled": false,
11701187
* // "classType": "my_classType",
11711188
* // "consumerNetwork": "my_consumerNetwork",
11721189
* // "controlledEgressConfig": {},
@@ -1197,7 +1214,9 @@ export namespace looker_v1 {
11971214
* // "reservedRange": "my_reservedRange",
11981215
* // "satisfiesPzi": false,
11991216
* // "satisfiesPzs": false,
1217+
* // "softDeleteReason": "my_softDeleteReason",
12001218
* // "state": "my_state",
1219+
* // "suspendedTime": "my_suspendedTime",
12011220
* // "updateTime": "my_updateTime",
12021221
* // "userMetadata": {}
12031222
* // }
@@ -1636,6 +1655,7 @@ export namespace looker_v1 {
16361655
* // Example response
16371656
* // {
16381657
* // "adminSettings": {},
1658+
* // "catalogIntegrationEnabled": false,
16391659
* // "classType": "my_classType",
16401660
* // "consumerNetwork": "my_consumerNetwork",
16411661
* // "controlledEgressConfig": {},
@@ -1666,7 +1686,9 @@ export namespace looker_v1 {
16661686
* // "reservedRange": "my_reservedRange",
16671687
* // "satisfiesPzi": false,
16681688
* // "satisfiesPzs": false,
1689+
* // "softDeleteReason": "my_softDeleteReason",
16691690
* // "state": "my_state",
1691+
* // "suspendedTime": "my_suspendedTime",
16701692
* // "updateTime": "my_updateTime",
16711693
* // "userMetadata": {}
16721694
* // }
@@ -2096,6 +2118,7 @@ export namespace looker_v1 {
20962118
* // request body parameters
20972119
* // {
20982120
* // "adminSettings": {},
2121+
* // "catalogIntegrationEnabled": false,
20992122
* // "classType": "my_classType",
21002123
* // "consumerNetwork": "my_consumerNetwork",
21012124
* // "controlledEgressConfig": {},
@@ -2126,7 +2149,9 @@ export namespace looker_v1 {
21262149
* // "reservedRange": "my_reservedRange",
21272150
* // "satisfiesPzi": false,
21282151
* // "satisfiesPzs": false,
2152+
* // "softDeleteReason": "my_softDeleteReason",
21292153
* // "state": "my_state",
2154+
* // "suspendedTime": "my_suspendedTime",
21302155
* // "updateTime": "my_updateTime",
21312156
* // "userMetadata": {}
21322157
* // }
@@ -2531,6 +2556,153 @@ export namespace looker_v1 {
25312556
return createAPIRequest<Schema$Operation>(parameters);
25322557
}
25332558
}
2559+
2560+
/**
2561+
* Undeletes Looker instance.
2562+
* @example
2563+
* ```js
2564+
* // Before running the sample:
2565+
* // - Enable the API at:
2566+
* // https://console.developers.google.com/apis/api/looker.googleapis.com
2567+
* // - Login into gcloud by running:
2568+
* // ```sh
2569+
* // $ gcloud auth application-default login
2570+
* // ```
2571+
* // - Install the npm module by running:
2572+
* // ```sh
2573+
* // $ npm install googleapis
2574+
* // ```
2575+
*
2576+
* const {google} = require('googleapis');
2577+
* const looker = google.looker('v1');
2578+
*
2579+
* async function main() {
2580+
* const auth = new google.auth.GoogleAuth({
2581+
* // Scopes can be specified either as an array or as a single, space-delimited string.
2582+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2583+
* });
2584+
*
2585+
* // Acquire an auth client, and bind it to all future calls
2586+
* const authClient = await auth.getClient();
2587+
* google.options({auth: authClient});
2588+
*
2589+
* // Do the magic
2590+
* const res = await looker.projects.locations.instances.undelete({
2591+
* // Required. Format: projects/{project\}/locations/{location\}/instances/{instance\}
2592+
* name: 'projects/my-project/locations/my-location/instances/my-instance',
2593+
*
2594+
* // Request body metadata
2595+
* requestBody: {
2596+
* // request body parameters
2597+
* // {}
2598+
* },
2599+
* });
2600+
* console.log(res.data);
2601+
*
2602+
* // Example response
2603+
* // {
2604+
* // "done": false,
2605+
* // "error": {},
2606+
* // "metadata": {},
2607+
* // "name": "my_name",
2608+
* // "response": {}
2609+
* // }
2610+
* }
2611+
*
2612+
* main().catch(e => {
2613+
* console.error(e);
2614+
* throw e;
2615+
* });
2616+
*
2617+
* ```
2618+
*
2619+
* @param params - Parameters for request
2620+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2621+
* @param callback - Optional callback that handles the response.
2622+
* @returns A promise if used with async/await, or void if used with a callback.
2623+
*/
2624+
undelete(
2625+
params: Params$Resource$Projects$Locations$Instances$Undelete,
2626+
options: StreamMethodOptions
2627+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
2628+
undelete(
2629+
params?: Params$Resource$Projects$Locations$Instances$Undelete,
2630+
options?: MethodOptions
2631+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2632+
undelete(
2633+
params: Params$Resource$Projects$Locations$Instances$Undelete,
2634+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
2635+
callback: BodyResponseCallback<Readable>
2636+
): void;
2637+
undelete(
2638+
params: Params$Resource$Projects$Locations$Instances$Undelete,
2639+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2640+
callback: BodyResponseCallback<Schema$Operation>
2641+
): void;
2642+
undelete(
2643+
params: Params$Resource$Projects$Locations$Instances$Undelete,
2644+
callback: BodyResponseCallback<Schema$Operation>
2645+
): void;
2646+
undelete(callback: BodyResponseCallback<Schema$Operation>): void;
2647+
undelete(
2648+
paramsOrCallback?:
2649+
| Params$Resource$Projects$Locations$Instances$Undelete
2650+
| BodyResponseCallback<Schema$Operation>
2651+
| BodyResponseCallback<Readable>,
2652+
optionsOrCallback?:
2653+
| MethodOptions
2654+
| StreamMethodOptions
2655+
| BodyResponseCallback<Schema$Operation>
2656+
| BodyResponseCallback<Readable>,
2657+
callback?:
2658+
| BodyResponseCallback<Schema$Operation>
2659+
| BodyResponseCallback<Readable>
2660+
):
2661+
| void
2662+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2663+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
2664+
let params = (paramsOrCallback ||
2665+
{}) as Params$Resource$Projects$Locations$Instances$Undelete;
2666+
let options = (optionsOrCallback || {}) as MethodOptions;
2667+
2668+
if (typeof paramsOrCallback === 'function') {
2669+
callback = paramsOrCallback;
2670+
params = {} as Params$Resource$Projects$Locations$Instances$Undelete;
2671+
options = {};
2672+
}
2673+
2674+
if (typeof optionsOrCallback === 'function') {
2675+
callback = optionsOrCallback;
2676+
options = {};
2677+
}
2678+
2679+
const rootUrl = options.rootUrl || 'https://looker.googleapis.com/';
2680+
const parameters = {
2681+
options: Object.assign(
2682+
{
2683+
url: (rootUrl + '/v1/{+name}:undelete').replace(
2684+
/([^:]\/)\/+/g,
2685+
'$1'
2686+
),
2687+
method: 'POST',
2688+
apiVersion: '',
2689+
},
2690+
options
2691+
),
2692+
params,
2693+
requiredParams: ['name'],
2694+
pathParams: ['name'],
2695+
context: this.context,
2696+
};
2697+
if (callback) {
2698+
createAPIRequest<Schema$Operation>(
2699+
parameters,
2700+
callback as BodyResponseCallback<unknown>
2701+
);
2702+
} else {
2703+
return createAPIRequest<Schema$Operation>(parameters);
2704+
}
2705+
}
25342706
}
25352707

25362708
export interface Params$Resource$Projects$Locations$Instances$Create extends StandardParameters {
@@ -2637,6 +2809,17 @@ export namespace looker_v1 {
26372809
*/
26382810
requestBody?: Schema$RestoreInstanceRequest;
26392811
}
2812+
export interface Params$Resource$Projects$Locations$Instances$Undelete extends StandardParameters {
2813+
/**
2814+
* Required. Format: projects/{project\}/locations/{location\}/instances/{instance\}
2815+
*/
2816+
name?: string;
2817+
2818+
/**
2819+
* Request body metadata
2820+
*/
2821+
requestBody?: Schema$UndeleteInstanceRequest;
2822+
}
26402823

26412824
export class Resource$Projects$Locations$Instances$Backups {
26422825
context: APIRequestContext;

0 commit comments

Comments
 (0)