Skip to content

Commit

Permalink
feat: an option to override mixins (#1266)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster committed Sep 20, 2022
1 parent 9a68aa6 commit 2546855
Show file tree
Hide file tree
Showing 19 changed files with 479 additions and 4,954 deletions.
177 changes: 177 additions & 0 deletions baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,183 @@ export class CloudRedisClient {
callSettings
) as AsyncIterable<protos.google.cloud.redis.v1beta1.IInstance>;
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the
* details.
* @param {function(?Error, ?Object)=} callback
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing
* [google.longrunning.Operation]{@link
* external:"google.longrunning.Operation"}.
* @return {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* [google.longrunning.Operation]{@link
* external:"google.longrunning.Operation"}. The promise has a method named
* "cancel" which cancels the ongoing API call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* const name = '';
* const [response] = await client.getOperation({name});
* // doThingsWith(response)
* ```
*/
getOperation(
request: protos.google.longrunning.GetOperationRequest,
options?:
| gax.CallOptions
| Callback<
protos.google.longrunning.Operation,
protos.google.longrunning.GetOperationRequest,
{} | null | undefined
>,
callback?: Callback<
protos.google.longrunning.Operation,
protos.google.longrunning.GetOperationRequest,
{} | null | undefined
>
): Promise<[protos.google.longrunning.Operation]> {
return this.operationsClient.getOperation(request, options, callback);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
*
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation collection.
* @param {string} request.filter - The standard list filter.
* @param {number=} request.pageSize -
* The maximum number of resources contained in the underlying API
* response. If page streaming is performed per-resource, this
* parameter does not affect the return value. If page streaming is
* performed per-page, this determines the maximum number of
* resources in a page.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the
* details.
* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
*
* @example
* ```
* const client = longrunning.operationsClient();
* for await (const response of client.listOperationsAsync(request));
* // doThingsWith(response)
* ```
*/
listOperationsAsync(
request: protos.google.longrunning.ListOperationsRequest,
options?: gax.CallOptions
): AsyncIterable<protos.google.longrunning.ListOperationsResponse> {
return this.operationsClient.listOperationsAsync(request, options);
}
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* {@link Operations.GetOperation} or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
* 1, corresponding to `Code.CANCELLED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be cancelled.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the
* details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.cancelOperation({name: ''});
* ```
*/
cancelOperation(
request: protos.google.longrunning.CancelOperationRequest,
options?:
| gax.CallOptions
| Callback<
protos.google.protobuf.Empty,
protos.google.longrunning.CancelOperationRequest,
{} | undefined | null
>,
callback?: Callback<
protos.google.longrunning.CancelOperationRequest,
protos.google.protobuf.Empty,
{} | undefined | null
>
): Promise<protos.google.protobuf.Empty> {
return this.operationsClient.cancelOperation(request, options, callback);
}

/**
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be deleted.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the
* details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.deleteOperation({name: ''});
* ```
*/
deleteOperation(
request: protos.google.longrunning.DeleteOperationRequest,
options?:
| gax.CallOptions
| Callback<
protos.google.protobuf.Empty,
protos.google.longrunning.DeleteOperationRequest,
{} | null | undefined
>,
callback?: Callback<
protos.google.protobuf.Empty,
protos.google.longrunning.DeleteOperationRequest,
{} | null | undefined
>
): Promise<protos.google.protobuf.Empty> {
return this.operationsClient.deleteOperation(request, options, callback);
}

// --------------------
// -- Path templates --
// --------------------
Expand Down
Loading

0 comments on commit 2546855

Please sign in to comment.