Skip to content

Commit d643c96

Browse files
committed
test: update baselines for redis client
1 parent b1cc7fd commit d643c96

2 files changed

Lines changed: 384 additions & 0 deletions

File tree

core/generator/gapic-generator-typescript/baselines/redis-esm/esm/src/v1beta1/cloud_redis_client.ts.baseline

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,198 @@ export class CloudRedisClient {
14971497
* // doThingsWith(response)
14981498
* ```
14991499
*/
1500+
getOperation(
1501+
request: protos.google.longrunning.GetOperationRequest,
1502+
optionsOrCallback?:
1503+
| gax.CallOptions
1504+
| Callback<
1505+
protos.google.longrunning.Operation,
1506+
protos.google.longrunning.GetOperationRequest,
1507+
{} | null | undefined
1508+
>,
1509+
callback?: Callback<
1510+
protos.google.longrunning.Operation,
1511+
protos.google.longrunning.GetOperationRequest,
1512+
{} | null | undefined
1513+
>
1514+
): Promise<[protos.google.longrunning.Operation]> {
1515+
let options: gax.CallOptions;
1516+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1517+
callback = optionsOrCallback;
1518+
options = {};
1519+
} else {
1520+
options = optionsOrCallback as gax.CallOptions;
1521+
}
1522+
options = options || {};
1523+
options.otherArgs = options.otherArgs || {};
1524+
options.otherArgs.headers = options.otherArgs.headers || {};
1525+
options.otherArgs.headers['x-goog-request-params'] =
1526+
this._gaxModule.routingHeader.fromParams({
1527+
name: request.name ?? '',
1528+
});
1529+
return this.operationsClient.getOperation(request, options, callback);
1530+
}
1531+
/**
1532+
* Lists operations that match the specified filter in the request. If the
1533+
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
1534+
*
1535+
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
1536+
*
1537+
* @param {Object} request - The request object that will be sent.
1538+
* @param {string} request.name - The name of the operation collection.
1539+
* @param {string} request.filter - The standard list filter.
1540+
* @param {number=} request.pageSize -
1541+
* The maximum number of resources contained in the underlying API
1542+
* response. If page streaming is performed per-resource, this
1543+
* parameter does not affect the return value. If page streaming is
1544+
* performed per-page, this determines the maximum number of
1545+
* resources in a page.
1546+
* @param {Object=} options
1547+
* Optional parameters. You can override the default settings for this call,
1548+
* e.g, timeout, retries, paginations, etc. See {@link
1549+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
1550+
* details.
1551+
* @returns {Object}
1552+
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
1553+
*
1554+
* @example
1555+
* ```
1556+
* const client = longrunning.operationsClient();
1557+
* for await (const response of client.listOperationsAsync(request));
1558+
* // doThingsWith(response)
1559+
* ```
1560+
*/
1561+
listOperationsAsync(
1562+
request: protos.google.longrunning.ListOperationsRequest,
1563+
options?: gax.CallOptions
1564+
): AsyncIterable<protos.google.longrunning.IOperation> {
1565+
options = options || {};
1566+
options.otherArgs = options.otherArgs || {};
1567+
options.otherArgs.headers = options.otherArgs.headers || {};
1568+
options.otherArgs.headers['x-goog-request-params'] =
1569+
this._gaxModule.routingHeader.fromParams({
1570+
name: request.name ?? '',
1571+
});
1572+
return this.operationsClient.listOperationsAsync(request, options);
1573+
}
1574+
/**
1575+
* Starts asynchronous cancellation on a long-running operation. The server
1576+
* makes a best effort to cancel the operation, but success is not
1577+
* guaranteed. If the server doesn't support this method, it returns
1578+
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
1579+
* {@link Operations.GetOperation} or
1580+
* other methods to check whether the cancellation succeeded or whether the
1581+
* operation completed despite cancellation. On successful cancellation,
1582+
* the operation is not deleted; instead, it becomes an operation with
1583+
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
1584+
* 1, corresponding to `Code.CANCELLED`.
1585+
*
1586+
* @param {Object} request - The request object that will be sent.
1587+
* @param {string} request.name - The name of the operation resource to be cancelled.
1588+
* @param {Object=} options
1589+
* Optional parameters. You can override the default settings for this call,
1590+
* e.g, timeout, retries, paginations, etc. See {@link
1591+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
1592+
* details.
1593+
* @param {function(?Error)=} callback
1594+
* The function which will be called with the result of the API call.
1595+
* @return {Promise} - The promise which resolves when API call finishes.
1596+
* The promise has a method named "cancel" which cancels the ongoing API
1597+
* call.
1598+
*
1599+
* @example
1600+
* ```
1601+
* const client = longrunning.operationsClient();
1602+
* await client.cancelOperation({name: ''});
1603+
* ```
1604+
*/
1605+
cancelOperation(
1606+
request: protos.google.longrunning.CancelOperationRequest,
1607+
optionsOrCallback?:
1608+
| gax.CallOptions
1609+
| Callback<
1610+
protos.google.longrunning.CancelOperationRequest,
1611+
protos.google.protobuf.Empty,
1612+
{} | undefined | null
1613+
>,
1614+
callback?: Callback<
1615+
protos.google.longrunning.CancelOperationRequest,
1616+
protos.google.protobuf.Empty,
1617+
{} | undefined | null
1618+
>
1619+
): Promise<protos.google.protobuf.Empty> {
1620+
let options: gax.CallOptions;
1621+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1622+
callback = optionsOrCallback;
1623+
options = {};
1624+
} else {
1625+
options = optionsOrCallback as gax.CallOptions;
1626+
}
1627+
options = options || {};
1628+
options.otherArgs = options.otherArgs || {};
1629+
options.otherArgs.headers = options.otherArgs.headers || {};
1630+
options.otherArgs.headers['x-goog-request-params'] =
1631+
this._gaxModule.routingHeader.fromParams({
1632+
name: request.name ?? '',
1633+
});
1634+
return this.operationsClient.cancelOperation(request, options, callback);
1635+
}
1636+
/**
1637+
* Deletes a long-running operation. This method indicates that the client is
1638+
* no longer interested in the operation result. It does not cancel the
1639+
* operation. If the server doesn't support this method, it returns
1640+
* `google.rpc.Code.UNIMPLEMENTED`.
1641+
*
1642+
* @param {Object} request - The request object that will be sent.
1643+
* @param {string} request.name - The name of the operation resource to be deleted.
1644+
* @param {Object=} options
1645+
* Optional parameters. You can override the default settings for this call,
1646+
* e.g, timeout, retries, paginations, etc. See {@link
1647+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1648+
* for the details.
1649+
* @param {function(?Error)=} callback
1650+
* The function which will be called with the result of the API call.
1651+
* @return {Promise} - The promise which resolves when API call finishes.
1652+
* The promise has a method named "cancel" which cancels the ongoing API
1653+
* call.
1654+
*
1655+
* @example
1656+
* ```
1657+
* const client = longrunning.operationsClient();
1658+
* await client.deleteOperation({name: ''});
1659+
* ```
1660+
*/
1661+
deleteOperation(
1662+
request: protos.google.longrunning.DeleteOperationRequest,
1663+
optionsOrCallback?:
1664+
| gax.CallOptions
1665+
| Callback<
1666+
protos.google.protobuf.Empty,
1667+
protos.google.longrunning.DeleteOperationRequest,
1668+
{} | null | undefined
1669+
>,
1670+
callback?: Callback<
1671+
protos.google.protobuf.Empty,
1672+
protos.google.longrunning.DeleteOperationRequest,
1673+
{} | null | undefined
1674+
>
1675+
): Promise<protos.google.protobuf.Empty> {
1676+
let options: gax.CallOptions;
1677+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1678+
callback = optionsOrCallback;
1679+
options = {};
1680+
} else {
1681+
options = optionsOrCallback as gax.CallOptions;
1682+
}
1683+
options = options || {};
1684+
options.otherArgs = options.otherArgs || {};
1685+
options.otherArgs.headers = options.otherArgs.headers || {};
1686+
options.otherArgs.headers['x-goog-request-params'] =
1687+
this._gaxModule.routingHeader.fromParams({
1688+
name: request.name ?? '',
1689+
});
1690+
return this.operationsClient.deleteOperation(request, options, callback);
1691+
}
15001692

15011693
// --------------------
15021694
// -- Path templates --

core/generator/gapic-generator-typescript/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,198 @@ export class CloudRedisClient {
14781478
* // doThingsWith(response)
14791479
* ```
14801480
*/
1481+
getOperation(
1482+
request: protos.google.longrunning.GetOperationRequest,
1483+
optionsOrCallback?:
1484+
| gax.CallOptions
1485+
| Callback<
1486+
protos.google.longrunning.Operation,
1487+
protos.google.longrunning.GetOperationRequest,
1488+
{} | null | undefined
1489+
>,
1490+
callback?: Callback<
1491+
protos.google.longrunning.Operation,
1492+
protos.google.longrunning.GetOperationRequest,
1493+
{} | null | undefined
1494+
>
1495+
): Promise<[protos.google.longrunning.Operation]> {
1496+
let options: gax.CallOptions;
1497+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1498+
callback = optionsOrCallback;
1499+
options = {};
1500+
} else {
1501+
options = optionsOrCallback as gax.CallOptions;
1502+
}
1503+
options = options || {};
1504+
options.otherArgs = options.otherArgs || {};
1505+
options.otherArgs.headers = options.otherArgs.headers || {};
1506+
options.otherArgs.headers['x-goog-request-params'] =
1507+
this._gaxModule.routingHeader.fromParams({
1508+
name: request.name ?? '',
1509+
});
1510+
return this.operationsClient.getOperation(request, options, callback);
1511+
}
1512+
/**
1513+
* Lists operations that match the specified filter in the request. If the
1514+
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
1515+
*
1516+
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
1517+
*
1518+
* @param {Object} request - The request object that will be sent.
1519+
* @param {string} request.name - The name of the operation collection.
1520+
* @param {string} request.filter - The standard list filter.
1521+
* @param {number=} request.pageSize -
1522+
* The maximum number of resources contained in the underlying API
1523+
* response. If page streaming is performed per-resource, this
1524+
* parameter does not affect the return value. If page streaming is
1525+
* performed per-page, this determines the maximum number of
1526+
* resources in a page.
1527+
* @param {Object=} options
1528+
* Optional parameters. You can override the default settings for this call,
1529+
* e.g, timeout, retries, paginations, etc. See {@link
1530+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
1531+
* details.
1532+
* @returns {Object}
1533+
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
1534+
*
1535+
* @example
1536+
* ```
1537+
* const client = longrunning.operationsClient();
1538+
* for await (const response of client.listOperationsAsync(request));
1539+
* // doThingsWith(response)
1540+
* ```
1541+
*/
1542+
listOperationsAsync(
1543+
request: protos.google.longrunning.ListOperationsRequest,
1544+
options?: gax.CallOptions
1545+
): AsyncIterable<protos.google.longrunning.IOperation> {
1546+
options = options || {};
1547+
options.otherArgs = options.otherArgs || {};
1548+
options.otherArgs.headers = options.otherArgs.headers || {};
1549+
options.otherArgs.headers['x-goog-request-params'] =
1550+
this._gaxModule.routingHeader.fromParams({
1551+
name: request.name ?? '',
1552+
});
1553+
return this.operationsClient.listOperationsAsync(request, options);
1554+
}
1555+
/**
1556+
* Starts asynchronous cancellation on a long-running operation. The server
1557+
* makes a best effort to cancel the operation, but success is not
1558+
* guaranteed. If the server doesn't support this method, it returns
1559+
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
1560+
* {@link Operations.GetOperation} or
1561+
* other methods to check whether the cancellation succeeded or whether the
1562+
* operation completed despite cancellation. On successful cancellation,
1563+
* the operation is not deleted; instead, it becomes an operation with
1564+
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
1565+
* 1, corresponding to `Code.CANCELLED`.
1566+
*
1567+
* @param {Object} request - The request object that will be sent.
1568+
* @param {string} request.name - The name of the operation resource to be cancelled.
1569+
* @param {Object=} options
1570+
* Optional parameters. You can override the default settings for this call,
1571+
* e.g, timeout, retries, paginations, etc. See {@link
1572+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
1573+
* details.
1574+
* @param {function(?Error)=} callback
1575+
* The function which will be called with the result of the API call.
1576+
* @return {Promise} - The promise which resolves when API call finishes.
1577+
* The promise has a method named "cancel" which cancels the ongoing API
1578+
* call.
1579+
*
1580+
* @example
1581+
* ```
1582+
* const client = longrunning.operationsClient();
1583+
* await client.cancelOperation({name: ''});
1584+
* ```
1585+
*/
1586+
cancelOperation(
1587+
request: protos.google.longrunning.CancelOperationRequest,
1588+
optionsOrCallback?:
1589+
| gax.CallOptions
1590+
| Callback<
1591+
protos.google.longrunning.CancelOperationRequest,
1592+
protos.google.protobuf.Empty,
1593+
{} | undefined | null
1594+
>,
1595+
callback?: Callback<
1596+
protos.google.longrunning.CancelOperationRequest,
1597+
protos.google.protobuf.Empty,
1598+
{} | undefined | null
1599+
>
1600+
): Promise<protos.google.protobuf.Empty> {
1601+
let options: gax.CallOptions;
1602+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1603+
callback = optionsOrCallback;
1604+
options = {};
1605+
} else {
1606+
options = optionsOrCallback as gax.CallOptions;
1607+
}
1608+
options = options || {};
1609+
options.otherArgs = options.otherArgs || {};
1610+
options.otherArgs.headers = options.otherArgs.headers || {};
1611+
options.otherArgs.headers['x-goog-request-params'] =
1612+
this._gaxModule.routingHeader.fromParams({
1613+
name: request.name ?? '',
1614+
});
1615+
return this.operationsClient.cancelOperation(request, options, callback);
1616+
}
1617+
/**
1618+
* Deletes a long-running operation. This method indicates that the client is
1619+
* no longer interested in the operation result. It does not cancel the
1620+
* operation. If the server doesn't support this method, it returns
1621+
* `google.rpc.Code.UNIMPLEMENTED`.
1622+
*
1623+
* @param {Object} request - The request object that will be sent.
1624+
* @param {string} request.name - The name of the operation resource to be deleted.
1625+
* @param {Object=} options
1626+
* Optional parameters. You can override the default settings for this call,
1627+
* e.g, timeout, retries, paginations, etc. See {@link
1628+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1629+
* for the details.
1630+
* @param {function(?Error)=} callback
1631+
* The function which will be called with the result of the API call.
1632+
* @return {Promise} - The promise which resolves when API call finishes.
1633+
* The promise has a method named "cancel" which cancels the ongoing API
1634+
* call.
1635+
*
1636+
* @example
1637+
* ```
1638+
* const client = longrunning.operationsClient();
1639+
* await client.deleteOperation({name: ''});
1640+
* ```
1641+
*/
1642+
deleteOperation(
1643+
request: protos.google.longrunning.DeleteOperationRequest,
1644+
optionsOrCallback?:
1645+
| gax.CallOptions
1646+
| Callback<
1647+
protos.google.protobuf.Empty,
1648+
protos.google.longrunning.DeleteOperationRequest,
1649+
{} | null | undefined
1650+
>,
1651+
callback?: Callback<
1652+
protos.google.protobuf.Empty,
1653+
protos.google.longrunning.DeleteOperationRequest,
1654+
{} | null | undefined
1655+
>
1656+
): Promise<protos.google.protobuf.Empty> {
1657+
let options: gax.CallOptions;
1658+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1659+
callback = optionsOrCallback;
1660+
options = {};
1661+
} else {
1662+
options = optionsOrCallback as gax.CallOptions;
1663+
}
1664+
options = options || {};
1665+
options.otherArgs = options.otherArgs || {};
1666+
options.otherArgs.headers = options.otherArgs.headers || {};
1667+
options.otherArgs.headers['x-goog-request-params'] =
1668+
this._gaxModule.routingHeader.fromParams({
1669+
name: request.name ?? '',
1670+
});
1671+
return this.operationsClient.deleteOperation(request, options, callback);
1672+
}
14811673

14821674
// --------------------
14831675
// -- Path templates --

0 commit comments

Comments
 (0)