@googleapis/servicecontrol 6.0.1 → 8.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## [8.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v8.0.0...servicecontrol-v8.0.1) (2025-07-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **servicecontrol:** update the API ([1477ede](https://github.com/googleapis/google-api-nodejs-client/commit/1477edeea9452111ba77291aba99d7e6f33ca426))
9
+ * **servicecontrol:** update the API ([59b3706](https://github.com/googleapis/google-api-nodejs-client/commit/59b3706e5255f3e4c706aef2bc3573f9d2cd0681))
10
+
11
+ ## [8.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v7.0.1...servicecontrol-v8.0.0) (2025-06-30)
12
+
13
+
14
+ ### ⚠ BREAKING CHANGES
15
+
16
+ * upgrade to node 18
17
+
18
+ ### Features
19
+
20
+ * upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
26
+ * **servicecontrol:** update the API ([59b3706](https://github.com/googleapis/google-api-nodejs-client/commit/59b3706e5255f3e4c706aef2bc3573f9d2cd0681))
27
+ * **servicecontrol:** update the API ([1bb6bcc](https://github.com/googleapis/google-api-nodejs-client/commit/1bb6bccd508806455999d7ad949796f2bf2a2a24))
28
+ * **servicecontrol:** update the API ([71aa0ef](https://github.com/googleapis/google-api-nodejs-client/commit/71aa0ef8c5d0956cc157af95a1f1269bd0eb1424))
29
+
30
+ ## [7.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v7.0.0...servicecontrol-v7.0.1) (2025-06-04)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
36
+
37
+ ## [7.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v6.0.1...servicecontrol-v7.0.0) (2025-05-29)
38
+
39
+
40
+ ### ⚠ BREAKING CHANGES
41
+
42
+ * upgrade to node 18
43
+
44
+ ### Features
45
+
46
+ * upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
47
+
3
48
  ## [6.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v6.0.0...servicecontrol-v6.0.1) (2025-05-05)
4
49
 
5
50
 
package/build/index.d.ts CHANGED
@@ -14,4 +14,4 @@ declare const auth: AuthPlus;
14
14
  export { auth };
15
15
  export { servicecontrol_v1 };
16
16
  export { servicecontrol_v2 };
17
- export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, GaxiosPromise, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
17
+ export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,kCAAkC;AAElC,yDAAuE;AACvE,6BAAuC;AA+B/B,kGA/BA,sBAAiB,OA+BA;AA9BzB,6BAAuC;AA+B/B,kGA/BA,sBAAiB,OA+BA;AA7BZ,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,sBAAiB,CAAC,cAAc;IACpC,EAAE,EAAE,sBAAiB,CAAC,cAAc;CACrC,CAAC;AAUF,SAAgB,cAAc,CAI5B,gBAI6B;IAE7B,OAAO,IAAA,0BAAM,EAAI,gBAAgB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC;AAXD,wCAWC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAGZ,uDAS2B;AARzB,6GAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,kCAAkC;AAElC,yDAAuE;AACvE,6BAAuC;AA+B/B,kGA/BA,sBAAiB,OA+BA;AA9BzB,6BAAuC;AA+B/B,kGA/BA,sBAAiB,OA+BA;AA7BZ,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,sBAAiB,CAAC,cAAc;IACpC,EAAE,EAAE,sBAAiB,CAAC,cAAc;CACrC,CAAC;AAUF,SAAgB,cAAc,CAI5B,gBAI6B;IAE7B,OAAO,IAAA,0BAAM,EAAI,gBAAgB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC;AAXD,wCAWC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAGZ,uDAQ2B;AAPzB,6GAAA,QAAQ,OAAA"}
package/build/v1.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
3
  import { Readable } from 'stream';
4
4
  export declare namespace servicecontrol_v1 {
5
5
  export interface Options extends GlobalOptions {
@@ -1570,42 +1570,229 @@ export declare namespace servicecontrol_v1 {
1570
1570
  constructor(context: APIRequestContext);
1571
1571
  /**
1572
1572
  * Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
1573
+ * @example
1574
+ * ```js
1575
+ * // Before running the sample:
1576
+ * // - Enable the API at:
1577
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1578
+ * // - Login into gcloud by running:
1579
+ * // ```sh
1580
+ * // $ gcloud auth application-default login
1581
+ * // ```
1582
+ * // - Install the npm module by running:
1583
+ * // ```sh
1584
+ * // $ npm install googleapis
1585
+ * // ```
1586
+ *
1587
+ * const {google} = require('googleapis');
1588
+ * const servicecontrol = google.servicecontrol('v1');
1589
+ *
1590
+ * async function main() {
1591
+ * const auth = new google.auth.GoogleAuth({
1592
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1593
+ * scopes: [
1594
+ * 'https://www.googleapis.com/auth/cloud-platform',
1595
+ * 'https://www.googleapis.com/auth/servicecontrol',
1596
+ * ],
1597
+ * });
1598
+ *
1599
+ * // Acquire an auth client, and bind it to all future calls
1600
+ * const authClient = await auth.getClient();
1601
+ * google.options({auth: authClient});
1602
+ *
1603
+ * // Do the magic
1604
+ * const res = await servicecontrol.services.allocateQuota({
1605
+ * // Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
1606
+ * serviceName: 'placeholder-value',
1607
+ *
1608
+ * // Request body metadata
1609
+ * requestBody: {
1610
+ * // request body parameters
1611
+ * // {
1612
+ * // "allocateOperation": {},
1613
+ * // "serviceConfigId": "my_serviceConfigId"
1614
+ * // }
1615
+ * },
1616
+ * });
1617
+ * console.log(res.data);
1618
+ *
1619
+ * // Example response
1620
+ * // {
1621
+ * // "allocateErrors": [],
1622
+ * // "allocateInfo": {},
1623
+ * // "operationId": "my_operationId",
1624
+ * // "quotaMetrics": [],
1625
+ * // "serviceConfigId": "my_serviceConfigId"
1626
+ * // }
1627
+ * }
1628
+ *
1629
+ * main().catch(e => {
1630
+ * console.error(e);
1631
+ * throw e;
1632
+ * });
1633
+ *
1634
+ * ```
1573
1635
  *
1574
1636
  * @param params - Parameters for request
1575
1637
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1576
1638
  * @param callback - Optional callback that handles the response.
1577
1639
  * @returns A promise if used with async/await, or void if used with a callback.
1578
1640
  */
1579
- allocateQuota(params: Params$Resource$Services$Allocatequota, options: StreamMethodOptions): GaxiosPromise<Readable>;
1580
- allocateQuota(params?: Params$Resource$Services$Allocatequota, options?: MethodOptions): GaxiosPromise<Schema$AllocateQuotaResponse>;
1641
+ allocateQuota(params: Params$Resource$Services$Allocatequota, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1642
+ allocateQuota(params?: Params$Resource$Services$Allocatequota, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AllocateQuotaResponse>>;
1581
1643
  allocateQuota(params: Params$Resource$Services$Allocatequota, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1582
1644
  allocateQuota(params: Params$Resource$Services$Allocatequota, options: MethodOptions | BodyResponseCallback<Schema$AllocateQuotaResponse>, callback: BodyResponseCallback<Schema$AllocateQuotaResponse>): void;
1583
1645
  allocateQuota(params: Params$Resource$Services$Allocatequota, callback: BodyResponseCallback<Schema$AllocateQuotaResponse>): void;
1584
1646
  allocateQuota(callback: BodyResponseCallback<Schema$AllocateQuotaResponse>): void;
1585
1647
  /**
1586
1648
  * Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).
1649
+ * @example
1650
+ * ```js
1651
+ * // Before running the sample:
1652
+ * // - Enable the API at:
1653
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1654
+ * // - Login into gcloud by running:
1655
+ * // ```sh
1656
+ * // $ gcloud auth application-default login
1657
+ * // ```
1658
+ * // - Install the npm module by running:
1659
+ * // ```sh
1660
+ * // $ npm install googleapis
1661
+ * // ```
1662
+ *
1663
+ * const {google} = require('googleapis');
1664
+ * const servicecontrol = google.servicecontrol('v1');
1665
+ *
1666
+ * async function main() {
1667
+ * const auth = new google.auth.GoogleAuth({
1668
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1669
+ * scopes: [
1670
+ * 'https://www.googleapis.com/auth/cloud-platform',
1671
+ * 'https://www.googleapis.com/auth/servicecontrol',
1672
+ * ],
1673
+ * });
1674
+ *
1675
+ * // Acquire an auth client, and bind it to all future calls
1676
+ * const authClient = await auth.getClient();
1677
+ * google.options({auth: authClient});
1678
+ *
1679
+ * // Do the magic
1680
+ * const res = await servicecontrol.services.check({
1681
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1682
+ * serviceName: 'placeholder-value',
1683
+ *
1684
+ * // Request body metadata
1685
+ * requestBody: {
1686
+ * // request body parameters
1687
+ * // {
1688
+ * // "operation": {},
1689
+ * // "requestProjectSettings": false,
1690
+ * // "serviceConfigId": "my_serviceConfigId",
1691
+ * // "skipActivationCheck": false
1692
+ * // }
1693
+ * },
1694
+ * });
1695
+ * console.log(res.data);
1696
+ *
1697
+ * // Example response
1698
+ * // {
1699
+ * // "checkErrors": [],
1700
+ * // "checkInfo": {},
1701
+ * // "operationId": "my_operationId",
1702
+ * // "quotaInfo": {},
1703
+ * // "serviceConfigId": "my_serviceConfigId",
1704
+ * // "serviceRolloutId": "my_serviceRolloutId"
1705
+ * // }
1706
+ * }
1707
+ *
1708
+ * main().catch(e => {
1709
+ * console.error(e);
1710
+ * throw e;
1711
+ * });
1712
+ *
1713
+ * ```
1587
1714
  *
1588
1715
  * @param params - Parameters for request
1589
1716
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1590
1717
  * @param callback - Optional callback that handles the response.
1591
1718
  * @returns A promise if used with async/await, or void if used with a callback.
1592
1719
  */
1593
- check(params: Params$Resource$Services$Check, options: StreamMethodOptions): GaxiosPromise<Readable>;
1594
- check(params?: Params$Resource$Services$Check, options?: MethodOptions): GaxiosPromise<Schema$CheckResponse>;
1720
+ check(params: Params$Resource$Services$Check, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1721
+ check(params?: Params$Resource$Services$Check, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$CheckResponse>>;
1595
1722
  check(params: Params$Resource$Services$Check, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1596
1723
  check(params: Params$Resource$Services$Check, options: MethodOptions | BodyResponseCallback<Schema$CheckResponse>, callback: BodyResponseCallback<Schema$CheckResponse>): void;
1597
1724
  check(params: Params$Resource$Services$Check, callback: BodyResponseCallback<Schema$CheckResponse>): void;
1598
1725
  check(callback: BodyResponseCallback<Schema$CheckResponse>): void;
1599
1726
  /**
1600
1727
  * Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
1728
+ * @example
1729
+ * ```js
1730
+ * // Before running the sample:
1731
+ * // - Enable the API at:
1732
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1733
+ * // - Login into gcloud by running:
1734
+ * // ```sh
1735
+ * // $ gcloud auth application-default login
1736
+ * // ```
1737
+ * // - Install the npm module by running:
1738
+ * // ```sh
1739
+ * // $ npm install googleapis
1740
+ * // ```
1741
+ *
1742
+ * const {google} = require('googleapis');
1743
+ * const servicecontrol = google.servicecontrol('v1');
1744
+ *
1745
+ * async function main() {
1746
+ * const auth = new google.auth.GoogleAuth({
1747
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1748
+ * scopes: [
1749
+ * 'https://www.googleapis.com/auth/cloud-platform',
1750
+ * 'https://www.googleapis.com/auth/servicecontrol',
1751
+ * ],
1752
+ * });
1753
+ *
1754
+ * // Acquire an auth client, and bind it to all future calls
1755
+ * const authClient = await auth.getClient();
1756
+ * google.options({auth: authClient});
1757
+ *
1758
+ * // Do the magic
1759
+ * const res = await servicecontrol.services.report({
1760
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1761
+ * serviceName: 'placeholder-value',
1762
+ *
1763
+ * // Request body metadata
1764
+ * requestBody: {
1765
+ * // request body parameters
1766
+ * // {
1767
+ * // "operations": [],
1768
+ * // "serviceConfigId": "my_serviceConfigId"
1769
+ * // }
1770
+ * },
1771
+ * });
1772
+ * console.log(res.data);
1773
+ *
1774
+ * // Example response
1775
+ * // {
1776
+ * // "reportErrors": [],
1777
+ * // "serviceConfigId": "my_serviceConfigId",
1778
+ * // "serviceRolloutId": "my_serviceRolloutId"
1779
+ * // }
1780
+ * }
1781
+ *
1782
+ * main().catch(e => {
1783
+ * console.error(e);
1784
+ * throw e;
1785
+ * });
1786
+ *
1787
+ * ```
1601
1788
  *
1602
1789
  * @param params - Parameters for request
1603
1790
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1604
1791
  * @param callback - Optional callback that handles the response.
1605
1792
  * @returns A promise if used with async/await, or void if used with a callback.
1606
1793
  */
1607
- report(params: Params$Resource$Services$Report, options: StreamMethodOptions): GaxiosPromise<Readable>;
1608
- report(params?: Params$Resource$Services$Report, options?: MethodOptions): GaxiosPromise<Schema$ReportResponse>;
1794
+ report(params: Params$Resource$Services$Report, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1795
+ report(params?: Params$Resource$Services$Report, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ReportResponse>>;
1609
1796
  report(params: Params$Resource$Services$Report, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1610
1797
  report(params: Params$Resource$Services$Report, options: MethodOptions | BodyResponseCallback<Schema$ReportResponse>, callback: BodyResponseCallback<Schema$ReportResponse>): void;
1611
1798
  report(params: Params$Resource$Services$Report, callback: BodyResponseCallback<Schema$ReportResponse>): void;
package/build/v1.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEA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ACR;gBACD,MAAM;gBACN,cAAc,EAAE,CAAC,aAAa,CAAC;gBAC/B,UAAU,EAAE,CAAC,aAAa,CAAC;gBAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EAAwB,UAAU,CAAC,CAAC;aAC5D;QACH,CAAC;KACF;IAtdY,mCAAiB,oBAsd7B,CAAA;AAoCH,CAAC,EA1+DgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA0+DjC"}
package/build/v2.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
3
  import { Readable } from 'stream';
4
4
  export declare namespace servicecontrol_v2 {
5
5
  export interface Options extends GlobalOptions {
@@ -958,28 +958,148 @@ export declare namespace servicecontrol_v2 {
958
958
  constructor(context: APIRequestContext);
959
959
  /**
960
960
  * This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
961
+ * @example
962
+ * ```js
963
+ * // Before running the sample:
964
+ * // - Enable the API at:
965
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
966
+ * // - Login into gcloud by running:
967
+ * // ```sh
968
+ * // $ gcloud auth application-default login
969
+ * // ```
970
+ * // - Install the npm module by running:
971
+ * // ```sh
972
+ * // $ npm install googleapis
973
+ * // ```
974
+ *
975
+ * const {google} = require('googleapis');
976
+ * const servicecontrol = google.servicecontrol('v2');
977
+ *
978
+ * async function main() {
979
+ * const auth = new google.auth.GoogleAuth({
980
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
981
+ * scopes: [
982
+ * 'https://www.googleapis.com/auth/cloud-platform',
983
+ * 'https://www.googleapis.com/auth/servicecontrol',
984
+ * ],
985
+ * });
986
+ *
987
+ * // Acquire an auth client, and bind it to all future calls
988
+ * const authClient = await auth.getClient();
989
+ * google.options({auth: authClient});
990
+ *
991
+ * // Do the magic
992
+ * const res = await servicecontrol.services.check({
993
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
994
+ * serviceName: 'placeholder-value',
995
+ *
996
+ * // Request body metadata
997
+ * requestBody: {
998
+ * // request body parameters
999
+ * // {
1000
+ * // "attributes": {},
1001
+ * // "flags": "my_flags",
1002
+ * // "resources": [],
1003
+ * // "serviceConfigId": "my_serviceConfigId"
1004
+ * // }
1005
+ * },
1006
+ * });
1007
+ * console.log(res.data);
1008
+ *
1009
+ * // Example response
1010
+ * // {
1011
+ * // "dynamicMetadata": {},
1012
+ * // "headers": {},
1013
+ * // "status": {}
1014
+ * // }
1015
+ * }
1016
+ *
1017
+ * main().catch(e => {
1018
+ * console.error(e);
1019
+ * throw e;
1020
+ * });
1021
+ *
1022
+ * ```
961
1023
  *
962
1024
  * @param params - Parameters for request
963
1025
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
964
1026
  * @param callback - Optional callback that handles the response.
965
1027
  * @returns A promise if used with async/await, or void if used with a callback.
966
1028
  */
967
- check(params: Params$Resource$Services$Check, options: StreamMethodOptions): GaxiosPromise<Readable>;
968
- check(params?: Params$Resource$Services$Check, options?: MethodOptions): GaxiosPromise<Schema$CheckResponse>;
1029
+ check(params: Params$Resource$Services$Check, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1030
+ check(params?: Params$Resource$Services$Check, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$CheckResponse>>;
969
1031
  check(params: Params$Resource$Services$Check, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
970
1032
  check(params: Params$Resource$Services$Check, options: MethodOptions | BodyResponseCallback<Schema$CheckResponse>, callback: BodyResponseCallback<Schema$CheckResponse>): void;
971
1033
  check(params: Params$Resource$Services$Check, callback: BodyResponseCallback<Schema$CheckResponse>): void;
972
1034
  check(callback: BodyResponseCallback<Schema$CheckResponse>): void;
973
1035
  /**
974
1036
  * This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
1037
+ * @example
1038
+ * ```js
1039
+ * // Before running the sample:
1040
+ * // - Enable the API at:
1041
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1042
+ * // - Login into gcloud by running:
1043
+ * // ```sh
1044
+ * // $ gcloud auth application-default login
1045
+ * // ```
1046
+ * // - Install the npm module by running:
1047
+ * // ```sh
1048
+ * // $ npm install googleapis
1049
+ * // ```
1050
+ *
1051
+ * const {google} = require('googleapis');
1052
+ * const servicecontrol = google.servicecontrol('v2');
1053
+ *
1054
+ * async function main() {
1055
+ * const auth = new google.auth.GoogleAuth({
1056
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1057
+ * scopes: [
1058
+ * 'https://www.googleapis.com/auth/cloud-platform',
1059
+ * 'https://www.googleapis.com/auth/servicecontrol',
1060
+ * ],
1061
+ * });
1062
+ *
1063
+ * // Acquire an auth client, and bind it to all future calls
1064
+ * const authClient = await auth.getClient();
1065
+ * google.options({auth: authClient});
1066
+ *
1067
+ * // Do the magic
1068
+ * const res = await servicecontrol.services.report({
1069
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1070
+ * serviceName: 'placeholder-value',
1071
+ *
1072
+ * // Request body metadata
1073
+ * requestBody: {
1074
+ * // request body parameters
1075
+ * // {
1076
+ * // "operations": [],
1077
+ * // "serviceConfigId": "my_serviceConfigId"
1078
+ * // }
1079
+ * },
1080
+ * });
1081
+ * console.log(res.data);
1082
+ *
1083
+ * // Example response
1084
+ * // {
1085
+ * // "extensions": {}
1086
+ * // }
1087
+ * }
1088
+ *
1089
+ * main().catch(e => {
1090
+ * console.error(e);
1091
+ * throw e;
1092
+ * });
1093
+ *
1094
+ * ```
975
1095
  *
976
1096
  * @param params - Parameters for request
977
1097
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
978
1098
  * @param callback - Optional callback that handles the response.
979
1099
  * @returns A promise if used with async/await, or void if used with a callback.
980
1100
  */
981
- report(params: Params$Resource$Services$Report, options: StreamMethodOptions): GaxiosPromise<Readable>;
982
- report(params?: Params$Resource$Services$Report, options?: MethodOptions): GaxiosPromise<Schema$ReportResponse>;
1101
+ report(params: Params$Resource$Services$Report, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1102
+ report(params?: Params$Resource$Services$Report, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ReportResponse>>;
983
1103
  report(params: Params$Resource$Services$Report, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
984
1104
  report(params: Params$Resource$Services$Report, options: MethodOptions | BodyResponseCallback<Schema$ReportResponse>, callback: BodyResponseCallback<Schema$ReportResponse>): void;
985
1105
  report(params: Params$Resource$Services$Report, callback: BodyResponseCallback<Schema$ReportResponse>): void;
package/build/v2.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v2.js","sourceRoot":"","sources":["../v2.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,iBAAiB,CAmmCjC;AAnmCD,WAAiB,iBAAiB;IAgEhC;;;;;;;;;;OAUG;IACH,MAAa,cAAc;QAIzB,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,QAAQ,EAAE,OAAO,IAAI,EAAE;gBACvB,MAAM;aACP,CAAC;YAEF,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;KACF;IAZY,gCAAc,iBAY1B,CAAA;IA+zBD,MAAa,iBAAiB;QAE5B,YAAY,OAA0B;YACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC;QAiCD,KAAK,CACH,gBAGkC,EAClC,iBAIkC,EAClC,QAEkC;YAElC,IAAI,MAAM,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAmC,CAAC;YACxE,IAAI,OAAO,G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CAAiB,oBAmT7B,CAAA;AAwBH,CAAC,EAjuCgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAiuCjC"}
package/index.ts CHANGED
@@ -53,7 +53,6 @@ export {
53
53
  APIRequestContext,
54
54
  GoogleConfigurable,
55
55
  StreamMethodOptions,
56
- GaxiosPromise,
57
56
  MethodOptions,
58
57
  BodyResponseCallback,
59
58
  } from 'googleapis-common';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/servicecontrol",
3
- "version": "6.0.1",
3
+ "version": "8.0.1",
4
4
  "description": "servicecontrol",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "webpack": "webpack"
29
29
  },
30
30
  "dependencies": {
31
- "googleapis-common": "^7.0.0"
31
+ "googleapis-common": "^8.0.2-rc.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@microsoft/api-documenter": "^7.8.10",
package/v1.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -1563,6 +1563,68 @@ export namespace servicecontrol_v1 {
1563
1563
 
1564
1564
  /**
1565
1565
  * Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
1566
+ * @example
1567
+ * ```js
1568
+ * // Before running the sample:
1569
+ * // - Enable the API at:
1570
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1571
+ * // - Login into gcloud by running:
1572
+ * // ```sh
1573
+ * // $ gcloud auth application-default login
1574
+ * // ```
1575
+ * // - Install the npm module by running:
1576
+ * // ```sh
1577
+ * // $ npm install googleapis
1578
+ * // ```
1579
+ *
1580
+ * const {google} = require('googleapis');
1581
+ * const servicecontrol = google.servicecontrol('v1');
1582
+ *
1583
+ * async function main() {
1584
+ * const auth = new google.auth.GoogleAuth({
1585
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1586
+ * scopes: [
1587
+ * 'https://www.googleapis.com/auth/cloud-platform',
1588
+ * 'https://www.googleapis.com/auth/servicecontrol',
1589
+ * ],
1590
+ * });
1591
+ *
1592
+ * // Acquire an auth client, and bind it to all future calls
1593
+ * const authClient = await auth.getClient();
1594
+ * google.options({auth: authClient});
1595
+ *
1596
+ * // Do the magic
1597
+ * const res = await servicecontrol.services.allocateQuota({
1598
+ * // Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
1599
+ * serviceName: 'placeholder-value',
1600
+ *
1601
+ * // Request body metadata
1602
+ * requestBody: {
1603
+ * // request body parameters
1604
+ * // {
1605
+ * // "allocateOperation": {},
1606
+ * // "serviceConfigId": "my_serviceConfigId"
1607
+ * // }
1608
+ * },
1609
+ * });
1610
+ * console.log(res.data);
1611
+ *
1612
+ * // Example response
1613
+ * // {
1614
+ * // "allocateErrors": [],
1615
+ * // "allocateInfo": {},
1616
+ * // "operationId": "my_operationId",
1617
+ * // "quotaMetrics": [],
1618
+ * // "serviceConfigId": "my_serviceConfigId"
1619
+ * // }
1620
+ * }
1621
+ *
1622
+ * main().catch(e => {
1623
+ * console.error(e);
1624
+ * throw e;
1625
+ * });
1626
+ *
1627
+ * ```
1566
1628
  *
1567
1629
  * @param params - Parameters for request
1568
1630
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1572,11 +1634,11 @@ export namespace servicecontrol_v1 {
1572
1634
  allocateQuota(
1573
1635
  params: Params$Resource$Services$Allocatequota,
1574
1636
  options: StreamMethodOptions
1575
- ): GaxiosPromise<Readable>;
1637
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1576
1638
  allocateQuota(
1577
1639
  params?: Params$Resource$Services$Allocatequota,
1578
1640
  options?: MethodOptions
1579
- ): GaxiosPromise<Schema$AllocateQuotaResponse>;
1641
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AllocateQuotaResponse>>;
1580
1642
  allocateQuota(
1581
1643
  params: Params$Resource$Services$Allocatequota,
1582
1644
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1611,8 +1673,8 @@ export namespace servicecontrol_v1 {
1611
1673
  | BodyResponseCallback<Readable>
1612
1674
  ):
1613
1675
  | void
1614
- | GaxiosPromise<Schema$AllocateQuotaResponse>
1615
- | GaxiosPromise<Readable> {
1676
+ | Promise<GaxiosResponseWithHTTP2<Schema$AllocateQuotaResponse>>
1677
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1616
1678
  let params = (paramsOrCallback ||
1617
1679
  {}) as Params$Resource$Services$Allocatequota;
1618
1680
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1659,6 +1721,71 @@ export namespace servicecontrol_v1 {
1659
1721
 
1660
1722
  /**
1661
1723
  * Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).
1724
+ * @example
1725
+ * ```js
1726
+ * // Before running the sample:
1727
+ * // - Enable the API at:
1728
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1729
+ * // - Login into gcloud by running:
1730
+ * // ```sh
1731
+ * // $ gcloud auth application-default login
1732
+ * // ```
1733
+ * // - Install the npm module by running:
1734
+ * // ```sh
1735
+ * // $ npm install googleapis
1736
+ * // ```
1737
+ *
1738
+ * const {google} = require('googleapis');
1739
+ * const servicecontrol = google.servicecontrol('v1');
1740
+ *
1741
+ * async function main() {
1742
+ * const auth = new google.auth.GoogleAuth({
1743
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1744
+ * scopes: [
1745
+ * 'https://www.googleapis.com/auth/cloud-platform',
1746
+ * 'https://www.googleapis.com/auth/servicecontrol',
1747
+ * ],
1748
+ * });
1749
+ *
1750
+ * // Acquire an auth client, and bind it to all future calls
1751
+ * const authClient = await auth.getClient();
1752
+ * google.options({auth: authClient});
1753
+ *
1754
+ * // Do the magic
1755
+ * const res = await servicecontrol.services.check({
1756
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1757
+ * serviceName: 'placeholder-value',
1758
+ *
1759
+ * // Request body metadata
1760
+ * requestBody: {
1761
+ * // request body parameters
1762
+ * // {
1763
+ * // "operation": {},
1764
+ * // "requestProjectSettings": false,
1765
+ * // "serviceConfigId": "my_serviceConfigId",
1766
+ * // "skipActivationCheck": false
1767
+ * // }
1768
+ * },
1769
+ * });
1770
+ * console.log(res.data);
1771
+ *
1772
+ * // Example response
1773
+ * // {
1774
+ * // "checkErrors": [],
1775
+ * // "checkInfo": {},
1776
+ * // "operationId": "my_operationId",
1777
+ * // "quotaInfo": {},
1778
+ * // "serviceConfigId": "my_serviceConfigId",
1779
+ * // "serviceRolloutId": "my_serviceRolloutId"
1780
+ * // }
1781
+ * }
1782
+ *
1783
+ * main().catch(e => {
1784
+ * console.error(e);
1785
+ * throw e;
1786
+ * });
1787
+ *
1788
+ * ```
1662
1789
  *
1663
1790
  * @param params - Parameters for request
1664
1791
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1668,11 +1795,11 @@ export namespace servicecontrol_v1 {
1668
1795
  check(
1669
1796
  params: Params$Resource$Services$Check,
1670
1797
  options: StreamMethodOptions
1671
- ): GaxiosPromise<Readable>;
1798
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1672
1799
  check(
1673
1800
  params?: Params$Resource$Services$Check,
1674
1801
  options?: MethodOptions
1675
- ): GaxiosPromise<Schema$CheckResponse>;
1802
+ ): Promise<GaxiosResponseWithHTTP2<Schema$CheckResponse>>;
1676
1803
  check(
1677
1804
  params: Params$Resource$Services$Check,
1678
1805
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1701,7 +1828,10 @@ export namespace servicecontrol_v1 {
1701
1828
  callback?:
1702
1829
  | BodyResponseCallback<Schema$CheckResponse>
1703
1830
  | BodyResponseCallback<Readable>
1704
- ): void | GaxiosPromise<Schema$CheckResponse> | GaxiosPromise<Readable> {
1831
+ ):
1832
+ | void
1833
+ | Promise<GaxiosResponseWithHTTP2<Schema$CheckResponse>>
1834
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1705
1835
  let params = (paramsOrCallback || {}) as Params$Resource$Services$Check;
1706
1836
  let options = (optionsOrCallback || {}) as MethodOptions;
1707
1837
 
@@ -1747,6 +1877,66 @@ export namespace servicecontrol_v1 {
1747
1877
 
1748
1878
  /**
1749
1879
  * Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
1880
+ * @example
1881
+ * ```js
1882
+ * // Before running the sample:
1883
+ * // - Enable the API at:
1884
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1885
+ * // - Login into gcloud by running:
1886
+ * // ```sh
1887
+ * // $ gcloud auth application-default login
1888
+ * // ```
1889
+ * // - Install the npm module by running:
1890
+ * // ```sh
1891
+ * // $ npm install googleapis
1892
+ * // ```
1893
+ *
1894
+ * const {google} = require('googleapis');
1895
+ * const servicecontrol = google.servicecontrol('v1');
1896
+ *
1897
+ * async function main() {
1898
+ * const auth = new google.auth.GoogleAuth({
1899
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1900
+ * scopes: [
1901
+ * 'https://www.googleapis.com/auth/cloud-platform',
1902
+ * 'https://www.googleapis.com/auth/servicecontrol',
1903
+ * ],
1904
+ * });
1905
+ *
1906
+ * // Acquire an auth client, and bind it to all future calls
1907
+ * const authClient = await auth.getClient();
1908
+ * google.options({auth: authClient});
1909
+ *
1910
+ * // Do the magic
1911
+ * const res = await servicecontrol.services.report({
1912
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1913
+ * serviceName: 'placeholder-value',
1914
+ *
1915
+ * // Request body metadata
1916
+ * requestBody: {
1917
+ * // request body parameters
1918
+ * // {
1919
+ * // "operations": [],
1920
+ * // "serviceConfigId": "my_serviceConfigId"
1921
+ * // }
1922
+ * },
1923
+ * });
1924
+ * console.log(res.data);
1925
+ *
1926
+ * // Example response
1927
+ * // {
1928
+ * // "reportErrors": [],
1929
+ * // "serviceConfigId": "my_serviceConfigId",
1930
+ * // "serviceRolloutId": "my_serviceRolloutId"
1931
+ * // }
1932
+ * }
1933
+ *
1934
+ * main().catch(e => {
1935
+ * console.error(e);
1936
+ * throw e;
1937
+ * });
1938
+ *
1939
+ * ```
1750
1940
  *
1751
1941
  * @param params - Parameters for request
1752
1942
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1756,11 +1946,11 @@ export namespace servicecontrol_v1 {
1756
1946
  report(
1757
1947
  params: Params$Resource$Services$Report,
1758
1948
  options: StreamMethodOptions
1759
- ): GaxiosPromise<Readable>;
1949
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1760
1950
  report(
1761
1951
  params?: Params$Resource$Services$Report,
1762
1952
  options?: MethodOptions
1763
- ): GaxiosPromise<Schema$ReportResponse>;
1953
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ReportResponse>>;
1764
1954
  report(
1765
1955
  params: Params$Resource$Services$Report,
1766
1956
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1789,7 +1979,10 @@ export namespace servicecontrol_v1 {
1789
1979
  callback?:
1790
1980
  | BodyResponseCallback<Schema$ReportResponse>
1791
1981
  | BodyResponseCallback<Readable>
1792
- ): void | GaxiosPromise<Schema$ReportResponse> | GaxiosPromise<Readable> {
1982
+ ):
1983
+ | void
1984
+ | Promise<GaxiosResponseWithHTTP2<Schema$ReportResponse>>
1985
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1793
1986
  let params = (paramsOrCallback || {}) as Params$Resource$Services$Report;
1794
1987
  let options = (optionsOrCallback || {}) as MethodOptions;
1795
1988
 
package/v2.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -961,6 +961,68 @@ export namespace servicecontrol_v2 {
961
961
 
962
962
  /**
963
963
  * This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
964
+ * @example
965
+ * ```js
966
+ * // Before running the sample:
967
+ * // - Enable the API at:
968
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
969
+ * // - Login into gcloud by running:
970
+ * // ```sh
971
+ * // $ gcloud auth application-default login
972
+ * // ```
973
+ * // - Install the npm module by running:
974
+ * // ```sh
975
+ * // $ npm install googleapis
976
+ * // ```
977
+ *
978
+ * const {google} = require('googleapis');
979
+ * const servicecontrol = google.servicecontrol('v2');
980
+ *
981
+ * async function main() {
982
+ * const auth = new google.auth.GoogleAuth({
983
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
984
+ * scopes: [
985
+ * 'https://www.googleapis.com/auth/cloud-platform',
986
+ * 'https://www.googleapis.com/auth/servicecontrol',
987
+ * ],
988
+ * });
989
+ *
990
+ * // Acquire an auth client, and bind it to all future calls
991
+ * const authClient = await auth.getClient();
992
+ * google.options({auth: authClient});
993
+ *
994
+ * // Do the magic
995
+ * const res = await servicecontrol.services.check({
996
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
997
+ * serviceName: 'placeholder-value',
998
+ *
999
+ * // Request body metadata
1000
+ * requestBody: {
1001
+ * // request body parameters
1002
+ * // {
1003
+ * // "attributes": {},
1004
+ * // "flags": "my_flags",
1005
+ * // "resources": [],
1006
+ * // "serviceConfigId": "my_serviceConfigId"
1007
+ * // }
1008
+ * },
1009
+ * });
1010
+ * console.log(res.data);
1011
+ *
1012
+ * // Example response
1013
+ * // {
1014
+ * // "dynamicMetadata": {},
1015
+ * // "headers": {},
1016
+ * // "status": {}
1017
+ * // }
1018
+ * }
1019
+ *
1020
+ * main().catch(e => {
1021
+ * console.error(e);
1022
+ * throw e;
1023
+ * });
1024
+ *
1025
+ * ```
964
1026
  *
965
1027
  * @param params - Parameters for request
966
1028
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -970,11 +1032,11 @@ export namespace servicecontrol_v2 {
970
1032
  check(
971
1033
  params: Params$Resource$Services$Check,
972
1034
  options: StreamMethodOptions
973
- ): GaxiosPromise<Readable>;
1035
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
974
1036
  check(
975
1037
  params?: Params$Resource$Services$Check,
976
1038
  options?: MethodOptions
977
- ): GaxiosPromise<Schema$CheckResponse>;
1039
+ ): Promise<GaxiosResponseWithHTTP2<Schema$CheckResponse>>;
978
1040
  check(
979
1041
  params: Params$Resource$Services$Check,
980
1042
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1003,7 +1065,10 @@ export namespace servicecontrol_v2 {
1003
1065
  callback?:
1004
1066
  | BodyResponseCallback<Schema$CheckResponse>
1005
1067
  | BodyResponseCallback<Readable>
1006
- ): void | GaxiosPromise<Schema$CheckResponse> | GaxiosPromise<Readable> {
1068
+ ):
1069
+ | void
1070
+ | Promise<GaxiosResponseWithHTTP2<Schema$CheckResponse>>
1071
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1007
1072
  let params = (paramsOrCallback || {}) as Params$Resource$Services$Check;
1008
1073
  let options = (optionsOrCallback || {}) as MethodOptions;
1009
1074
 
@@ -1049,6 +1114,64 @@ export namespace servicecontrol_v2 {
1049
1114
 
1050
1115
  /**
1051
1116
  * This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
1117
+ * @example
1118
+ * ```js
1119
+ * // Before running the sample:
1120
+ * // - Enable the API at:
1121
+ * // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
1122
+ * // - Login into gcloud by running:
1123
+ * // ```sh
1124
+ * // $ gcloud auth application-default login
1125
+ * // ```
1126
+ * // - Install the npm module by running:
1127
+ * // ```sh
1128
+ * // $ npm install googleapis
1129
+ * // ```
1130
+ *
1131
+ * const {google} = require('googleapis');
1132
+ * const servicecontrol = google.servicecontrol('v2');
1133
+ *
1134
+ * async function main() {
1135
+ * const auth = new google.auth.GoogleAuth({
1136
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1137
+ * scopes: [
1138
+ * 'https://www.googleapis.com/auth/cloud-platform',
1139
+ * 'https://www.googleapis.com/auth/servicecontrol',
1140
+ * ],
1141
+ * });
1142
+ *
1143
+ * // Acquire an auth client, and bind it to all future calls
1144
+ * const authClient = await auth.getClient();
1145
+ * google.options({auth: authClient});
1146
+ *
1147
+ * // Do the magic
1148
+ * const res = await servicecontrol.services.report({
1149
+ * // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1150
+ * serviceName: 'placeholder-value',
1151
+ *
1152
+ * // Request body metadata
1153
+ * requestBody: {
1154
+ * // request body parameters
1155
+ * // {
1156
+ * // "operations": [],
1157
+ * // "serviceConfigId": "my_serviceConfigId"
1158
+ * // }
1159
+ * },
1160
+ * });
1161
+ * console.log(res.data);
1162
+ *
1163
+ * // Example response
1164
+ * // {
1165
+ * // "extensions": {}
1166
+ * // }
1167
+ * }
1168
+ *
1169
+ * main().catch(e => {
1170
+ * console.error(e);
1171
+ * throw e;
1172
+ * });
1173
+ *
1174
+ * ```
1052
1175
  *
1053
1176
  * @param params - Parameters for request
1054
1177
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1058,11 +1181,11 @@ export namespace servicecontrol_v2 {
1058
1181
  report(
1059
1182
  params: Params$Resource$Services$Report,
1060
1183
  options: StreamMethodOptions
1061
- ): GaxiosPromise<Readable>;
1184
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1062
1185
  report(
1063
1186
  params?: Params$Resource$Services$Report,
1064
1187
  options?: MethodOptions
1065
- ): GaxiosPromise<Schema$ReportResponse>;
1188
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ReportResponse>>;
1066
1189
  report(
1067
1190
  params: Params$Resource$Services$Report,
1068
1191
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1091,7 +1214,10 @@ export namespace servicecontrol_v2 {
1091
1214
  callback?:
1092
1215
  | BodyResponseCallback<Schema$ReportResponse>
1093
1216
  | BodyResponseCallback<Readable>
1094
- ): void | GaxiosPromise<Schema$ReportResponse> | GaxiosPromise<Readable> {
1217
+ ):
1218
+ | void
1219
+ | Promise<GaxiosResponseWithHTTP2<Schema$ReportResponse>>
1220
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1095
1221
  let params = (paramsOrCallback || {}) as Params$Resource$Services$Report;
1096
1222
  let options = (optionsOrCallback || {}) as MethodOptions;
1097
1223