From 0879e9a5ba8049f508bc8a496494ccceb33d77de Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Fri, 2 Feb 2024 01:30:43 +0000 Subject: [PATCH] feat(recommender): update the API #### recommender:v1beta1 The following keys were added: - resources.billingAccounts.resources.locations.methods.list.description - resources.billingAccounts.resources.locations.methods.list.flatPath - resources.billingAccounts.resources.locations.methods.list.httpMethod - resources.billingAccounts.resources.locations.methods.list.id - resources.billingAccounts.resources.locations.methods.list.parameterOrder - resources.billingAccounts.resources.locations.methods.list.parameters.filter.description - resources.billingAccounts.resources.locations.methods.list.parameters.filter.location - resources.billingAccounts.resources.locations.methods.list.parameters.filter.type - resources.billingAccounts.resources.locations.methods.list.parameters.name.description - resources.billingAccounts.resources.locations.methods.list.parameters.name.location - resources.billingAccounts.resources.locations.methods.list.parameters.name.pattern - resources.billingAccounts.resources.locations.methods.list.parameters.name.required - resources.billingAccounts.resources.locations.methods.list.parameters.name.type - resources.billingAccounts.resources.locations.methods.list.parameters.pageSize.description - resources.billingAccounts.resources.locations.methods.list.parameters.pageSize.format - resources.billingAccounts.resources.locations.methods.list.parameters.pageSize.location - resources.billingAccounts.resources.locations.methods.list.parameters.pageSize.type - resources.billingAccounts.resources.locations.methods.list.parameters.pageToken.description - resources.billingAccounts.resources.locations.methods.list.parameters.pageToken.location - resources.billingAccounts.resources.locations.methods.list.parameters.pageToken.type - resources.billingAccounts.resources.locations.methods.list.path - resources.billingAccounts.resources.locations.methods.list.response.$ref - resources.billingAccounts.resources.locations.methods.list.scopes - resources.folders.resources.locations.methods.list.description - resources.folders.resources.locations.methods.list.flatPath - resources.folders.resources.locations.methods.list.httpMethod - resources.folders.resources.locations.methods.list.id - resources.folders.resources.locations.methods.list.parameterOrder - resources.folders.resources.locations.methods.list.parameters.filter.description - resources.folders.resources.locations.methods.list.parameters.filter.location - resources.folders.resources.locations.methods.list.parameters.filter.type - resources.folders.resources.locations.methods.list.parameters.name.description - resources.folders.resources.locations.methods.list.parameters.name.location - resources.folders.resources.locations.methods.list.parameters.name.pattern - resources.folders.resources.locations.methods.list.parameters.name.required - resources.folders.resources.locations.methods.list.parameters.name.type - resources.folders.resources.locations.methods.list.parameters.pageSize.description - resources.folders.resources.locations.methods.list.parameters.pageSize.format - resources.folders.resources.locations.methods.list.parameters.pageSize.location - resources.folders.resources.locations.methods.list.parameters.pageSize.type - resources.folders.resources.locations.methods.list.parameters.pageToken.description - resources.folders.resources.locations.methods.list.parameters.pageToken.location - resources.folders.resources.locations.methods.list.parameters.pageToken.type - resources.folders.resources.locations.methods.list.path - resources.folders.resources.locations.methods.list.response.$ref - resources.folders.resources.locations.methods.list.scopes - resources.organizations.resources.locations.methods.list.description - resources.organizations.resources.locations.methods.list.flatPath - resources.organizations.resources.locations.methods.list.httpMethod - resources.organizations.resources.locations.methods.list.id - resources.organizations.resources.locations.methods.list.parameterOrder - resources.organizations.resources.locations.methods.list.parameters.filter.description - resources.organizations.resources.locations.methods.list.parameters.filter.location - resources.organizations.resources.locations.methods.list.parameters.filter.type - resources.organizations.resources.locations.methods.list.parameters.name.description - resources.organizations.resources.locations.methods.list.parameters.name.location - resources.organizations.resources.locations.methods.list.parameters.name.pattern - resources.organizations.resources.locations.methods.list.parameters.name.required - resources.organizations.resources.locations.methods.list.parameters.name.type - resources.organizations.resources.locations.methods.list.parameters.pageSize.description - resources.organizations.resources.locations.methods.list.parameters.pageSize.format - resources.organizations.resources.locations.methods.list.parameters.pageSize.location - resources.organizations.resources.locations.methods.list.parameters.pageSize.type - resources.organizations.resources.locations.methods.list.parameters.pageToken.description - resources.organizations.resources.locations.methods.list.parameters.pageToken.location - resources.organizations.resources.locations.methods.list.parameters.pageToken.type - resources.organizations.resources.locations.methods.list.path - resources.organizations.resources.locations.methods.list.response.$ref - resources.organizations.resources.locations.methods.list.scopes - resources.projects.resources.locations.methods.list.description - resources.projects.resources.locations.methods.list.flatPath - resources.projects.resources.locations.methods.list.httpMethod - resources.projects.resources.locations.methods.list.id - resources.projects.resources.locations.methods.list.parameterOrder - resources.projects.resources.locations.methods.list.parameters.filter.description - resources.projects.resources.locations.methods.list.parameters.filter.location - resources.projects.resources.locations.methods.list.parameters.filter.type - resources.projects.resources.locations.methods.list.parameters.name.description - resources.projects.resources.locations.methods.list.parameters.name.location - resources.projects.resources.locations.methods.list.parameters.name.pattern - resources.projects.resources.locations.methods.list.parameters.name.required - resources.projects.resources.locations.methods.list.parameters.name.type - resources.projects.resources.locations.methods.list.parameters.pageSize.description - resources.projects.resources.locations.methods.list.parameters.pageSize.format - resources.projects.resources.locations.methods.list.parameters.pageSize.location - resources.projects.resources.locations.methods.list.parameters.pageSize.type - resources.projects.resources.locations.methods.list.parameters.pageToken.description - resources.projects.resources.locations.methods.list.parameters.pageToken.location - resources.projects.resources.locations.methods.list.parameters.pageToken.type - resources.projects.resources.locations.methods.list.path - resources.projects.resources.locations.methods.list.response.$ref - resources.projects.resources.locations.methods.list.scopes - schemas.GoogleCloudLocationListLocationsResponse.description - schemas.GoogleCloudLocationListLocationsResponse.id - schemas.GoogleCloudLocationListLocationsResponse.properties.locations.description - schemas.GoogleCloudLocationListLocationsResponse.properties.locations.items.$ref - schemas.GoogleCloudLocationListLocationsResponse.properties.locations.type - schemas.GoogleCloudLocationListLocationsResponse.properties.nextPageToken.description - schemas.GoogleCloudLocationListLocationsResponse.properties.nextPageToken.type - schemas.GoogleCloudLocationListLocationsResponse.type - schemas.GoogleCloudLocationLocation.description - schemas.GoogleCloudLocationLocation.id - schemas.GoogleCloudLocationLocation.properties.displayName.description - schemas.GoogleCloudLocationLocation.properties.displayName.type - schemas.GoogleCloudLocationLocation.properties.labels.additionalProperties.type - schemas.GoogleCloudLocationLocation.properties.labels.description - schemas.GoogleCloudLocationLocation.properties.labels.type - schemas.GoogleCloudLocationLocation.properties.locationId.description - schemas.GoogleCloudLocationLocation.properties.locationId.type - schemas.GoogleCloudLocationLocation.properties.metadata.additionalProperties.description - schemas.GoogleCloudLocationLocation.properties.metadata.additionalProperties.type - schemas.GoogleCloudLocationLocation.properties.metadata.description - schemas.GoogleCloudLocationLocation.properties.metadata.type - schemas.GoogleCloudLocationLocation.properties.name.description - schemas.GoogleCloudLocationLocation.properties.name.type - schemas.GoogleCloudLocationLocation.type #### recommender:v1 The following keys were added: - schemas.GoogleCloudRecommenderV1Recommendation.properties.targetResources.description - schemas.GoogleCloudRecommenderV1Recommendation.properties.targetResources.items.type - schemas.GoogleCloudRecommenderV1Recommendation.properties.targetResources.type --- discovery/recommender-v1.json | 9 +- discovery/recommender-v1beta1.json | 226 ++++++++++++- src/apis/recommender/v1.ts | 4 + src/apis/recommender/v1beta1.ts | 502 +++++++++++++++++++++++++++++ 4 files changed, 739 insertions(+), 2 deletions(-) diff --git a/discovery/recommender-v1.json b/discovery/recommender-v1.json index 769d408908..e13013e8a8 100644 --- a/discovery/recommender-v1.json +++ b/discovery/recommender-v1.json @@ -1686,7 +1686,7 @@ } } }, - "revision": "20231217", + "revision": "20240128", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { @@ -2204,6 +2204,13 @@ "$ref": "GoogleCloudRecommenderV1RecommendationStateInfo", "description": "Information for state. Contains state and metadata." }, + "targetResources": { + "description": "Fully qualified resource names that this recommendation is targeting.", + "items": { + "type": "string" + }, + "type": "array" + }, "xorGroupId": { "description": "Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.", "type": "string" diff --git a/discovery/recommender-v1beta1.json b/discovery/recommender-v1beta1.json index 81fc7fa302..2ddaef748c 100644 --- a/discovery/recommender-v1beta1.json +++ b/discovery/recommender-v1beta1.json @@ -108,6 +108,49 @@ "billingAccounts": { "resources": { "locations": { + "methods": { + "list": { + "description": "Lists locations with recommendations or insights.", + "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations", + "httpMethod": "GET", + "id": "recommender.billingAccounts.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^billingAccounts/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insightTypes": { "methods": { @@ -536,6 +579,49 @@ "folders": { "resources": { "locations": { + "methods": { + "list": { + "description": "Lists locations with recommendations or insights.", + "flatPath": "v1beta1/folders/{foldersId}/locations", + "httpMethod": "GET", + "id": "recommender.folders.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insightTypes": { "resources": { @@ -863,6 +949,49 @@ "organizations": { "resources": { "locations": { + "methods": { + "list": { + "description": "Lists locations with recommendations or insights.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations", + "httpMethod": "GET", + "id": "recommender.organizations.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insightTypes": { "methods": { @@ -1291,6 +1420,49 @@ "projects": { "resources": { "locations": { + "methods": { + "list": { + "description": "Lists locations with recommendations or insights.", + "flatPath": "v1beta1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "recommender.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insightTypes": { "methods": { @@ -1748,9 +1920,61 @@ } } }, - "revision": "20231217", + "revision": "20240128", "rootUrl": "https://recommender.googleapis.com/", "schemas": { + "GoogleCloudLocationListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "GoogleCloudLocationListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleCloudLocationLocation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudLocationLocation": { + "description": "A resource that represents a Google Cloud location.", + "id": "GoogleCloudLocationLocation", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRecommenderV1beta1CostProjection": { "description": "Contains metadata about how much money a recommendation can save or incur.", "id": "GoogleCloudRecommenderV1beta1CostProjection", diff --git a/src/apis/recommender/v1.ts b/src/apis/recommender/v1.ts index ce9dcd5b75..88502b28cc 100644 --- a/src/apis/recommender/v1.ts +++ b/src/apis/recommender/v1.ts @@ -480,6 +480,10 @@ export namespace recommender_v1 { * Information for state. Contains state and metadata. */ stateInfo?: Schema$GoogleCloudRecommenderV1RecommendationStateInfo; + /** + * Fully qualified resource names that this recommendation is targeting. + */ + targetResources?: string[] | null; /** * Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied. */ diff --git a/src/apis/recommender/v1beta1.ts b/src/apis/recommender/v1beta1.ts index 84285dc0e6..6f4c2d5adc 100644 --- a/src/apis/recommender/v1beta1.ts +++ b/src/apis/recommender/v1beta1.ts @@ -134,6 +134,44 @@ export namespace recommender_v1beta1 { } } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$GoogleCloudLocationListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$GoogleCloudLocationLocation[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * A resource that represents a Google Cloud location. + */ + export interface Schema$GoogleCloudLocationLocation { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } /** * Contains metadata about how much money a recommendation can save or incur. */ @@ -702,6 +740,122 @@ export namespace recommender_v1beta1 { this.context ); } + + /** + * Lists locations with recommendations or insights. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Billingaccounts$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Billingaccounts$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Billingaccounts$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Billingaccounts$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Billingaccounts$Locations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Billingaccounts$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Billingaccounts$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Billingaccounts$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://recommender.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Billingaccounts$Locations$List + extends StandardParameters { + /** + * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service selects a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; } export class Resource$Billingaccounts$Locations$Insighttypes { @@ -2177,6 +2331,122 @@ export namespace recommender_v1beta1 { this.context ); } + + /** + * Lists locations with recommendations or insights. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Folders$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Folders$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Folders$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Folders$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Folders$Locations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Folders$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://recommender.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Folders$Locations$List + extends StandardParameters { + /** + * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service selects a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; } export class Resource$Folders$Locations$Insighttypes { @@ -3334,6 +3604,122 @@ export namespace recommender_v1beta1 { this.context ); } + + /** + * Lists locations with recommendations or insights. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Organizations$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Organizations$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Organizations$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Locations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Organizations$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://recommender.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Organizations$Locations$List + extends StandardParameters { + /** + * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service selects a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; } export class Resource$Organizations$Locations$Insighttypes { @@ -4809,6 +5195,122 @@ export namespace recommender_v1beta1 { this.context ); } + + /** + * Lists locations with recommendations or insights. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://recommender.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service selects a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; } export class Resource$Projects$Locations$Insighttypes {