@@ -787,7 +787,10 @@ export namespace adsenseplatform_v1alpha {
787
787
* async function main() {
788
788
* const auth = new google.auth.GoogleAuth({
789
789
* // Scopes can be specified either as an array or as a single, space-delimited string.
790
- * scopes: ['https://www.googleapis.com/auth/adsense'],
790
+ * scopes: [
791
+ * 'https://www.googleapis.com/auth/adsense',
792
+ * 'https://www.googleapis.com/auth/adsense.readonly',
793
+ * ],
791
794
* });
792
795
*
793
796
* // Acquire an auth client, and bind it to all future calls
@@ -1278,7 +1281,10 @@ export namespace adsenseplatform_v1alpha {
1278
1281
* async function main() {
1279
1282
* const auth = new google.auth.GoogleAuth({
1280
1283
* // Scopes can be specified either as an array or as a single, space-delimited string.
1281
- * scopes: ['https://www.googleapis.com/auth/adsense'],
1284
+ * scopes: [
1285
+ * 'https://www.googleapis.com/auth/adsense',
1286
+ * 'https://www.googleapis.com/auth/adsense.readonly',
1287
+ * ],
1282
1288
* });
1283
1289
*
1284
1290
* // Acquire an auth client, and bind it to all future calls
@@ -1542,6 +1548,155 @@ export namespace adsenseplatform_v1alpha {
1542
1548
return createAPIRequest < Schema$ListPlatformGroupsResponse > ( parameters ) ;
1543
1549
}
1544
1550
}
1551
+
1552
+ /**
1553
+ * Update a Platform Group.
1554
+ * @example
1555
+ * ```js
1556
+ * // Before running the sample:
1557
+ * // - Enable the API at:
1558
+ * // https://console.developers.google.com/apis/api/adsenseplatform.googleapis.com
1559
+ * // - Login into gcloud by running:
1560
+ * // ```sh
1561
+ * // $ gcloud auth application-default login
1562
+ * // ```
1563
+ * // - Install the npm module by running:
1564
+ * // ```sh
1565
+ * // $ npm install googleapis
1566
+ * // ```
1567
+ *
1568
+ * const {google} = require('googleapis');
1569
+ * const adsenseplatform = google.adsenseplatform('v1alpha');
1570
+ *
1571
+ * async function main() {
1572
+ * const auth = new google.auth.GoogleAuth({
1573
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1574
+ * scopes: ['https://www.googleapis.com/auth/adsense'],
1575
+ * });
1576
+ *
1577
+ * // Acquire an auth client, and bind it to all future calls
1578
+ * const authClient = await auth.getClient();
1579
+ * google.options({auth: authClient});
1580
+ *
1581
+ * // Do the magic
1582
+ * const res = await adsenseplatform.accounts.platforms.groups.patch({
1583
+ * // Identifier. Format: accounts/{account\}/platforms/{platform\}/groups/{platform_group\}
1584
+ * name: 'accounts/my-account/platforms/my-platform/groups/my-group',
1585
+ * // Optional. The list of fields to update - currently only supports updating the `description` field.
1586
+ * updateMask: 'placeholder-value',
1587
+ *
1588
+ * // Request body metadata
1589
+ * requestBody: {
1590
+ * // request body parameters
1591
+ * // {
1592
+ * // "description": "my_description",
1593
+ * // "name": "my_name",
1594
+ * // "revshareMillipercent": {}
1595
+ * // }
1596
+ * },
1597
+ * });
1598
+ * console.log(res.data);
1599
+ *
1600
+ * // Example response
1601
+ * // {
1602
+ * // "description": "my_description",
1603
+ * // "name": "my_name",
1604
+ * // "revshareMillipercent": {}
1605
+ * // }
1606
+ * }
1607
+ *
1608
+ * main().catch(e => {
1609
+ * console.error(e);
1610
+ * throw e;
1611
+ * });
1612
+ *
1613
+ * ```
1614
+ *
1615
+ * @param params - Parameters for request
1616
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1617
+ * @param callback - Optional callback that handles the response.
1618
+ * @returns A promise if used with async/await, or void if used with a callback.
1619
+ */
1620
+ patch (
1621
+ params : Params$Resource$Accounts$Platforms$Groups$Patch ,
1622
+ options : StreamMethodOptions
1623
+ ) : Promise < GaxiosResponseWithHTTP2 < Readable > > ;
1624
+ patch (
1625
+ params ?: Params$Resource$Accounts$Platforms$Groups$Patch ,
1626
+ options ?: MethodOptions
1627
+ ) : Promise < GaxiosResponseWithHTTP2 < Schema$PlatformGroup > > ;
1628
+ patch (
1629
+ params : Params$Resource$Accounts$Platforms$Groups$Patch ,
1630
+ options : StreamMethodOptions | BodyResponseCallback < Readable > ,
1631
+ callback : BodyResponseCallback < Readable >
1632
+ ) : void ;
1633
+ patch (
1634
+ params : Params$Resource$Accounts$Platforms$Groups$Patch ,
1635
+ options : MethodOptions | BodyResponseCallback < Schema$PlatformGroup > ,
1636
+ callback : BodyResponseCallback < Schema$PlatformGroup >
1637
+ ) : void ;
1638
+ patch (
1639
+ params : Params$Resource$Accounts$Platforms$Groups$Patch ,
1640
+ callback : BodyResponseCallback < Schema$PlatformGroup >
1641
+ ) : void ;
1642
+ patch ( callback : BodyResponseCallback < Schema$PlatformGroup > ) : void ;
1643
+ patch (
1644
+ paramsOrCallback ?:
1645
+ | Params$Resource$Accounts$Platforms$Groups$Patch
1646
+ | BodyResponseCallback < Schema$PlatformGroup >
1647
+ | BodyResponseCallback < Readable > ,
1648
+ optionsOrCallback ?:
1649
+ | MethodOptions
1650
+ | StreamMethodOptions
1651
+ | BodyResponseCallback < Schema$PlatformGroup >
1652
+ | BodyResponseCallback < Readable > ,
1653
+ callback ?:
1654
+ | BodyResponseCallback < Schema$PlatformGroup >
1655
+ | BodyResponseCallback < Readable >
1656
+ ) :
1657
+ | void
1658
+ | Promise < GaxiosResponseWithHTTP2 < Schema$PlatformGroup > >
1659
+ | Promise < GaxiosResponseWithHTTP2 < Readable > > {
1660
+ let params = ( paramsOrCallback ||
1661
+ { } ) as Params$Resource$Accounts$Platforms$Groups$Patch ;
1662
+ let options = ( optionsOrCallback || { } ) as MethodOptions ;
1663
+
1664
+ if ( typeof paramsOrCallback === 'function' ) {
1665
+ callback = paramsOrCallback ;
1666
+ params = { } as Params$Resource$Accounts$Platforms$Groups$Patch ;
1667
+ options = { } ;
1668
+ }
1669
+
1670
+ if ( typeof optionsOrCallback === 'function' ) {
1671
+ callback = optionsOrCallback ;
1672
+ options = { } ;
1673
+ }
1674
+
1675
+ const rootUrl =
1676
+ options . rootUrl || 'https://adsenseplatform.googleapis.com/' ;
1677
+ const parameters = {
1678
+ options : Object . assign (
1679
+ {
1680
+ url : ( rootUrl + '/v1alpha/{+name}' ) . replace ( / ( [ ^ : ] \/ ) \/ + / g, '$1' ) ,
1681
+ method : 'PATCH' ,
1682
+ apiVersion : '' ,
1683
+ } ,
1684
+ options
1685
+ ) ,
1686
+ params,
1687
+ requiredParams : [ 'name' ] ,
1688
+ pathParams : [ 'name' ] ,
1689
+ context : this . context ,
1690
+ } ;
1691
+ if ( callback ) {
1692
+ createAPIRequest < Schema$PlatformGroup > (
1693
+ parameters ,
1694
+ callback as BodyResponseCallback < unknown >
1695
+ ) ;
1696
+ } else {
1697
+ return createAPIRequest < Schema$PlatformGroup > ( parameters ) ;
1698
+ }
1699
+ }
1545
1700
}
1546
1701
1547
1702
export interface Params$Resource$Accounts$Platforms$Groups$Get
@@ -1566,6 +1721,22 @@ export namespace adsenseplatform_v1alpha {
1566
1721
*/
1567
1722
parent ?: string ;
1568
1723
}
1724
+ export interface Params$Resource$Accounts$Platforms$Groups$Patch
1725
+ extends StandardParameters {
1726
+ /**
1727
+ * Identifier. Format: accounts/{account\}/platforms/{platform\}/groups/{platform_group\}
1728
+ */
1729
+ name ?: string ;
1730
+ /**
1731
+ * Optional. The list of fields to update - currently only supports updating the `description` field.
1732
+ */
1733
+ updateMask ?: string ;
1734
+
1735
+ /**
1736
+ * Request body metadata
1737
+ */
1738
+ requestBody ?: Schema$PlatformGroup ;
1739
+ }
1569
1740
1570
1741
export class Resource$Platforms {
1571
1742
context : APIRequestContext ;
0 commit comments