@googleapis/sourcerepo 1.0.2 → 1.0.4

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/build/v1.d.ts CHANGED
@@ -193,14 +193,14 @@ export declare namespace sourcerepo_v1 {
193
193
  */
194
194
  name?: string | null;
195
195
  /**
196
- * 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`.
196
+ * 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`.
197
197
  */
198
198
  response?: {
199
199
  [key: string]: any;
200
200
  } | null;
201
201
  }
202
202
  /**
203
- * 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/).
203
+ * 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/).
204
204
  */
205
205
  export interface Schema$Policy {
206
206
  /**
@@ -391,50 +391,6 @@ export declare namespace sourcerepo_v1 {
391
391
  constructor(context: APIRequestContext);
392
392
  /**
393
393
  * Returns the Cloud Source Repositories configuration of the project.
394
- * @example
395
- * ```js
396
- * // Before running the sample:
397
- * // - Enable the API at:
398
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
399
- * // - Login into gcloud by running:
400
- * // `$ gcloud auth application-default login`
401
- * // - Install the npm module by running:
402
- * // `$ npm install googleapis`
403
- *
404
- * const {google} = require('googleapis');
405
- * const sourcerepo = google.sourcerepo('v1');
406
- *
407
- * async function main() {
408
- * const auth = new google.auth.GoogleAuth({
409
- * // Scopes can be specified either as an array or as a single, space-delimited string.
410
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
411
- * });
412
- *
413
- * // Acquire an auth client, and bind it to all future calls
414
- * const authClient = await auth.getClient();
415
- * google.options({auth: authClient});
416
- *
417
- * // Do the magic
418
- * const res = await sourcerepo.projects.getConfig({
419
- * // The name of the requested project. Values are of the form `projects/`.
420
- * name: 'projects/my-project',
421
- * });
422
- * console.log(res.data);
423
- *
424
- * // Example response
425
- * // {
426
- * // "enablePrivateKeyCheck": false,
427
- * // "name": "my_name",
428
- * // "pubsubConfigs": {}
429
- * // }
430
- * }
431
- *
432
- * main().catch(e => {
433
- * console.error(e);
434
- * throw e;
435
- * });
436
- *
437
- * ```
438
394
  *
439
395
  * @param params - Parameters for request
440
396
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -449,59 +405,6 @@ export declare namespace sourcerepo_v1 {
449
405
  getConfig(callback: BodyResponseCallback<Schema$ProjectConfig>): void;
450
406
  /**
451
407
  * Updates the Cloud Source Repositories configuration of the project.
452
- * @example
453
- * ```js
454
- * // Before running the sample:
455
- * // - Enable the API at:
456
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
457
- * // - Login into gcloud by running:
458
- * // `$ gcloud auth application-default login`
459
- * // - Install the npm module by running:
460
- * // `$ npm install googleapis`
461
- *
462
- * const {google} = require('googleapis');
463
- * const sourcerepo = google.sourcerepo('v1');
464
- *
465
- * async function main() {
466
- * const auth = new google.auth.GoogleAuth({
467
- * // Scopes can be specified either as an array or as a single, space-delimited string.
468
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
469
- * });
470
- *
471
- * // Acquire an auth client, and bind it to all future calls
472
- * const authClient = await auth.getClient();
473
- * google.options({auth: authClient});
474
- *
475
- * // Do the magic
476
- * const res = await sourcerepo.projects.updateConfig({
477
- * // The name of the requested project. Values are of the form `projects/`.
478
- * name: 'projects/my-project',
479
- *
480
- * // Request body metadata
481
- * requestBody: {
482
- * // request body parameters
483
- * // {
484
- * // "projectConfig": {},
485
- * // "updateMask": "my_updateMask"
486
- * // }
487
- * },
488
- * });
489
- * console.log(res.data);
490
- *
491
- * // Example response
492
- * // {
493
- * // "enablePrivateKeyCheck": false,
494
- * // "name": "my_name",
495
- * // "pubsubConfigs": {}
496
- * // }
497
- * }
498
- *
499
- * main().catch(e => {
500
- * console.error(e);
501
- * throw e;
502
- * });
503
- *
504
- * ```
505
408
  *
506
409
  * @param params - Parameters for request
507
410
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -536,67 +439,6 @@ export declare namespace sourcerepo_v1 {
536
439
  constructor(context: APIRequestContext);
537
440
  /**
538
441
  * Creates a repo in the given project with the given name. If the named repository already exists, `CreateRepo` returns `ALREADY_EXISTS`.
539
- * @example
540
- * ```js
541
- * // Before running the sample:
542
- * // - Enable the API at:
543
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
544
- * // - Login into gcloud by running:
545
- * // `$ gcloud auth application-default login`
546
- * // - Install the npm module by running:
547
- * // `$ npm install googleapis`
548
- *
549
- * const {google} = require('googleapis');
550
- * const sourcerepo = google.sourcerepo('v1');
551
- *
552
- * async function main() {
553
- * const auth = new google.auth.GoogleAuth({
554
- * // Scopes can be specified either as an array or as a single, space-delimited string.
555
- * scopes: [
556
- * 'https://www.googleapis.com/auth/cloud-platform',
557
- * 'https://www.googleapis.com/auth/source.full_control',
558
- * ],
559
- * });
560
- *
561
- * // Acquire an auth client, and bind it to all future calls
562
- * const authClient = await auth.getClient();
563
- * google.options({auth: authClient});
564
- *
565
- * // Do the magic
566
- * const res = await sourcerepo.projects.repos.create({
567
- * // The project in which to create the repo. Values are of the form `projects/`.
568
- * parent: 'projects/my-project',
569
- *
570
- * // Request body metadata
571
- * requestBody: {
572
- * // request body parameters
573
- * // {
574
- * // "mirrorConfig": {},
575
- * // "name": "my_name",
576
- * // "pubsubConfigs": {},
577
- * // "size": "my_size",
578
- * // "url": "my_url"
579
- * // }
580
- * },
581
- * });
582
- * console.log(res.data);
583
- *
584
- * // Example response
585
- * // {
586
- * // "mirrorConfig": {},
587
- * // "name": "my_name",
588
- * // "pubsubConfigs": {},
589
- * // "size": "my_size",
590
- * // "url": "my_url"
591
- * // }
592
- * }
593
- *
594
- * main().catch(e => {
595
- * console.error(e);
596
- * throw e;
597
- * });
598
- *
599
- * ```
600
442
  *
601
443
  * @param params - Parameters for request
602
444
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -611,49 +453,6 @@ export declare namespace sourcerepo_v1 {
611
453
  create(callback: BodyResponseCallback<Schema$Repo>): void;
612
454
  /**
613
455
  * Deletes a repo.
614
- * @example
615
- * ```js
616
- * // Before running the sample:
617
- * // - Enable the API at:
618
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
619
- * // - Login into gcloud by running:
620
- * // `$ gcloud auth application-default login`
621
- * // - Install the npm module by running:
622
- * // `$ npm install googleapis`
623
- *
624
- * const {google} = require('googleapis');
625
- * const sourcerepo = google.sourcerepo('v1');
626
- *
627
- * async function main() {
628
- * const auth = new google.auth.GoogleAuth({
629
- * // Scopes can be specified either as an array or as a single, space-delimited string.
630
- * scopes: [
631
- * 'https://www.googleapis.com/auth/cloud-platform',
632
- * 'https://www.googleapis.com/auth/source.full_control',
633
- * ],
634
- * });
635
- *
636
- * // Acquire an auth client, and bind it to all future calls
637
- * const authClient = await auth.getClient();
638
- * google.options({auth: authClient});
639
- *
640
- * // Do the magic
641
- * const res = await sourcerepo.projects.repos.delete({
642
- * // The name of the repo to delete. Values are of the form `projects//repos/`.
643
- * name: 'projects/my-project/repos/.*',
644
- * });
645
- * console.log(res.data);
646
- *
647
- * // Example response
648
- * // {}
649
- * }
650
- *
651
- * main().catch(e => {
652
- * console.error(e);
653
- * throw e;
654
- * });
655
- *
656
- * ```
657
456
  *
658
457
  * @param params - Parameters for request
659
458
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -668,57 +467,6 @@ export declare namespace sourcerepo_v1 {
668
467
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
669
468
  /**
670
469
  * Returns information about a repo.
671
- * @example
672
- * ```js
673
- * // Before running the sample:
674
- * // - Enable the API at:
675
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
676
- * // - Login into gcloud by running:
677
- * // `$ gcloud auth application-default login`
678
- * // - Install the npm module by running:
679
- * // `$ npm install googleapis`
680
- *
681
- * const {google} = require('googleapis');
682
- * const sourcerepo = google.sourcerepo('v1');
683
- *
684
- * async function main() {
685
- * const auth = new google.auth.GoogleAuth({
686
- * // Scopes can be specified either as an array or as a single, space-delimited string.
687
- * scopes: [
688
- * 'https://www.googleapis.com/auth/cloud-platform',
689
- * 'https://www.googleapis.com/auth/source.full_control',
690
- * 'https://www.googleapis.com/auth/source.read_only',
691
- * 'https://www.googleapis.com/auth/source.read_write',
692
- * ],
693
- * });
694
- *
695
- * // Acquire an auth client, and bind it to all future calls
696
- * const authClient = await auth.getClient();
697
- * google.options({auth: authClient});
698
- *
699
- * // Do the magic
700
- * const res = await sourcerepo.projects.repos.get({
701
- * // The name of the requested repository. Values are of the form `projects//repos/`.
702
- * name: 'projects/my-project/repos/.*',
703
- * });
704
- * console.log(res.data);
705
- *
706
- * // Example response
707
- * // {
708
- * // "mirrorConfig": {},
709
- * // "name": "my_name",
710
- * // "pubsubConfigs": {},
711
- * // "size": "my_size",
712
- * // "url": "my_url"
713
- * // }
714
- * }
715
- *
716
- * main().catch(e => {
717
- * console.error(e);
718
- * throw e;
719
- * });
720
- *
721
- * ```
722
470
  *
723
471
  * @param params - Parameters for request
724
472
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -733,58 +481,6 @@ export declare namespace sourcerepo_v1 {
733
481
  get(callback: BodyResponseCallback<Schema$Repo>): void;
734
482
  /**
735
483
  * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
736
- * @example
737
- * ```js
738
- * // Before running the sample:
739
- * // - Enable the API at:
740
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
741
- * // - Login into gcloud by running:
742
- * // `$ gcloud auth application-default login`
743
- * // - Install the npm module by running:
744
- * // `$ npm install googleapis`
745
- *
746
- * const {google} = require('googleapis');
747
- * const sourcerepo = google.sourcerepo('v1');
748
- *
749
- * async function main() {
750
- * const auth = new google.auth.GoogleAuth({
751
- * // Scopes can be specified either as an array or as a single, space-delimited string.
752
- * scopes: [
753
- * 'https://www.googleapis.com/auth/cloud-platform',
754
- * 'https://www.googleapis.com/auth/source.full_control',
755
- * 'https://www.googleapis.com/auth/source.read_only',
756
- * 'https://www.googleapis.com/auth/source.read_write',
757
- * ],
758
- * });
759
- *
760
- * // Acquire an auth client, and bind it to all future calls
761
- * const authClient = await auth.getClient();
762
- * google.options({auth: authClient});
763
- *
764
- * // Do the magic
765
- * const res = await sourcerepo.projects.repos.getIamPolicy({
766
- * // 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).
767
- * 'options.requestedPolicyVersion': 'placeholder-value',
768
- * // 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.
769
- * resource: 'projects/my-project/repos/.*',
770
- * });
771
- * console.log(res.data);
772
- *
773
- * // Example response
774
- * // {
775
- * // "auditConfigs": [],
776
- * // "bindings": [],
777
- * // "etag": "my_etag",
778
- * // "version": 0
779
- * // }
780
- * }
781
- *
782
- * main().catch(e => {
783
- * console.error(e);
784
- * throw e;
785
- * });
786
- *
787
- * ```
788
484
  *
789
485
  * @param params - Parameters for request
790
486
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -799,58 +495,6 @@ export declare namespace sourcerepo_v1 {
799
495
  getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
800
496
  /**
801
497
  * 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.
802
- * @example
803
- * ```js
804
- * // Before running the sample:
805
- * // - Enable the API at:
806
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
807
- * // - Login into gcloud by running:
808
- * // `$ gcloud auth application-default login`
809
- * // - Install the npm module by running:
810
- * // `$ npm install googleapis`
811
- *
812
- * const {google} = require('googleapis');
813
- * const sourcerepo = google.sourcerepo('v1');
814
- *
815
- * async function main() {
816
- * const auth = new google.auth.GoogleAuth({
817
- * // Scopes can be specified either as an array or as a single, space-delimited string.
818
- * scopes: [
819
- * 'https://www.googleapis.com/auth/cloud-platform',
820
- * 'https://www.googleapis.com/auth/source.full_control',
821
- * 'https://www.googleapis.com/auth/source.read_only',
822
- * 'https://www.googleapis.com/auth/source.read_write',
823
- * ],
824
- * });
825
- *
826
- * // Acquire an auth client, and bind it to all future calls
827
- * const authClient = await auth.getClient();
828
- * google.options({auth: authClient});
829
- *
830
- * // Do the magic
831
- * const res = await sourcerepo.projects.repos.list({
832
- * // The project ID whose repos should be listed. Values are of the form `projects/`.
833
- * name: 'projects/my-project',
834
- * // Maximum number of repositories to return; between 1 and 500. If not set or zero, defaults to 100 at the server.
835
- * pageSize: 'placeholder-value',
836
- * // 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.
837
- * pageToken: 'placeholder-value',
838
- * });
839
- * console.log(res.data);
840
- *
841
- * // Example response
842
- * // {
843
- * // "nextPageToken": "my_nextPageToken",
844
- * // "repos": []
845
- * // }
846
- * }
847
- *
848
- * main().catch(e => {
849
- * console.error(e);
850
- * throw e;
851
- * });
852
- *
853
- * ```
854
498
  *
855
499
  * @param params - Parameters for request
856
500
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -865,61 +509,6 @@ export declare namespace sourcerepo_v1 {
865
509
  list(callback: BodyResponseCallback<Schema$ListReposResponse>): void;
866
510
  /**
867
511
  * Updates information about a repo.
868
- * @example
869
- * ```js
870
- * // Before running the sample:
871
- * // - Enable the API at:
872
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
873
- * // - Login into gcloud by running:
874
- * // `$ gcloud auth application-default login`
875
- * // - Install the npm module by running:
876
- * // `$ npm install googleapis`
877
- *
878
- * const {google} = require('googleapis');
879
- * const sourcerepo = google.sourcerepo('v1');
880
- *
881
- * async function main() {
882
- * const auth = new google.auth.GoogleAuth({
883
- * // Scopes can be specified either as an array or as a single, space-delimited string.
884
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
885
- * });
886
- *
887
- * // Acquire an auth client, and bind it to all future calls
888
- * const authClient = await auth.getClient();
889
- * google.options({auth: authClient});
890
- *
891
- * // Do the magic
892
- * const res = await sourcerepo.projects.repos.patch({
893
- * // The name of the requested repository. Values are of the form `projects//repos/`.
894
- * name: 'projects/my-project/repos/.*',
895
- *
896
- * // Request body metadata
897
- * requestBody: {
898
- * // request body parameters
899
- * // {
900
- * // "repo": {},
901
- * // "updateMask": "my_updateMask"
902
- * // }
903
- * },
904
- * });
905
- * console.log(res.data);
906
- *
907
- * // Example response
908
- * // {
909
- * // "mirrorConfig": {},
910
- * // "name": "my_name",
911
- * // "pubsubConfigs": {},
912
- * // "size": "my_size",
913
- * // "url": "my_url"
914
- * // }
915
- * }
916
- *
917
- * main().catch(e => {
918
- * console.error(e);
919
- * throw e;
920
- * });
921
- *
922
- * ```
923
512
  *
924
513
  * @param params - Parameters for request
925
514
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -934,63 +523,6 @@ export declare namespace sourcerepo_v1 {
934
523
  patch(callback: BodyResponseCallback<Schema$Repo>): void;
935
524
  /**
936
525
  * Sets the access control policy on the specified resource. Replaces any existing policy.
937
- * @example
938
- * ```js
939
- * // Before running the sample:
940
- * // - Enable the API at:
941
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
942
- * // - Login into gcloud by running:
943
- * // `$ gcloud auth application-default login`
944
- * // - Install the npm module by running:
945
- * // `$ npm install googleapis`
946
- *
947
- * const {google} = require('googleapis');
948
- * const sourcerepo = google.sourcerepo('v1');
949
- *
950
- * async function main() {
951
- * const auth = new google.auth.GoogleAuth({
952
- * // Scopes can be specified either as an array or as a single, space-delimited string.
953
- * scopes: [
954
- * 'https://www.googleapis.com/auth/cloud-platform',
955
- * 'https://www.googleapis.com/auth/source.full_control',
956
- * ],
957
- * });
958
- *
959
- * // Acquire an auth client, and bind it to all future calls
960
- * const authClient = await auth.getClient();
961
- * google.options({auth: authClient});
962
- *
963
- * // Do the magic
964
- * const res = await sourcerepo.projects.repos.setIamPolicy({
965
- * // 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.
966
- * resource: 'projects/my-project/repos/.*',
967
- *
968
- * // Request body metadata
969
- * requestBody: {
970
- * // request body parameters
971
- * // {
972
- * // "policy": {},
973
- * // "updateMask": "my_updateMask"
974
- * // }
975
- * },
976
- * });
977
- * console.log(res.data);
978
- *
979
- * // Example response
980
- * // {
981
- * // "auditConfigs": [],
982
- * // "bindings": [],
983
- * // "etag": "my_etag",
984
- * // "version": 0
985
- * // }
986
- * }
987
- *
988
- * main().catch(e => {
989
- * console.error(e);
990
- * throw e;
991
- * });
992
- *
993
- * ```
994
526
  *
995
527
  * @param params - Parameters for request
996
528
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1005,58 +537,6 @@ export declare namespace sourcerepo_v1 {
1005
537
  setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
1006
538
  /**
1007
539
  * Synchronize a connected repo. The response contains SyncRepoMetadata in the metadata field.
1008
- * @example
1009
- * ```js
1010
- * // Before running the sample:
1011
- * // - Enable the API at:
1012
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1013
- * // - Login into gcloud by running:
1014
- * // `$ gcloud auth application-default login`
1015
- * // - Install the npm module by running:
1016
- * // `$ npm install googleapis`
1017
- *
1018
- * const {google} = require('googleapis');
1019
- * const sourcerepo = google.sourcerepo('v1');
1020
- *
1021
- * async function main() {
1022
- * const auth = new google.auth.GoogleAuth({
1023
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1024
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1025
- * });
1026
- *
1027
- * // Acquire an auth client, and bind it to all future calls
1028
- * const authClient = await auth.getClient();
1029
- * google.options({auth: authClient});
1030
- *
1031
- * // Do the magic
1032
- * const res = await sourcerepo.projects.repos.sync({
1033
- * // The name of the repo to synchronize. Values are of the form `projects//repos/`.
1034
- * name: 'projects/my-project/repos/.*',
1035
- *
1036
- * // Request body metadata
1037
- * requestBody: {
1038
- * // request body parameters
1039
- * // {}
1040
- * },
1041
- * });
1042
- * console.log(res.data);
1043
- *
1044
- * // Example response
1045
- * // {
1046
- * // "done": false,
1047
- * // "error": {},
1048
- * // "metadata": {},
1049
- * // "name": "my_name",
1050
- * // "response": {}
1051
- * // }
1052
- * }
1053
- *
1054
- * main().catch(e => {
1055
- * console.error(e);
1056
- * throw e;
1057
- * });
1058
- *
1059
- * ```
1060
540
  *
1061
541
  * @param params - Parameters for request
1062
542
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1071,61 +551,6 @@ export declare namespace sourcerepo_v1 {
1071
551
  sync(callback: BodyResponseCallback<Schema$Operation>): void;
1072
552
  /**
1073
553
  * 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.
1074
- * @example
1075
- * ```js
1076
- * // Before running the sample:
1077
- * // - Enable the API at:
1078
- * // https://console.developers.google.com/apis/api/sourcerepo.googleapis.com
1079
- * // - Login into gcloud by running:
1080
- * // `$ gcloud auth application-default login`
1081
- * // - Install the npm module by running:
1082
- * // `$ npm install googleapis`
1083
- *
1084
- * const {google} = require('googleapis');
1085
- * const sourcerepo = google.sourcerepo('v1');
1086
- *
1087
- * async function main() {
1088
- * const auth = new google.auth.GoogleAuth({
1089
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1090
- * scopes: [
1091
- * 'https://www.googleapis.com/auth/cloud-platform',
1092
- * 'https://www.googleapis.com/auth/source.full_control',
1093
- * 'https://www.googleapis.com/auth/source.read_only',
1094
- * 'https://www.googleapis.com/auth/source.read_write',
1095
- * ],
1096
- * });
1097
- *
1098
- * // Acquire an auth client, and bind it to all future calls
1099
- * const authClient = await auth.getClient();
1100
- * google.options({auth: authClient});
1101
- *
1102
- * // Do the magic
1103
- * const res = await sourcerepo.projects.repos.testIamPermissions({
1104
- * // 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.
1105
- * resource: 'projects/my-project/repos/.*',
1106
- *
1107
- * // Request body metadata
1108
- * requestBody: {
1109
- * // request body parameters
1110
- * // {
1111
- * // "permissions": []
1112
- * // }
1113
- * },
1114
- * });
1115
- * console.log(res.data);
1116
- *
1117
- * // Example response
1118
- * // {
1119
- * // "permissions": []
1120
- * // }
1121
- * }
1122
- *
1123
- * main().catch(e => {
1124
- * console.error(e);
1125
- * throw e;
1126
- * });
1127
- *
1128
- * ```
1129
554
  *
1130
555
  * @param params - Parameters for request
1131
556
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.