Skip to content

Commit

Permalink
feat(cloudsearch): update the API
Browse files Browse the repository at this point in the history
#### cloudsearch:v1

The following keys were added:
- resources.query.methods.debugSearch.description
- resources.query.methods.debugSearch.flatPath
- resources.query.methods.debugSearch.httpMethod
- resources.query.methods.debugSearch.id
- resources.query.methods.debugSearch.parameterOrder
- resources.query.methods.debugSearch.path
- resources.query.methods.debugSearch.request.$ref
- resources.query.methods.debugSearch.response.$ref
- resources.query.methods.debugSearch.scopes
- schemas.DebugResponse.description
- schemas.DebugResponse.id
- schemas.DebugResponse.properties.gsrRequest.description
- schemas.DebugResponse.properties.gsrRequest.format
- schemas.DebugResponse.properties.gsrRequest.type
- schemas.DebugResponse.properties.gsrResponse.description
- schemas.DebugResponse.properties.gsrResponse.format
- schemas.DebugResponse.properties.gsrResponse.type
- schemas.DebugResponse.properties.searchResponse.$ref
- schemas.DebugResponse.properties.searchResponse.description
- schemas.DebugResponse.type
  • Loading branch information
yoshi-automation authored and sofisl committed Jun 6, 2024
1 parent c395939 commit a153fd8
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 1 deletion.
42 changes: 41 additions & 1 deletion discovery/cloudsearch-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,25 @@
},
"query": {
"methods": {
"debugSearch": {
"description": "Returns Debug information for Cloud Search Query API provides the search method. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).",
"flatPath": "v1/query:debugSearch",
"httpMethod": "POST",
"id": "cloudsearch.query.debugSearch",
"parameterOrder": [],
"parameters": {},
"path": "v1/query:debugSearch",
"request": {
"$ref": "SearchRequest"
},
"response": {
"$ref": "DebugResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.query"
]
},
"removeActivity": {
"description": "Provides functionality to remove logged activity for a user. Currently to be used only for Chat 1p clients **Note:** This API requires a standard end user account to execute. A service account can't perform Remove Activity requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).",
"flatPath": "v1/query:removeActivity",
Expand Down Expand Up @@ -2096,7 +2115,7 @@
}
}
},
"revision": "20240501",
"revision": "20240529",
"rootUrl": "https://cloudsearch.googleapis.com/",
"schemas": {
"Action": {
Expand Down Expand Up @@ -2653,6 +2672,27 @@
},
"type": "object"
},
"DebugResponse": {
"description": "Debug Search Response.",
"id": "DebugResponse",
"properties": {
"gsrRequest": {
"description": "Serialized string of GenericSearchRequest.",
"format": "byte",
"type": "string"
},
"gsrResponse": {
"description": "Serialized string of GenericSearchResponse.",
"format": "byte",
"type": "string"
},
"searchResponse": {
"$ref": "SearchResponse",
"description": "Search response."
}
},
"type": "object"
},
"DeleteQueueItemsRequest": {
"id": "DeleteQueueItemsRequest",
"properties": {
Expand Down
112 changes: 112 additions & 0 deletions src/apis/cloudsearch/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,23 @@ export namespace cloudsearch_v1 {
*/
enableDebugging?: boolean | null;
}
/**
* Debug Search Response.
*/
export interface Schema$DebugResponse {
/**
* Serialized string of GenericSearchRequest.
*/
gsrRequest?: string | null;
/**
* Serialized string of GenericSearchResponse.
*/
gsrResponse?: string | null;
/**
* Search response.
*/
searchResponse?: Schema$SearchResponse;
}
export interface Schema$DeleteQueueItemsRequest {
/**
* The name of connector making this call. Format: datasources/{source_id\}/connectors/{ID\}
Expand Down Expand Up @@ -6011,6 +6028,94 @@ export namespace cloudsearch_v1 {
this.sources = new Resource$Query$Sources(this.context);
}

/**
* Returns Debug information for Cloud Search Query API provides the search method. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
*
* @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.
*/
debugSearch(
params: Params$Resource$Query$Debugsearch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
debugSearch(
params?: Params$Resource$Query$Debugsearch,
options?: MethodOptions
): GaxiosPromise<Schema$DebugResponse>;
debugSearch(
params: Params$Resource$Query$Debugsearch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
debugSearch(
params: Params$Resource$Query$Debugsearch,
options: MethodOptions | BodyResponseCallback<Schema$DebugResponse>,
callback: BodyResponseCallback<Schema$DebugResponse>
): void;
debugSearch(
params: Params$Resource$Query$Debugsearch,
callback: BodyResponseCallback<Schema$DebugResponse>
): void;
debugSearch(callback: BodyResponseCallback<Schema$DebugResponse>): void;
debugSearch(
paramsOrCallback?:
| Params$Resource$Query$Debugsearch
| BodyResponseCallback<Schema$DebugResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$DebugResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$DebugResponse>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$DebugResponse> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Query$Debugsearch;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Query$Debugsearch;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl = options.rootUrl || 'https://cloudsearch.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/query:debugSearch').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
apiVersion: '',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$DebugResponse>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$DebugResponse>(parameters);
}
}

/**
* Provides functionality to remove logged activity for a user. Currently to be used only for Chat 1p clients **Note:** This API requires a standard end user account to execute. A service account can't perform Remove Activity requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
*
Expand Down Expand Up @@ -6275,6 +6380,13 @@ export namespace cloudsearch_v1 {
}
}

export interface Params$Resource$Query$Debugsearch
extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$SearchRequest;
}
export interface Params$Resource$Query$Removeactivity
extends StandardParameters {
/**
Expand Down

0 comments on commit a153fd8

Please sign in to comment.