@googleapis/sourcerepo 1.0.1 → 1.0.3

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/v1.ts CHANGED
@@ -243,12 +243,12 @@ export namespace sourcerepo_v1 {
243
243
  */
244
244
  name?: string | null;
245
245
  /**
246
- * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
246
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
247
247
  */
248
248
  response?: {[key: string]: any} | null;
249
249
  }
250
250
  /**
251
- * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
251
+ * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
252
252
  */
253
253
  export interface Schema$Policy {
254
254
  /**
@@ -437,50 +437,6 @@ export namespace sourcerepo_v1 {
437
437
 
438
438
  /**
439
439
  * Returns the Cloud Source Repositories configuration of the project.
440
- * @example
441
- * ```js
442
- * // Before running the sample:
443
- * // - Enable the API at:
444
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
445
- * // - Login into gcloud by running:
446
- * // `$ gcloud auth application-default login`
447
- * // - Install the npm module by running:
448
- * // `$ npm install googleapis`
449
- *
450
- * const {google} = require('googleapis');
451
- * const sourcerepo = google.sourcerepo('v1');
452
- *
453
- * async function main() {
454
- * const auth = new google.auth.GoogleAuth({
455
- * // Scopes can be specified either as an array or as a single, space-delimited string.
456
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
457
- * });
458
- *
459
- * // Acquire an auth client, and bind it to all future calls
460
- * const authClient = await auth.getClient();
461
- * google.options({auth: authClient});
462
- *
463
- * // Do the magic
464
- * const res = await sourcerepo.projects.getConfig({
465
- * // The name of the requested project. Values are of the form `projects/`.
466
- * name: 'projects/my-project',
467
- * });
468
- * console.log(res.data);
469
- *
470
- * // Example response
471
- * // {
472
- * // "enablePrivateKeyCheck": false,
473
- * // "name": "my_name",
474
- * // "pubsubConfigs": {}
475
- * // }
476
- * }
477
- *
478
- * main().catch(e => {
479
- * console.error(e);
480
- * throw e;
481
- * });
482
- *
483
- * ```
484
440
  *
485
441
  * @param params - Parameters for request
486
442
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -565,59 +521,6 @@ export namespace sourcerepo_v1 {
565
521
 
566
522
  /**
567
523
  * Updates the Cloud Source Repositories configuration of the project.
568
- * @example
569
- * ```js
570
- * // Before running the sample:
571
- * // - Enable the API at:
572
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
573
- * // - Login into gcloud by running:
574
- * // `$ gcloud auth application-default login`
575
- * // - Install the npm module by running:
576
- * // `$ npm install googleapis`
577
- *
578
- * const {google} = require('googleapis');
579
- * const sourcerepo = google.sourcerepo('v1');
580
- *
581
- * async function main() {
582
- * const auth = new google.auth.GoogleAuth({
583
- * // Scopes can be specified either as an array or as a single, space-delimited string.
584
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
585
- * });
586
- *
587
- * // Acquire an auth client, and bind it to all future calls
588
- * const authClient = await auth.getClient();
589
- * google.options({auth: authClient});
590
- *
591
- * // Do the magic
592
- * const res = await sourcerepo.projects.updateConfig({
593
- * // The name of the requested project. Values are of the form `projects/`.
594
- * name: 'projects/my-project',
595
- *
596
- * // Request body metadata
597
- * requestBody: {
598
- * // request body parameters
599
- * // {
600
- * // "projectConfig": {},
601
- * // "updateMask": "my_updateMask"
602
- * // }
603
- * },
604
- * });
605
- * console.log(res.data);
606
- *
607
- * // Example response
608
- * // {
609
- * // "enablePrivateKeyCheck": false,
610
- * // "name": "my_name",
611
- * // "pubsubConfigs": {}
612
- * // }
613
- * }
614
- *
615
- * main().catch(e => {
616
- * console.error(e);
617
- * throw e;
618
- * });
619
- *
620
- * ```
621
524
  *
622
525
  * @param params - Parameters for request
623
526
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -729,67 +632,6 @@ export namespace sourcerepo_v1 {
729
632
 
730
633
  /**
731
634
  * Creates a repo in the given project with the given name. If the named repository already exists, `CreateRepo` returns `ALREADY_EXISTS`.
732
- * @example
733
- * ```js
734
- * // Before running the sample:
735
- * // - Enable the API at:
736
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
737
- * // - Login into gcloud by running:
738
- * // `$ gcloud auth application-default login`
739
- * // - Install the npm module by running:
740
- * // `$ npm install googleapis`
741
- *
742
- * const {google} = require('googleapis');
743
- * const sourcerepo = google.sourcerepo('v1');
744
- *
745
- * async function main() {
746
- * const auth = new google.auth.GoogleAuth({
747
- * // Scopes can be specified either as an array or as a single, space-delimited string.
748
- * scopes: [
749
- * 'https://www.googleapis.com/auth/cloud-platform',
750
- * 'https://www.googleapis.com/auth/source.full_control',
751
- * ],
752
- * });
753
- *
754
- * // Acquire an auth client, and bind it to all future calls
755
- * const authClient = await auth.getClient();
756
- * google.options({auth: authClient});
757
- *
758
- * // Do the magic
759
- * const res = await sourcerepo.projects.repos.create({
760
- * // The project in which to create the repo. Values are of the form `projects/`.
761
- * parent: 'projects/my-project',
762
- *
763
- * // Request body metadata
764
- * requestBody: {
765
- * // request body parameters
766
- * // {
767
- * // "mirrorConfig": {},
768
- * // "name": "my_name",
769
- * // "pubsubConfigs": {},
770
- * // "size": "my_size",
771
- * // "url": "my_url"
772
- * // }
773
- * },
774
- * });
775
- * console.log(res.data);
776
- *
777
- * // Example response
778
- * // {
779
- * // "mirrorConfig": {},
780
- * // "name": "my_name",
781
- * // "pubsubConfigs": {},
782
- * // "size": "my_size",
783
- * // "url": "my_url"
784
- * // }
785
- * }
786
- *
787
- * main().catch(e => {
788
- * console.error(e);
789
- * throw e;
790
- * });
791
- *
792
- * ```
793
635
  *
794
636
  * @param params - Parameters for request
795
637
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -877,49 +719,6 @@ export namespace sourcerepo_v1 {
877
719
 
878
720
  /**
879
721
  * Deletes a repo.
880
- * @example
881
- * ```js
882
- * // Before running the sample:
883
- * // - Enable the API at:
884
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
885
- * // - Login into gcloud by running:
886
- * // `$ gcloud auth application-default login`
887
- * // - Install the npm module by running:
888
- * // `$ npm install googleapis`
889
- *
890
- * const {google} = require('googleapis');
891
- * const sourcerepo = google.sourcerepo('v1');
892
- *
893
- * async function main() {
894
- * const auth = new google.auth.GoogleAuth({
895
- * // Scopes can be specified either as an array or as a single, space-delimited string.
896
- * scopes: [
897
- * 'https://www.googleapis.com/auth/cloud-platform',
898
- * 'https://www.googleapis.com/auth/source.full_control',
899
- * ],
900
- * });
901
- *
902
- * // Acquire an auth client, and bind it to all future calls
903
- * const authClient = await auth.getClient();
904
- * google.options({auth: authClient});
905
- *
906
- * // Do the magic
907
- * const res = await sourcerepo.projects.repos.delete({
908
- * // The name of the repo to delete. Values are of the form `projects//repos/`.
909
- * name: 'projects/my-project/repos/.*',
910
- * });
911
- * console.log(res.data);
912
- *
913
- * // Example response
914
- * // {}
915
- * }
916
- *
917
- * main().catch(e => {
918
- * console.error(e);
919
- * throw e;
920
- * });
921
- *
922
- * ```
923
722
  *
924
723
  * @param params - Parameters for request
925
724
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1004,57 +803,6 @@ export namespace sourcerepo_v1 {
1004
803
 
1005
804
  /**
1006
805
  * Returns information about a repo.
1007
- * @example
1008
- * ```js
1009
- * // Before running the sample:
1010
- * // - Enable the API at:
1011
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1012
- * // - Login into gcloud by running:
1013
- * // `$ gcloud auth application-default login`
1014
- * // - Install the npm module by running:
1015
- * // `$ npm install googleapis`
1016
- *
1017
- * const {google} = require('googleapis');
1018
- * const sourcerepo = google.sourcerepo('v1');
1019
- *
1020
- * async function main() {
1021
- * const auth = new google.auth.GoogleAuth({
1022
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1023
- * scopes: [
1024
- * 'https://www.googleapis.com/auth/cloud-platform',
1025
- * 'https://www.googleapis.com/auth/source.full_control',
1026
- * 'https://www.googleapis.com/auth/source.read_only',
1027
- * 'https://www.googleapis.com/auth/source.read_write',
1028
- * ],
1029
- * });
1030
- *
1031
- * // Acquire an auth client, and bind it to all future calls
1032
- * const authClient = await auth.getClient();
1033
- * google.options({auth: authClient});
1034
- *
1035
- * // Do the magic
1036
- * const res = await sourcerepo.projects.repos.get({
1037
- * // The name of the requested repository. Values are of the form `projects//repos/`.
1038
- * name: 'projects/my-project/repos/.*',
1039
- * });
1040
- * console.log(res.data);
1041
- *
1042
- * // Example response
1043
- * // {
1044
- * // "mirrorConfig": {},
1045
- * // "name": "my_name",
1046
- * // "pubsubConfigs": {},
1047
- * // "size": "my_size",
1048
- * // "url": "my_url"
1049
- * // }
1050
- * }
1051
- *
1052
- * main().catch(e => {
1053
- * console.error(e);
1054
- * throw e;
1055
- * });
1056
- *
1057
- * ```
1058
806
  *
1059
807
  * @param params - Parameters for request
1060
808
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1139,58 +887,6 @@ export namespace sourcerepo_v1 {
1139
887
 
1140
888
  /**
1141
889
  * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
1142
- * @example
1143
- * ```js
1144
- * // Before running the sample:
1145
- * // - Enable the API at:
1146
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1147
- * // - Login into gcloud by running:
1148
- * // `$ gcloud auth application-default login`
1149
- * // - Install the npm module by running:
1150
- * // `$ npm install googleapis`
1151
- *
1152
- * const {google} = require('googleapis');
1153
- * const sourcerepo = google.sourcerepo('v1');
1154
- *
1155
- * async function main() {
1156
- * const auth = new google.auth.GoogleAuth({
1157
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1158
- * scopes: [
1159
- * 'https://www.googleapis.com/auth/cloud-platform',
1160
- * 'https://www.googleapis.com/auth/source.full_control',
1161
- * 'https://www.googleapis.com/auth/source.read_only',
1162
- * 'https://www.googleapis.com/auth/source.read_write',
1163
- * ],
1164
- * });
1165
- *
1166
- * // Acquire an auth client, and bind it to all future calls
1167
- * const authClient = await auth.getClient();
1168
- * google.options({auth: authClient});
1169
- *
1170
- * // Do the magic
1171
- * const res = await sourcerepo.projects.repos.getIamPolicy({
1172
- * // Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1173
- * 'options.requestedPolicyVersion': 'placeholder-value',
1174
- * // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1175
- * resource: 'projects/my-project/repos/.*',
1176
- * });
1177
- * console.log(res.data);
1178
- *
1179
- * // Example response
1180
- * // {
1181
- * // "auditConfigs": [],
1182
- * // "bindings": [],
1183
- * // "etag": "my_etag",
1184
- * // "version": 0
1185
- * // }
1186
- * }
1187
- *
1188
- * main().catch(e => {
1189
- * console.error(e);
1190
- * throw e;
1191
- * });
1192
- *
1193
- * ```
1194
890
  *
1195
891
  * @param params - Parameters for request
1196
892
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1278,58 +974,6 @@ export namespace sourcerepo_v1 {
1278
974
 
1279
975
  /**
1280
976
  * Returns all repos belonging to a project. The sizes of the repos are not set by ListRepos. To get the size of a repo, use GetRepo.
1281
- * @example
1282
- * ```js
1283
- * // Before running the sample:
1284
- * // - Enable the API at:
1285
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1286
- * // - Login into gcloud by running:
1287
- * // `$ gcloud auth application-default login`
1288
- * // - Install the npm module by running:
1289
- * // `$ npm install googleapis`
1290
- *
1291
- * const {google} = require('googleapis');
1292
- * const sourcerepo = google.sourcerepo('v1');
1293
- *
1294
- * async function main() {
1295
- * const auth = new google.auth.GoogleAuth({
1296
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1297
- * scopes: [
1298
- * 'https://www.googleapis.com/auth/cloud-platform',
1299
- * 'https://www.googleapis.com/auth/source.full_control',
1300
- * 'https://www.googleapis.com/auth/source.read_only',
1301
- * 'https://www.googleapis.com/auth/source.read_write',
1302
- * ],
1303
- * });
1304
- *
1305
- * // Acquire an auth client, and bind it to all future calls
1306
- * const authClient = await auth.getClient();
1307
- * google.options({auth: authClient});
1308
- *
1309
- * // Do the magic
1310
- * const res = await sourcerepo.projects.repos.list({
1311
- * // The project ID whose repos should be listed. Values are of the form `projects/`.
1312
- * name: 'projects/my-project',
1313
- * // Maximum number of repositories to return; between 1 and 500. If not set or zero, defaults to 100 at the server.
1314
- * pageSize: 'placeholder-value',
1315
- * // Resume listing repositories where a prior ListReposResponse left off. This is an opaque token that must be obtained from a recent, prior ListReposResponse's next_page_token field.
1316
- * pageToken: 'placeholder-value',
1317
- * });
1318
- * console.log(res.data);
1319
- *
1320
- * // Example response
1321
- * // {
1322
- * // "nextPageToken": "my_nextPageToken",
1323
- * // "repos": []
1324
- * // }
1325
- * }
1326
- *
1327
- * main().catch(e => {
1328
- * console.error(e);
1329
- * throw e;
1330
- * });
1331
- *
1332
- * ```
1333
977
  *
1334
978
  * @param params - Parameters for request
1335
979
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1417,61 +1061,6 @@ export namespace sourcerepo_v1 {
1417
1061
 
1418
1062
  /**
1419
1063
  * Updates information about a repo.
1420
- * @example
1421
- * ```js
1422
- * // Before running the sample:
1423
- * // - Enable the API at:
1424
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1425
- * // - Login into gcloud by running:
1426
- * // `$ gcloud auth application-default login`
1427
- * // - Install the npm module by running:
1428
- * // `$ npm install googleapis`
1429
- *
1430
- * const {google} = require('googleapis');
1431
- * const sourcerepo = google.sourcerepo('v1');
1432
- *
1433
- * async function main() {
1434
- * const auth = new google.auth.GoogleAuth({
1435
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1436
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1437
- * });
1438
- *
1439
- * // Acquire an auth client, and bind it to all future calls
1440
- * const authClient = await auth.getClient();
1441
- * google.options({auth: authClient});
1442
- *
1443
- * // Do the magic
1444
- * const res = await sourcerepo.projects.repos.patch({
1445
- * // The name of the requested repository. Values are of the form `projects//repos/`.
1446
- * name: 'projects/my-project/repos/.*',
1447
- *
1448
- * // Request body metadata
1449
- * requestBody: {
1450
- * // request body parameters
1451
- * // {
1452
- * // "repo": {},
1453
- * // "updateMask": "my_updateMask"
1454
- * // }
1455
- * },
1456
- * });
1457
- * console.log(res.data);
1458
- *
1459
- * // Example response
1460
- * // {
1461
- * // "mirrorConfig": {},
1462
- * // "name": "my_name",
1463
- * // "pubsubConfigs": {},
1464
- * // "size": "my_size",
1465
- * // "url": "my_url"
1466
- * // }
1467
- * }
1468
- *
1469
- * main().catch(e => {
1470
- * console.error(e);
1471
- * throw e;
1472
- * });
1473
- *
1474
- * ```
1475
1064
  *
1476
1065
  * @param params - Parameters for request
1477
1066
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1556,63 +1145,6 @@ export namespace sourcerepo_v1 {
1556
1145
 
1557
1146
  /**
1558
1147
  * Sets the access control policy on the specified resource. Replaces any existing policy.
1559
- * @example
1560
- * ```js
1561
- * // Before running the sample:
1562
- * // - Enable the API at:
1563
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1564
- * // - Login into gcloud by running:
1565
- * // `$ gcloud auth application-default login`
1566
- * // - Install the npm module by running:
1567
- * // `$ npm install googleapis`
1568
- *
1569
- * const {google} = require('googleapis');
1570
- * const sourcerepo = google.sourcerepo('v1');
1571
- *
1572
- * async function main() {
1573
- * const auth = new google.auth.GoogleAuth({
1574
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1575
- * scopes: [
1576
- * 'https://www.googleapis.com/auth/cloud-platform',
1577
- * 'https://www.googleapis.com/auth/source.full_control',
1578
- * ],
1579
- * });
1580
- *
1581
- * // Acquire an auth client, and bind it to all future calls
1582
- * const authClient = await auth.getClient();
1583
- * google.options({auth: authClient});
1584
- *
1585
- * // Do the magic
1586
- * const res = await sourcerepo.projects.repos.setIamPolicy({
1587
- * // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1588
- * resource: 'projects/my-project/repos/.*',
1589
- *
1590
- * // Request body metadata
1591
- * requestBody: {
1592
- * // request body parameters
1593
- * // {
1594
- * // "policy": {},
1595
- * // "updateMask": "my_updateMask"
1596
- * // }
1597
- * },
1598
- * });
1599
- * console.log(res.data);
1600
- *
1601
- * // Example response
1602
- * // {
1603
- * // "auditConfigs": [],
1604
- * // "bindings": [],
1605
- * // "etag": "my_etag",
1606
- * // "version": 0
1607
- * // }
1608
- * }
1609
- *
1610
- * main().catch(e => {
1611
- * console.error(e);
1612
- * throw e;
1613
- * });
1614
- *
1615
- * ```
1616
1148
  *
1617
1149
  * @param params - Parameters for request
1618
1150
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1700,58 +1232,6 @@ export namespace sourcerepo_v1 {
1700
1232
 
1701
1233
  /**
1702
1234
  * Synchronize a connected repo. The response contains SyncRepoMetadata in the metadata field.
1703
- * @example
1704
- * ```js
1705
- * // Before running the sample:
1706
- * // - Enable the API at:
1707
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1708
- * // - Login into gcloud by running:
1709
- * // `$ gcloud auth application-default login`
1710
- * // - Install the npm module by running:
1711
- * // `$ npm install googleapis`
1712
- *
1713
- * const {google} = require('googleapis');
1714
- * const sourcerepo = google.sourcerepo('v1');
1715
- *
1716
- * async function main() {
1717
- * const auth = new google.auth.GoogleAuth({
1718
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1719
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1720
- * });
1721
- *
1722
- * // Acquire an auth client, and bind it to all future calls
1723
- * const authClient = await auth.getClient();
1724
- * google.options({auth: authClient});
1725
- *
1726
- * // Do the magic
1727
- * const res = await sourcerepo.projects.repos.sync({
1728
- * // The name of the repo to synchronize. Values are of the form `projects//repos/`.
1729
- * name: 'projects/my-project/repos/.*',
1730
- *
1731
- * // Request body metadata
1732
- * requestBody: {
1733
- * // request body parameters
1734
- * // {}
1735
- * },
1736
- * });
1737
- * console.log(res.data);
1738
- *
1739
- * // Example response
1740
- * // {
1741
- * // "done": false,
1742
- * // "error": {},
1743
- * // "metadata": {},
1744
- * // "name": "my_name",
1745
- * // "response": {}
1746
- * // }
1747
- * }
1748
- *
1749
- * main().catch(e => {
1750
- * console.error(e);
1751
- * throw e;
1752
- * });
1753
- *
1754
- * ```
1755
1235
  *
1756
1236
  * @param params - Parameters for request
1757
1237
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1836,61 +1316,6 @@ export namespace sourcerepo_v1 {
1836
1316
 
1837
1317
  /**
1838
1318
  * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
1839
- * @example
1840
- * ```js
1841
- * // Before running the sample:
1842
- * // - Enable the API at:
1843
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1844
- * // - Login into gcloud by running:
1845
- * // `$ gcloud auth application-default login`
1846
- * // - Install the npm module by running:
1847
- * // `$ npm install googleapis`
1848
- *
1849
- * const {google} = require('googleapis');
1850
- * const sourcerepo = google.sourcerepo('v1');
1851
- *
1852
- * async function main() {
1853
- * const auth = new google.auth.GoogleAuth({
1854
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1855
- * scopes: [
1856
- * 'https://www.googleapis.com/auth/cloud-platform',
1857
- * 'https://www.googleapis.com/auth/source.full_control',
1858
- * 'https://www.googleapis.com/auth/source.read_only',
1859
- * 'https://www.googleapis.com/auth/source.read_write',
1860
- * ],
1861
- * });
1862
- *
1863
- * // Acquire an auth client, and bind it to all future calls
1864
- * const authClient = await auth.getClient();
1865
- * google.options({auth: authClient});
1866
- *
1867
- * // Do the magic
1868
- * const res = await sourcerepo.projects.repos.testIamPermissions({
1869
- * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1870
- * resource: 'projects/my-project/repos/.*',
1871
- *
1872
- * // Request body metadata
1873
- * requestBody: {
1874
- * // request body parameters
1875
- * // {
1876
- * // "permissions": []
1877
- * // }
1878
- * },
1879
- * });
1880
- * console.log(res.data);
1881
- *
1882
- * // Example response
1883
- * // {
1884
- * // "permissions": []
1885
- * // }
1886
- * }
1887
- *
1888
- * main().catch(e => {
1889
- * console.error(e);
1890
- * throw e;
1891
- * });
1892
- *
1893
- * ```
1894
1319
  *
1895
1320
  * @param params - Parameters for request
1896
1321
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.