@googleapis/servicenetworking 22.0.1 → 24.0.0

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
@@ -205,7 +205,7 @@ export declare namespace servicenetworking_v1 {
205
205
  */
206
206
  purpose?: string | null;
207
207
  /**
208
- * Required. The name of a [region](/compute/docs/regions-zones) for the subnet, such `europe-west1`.
208
+ * Required. The name of a [region](https://cloud.google.com/compute/docs/regions-zones) for the subnet, such `europe-west1`.
209
209
  */
210
210
  region?: string | null;
211
211
  /**
@@ -229,7 +229,7 @@ export declare namespace servicenetworking_v1 {
229
229
  */
230
230
  skipRequestedAddressValidation?: boolean | null;
231
231
  /**
232
- * Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
232
+ * Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
233
233
  */
234
234
  subnetwork?: string | null;
235
235
  /**
@@ -245,6 +245,10 @@ export declare namespace servicenetworking_v1 {
245
245
  * Api is a light-weight descriptor for an API Interface. Interfaces are also described as "protocol buffer services" in some contexts, such as by the "service" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as "APIs" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.
246
246
  */
247
247
  export interface Schema$Api {
248
+ /**
249
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
250
+ */
251
+ edition?: string | null;
248
252
  /**
249
253
  * The methods of this interface, in unspecified order.
250
254
  */
@@ -412,6 +416,9 @@ export declare namespace servicenetworking_v1 {
412
416
  overridesByRequestProtocol?: {
413
417
  [key: string]: Schema$BackendRule;
414
418
  } | null;
419
+ /**
420
+ * no-lint
421
+ */
415
422
  pathTranslation?: string | null;
416
423
  /**
417
424
  * The protocol used for sending a request to the backend. The supported values are "http/1.1" and "h2". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to "h2" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.
@@ -422,6 +429,73 @@ export declare namespace servicenetworking_v1 {
422
429
  */
423
430
  selector?: string | null;
424
431
  }
432
+ /**
433
+ * `BatchingConfigProto` defines the batching configuration for an API method.
434
+ */
435
+ export interface Schema$BatchingConfigProto {
436
+ /**
437
+ * The request and response fields used in batching.
438
+ */
439
+ batchDescriptor?: Schema$BatchingDescriptorProto;
440
+ /**
441
+ * The thresholds which trigger a batched request to be sent.
442
+ */
443
+ thresholds?: Schema$BatchingSettingsProto;
444
+ }
445
+ /**
446
+ * `BatchingDescriptorProto` specifies the fields of the request message to be used for batching, and, optionally, the fields of the response message to be used for demultiplexing.
447
+ */
448
+ export interface Schema$BatchingDescriptorProto {
449
+ /**
450
+ * The repeated field in the request message to be aggregated by batching.
451
+ */
452
+ batchedField?: string | null;
453
+ /**
454
+ * A list of the fields in the request message. Two requests will be batched together only if the values of every field specified in `request_discriminator_fields` is equal between the two requests.
455
+ */
456
+ discriminatorFields?: string[] | null;
457
+ /**
458
+ * Optional. When present, indicates the field in the response message to be used to demultiplex the response into multiple response messages, in correspondence with the multiple request messages originally batched together.
459
+ */
460
+ subresponseField?: string | null;
461
+ }
462
+ /**
463
+ * `BatchingSettingsProto` specifies a set of batching thresholds, each of which acts as a trigger to send a batch of messages as a request. At least one threshold must be positive nonzero.
464
+ */
465
+ export interface Schema$BatchingSettingsProto {
466
+ /**
467
+ * The duration after which a batch should be sent, starting from the addition of the first message to that batch.
468
+ */
469
+ delayThreshold?: string | null;
470
+ /**
471
+ * The maximum number of elements collected in a batch that could be accepted by server.
472
+ */
473
+ elementCountLimit?: number | null;
474
+ /**
475
+ * The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.
476
+ */
477
+ elementCountThreshold?: number | null;
478
+ /**
479
+ * The maximum size of data allowed by flow control.
480
+ */
481
+ flowControlByteLimit?: number | null;
482
+ /**
483
+ * The maximum number of elements allowed by flow control.
484
+ */
485
+ flowControlElementLimit?: number | null;
486
+ /**
487
+ * The behavior to take when the flow control limit is exceeded.
488
+ */
489
+ flowControlLimitExceededBehavior?: string | null;
490
+ /**
491
+ * The maximum size of the request that could be accepted by server.
492
+ */
493
+ requestByteLimit?: number | null;
494
+ /**
495
+ * The aggregated size of the batched field which, if exceeded, causes the batch to be sent. This size is computed by aggregating the sizes of the request field to be batched, not of the entire request message.
496
+ */
497
+ requestByteThreshold?: string | null;
498
+ }
425
499
  /**
426
500
  * Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: "1" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count
427
501
  */
@@ -449,6 +523,11 @@ export declare namespace servicenetworking_v1 {
449
523
  */
450
524
  export interface Schema$CancelOperationRequest {
451
525
  }
526
+ /**
527
+ * Metadata provided through GetOperation request for the LRO generated by Cleanup Connection API
528
+ */
529
+ export interface Schema$CleanupConnectionMetadata {
530
+ }
452
531
  /**
453
532
  * Details about how and where to publish client libraries.
454
533
  */
@@ -503,15 +582,15 @@ export declare namespace servicenetworking_v1 {
503
582
  */
504
583
  export interface Schema$CloudSQLConfig {
505
584
  /**
506
- * Peering service used for peering with the Cloud SQL project.
585
+ * Required. Peering service used for peering with the Cloud SQL project.
507
586
  */
508
587
  service?: string | null;
509
588
  /**
510
- * The name of the umbrella network in the Cloud SQL umbrella project.
589
+ * Required. The name of the umbrella network in the Cloud SQL umbrella project.
511
590
  */
512
591
  umbrellaNetwork?: string | null;
513
592
  /**
514
- * The project number of the Cloud SQL umbrella project.
593
+ * Required. The project number of the Cloud SQL umbrella project.
515
594
  */
516
595
  umbrellaProject?: string | null;
517
596
  }
@@ -537,7 +616,7 @@ export declare namespace servicenetworking_v1 {
537
616
  */
538
617
  export interface Schema$Connection {
539
618
  /**
540
- * The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project\}/global/networks/{network\}`. `{project\}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network\}` is the name of the service consumer's VPC network.
619
+ * Required. The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project\}/global/networks/{network\}`. `{project\}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network\}` is the name of the service consumer's VPC network.
541
620
  */
542
621
  network?: string | null;
543
622
  /**
@@ -1126,7 +1205,7 @@ export declare namespace servicenetworking_v1 {
1126
1205
  */
1127
1206
  common?: Schema$CommonLanguageSettings;
1128
1207
  /**
1129
- * Map of service names to renamed services. Keys are the package relative service names and values are the name to be used for the service client and call options. publishing: go_settings: renamed_services: Publisher: TopicAdmin
1208
+ * Map of service names to renamed services. Keys are the package relative service names and values are the name to be used for the service client and call options. Example: publishing: go_settings: renamed_services: Publisher: TopicAdmin
1130
1209
  */
1131
1210
  renamedServices?: {
1132
1211
  [key: string]: string;
@@ -1368,6 +1447,10 @@ export declare namespace servicenetworking_v1 {
1368
1447
  * Method represents a method of an API interface.
1369
1448
  */
1370
1449
  export interface Schema$Method {
1450
+ /**
1451
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
1452
+ */
1453
+ edition?: string | null;
1371
1454
  /**
1372
1455
  * The simple name of this method.
1373
1456
  */
@@ -1418,6 +1501,10 @@ export declare namespace servicenetworking_v1 {
1418
1501
  * List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id
1419
1502
  */
1420
1503
  autoPopulatedFields?: string[] | null;
1504
+ /**
1505
+ * Batching configuration for an API method in client libraries. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.BatchCreateExample batching: element_count_threshold: 1000 request_byte_threshold: 100000000 delay_threshold_millis: 10
1506
+ */
1507
+ batching?: Schema$BatchingConfigProto;
1421
1508
  /**
1422
1509
  * Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes
1423
1510
  */
@@ -1673,7 +1760,7 @@ export declare namespace servicenetworking_v1 {
1673
1760
  */
1674
1761
  dnsSuffix?: string | null;
1675
1762
  /**
1676
- * User assigned name for this resource. Must be unique within the consumer network. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.
1763
+ * Required. User assigned name for this resource. Must be unique within the consumer network. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.
1677
1764
  */
1678
1765
  name?: string | null;
1679
1766
  }
@@ -1690,6 +1777,10 @@ export declare namespace servicenetworking_v1 {
1690
1777
  * Some settings.
1691
1778
  */
1692
1779
  common?: Schema$CommonLanguageSettings;
1780
+ /**
1781
+ * The package name to use in Php. Clobbers the php_namespace option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.php.package_name" field in gapic.yaml. API teams should use the protobuf php_namespace option where possible. Example of a YAML configuration:: publishing: library_settings: php_settings: library_package: Google\Cloud\PubSub\V1
1782
+ */
1783
+ libraryPackage?: string | null;
1693
1784
  }
1694
1785
  /**
1695
1786
  * Grouping of IAM role and IAM member.
@@ -1949,7 +2040,7 @@ export declare namespace servicenetworking_v1 {
1949
2040
  */
1950
2041
  ipPrefixLength?: number | null;
1951
2042
  /**
1952
- * Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project\}/global/networks/{network\}'. {project\} is a project number, as in '12345' {network\} is network name.
2043
+ * Required. Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project\}/global/networks/{network\}'. {project\} is a project number, as in '12345' {network\} is network name.
1953
2044
  */
1954
2045
  network?: string | null;
1955
2046
  }
@@ -2338,7 +2429,7 @@ export declare namespace servicenetworking_v1 {
2338
2429
  */
2339
2430
  consumerProject?: Schema$ConsumerProject;
2340
2431
  /**
2341
- * RANGES_EXHAUSTED, RANGES_EXHAUSTED, and RANGES_DELETED_LATER are done when range_reservation is provided.
2432
+ * RANGES_EXHAUSTED, RANGES_NOT_RESERVED, and RANGES_DELETED_LATER are done when range_reservation is provided.
2342
2433
  */
2343
2434
  rangeReservation?: Schema$RangeReservation;
2344
2435
  /**
@@ -2374,6 +2465,59 @@ export declare namespace servicenetworking_v1 {
2374
2465
  constructor(context: APIRequestContext);
2375
2466
  /**
2376
2467
  * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
2468
+ * @example
2469
+ * ```js
2470
+ * // Before running the sample:
2471
+ * // - Enable the API at:
2472
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2473
+ * // - Login into gcloud by running:
2474
+ * // ```sh
2475
+ * // $ gcloud auth application-default login
2476
+ * // ```
2477
+ * // - Install the npm module by running:
2478
+ * // ```sh
2479
+ * // $ npm install googleapis
2480
+ * // ```
2481
+ *
2482
+ * const {google} = require('googleapis');
2483
+ * const servicenetworking = google.servicenetworking('v1');
2484
+ *
2485
+ * async function main() {
2486
+ * const auth = new google.auth.GoogleAuth({
2487
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2488
+ * scopes: [
2489
+ * 'https://www.googleapis.com/auth/cloud-platform',
2490
+ * 'https://www.googleapis.com/auth/service.management',
2491
+ * ],
2492
+ * });
2493
+ *
2494
+ * // Acquire an auth client, and bind it to all future calls
2495
+ * const authClient = await auth.getClient();
2496
+ * google.options({auth: authClient});
2497
+ *
2498
+ * // Do the magic
2499
+ * const res = await servicenetworking.operations.cancel({
2500
+ * // The name of the operation resource to be cancelled.
2501
+ * name: 'operations/.*',
2502
+ *
2503
+ * // Request body metadata
2504
+ * requestBody: {
2505
+ * // request body parameters
2506
+ * // {}
2507
+ * },
2508
+ * });
2509
+ * console.log(res.data);
2510
+ *
2511
+ * // Example response
2512
+ * // {}
2513
+ * }
2514
+ *
2515
+ * main().catch(e => {
2516
+ * console.error(e);
2517
+ * throw e;
2518
+ * });
2519
+ *
2520
+ * ```
2377
2521
  *
2378
2522
  * @param params - Parameters for request
2379
2523
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2388,6 +2532,53 @@ export declare namespace servicenetworking_v1 {
2388
2532
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
2389
2533
  /**
2390
2534
  * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
2535
+ * @example
2536
+ * ```js
2537
+ * // Before running the sample:
2538
+ * // - Enable the API at:
2539
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2540
+ * // - Login into gcloud by running:
2541
+ * // ```sh
2542
+ * // $ gcloud auth application-default login
2543
+ * // ```
2544
+ * // - Install the npm module by running:
2545
+ * // ```sh
2546
+ * // $ npm install googleapis
2547
+ * // ```
2548
+ *
2549
+ * const {google} = require('googleapis');
2550
+ * const servicenetworking = google.servicenetworking('v1');
2551
+ *
2552
+ * async function main() {
2553
+ * const auth = new google.auth.GoogleAuth({
2554
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2555
+ * scopes: [
2556
+ * 'https://www.googleapis.com/auth/cloud-platform',
2557
+ * 'https://www.googleapis.com/auth/service.management',
2558
+ * ],
2559
+ * });
2560
+ *
2561
+ * // Acquire an auth client, and bind it to all future calls
2562
+ * const authClient = await auth.getClient();
2563
+ * google.options({auth: authClient});
2564
+ *
2565
+ * // Do the magic
2566
+ * const res = await servicenetworking.operations.delete({
2567
+ * // The name of the operation resource to be deleted.
2568
+ * name: 'operations/.*',
2569
+ * });
2570
+ * console.log(res.data);
2571
+ *
2572
+ * // Example response
2573
+ * // {}
2574
+ * }
2575
+ *
2576
+ * main().catch(e => {
2577
+ * console.error(e);
2578
+ * throw e;
2579
+ * });
2580
+ *
2581
+ * ```
2391
2582
  *
2392
2583
  * @param params - Parameters for request
2393
2584
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2402,6 +2593,59 @@ export declare namespace servicenetworking_v1 {
2402
2593
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
2403
2594
  /**
2404
2595
  * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
2596
+ * @example
2597
+ * ```js
2598
+ * // Before running the sample:
2599
+ * // - Enable the API at:
2600
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2601
+ * // - Login into gcloud by running:
2602
+ * // ```sh
2603
+ * // $ gcloud auth application-default login
2604
+ * // ```
2605
+ * // - Install the npm module by running:
2606
+ * // ```sh
2607
+ * // $ npm install googleapis
2608
+ * // ```
2609
+ *
2610
+ * const {google} = require('googleapis');
2611
+ * const servicenetworking = google.servicenetworking('v1');
2612
+ *
2613
+ * async function main() {
2614
+ * const auth = new google.auth.GoogleAuth({
2615
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2616
+ * scopes: [
2617
+ * 'https://www.googleapis.com/auth/cloud-platform',
2618
+ * 'https://www.googleapis.com/auth/service.management',
2619
+ * ],
2620
+ * });
2621
+ *
2622
+ * // Acquire an auth client, and bind it to all future calls
2623
+ * const authClient = await auth.getClient();
2624
+ * google.options({auth: authClient});
2625
+ *
2626
+ * // Do the magic
2627
+ * const res = await servicenetworking.operations.get({
2628
+ * // The name of the operation resource.
2629
+ * name: 'operations/my-operation',
2630
+ * });
2631
+ * console.log(res.data);
2632
+ *
2633
+ * // Example response
2634
+ * // {
2635
+ * // "done": false,
2636
+ * // "error": {},
2637
+ * // "metadata": {},
2638
+ * // "name": "my_name",
2639
+ * // "response": {}
2640
+ * // }
2641
+ * }
2642
+ *
2643
+ * main().catch(e => {
2644
+ * console.error(e);
2645
+ * throw e;
2646
+ * });
2647
+ *
2648
+ * ```
2405
2649
  *
2406
2650
  * @param params - Parameters for request
2407
2651
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2416,6 +2660,62 @@ export declare namespace servicenetworking_v1 {
2416
2660
  get(callback: BodyResponseCallback<Schema$Operation>): void;
2417
2661
  /**
2418
2662
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2663
+ * @example
2664
+ * ```js
2665
+ * // Before running the sample:
2666
+ * // - Enable the API at:
2667
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2668
+ * // - Login into gcloud by running:
2669
+ * // ```sh
2670
+ * // $ gcloud auth application-default login
2671
+ * // ```
2672
+ * // - Install the npm module by running:
2673
+ * // ```sh
2674
+ * // $ npm install googleapis
2675
+ * // ```
2676
+ *
2677
+ * const {google} = require('googleapis');
2678
+ * const servicenetworking = google.servicenetworking('v1');
2679
+ *
2680
+ * async function main() {
2681
+ * const auth = new google.auth.GoogleAuth({
2682
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2683
+ * scopes: [
2684
+ * 'https://www.googleapis.com/auth/cloud-platform',
2685
+ * 'https://www.googleapis.com/auth/service.management',
2686
+ * ],
2687
+ * });
2688
+ *
2689
+ * // Acquire an auth client, and bind it to all future calls
2690
+ * const authClient = await auth.getClient();
2691
+ * google.options({auth: authClient});
2692
+ *
2693
+ * // Do the magic
2694
+ * const res = await servicenetworking.operations.list({
2695
+ * // The standard list filter.
2696
+ * filter: 'placeholder-value',
2697
+ * // The name of the operation's parent resource.
2698
+ * name: 'operations',
2699
+ * // The standard list page size.
2700
+ * pageSize: 'placeholder-value',
2701
+ * // The standard list page token.
2702
+ * pageToken: 'placeholder-value',
2703
+ * });
2704
+ * console.log(res.data);
2705
+ *
2706
+ * // Example response
2707
+ * // {
2708
+ * // "nextPageToken": "my_nextPageToken",
2709
+ * // "operations": []
2710
+ * // }
2711
+ * }
2712
+ *
2713
+ * main().catch(e => {
2714
+ * console.error(e);
2715
+ * throw e;
2716
+ * });
2717
+ *
2718
+ * ```
2419
2719
  *
2420
2720
  * @param params - Parameters for request
2421
2721
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2479,6 +2779,86 @@ export declare namespace servicenetworking_v1 {
2479
2779
  constructor(context: APIRequestContext);
2480
2780
  /**
2481
2781
  * For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed.
2782
+ * @example
2783
+ * ```js
2784
+ * // Before running the sample:
2785
+ * // - Enable the API at:
2786
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2787
+ * // - Login into gcloud by running:
2788
+ * // ```sh
2789
+ * // $ gcloud auth application-default login
2790
+ * // ```
2791
+ * // - Install the npm module by running:
2792
+ * // ```sh
2793
+ * // $ npm install googleapis
2794
+ * // ```
2795
+ *
2796
+ * const {google} = require('googleapis');
2797
+ * const servicenetworking = google.servicenetworking('v1');
2798
+ *
2799
+ * async function main() {
2800
+ * const auth = new google.auth.GoogleAuth({
2801
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2802
+ * scopes: [
2803
+ * 'https://www.googleapis.com/auth/cloud-platform',
2804
+ * 'https://www.googleapis.com/auth/service.management',
2805
+ * ],
2806
+ * });
2807
+ *
2808
+ * // Acquire an auth client, and bind it to all future calls
2809
+ * const authClient = await auth.getClient();
2810
+ * google.options({auth: authClient});
2811
+ *
2812
+ * // Do the magic
2813
+ * const res = await servicenetworking.services.addSubnetwork({
2814
+ * // Required. A tenant project in the service producer organization, in the following format: services/{service\}/{collection-id\}/{resource-id\}. {collection-id\} is the cloud resource collection type that represents the tenant project. Only `projects` are supported. {resource-id\} is the tenant project numeric id, such as `123456`. {service\} the name of the peering service, such as `service-peering.example.com`. This service must already be enabled in the service consumer's project.
2815
+ * parent: 'services/my-service/[^/]+/[^/]+',
2816
+ *
2817
+ * // Request body metadata
2818
+ * requestBody: {
2819
+ * // request body parameters
2820
+ * // {
2821
+ * // "allowSubnetCidrRoutesOverlap": false,
2822
+ * // "checkServiceNetworkingUsePermission": false,
2823
+ * // "computeIdempotencyWindow": "my_computeIdempotencyWindow",
2824
+ * // "consumer": "my_consumer",
2825
+ * // "consumerNetwork": "my_consumerNetwork",
2826
+ * // "description": "my_description",
2827
+ * // "internalRange": "my_internalRange",
2828
+ * // "ipPrefixLength": 0,
2829
+ * // "outsideAllocationPublicIpRange": "my_outsideAllocationPublicIpRange",
2830
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
2831
+ * // "purpose": "my_purpose",
2832
+ * // "region": "my_region",
2833
+ * // "requestedAddress": "my_requestedAddress",
2834
+ * // "requestedRanges": [],
2835
+ * // "role": "my_role",
2836
+ * // "secondaryIpRangeSpecs": [],
2837
+ * // "skipRequestedAddressValidation": false,
2838
+ * // "subnetwork": "my_subnetwork",
2839
+ * // "subnetworkUsers": [],
2840
+ * // "useCustomComputeIdempotencyWindow": false
2841
+ * // }
2842
+ * },
2843
+ * });
2844
+ * console.log(res.data);
2845
+ *
2846
+ * // Example response
2847
+ * // {
2848
+ * // "done": false,
2849
+ * // "error": {},
2850
+ * // "metadata": {},
2851
+ * // "name": "my_name",
2852
+ * // "response": {}
2853
+ * // }
2854
+ * }
2855
+ *
2856
+ * main().catch(e => {
2857
+ * console.error(e);
2858
+ * throw e;
2859
+ * });
2860
+ *
2861
+ * ```
2482
2862
  *
2483
2863
  * @param params - Parameters for request
2484
2864
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2493,6 +2873,67 @@ export declare namespace servicenetworking_v1 {
2493
2873
  addSubnetwork(callback: BodyResponseCallback<Schema$Operation>): void;
2494
2874
  /**
2495
2875
  * Disables VPC service controls for a connection.
2876
+ * @example
2877
+ * ```js
2878
+ * // Before running the sample:
2879
+ * // - Enable the API at:
2880
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2881
+ * // - Login into gcloud by running:
2882
+ * // ```sh
2883
+ * // $ gcloud auth application-default login
2884
+ * // ```
2885
+ * // - Install the npm module by running:
2886
+ * // ```sh
2887
+ * // $ npm install googleapis
2888
+ * // ```
2889
+ *
2890
+ * const {google} = require('googleapis');
2891
+ * const servicenetworking = google.servicenetworking('v1');
2892
+ *
2893
+ * async function main() {
2894
+ * const auth = new google.auth.GoogleAuth({
2895
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2896
+ * scopes: [
2897
+ * 'https://www.googleapis.com/auth/cloud-platform',
2898
+ * 'https://www.googleapis.com/auth/service.management',
2899
+ * ],
2900
+ * });
2901
+ *
2902
+ * // Acquire an auth client, and bind it to all future calls
2903
+ * const authClient = await auth.getClient();
2904
+ * google.options({auth: authClient});
2905
+ *
2906
+ * // Do the magic
2907
+ * const res = await servicenetworking.services.disableVpcServiceControls({
2908
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
2909
+ * parent: 'services/my-service',
2910
+ *
2911
+ * // Request body metadata
2912
+ * requestBody: {
2913
+ * // request body parameters
2914
+ * // {
2915
+ * // "consumerNetwork": "my_consumerNetwork"
2916
+ * // }
2917
+ * },
2918
+ * });
2919
+ * console.log(res.data);
2920
+ *
2921
+ * // Example response
2922
+ * // {
2923
+ * // "done": false,
2924
+ * // "error": {},
2925
+ * // "metadata": {},
2926
+ * // "name": "my_name",
2927
+ * // "response": {}
2928
+ * // }
2929
+ * }
2930
+ *
2931
+ * main().catch(e => {
2932
+ * console.error(e);
2933
+ * throw e;
2934
+ * });
2935
+ *
2936
+ * ```
2496
2937
  *
2497
2938
  * @param params - Parameters for request
2498
2939
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2507,6 +2948,67 @@ export declare namespace servicenetworking_v1 {
2507
2948
  disableVpcServiceControls(callback: BodyResponseCallback<Schema$Operation>): void;
2508
2949
  /**
2509
2950
  * Enables VPC service controls for a connection.
2951
+ * @example
2952
+ * ```js
2953
+ * // Before running the sample:
2954
+ * // - Enable the API at:
2955
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2956
+ * // - Login into gcloud by running:
2957
+ * // ```sh
2958
+ * // $ gcloud auth application-default login
2959
+ * // ```
2960
+ * // - Install the npm module by running:
2961
+ * // ```sh
2962
+ * // $ npm install googleapis
2963
+ * // ```
2964
+ *
2965
+ * const {google} = require('googleapis');
2966
+ * const servicenetworking = google.servicenetworking('v1');
2967
+ *
2968
+ * async function main() {
2969
+ * const auth = new google.auth.GoogleAuth({
2970
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2971
+ * scopes: [
2972
+ * 'https://www.googleapis.com/auth/cloud-platform',
2973
+ * 'https://www.googleapis.com/auth/service.management',
2974
+ * ],
2975
+ * });
2976
+ *
2977
+ * // Acquire an auth client, and bind it to all future calls
2978
+ * const authClient = await auth.getClient();
2979
+ * google.options({auth: authClient});
2980
+ *
2981
+ * // Do the magic
2982
+ * const res = await servicenetworking.services.enableVpcServiceControls({
2983
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
2984
+ * parent: 'services/my-service',
2985
+ *
2986
+ * // Request body metadata
2987
+ * requestBody: {
2988
+ * // request body parameters
2989
+ * // {
2990
+ * // "consumerNetwork": "my_consumerNetwork"
2991
+ * // }
2992
+ * },
2993
+ * });
2994
+ * console.log(res.data);
2995
+ *
2996
+ * // Example response
2997
+ * // {
2998
+ * // "done": false,
2999
+ * // "error": {},
3000
+ * // "metadata": {},
3001
+ * // "name": "my_name",
3002
+ * // "response": {}
3003
+ * // }
3004
+ * }
3005
+ *
3006
+ * main().catch(e => {
3007
+ * console.error(e);
3008
+ * throw e;
3009
+ * });
3010
+ *
3011
+ * ```
2510
3012
  *
2511
3013
  * @param params - Parameters for request
2512
3014
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2521,6 +3023,68 @@ export declare namespace servicenetworking_v1 {
2521
3023
  enableVpcServiceControls(callback: BodyResponseCallback<Schema$Operation>): void;
2522
3024
  /**
2523
3025
  * Service producers can use this method to find a currently unused range within consumer allocated ranges. This returned range is not reserved, and not guaranteed to remain unused. It will validate previously provided allocated ranges, find non-conflicting sub-range of requested size (expressed in number of leading bits of ipv4 network mask, as in CIDR range notation).
3026
+ * @example
3027
+ * ```js
3028
+ * // Before running the sample:
3029
+ * // - Enable the API at:
3030
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3031
+ * // - Login into gcloud by running:
3032
+ * // ```sh
3033
+ * // $ gcloud auth application-default login
3034
+ * // ```
3035
+ * // - Install the npm module by running:
3036
+ * // ```sh
3037
+ * // $ npm install googleapis
3038
+ * // ```
3039
+ *
3040
+ * const {google} = require('googleapis');
3041
+ * const servicenetworking = google.servicenetworking('v1');
3042
+ *
3043
+ * async function main() {
3044
+ * const auth = new google.auth.GoogleAuth({
3045
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3046
+ * scopes: [
3047
+ * 'https://www.googleapis.com/auth/cloud-platform',
3048
+ * 'https://www.googleapis.com/auth/service.management',
3049
+ * ],
3050
+ * });
3051
+ *
3052
+ * // Acquire an auth client, and bind it to all future calls
3053
+ * const authClient = await auth.getClient();
3054
+ * google.options({auth: authClient});
3055
+ *
3056
+ * // Do the magic
3057
+ * const res = await servicenetworking.services.searchRange({
3058
+ * // Required. This is in a form services/{service\}. {service\} the name of the private access management service, for example 'service-peering.example.com'.
3059
+ * parent: 'services/my-service',
3060
+ *
3061
+ * // Request body metadata
3062
+ * requestBody: {
3063
+ * // request body parameters
3064
+ * // {
3065
+ * // "ipPrefixLength": 0,
3066
+ * // "network": "my_network"
3067
+ * // }
3068
+ * },
3069
+ * });
3070
+ * console.log(res.data);
3071
+ *
3072
+ * // Example response
3073
+ * // {
3074
+ * // "done": false,
3075
+ * // "error": {},
3076
+ * // "metadata": {},
3077
+ * // "name": "my_name",
3078
+ * // "response": {}
3079
+ * // }
3080
+ * }
3081
+ *
3082
+ * main().catch(e => {
3083
+ * console.error(e);
3084
+ * throw e;
3085
+ * });
3086
+ *
3087
+ * ```
2524
3088
  *
2525
3089
  * @param params - Parameters for request
2526
3090
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2535,6 +3099,69 @@ export declare namespace servicenetworking_v1 {
2535
3099
  searchRange(callback: BodyResponseCallback<Schema$Operation>): void;
2536
3100
  /**
2537
3101
  * Service producers use this method to validate if the consumer provided network, project and requested range are valid. This allows them to use a fail-fast mechanism for consumer requests, and not have to wait for AddSubnetwork operation completion to determine if user request is invalid.
3102
+ * @example
3103
+ * ```js
3104
+ * // Before running the sample:
3105
+ * // - Enable the API at:
3106
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3107
+ * // - Login into gcloud by running:
3108
+ * // ```sh
3109
+ * // $ gcloud auth application-default login
3110
+ * // ```
3111
+ * // - Install the npm module by running:
3112
+ * // ```sh
3113
+ * // $ npm install googleapis
3114
+ * // ```
3115
+ *
3116
+ * const {google} = require('googleapis');
3117
+ * const servicenetworking = google.servicenetworking('v1');
3118
+ *
3119
+ * async function main() {
3120
+ * const auth = new google.auth.GoogleAuth({
3121
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3122
+ * scopes: [
3123
+ * 'https://www.googleapis.com/auth/cloud-platform',
3124
+ * 'https://www.googleapis.com/auth/service.management',
3125
+ * ],
3126
+ * });
3127
+ *
3128
+ * // Acquire an auth client, and bind it to all future calls
3129
+ * const authClient = await auth.getClient();
3130
+ * google.options({auth: authClient});
3131
+ *
3132
+ * // Do the magic
3133
+ * const res = await servicenetworking.services.validate({
3134
+ * // Required. This is in a form services/{service\} where {service\} is the name of the private access management service. For example 'service-peering.example.com'.
3135
+ * parent: 'services/my-service',
3136
+ *
3137
+ * // Request body metadata
3138
+ * requestBody: {
3139
+ * // request body parameters
3140
+ * // {
3141
+ * // "checkServiceNetworkingUsePermission": false,
3142
+ * // "consumerNetwork": "my_consumerNetwork",
3143
+ * // "consumerProject": {},
3144
+ * // "rangeReservation": {},
3145
+ * // "validateNetwork": false
3146
+ * // }
3147
+ * },
3148
+ * });
3149
+ * console.log(res.data);
3150
+ *
3151
+ * // Example response
3152
+ * // {
3153
+ * // "existingSubnetworkCandidates": [],
3154
+ * // "isValid": false,
3155
+ * // "validationError": "my_validationError"
3156
+ * // }
3157
+ * }
3158
+ *
3159
+ * main().catch(e => {
3160
+ * console.error(e);
3161
+ * throw e;
3162
+ * });
3163
+ *
3164
+ * ```
2538
3165
  *
2539
3166
  * @param params - Parameters for request
2540
3167
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2560,7 +3187,7 @@ export declare namespace servicenetworking_v1 {
2560
3187
  }
2561
3188
  export interface Params$Resource$Services$Disablevpcservicecontrols extends StandardParameters {
2562
3189
  /**
2563
- * The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3190
+ * Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
2564
3191
  */
2565
3192
  parent?: string;
2566
3193
  /**
@@ -2570,7 +3197,7 @@ export declare namespace servicenetworking_v1 {
2570
3197
  }
2571
3198
  export interface Params$Resource$Services$Enablevpcservicecontrols extends StandardParameters {
2572
3199
  /**
2573
- * The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3200
+ * Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
2574
3201
  */
2575
3202
  parent?: string;
2576
3203
  /**
@@ -2603,6 +3230,70 @@ export declare namespace servicenetworking_v1 {
2603
3230
  constructor(context: APIRequestContext);
2604
3231
  /**
2605
3232
  * Creates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. The administrator of the service consumer's VPC network invokes this method. The administrator must assign one or more allocated IP ranges for provisioning subnetworks in the service producer's VPC network. This connection is used for all supported services in the service producer's organization, so it only needs to be invoked once.
3233
+ * @example
3234
+ * ```js
3235
+ * // Before running the sample:
3236
+ * // - Enable the API at:
3237
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3238
+ * // - Login into gcloud by running:
3239
+ * // ```sh
3240
+ * // $ gcloud auth application-default login
3241
+ * // ```
3242
+ * // - Install the npm module by running:
3243
+ * // ```sh
3244
+ * // $ npm install googleapis
3245
+ * // ```
3246
+ *
3247
+ * const {google} = require('googleapis');
3248
+ * const servicenetworking = google.servicenetworking('v1');
3249
+ *
3250
+ * async function main() {
3251
+ * const auth = new google.auth.GoogleAuth({
3252
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3253
+ * scopes: [
3254
+ * 'https://www.googleapis.com/auth/cloud-platform',
3255
+ * 'https://www.googleapis.com/auth/service.management',
3256
+ * ],
3257
+ * });
3258
+ *
3259
+ * // Acquire an auth client, and bind it to all future calls
3260
+ * const authClient = await auth.getClient();
3261
+ * google.options({auth: authClient});
3262
+ *
3263
+ * // Do the magic
3264
+ * const res = await servicenetworking.services.connections.create({
3265
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3266
+ * parent: 'services/my-service',
3267
+ *
3268
+ * // Request body metadata
3269
+ * requestBody: {
3270
+ * // request body parameters
3271
+ * // {
3272
+ * // "network": "my_network",
3273
+ * // "peering": "my_peering",
3274
+ * // "reservedPeeringRanges": [],
3275
+ * // "service": "my_service"
3276
+ * // }
3277
+ * },
3278
+ * });
3279
+ * console.log(res.data);
3280
+ *
3281
+ * // Example response
3282
+ * // {
3283
+ * // "done": false,
3284
+ * // "error": {},
3285
+ * // "metadata": {},
3286
+ * // "name": "my_name",
3287
+ * // "response": {}
3288
+ * // }
3289
+ * }
3290
+ *
3291
+ * main().catch(e => {
3292
+ * console.error(e);
3293
+ * throw e;
3294
+ * });
3295
+ *
3296
+ * ```
2606
3297
  *
2607
3298
  * @param params - Parameters for request
2608
3299
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2617,6 +3308,67 @@ export declare namespace servicenetworking_v1 {
2617
3308
  create(callback: BodyResponseCallback<Schema$Operation>): void;
2618
3309
  /**
2619
3310
  * Deletes a private service access connection.
3311
+ * @example
3312
+ * ```js
3313
+ * // Before running the sample:
3314
+ * // - Enable the API at:
3315
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3316
+ * // - Login into gcloud by running:
3317
+ * // ```sh
3318
+ * // $ gcloud auth application-default login
3319
+ * // ```
3320
+ * // - Install the npm module by running:
3321
+ * // ```sh
3322
+ * // $ npm install googleapis
3323
+ * // ```
3324
+ *
3325
+ * const {google} = require('googleapis');
3326
+ * const servicenetworking = google.servicenetworking('v1');
3327
+ *
3328
+ * async function main() {
3329
+ * const auth = new google.auth.GoogleAuth({
3330
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3331
+ * scopes: [
3332
+ * 'https://www.googleapis.com/auth/cloud-platform',
3333
+ * 'https://www.googleapis.com/auth/service.management',
3334
+ * ],
3335
+ * });
3336
+ *
3337
+ * // Acquire an auth client, and bind it to all future calls
3338
+ * const authClient = await auth.getClient();
3339
+ * google.options({auth: authClient});
3340
+ *
3341
+ * // Do the magic
3342
+ * const res = await servicenetworking.services.connections.deleteConnection({
3343
+ * // Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
3344
+ * name: 'services/my-service/connections/my-connection',
3345
+ *
3346
+ * // Request body metadata
3347
+ * requestBody: {
3348
+ * // request body parameters
3349
+ * // {
3350
+ * // "consumerNetwork": "my_consumerNetwork"
3351
+ * // }
3352
+ * },
3353
+ * });
3354
+ * console.log(res.data);
3355
+ *
3356
+ * // Example response
3357
+ * // {
3358
+ * // "done": false,
3359
+ * // "error": {},
3360
+ * // "metadata": {},
3361
+ * // "name": "my_name",
3362
+ * // "response": {}
3363
+ * // }
3364
+ * }
3365
+ *
3366
+ * main().catch(e => {
3367
+ * console.error(e);
3368
+ * throw e;
3369
+ * });
3370
+ *
3371
+ * ```
2620
3372
  *
2621
3373
  * @param params - Parameters for request
2622
3374
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2631,6 +3383,57 @@ export declare namespace servicenetworking_v1 {
2631
3383
  deleteConnection(callback: BodyResponseCallback<Schema$Operation>): void;
2632
3384
  /**
2633
3385
  * List the private connections that are configured in a service consumer's VPC network.
3386
+ * @example
3387
+ * ```js
3388
+ * // Before running the sample:
3389
+ * // - Enable the API at:
3390
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3391
+ * // - Login into gcloud by running:
3392
+ * // ```sh
3393
+ * // $ gcloud auth application-default login
3394
+ * // ```
3395
+ * // - Install the npm module by running:
3396
+ * // ```sh
3397
+ * // $ npm install googleapis
3398
+ * // ```
3399
+ *
3400
+ * const {google} = require('googleapis');
3401
+ * const servicenetworking = google.servicenetworking('v1');
3402
+ *
3403
+ * async function main() {
3404
+ * const auth = new google.auth.GoogleAuth({
3405
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3406
+ * scopes: [
3407
+ * 'https://www.googleapis.com/auth/cloud-platform',
3408
+ * 'https://www.googleapis.com/auth/service.management',
3409
+ * ],
3410
+ * });
3411
+ *
3412
+ * // Acquire an auth client, and bind it to all future calls
3413
+ * const authClient = await auth.getClient();
3414
+ * google.options({auth: authClient});
3415
+ *
3416
+ * // Do the magic
3417
+ * const res = await servicenetworking.services.connections.list({
3418
+ * // Required. The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project\}/global/networks/{network\}`. {project\} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
3419
+ * network: 'placeholder-value',
3420
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.
3421
+ * parent: 'services/my-service',
3422
+ * });
3423
+ * console.log(res.data);
3424
+ *
3425
+ * // Example response
3426
+ * // {
3427
+ * // "connections": []
3428
+ * // }
3429
+ * }
3430
+ *
3431
+ * main().catch(e => {
3432
+ * console.error(e);
3433
+ * throw e;
3434
+ * });
3435
+ *
3436
+ * ```
2634
3437
  *
2635
3438
  * @param params - Parameters for request
2636
3439
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2645,6 +3448,74 @@ export declare namespace servicenetworking_v1 {
2645
3448
  list(callback: BodyResponseCallback<Schema$ListConnectionsResponse>): void;
2646
3449
  /**
2647
3450
  * Updates the allocated ranges that are assigned to a connection.
3451
+ * @example
3452
+ * ```js
3453
+ * // Before running the sample:
3454
+ * // - Enable the API at:
3455
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3456
+ * // - Login into gcloud by running:
3457
+ * // ```sh
3458
+ * // $ gcloud auth application-default login
3459
+ * // ```
3460
+ * // - Install the npm module by running:
3461
+ * // ```sh
3462
+ * // $ npm install googleapis
3463
+ * // ```
3464
+ *
3465
+ * const {google} = require('googleapis');
3466
+ * const servicenetworking = google.servicenetworking('v1');
3467
+ *
3468
+ * async function main() {
3469
+ * const auth = new google.auth.GoogleAuth({
3470
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3471
+ * scopes: [
3472
+ * 'https://www.googleapis.com/auth/cloud-platform',
3473
+ * 'https://www.googleapis.com/auth/service.management',
3474
+ * ],
3475
+ * });
3476
+ *
3477
+ * // Acquire an auth client, and bind it to all future calls
3478
+ * const authClient = await auth.getClient();
3479
+ * google.options({auth: authClient});
3480
+ *
3481
+ * // Do the magic
3482
+ * const res = await servicenetworking.services.connections.patch({
3483
+ * // If a previously defined allocated range is removed, force flag must be set to true.
3484
+ * force: 'placeholder-value',
3485
+ * // Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
3486
+ * name: 'services/my-service/connections/my-connection',
3487
+ * // The update mask. If this is omitted, it defaults to "*". You can only update the listed peering ranges.
3488
+ * updateMask: 'placeholder-value',
3489
+ *
3490
+ * // Request body metadata
3491
+ * requestBody: {
3492
+ * // request body parameters
3493
+ * // {
3494
+ * // "network": "my_network",
3495
+ * // "peering": "my_peering",
3496
+ * // "reservedPeeringRanges": [],
3497
+ * // "service": "my_service"
3498
+ * // }
3499
+ * },
3500
+ * });
3501
+ * console.log(res.data);
3502
+ *
3503
+ * // Example response
3504
+ * // {
3505
+ * // "done": false,
3506
+ * // "error": {},
3507
+ * // "metadata": {},
3508
+ * // "name": "my_name",
3509
+ * // "response": {}
3510
+ * // }
3511
+ * }
3512
+ *
3513
+ * main().catch(e => {
3514
+ * console.error(e);
3515
+ * throw e;
3516
+ * });
3517
+ *
3518
+ * ```
2648
3519
  *
2649
3520
  * @param params - Parameters for request
2650
3521
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2660,7 +3531,7 @@ export declare namespace servicenetworking_v1 {
2660
3531
  }
2661
3532
  export interface Params$Resource$Services$Connections$Create extends StandardParameters {
2662
3533
  /**
2663
- * The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3534
+ * Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
2664
3535
  */
2665
3536
  parent?: string;
2666
3537
  /**
@@ -2680,11 +3551,11 @@ export declare namespace servicenetworking_v1 {
2680
3551
  }
2681
3552
  export interface Params$Resource$Services$Connections$List extends StandardParameters {
2682
3553
  /**
2683
- * The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project\}/global/networks/{network\}`. {project\} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
3554
+ * Required. The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project\}/global/networks/{network\}`. {project\} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
2684
3555
  */
2685
3556
  network?: string;
2686
3557
  /**
2687
- * The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.
3558
+ * Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.
2688
3559
  */
2689
3560
  parent?: string;
2690
3561
  }
@@ -2694,7 +3565,7 @@ export declare namespace servicenetworking_v1 {
2694
3565
  */
2695
3566
  force?: boolean;
2696
3567
  /**
2697
- * The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
3568
+ * Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
2698
3569
  */
2699
3570
  name?: string;
2700
3571
  /**
@@ -2711,6 +3582,69 @@ export declare namespace servicenetworking_v1 {
2711
3582
  constructor(context: APIRequestContext);
2712
3583
  /**
2713
3584
  * Service producers can use this method to add DNS record sets to private DNS zones in the shared producer host project.
3585
+ * @example
3586
+ * ```js
3587
+ * // Before running the sample:
3588
+ * // - Enable the API at:
3589
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3590
+ * // - Login into gcloud by running:
3591
+ * // ```sh
3592
+ * // $ gcloud auth application-default login
3593
+ * // ```
3594
+ * // - Install the npm module by running:
3595
+ * // ```sh
3596
+ * // $ npm install googleapis
3597
+ * // ```
3598
+ *
3599
+ * const {google} = require('googleapis');
3600
+ * const servicenetworking = google.servicenetworking('v1');
3601
+ *
3602
+ * async function main() {
3603
+ * const auth = new google.auth.GoogleAuth({
3604
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3605
+ * scopes: [
3606
+ * 'https://www.googleapis.com/auth/cloud-platform',
3607
+ * 'https://www.googleapis.com/auth/service.management',
3608
+ * ],
3609
+ * });
3610
+ *
3611
+ * // Acquire an auth client, and bind it to all future calls
3612
+ * const authClient = await auth.getClient();
3613
+ * google.options({auth: authClient});
3614
+ *
3615
+ * // Do the magic
3616
+ * const res = await servicenetworking.services.dnsRecordSets.add({
3617
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3618
+ * parent: 'services/my-service',
3619
+ *
3620
+ * // Request body metadata
3621
+ * requestBody: {
3622
+ * // request body parameters
3623
+ * // {
3624
+ * // "consumerNetwork": "my_consumerNetwork",
3625
+ * // "dnsRecordSet": {},
3626
+ * // "zone": "my_zone"
3627
+ * // }
3628
+ * },
3629
+ * });
3630
+ * console.log(res.data);
3631
+ *
3632
+ * // Example response
3633
+ * // {
3634
+ * // "done": false,
3635
+ * // "error": {},
3636
+ * // "metadata": {},
3637
+ * // "name": "my_name",
3638
+ * // "response": {}
3639
+ * // }
3640
+ * }
3641
+ *
3642
+ * main().catch(e => {
3643
+ * console.error(e);
3644
+ * throw e;
3645
+ * });
3646
+ *
3647
+ * ```
2714
3648
  *
2715
3649
  * @param params - Parameters for request
2716
3650
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2725,6 +3659,66 @@ export declare namespace servicenetworking_v1 {
2725
3659
  add(callback: BodyResponseCallback<Schema$Operation>): void;
2726
3660
  /**
2727
3661
  * Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network.
3662
+ * @example
3663
+ * ```js
3664
+ * // Before running the sample:
3665
+ * // - Enable the API at:
3666
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3667
+ * // - Login into gcloud by running:
3668
+ * // ```sh
3669
+ * // $ gcloud auth application-default login
3670
+ * // ```
3671
+ * // - Install the npm module by running:
3672
+ * // ```sh
3673
+ * // $ npm install googleapis
3674
+ * // ```
3675
+ *
3676
+ * const {google} = require('googleapis');
3677
+ * const servicenetworking = google.servicenetworking('v1');
3678
+ *
3679
+ * async function main() {
3680
+ * const auth = new google.auth.GoogleAuth({
3681
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3682
+ * scopes: [
3683
+ * 'https://www.googleapis.com/auth/cloud-platform',
3684
+ * 'https://www.googleapis.com/auth/service.management',
3685
+ * ],
3686
+ * });
3687
+ *
3688
+ * // Acquire an auth client, and bind it to all future calls
3689
+ * const authClient = await auth.getClient();
3690
+ * google.options({auth: authClient});
3691
+ *
3692
+ * // Do the magic
3693
+ * const res = await servicenetworking.services.dnsRecordSets.get({
3694
+ * // Required. The consumer network containing the record set. Must be in the form of projects/{project\}/global/networks/{network\}
3695
+ * consumerNetwork: 'placeholder-value',
3696
+ * // Required. The domain name of the zone containing the recordset.
3697
+ * domain: 'placeholder-value',
3698
+ * // Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service\}.
3699
+ * parent: 'services/my-service',
3700
+ * // Required. RecordSet Type eg. type='A'. See the list of [Supported DNS Types](https://cloud.google.com/dns/records/json-record).
3701
+ * type: 'placeholder-value',
3702
+ * // Required. The name of the zone containing the record set.
3703
+ * zone: 'placeholder-value',
3704
+ * });
3705
+ * console.log(res.data);
3706
+ *
3707
+ * // Example response
3708
+ * // {
3709
+ * // "data": [],
3710
+ * // "domain": "my_domain",
3711
+ * // "ttl": "my_ttl",
3712
+ * // "type": "my_type"
3713
+ * // }
3714
+ * }
3715
+ *
3716
+ * main().catch(e => {
3717
+ * console.error(e);
3718
+ * throw e;
3719
+ * });
3720
+ *
3721
+ * ```
2728
3722
  *
2729
3723
  * @param params - Parameters for request
2730
3724
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2739,6 +3733,59 @@ export declare namespace servicenetworking_v1 {
2739
3733
  get(callback: BodyResponseCallback<Schema$DnsRecordSet>): void;
2740
3734
  /**
2741
3735
  * Producers can use this method to retrieve a list of available DNS RecordSets available inside the private zone on the tenant host project accessible from their network.
3736
+ * @example
3737
+ * ```js
3738
+ * // Before running the sample:
3739
+ * // - Enable the API at:
3740
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3741
+ * // - Login into gcloud by running:
3742
+ * // ```sh
3743
+ * // $ gcloud auth application-default login
3744
+ * // ```
3745
+ * // - Install the npm module by running:
3746
+ * // ```sh
3747
+ * // $ npm install googleapis
3748
+ * // ```
3749
+ *
3750
+ * const {google} = require('googleapis');
3751
+ * const servicenetworking = google.servicenetworking('v1');
3752
+ *
3753
+ * async function main() {
3754
+ * const auth = new google.auth.GoogleAuth({
3755
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3756
+ * scopes: [
3757
+ * 'https://www.googleapis.com/auth/cloud-platform',
3758
+ * 'https://www.googleapis.com/auth/service.management',
3759
+ * ],
3760
+ * });
3761
+ *
3762
+ * // Acquire an auth client, and bind it to all future calls
3763
+ * const authClient = await auth.getClient();
3764
+ * google.options({auth: authClient});
3765
+ *
3766
+ * // Do the magic
3767
+ * const res = await servicenetworking.services.dnsRecordSets.list({
3768
+ * // Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project\}/global/networks/{network\} {project\} is the project number, as in '12345' {network\} is the network name.
3769
+ * consumerNetwork: 'placeholder-value',
3770
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3771
+ * parent: 'services/my-service',
3772
+ * // Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.
3773
+ * zone: 'placeholder-value',
3774
+ * });
3775
+ * console.log(res.data);
3776
+ *
3777
+ * // Example response
3778
+ * // {
3779
+ * // "dnsRecordSets": []
3780
+ * // }
3781
+ * }
3782
+ *
3783
+ * main().catch(e => {
3784
+ * console.error(e);
3785
+ * throw e;
3786
+ * });
3787
+ *
3788
+ * ```
2742
3789
  *
2743
3790
  * @param params - Parameters for request
2744
3791
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2753,6 +3800,69 @@ export declare namespace servicenetworking_v1 {
2753
3800
  list(callback: BodyResponseCallback<Schema$ListDnsRecordSetsResponse>): void;
2754
3801
  /**
2755
3802
  * Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project.
3803
+ * @example
3804
+ * ```js
3805
+ * // Before running the sample:
3806
+ * // - Enable the API at:
3807
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3808
+ * // - Login into gcloud by running:
3809
+ * // ```sh
3810
+ * // $ gcloud auth application-default login
3811
+ * // ```
3812
+ * // - Install the npm module by running:
3813
+ * // ```sh
3814
+ * // $ npm install googleapis
3815
+ * // ```
3816
+ *
3817
+ * const {google} = require('googleapis');
3818
+ * const servicenetworking = google.servicenetworking('v1');
3819
+ *
3820
+ * async function main() {
3821
+ * const auth = new google.auth.GoogleAuth({
3822
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3823
+ * scopes: [
3824
+ * 'https://www.googleapis.com/auth/cloud-platform',
3825
+ * 'https://www.googleapis.com/auth/service.management',
3826
+ * ],
3827
+ * });
3828
+ *
3829
+ * // Acquire an auth client, and bind it to all future calls
3830
+ * const authClient = await auth.getClient();
3831
+ * google.options({auth: authClient});
3832
+ *
3833
+ * // Do the magic
3834
+ * const res = await servicenetworking.services.dnsRecordSets.remove({
3835
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3836
+ * parent: 'services/my-service',
3837
+ *
3838
+ * // Request body metadata
3839
+ * requestBody: {
3840
+ * // request body parameters
3841
+ * // {
3842
+ * // "consumerNetwork": "my_consumerNetwork",
3843
+ * // "dnsRecordSet": {},
3844
+ * // "zone": "my_zone"
3845
+ * // }
3846
+ * },
3847
+ * });
3848
+ * console.log(res.data);
3849
+ *
3850
+ * // Example response
3851
+ * // {
3852
+ * // "done": false,
3853
+ * // "error": {},
3854
+ * // "metadata": {},
3855
+ * // "name": "my_name",
3856
+ * // "response": {}
3857
+ * // }
3858
+ * }
3859
+ *
3860
+ * main().catch(e => {
3861
+ * console.error(e);
3862
+ * throw e;
3863
+ * });
3864
+ *
3865
+ * ```
2756
3866
  *
2757
3867
  * @param params - Parameters for request
2758
3868
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2767,6 +3877,70 @@ export declare namespace servicenetworking_v1 {
2767
3877
  remove(callback: BodyResponseCallback<Schema$Operation>): void;
2768
3878
  /**
2769
3879
  * Service producers can use this method to update DNS record sets from private DNS zones in the shared producer host project.
3880
+ * @example
3881
+ * ```js
3882
+ * // Before running the sample:
3883
+ * // - Enable the API at:
3884
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3885
+ * // - Login into gcloud by running:
3886
+ * // ```sh
3887
+ * // $ gcloud auth application-default login
3888
+ * // ```
3889
+ * // - Install the npm module by running:
3890
+ * // ```sh
3891
+ * // $ npm install googleapis
3892
+ * // ```
3893
+ *
3894
+ * const {google} = require('googleapis');
3895
+ * const servicenetworking = google.servicenetworking('v1');
3896
+ *
3897
+ * async function main() {
3898
+ * const auth = new google.auth.GoogleAuth({
3899
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3900
+ * scopes: [
3901
+ * 'https://www.googleapis.com/auth/cloud-platform',
3902
+ * 'https://www.googleapis.com/auth/service.management',
3903
+ * ],
3904
+ * });
3905
+ *
3906
+ * // Acquire an auth client, and bind it to all future calls
3907
+ * const authClient = await auth.getClient();
3908
+ * google.options({auth: authClient});
3909
+ *
3910
+ * // Do the magic
3911
+ * const res = await servicenetworking.services.dnsRecordSets.update({
3912
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
3913
+ * parent: 'services/my-service',
3914
+ *
3915
+ * // Request body metadata
3916
+ * requestBody: {
3917
+ * // request body parameters
3918
+ * // {
3919
+ * // "consumerNetwork": "my_consumerNetwork",
3920
+ * // "existingDnsRecordSet": {},
3921
+ * // "newDnsRecordSet": {},
3922
+ * // "zone": "my_zone"
3923
+ * // }
3924
+ * },
3925
+ * });
3926
+ * console.log(res.data);
3927
+ *
3928
+ * // Example response
3929
+ * // {
3930
+ * // "done": false,
3931
+ * // "error": {},
3932
+ * // "metadata": {},
3933
+ * // "name": "my_name",
3934
+ * // "response": {}
3935
+ * // }
3936
+ * }
3937
+ *
3938
+ * main().catch(e => {
3939
+ * console.error(e);
3940
+ * throw e;
3941
+ * });
3942
+ *
3943
+ * ```
2770
3944
  *
2771
3945
  * @param params - Parameters for request
2772
3946
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2851,6 +4025,69 @@ export declare namespace servicenetworking_v1 {
2851
4025
  constructor(context: APIRequestContext);
2852
4026
  /**
2853
4027
  * Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.
4028
+ * @example
4029
+ * ```js
4030
+ * // Before running the sample:
4031
+ * // - Enable the API at:
4032
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4033
+ * // - Login into gcloud by running:
4034
+ * // ```sh
4035
+ * // $ gcloud auth application-default login
4036
+ * // ```
4037
+ * // - Install the npm module by running:
4038
+ * // ```sh
4039
+ * // $ npm install googleapis
4040
+ * // ```
4041
+ *
4042
+ * const {google} = require('googleapis');
4043
+ * const servicenetworking = google.servicenetworking('v1');
4044
+ *
4045
+ * async function main() {
4046
+ * const auth = new google.auth.GoogleAuth({
4047
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4048
+ * scopes: [
4049
+ * 'https://www.googleapis.com/auth/cloud-platform',
4050
+ * 'https://www.googleapis.com/auth/service.management',
4051
+ * ],
4052
+ * });
4053
+ *
4054
+ * // Acquire an auth client, and bind it to all future calls
4055
+ * const authClient = await auth.getClient();
4056
+ * google.options({auth: authClient});
4057
+ *
4058
+ * // Do the magic
4059
+ * const res = await servicenetworking.services.dnsZones.add({
4060
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
4061
+ * parent: 'services/my-service',
4062
+ *
4063
+ * // Request body metadata
4064
+ * requestBody: {
4065
+ * // request body parameters
4066
+ * // {
4067
+ * // "consumerNetwork": "my_consumerNetwork",
4068
+ * // "dnsSuffix": "my_dnsSuffix",
4069
+ * // "name": "my_name"
4070
+ * // }
4071
+ * },
4072
+ * });
4073
+ * console.log(res.data);
4074
+ *
4075
+ * // Example response
4076
+ * // {
4077
+ * // "done": false,
4078
+ * // "error": {},
4079
+ * // "metadata": {},
4080
+ * // "name": "my_name",
4081
+ * // "response": {}
4082
+ * // }
4083
+ * }
4084
+ *
4085
+ * main().catch(e => {
4086
+ * console.error(e);
4087
+ * throw e;
4088
+ * });
4089
+ *
4090
+ * ```
2854
4091
  *
2855
4092
  * @param params - Parameters for request
2856
4093
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2865,6 +4102,68 @@ export declare namespace servicenetworking_v1 {
2865
4102
  add(callback: BodyResponseCallback<Schema$Operation>): void;
2866
4103
  /**
2867
4104
  * Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project.
4105
+ * @example
4106
+ * ```js
4107
+ * // Before running the sample:
4108
+ * // - Enable the API at:
4109
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4110
+ * // - Login into gcloud by running:
4111
+ * // ```sh
4112
+ * // $ gcloud auth application-default login
4113
+ * // ```
4114
+ * // - Install the npm module by running:
4115
+ * // ```sh
4116
+ * // $ npm install googleapis
4117
+ * // ```
4118
+ *
4119
+ * const {google} = require('googleapis');
4120
+ * const servicenetworking = google.servicenetworking('v1');
4121
+ *
4122
+ * async function main() {
4123
+ * const auth = new google.auth.GoogleAuth({
4124
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4125
+ * scopes: [
4126
+ * 'https://www.googleapis.com/auth/cloud-platform',
4127
+ * 'https://www.googleapis.com/auth/service.management',
4128
+ * ],
4129
+ * });
4130
+ *
4131
+ * // Acquire an auth client, and bind it to all future calls
4132
+ * const authClient = await auth.getClient();
4133
+ * google.options({auth: authClient});
4134
+ *
4135
+ * // Do the magic
4136
+ * const res = await servicenetworking.services.dnsZones.remove({
4137
+ * // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
4138
+ * parent: 'services/my-service',
4139
+ *
4140
+ * // Request body metadata
4141
+ * requestBody: {
4142
+ * // request body parameters
4143
+ * // {
4144
+ * // "consumerNetwork": "my_consumerNetwork",
4145
+ * // "name": "my_name"
4146
+ * // }
4147
+ * },
4148
+ * });
4149
+ * console.log(res.data);
4150
+ *
4151
+ * // Example response
4152
+ * // {
4153
+ * // "done": false,
4154
+ * // "error": {},
4155
+ * // "metadata": {},
4156
+ * // "name": "my_name",
4157
+ * // "response": {}
4158
+ * // }
4159
+ * }
4160
+ *
4161
+ * main().catch(e => {
4162
+ * console.error(e);
4163
+ * throw e;
4164
+ * });
4165
+ *
4166
+ * ```
2868
4167
  *
2869
4168
  * @param params - Parameters for request
2870
4169
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2915,6 +4214,69 @@ export declare namespace servicenetworking_v1 {
2915
4214
  constructor(context: APIRequestContext);
2916
4215
  /**
2917
4216
  * Service producers use this method to get the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.
4217
+ * @example
4218
+ * ```js
4219
+ * // Before running the sample:
4220
+ * // - Enable the API at:
4221
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4222
+ * // - Login into gcloud by running:
4223
+ * // ```sh
4224
+ * // $ gcloud auth application-default login
4225
+ * // ```
4226
+ * // - Install the npm module by running:
4227
+ * // ```sh
4228
+ * // $ npm install googleapis
4229
+ * // ```
4230
+ *
4231
+ * const {google} = require('googleapis');
4232
+ * const servicenetworking = google.servicenetworking('v1');
4233
+ *
4234
+ * async function main() {
4235
+ * const auth = new google.auth.GoogleAuth({
4236
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4237
+ * scopes: [
4238
+ * 'https://www.googleapis.com/auth/cloud-platform',
4239
+ * 'https://www.googleapis.com/auth/service.management',
4240
+ * ],
4241
+ * });
4242
+ *
4243
+ * // Acquire an auth client, and bind it to all future calls
4244
+ * const authClient = await auth.getClient();
4245
+ * google.options({auth: authClient});
4246
+ *
4247
+ * // Do the magic
4248
+ * const res = await servicenetworking.services.projects.global.networks.get({
4249
+ * // Optional. When true, include the used IP ranges as part of the GetConsumerConfig output. This includes routes created inside the service networking network, consumer network, peers of the consumer network, and reserved ranges inside the service networking network. By default, this is false
4250
+ * includeUsedIpRanges: 'placeholder-value',
4251
+ * // Required. Name of the consumer config to retrieve in the format: `services/{service\}/projects/{project\}/global/networks/{network\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is a project number e.g. `12345` that contains the service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
4252
+ * name: 'services/my-service/projects/my-project/global/networks/my-network',
4253
+ * });
4254
+ * console.log(res.data);
4255
+ *
4256
+ * // Example response
4257
+ * // {
4258
+ * // "cloudsqlConfigs": [],
4259
+ * // "consumerExportCustomRoutes": false,
4260
+ * // "consumerExportSubnetRoutesWithPublicIp": false,
4261
+ * // "consumerImportCustomRoutes": false,
4262
+ * // "consumerImportSubnetRoutesWithPublicIp": false,
4263
+ * // "producerExportCustomRoutes": false,
4264
+ * // "producerExportSubnetRoutesWithPublicIp": false,
4265
+ * // "producerImportCustomRoutes": false,
4266
+ * // "producerImportSubnetRoutesWithPublicIp": false,
4267
+ * // "producerNetwork": "my_producerNetwork",
4268
+ * // "reservedRanges": [],
4269
+ * // "usedIpRanges": [],
4270
+ * // "vpcScReferenceArchitectureEnabled": false
4271
+ * // }
4272
+ * }
4273
+ *
4274
+ * main().catch(e => {
4275
+ * console.error(e);
4276
+ * throw e;
4277
+ * });
4278
+ *
4279
+ * ```
2918
4280
  *
2919
4281
  * @param params - Parameters for request
2920
4282
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2929,6 +4291,58 @@ export declare namespace servicenetworking_v1 {
2929
4291
  get(callback: BodyResponseCallback<Schema$ConsumerConfig>): void;
2930
4292
  /**
2931
4293
  * Consumers use this method to find out the state of VPC Service Controls. The controls could be enabled or disabled for a connection.
4294
+ * @example
4295
+ * ```js
4296
+ * // Before running the sample:
4297
+ * // - Enable the API at:
4298
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4299
+ * // - Login into gcloud by running:
4300
+ * // ```sh
4301
+ * // $ gcloud auth application-default login
4302
+ * // ```
4303
+ * // - Install the npm module by running:
4304
+ * // ```sh
4305
+ * // $ npm install googleapis
4306
+ * // ```
4307
+ *
4308
+ * const {google} = require('googleapis');
4309
+ * const servicenetworking = google.servicenetworking('v1');
4310
+ *
4311
+ * async function main() {
4312
+ * const auth = new google.auth.GoogleAuth({
4313
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4314
+ * scopes: [
4315
+ * 'https://www.googleapis.com/auth/cloud-platform',
4316
+ * 'https://www.googleapis.com/auth/service.management',
4317
+ * ],
4318
+ * });
4319
+ *
4320
+ * // Acquire an auth client, and bind it to all future calls
4321
+ * const authClient = await auth.getClient();
4322
+ * google.options({auth: authClient});
4323
+ *
4324
+ * // Do the magic
4325
+ * const res =
4326
+ * await servicenetworking.services.projects.global.networks.getVpcServiceControls(
4327
+ * {
4328
+ * // Required. Name of the VPC Service Controls config to retrieve in the format: `services/{service\}/projects/{project\}/global/networks/{network\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is a project number e.g. `12345` that contains the service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
4329
+ * name: 'services/my-service/projects/my-project/global/networks/my-network',
4330
+ * },
4331
+ * );
4332
+ * console.log(res.data);
4333
+ *
4334
+ * // Example response
4335
+ * // {
4336
+ * // "enabled": false
4337
+ * // }
4338
+ * }
4339
+ *
4340
+ * main().catch(e => {
4341
+ * console.error(e);
4342
+ * throw e;
4343
+ * });
4344
+ *
4345
+ * ```
2932
4346
  *
2933
4347
  * @param params - Parameters for request
2934
4348
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2943,6 +4357,71 @@ export declare namespace servicenetworking_v1 {
2943
4357
  getVpcServiceControls(callback: BodyResponseCallback<Schema$VpcServiceControls>): void;
2944
4358
  /**
2945
4359
  * Service producers use this method to update the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.
4360
+ * @example
4361
+ * ```js
4362
+ * // Before running the sample:
4363
+ * // - Enable the API at:
4364
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4365
+ * // - Login into gcloud by running:
4366
+ * // ```sh
4367
+ * // $ gcloud auth application-default login
4368
+ * // ```
4369
+ * // - Install the npm module by running:
4370
+ * // ```sh
4371
+ * // $ npm install googleapis
4372
+ * // ```
4373
+ *
4374
+ * const {google} = require('googleapis');
4375
+ * const servicenetworking = google.servicenetworking('v1');
4376
+ *
4377
+ * async function main() {
4378
+ * const auth = new google.auth.GoogleAuth({
4379
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4380
+ * scopes: [
4381
+ * 'https://www.googleapis.com/auth/cloud-platform',
4382
+ * 'https://www.googleapis.com/auth/service.management',
4383
+ * ],
4384
+ * });
4385
+ *
4386
+ * // Acquire an auth client, and bind it to all future calls
4387
+ * const authClient = await auth.getClient();
4388
+ * google.options({auth: authClient});
4389
+ *
4390
+ * // Do the magic
4391
+ * const res =
4392
+ * await servicenetworking.services.projects.global.networks.updateConsumerConfig(
4393
+ * {
4394
+ * // Required. Parent resource identifying the connection for which the consumer config is being updated in the format: `services/{service\}/projects/{project\}/global/networks/{network\}` {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network\} is the name of the service consumer's VPC network.
4395
+ * parent:
4396
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4397
+ *
4398
+ * // Request body metadata
4399
+ * requestBody: {
4400
+ * // request body parameters
4401
+ * // {
4402
+ * // "consumerConfig": {}
4403
+ * // }
4404
+ * },
4405
+ * },
4406
+ * );
4407
+ * console.log(res.data);
4408
+ *
4409
+ * // Example response
4410
+ * // {
4411
+ * // "done": false,
4412
+ * // "error": {},
4413
+ * // "metadata": {},
4414
+ * // "name": "my_name",
4415
+ * // "response": {}
4416
+ * // }
4417
+ * }
4418
+ *
4419
+ * main().catch(e => {
4420
+ * console.error(e);
4421
+ * throw e;
4422
+ * });
4423
+ *
4424
+ * ```
2946
4425
  *
2947
4426
  * @param params - Parameters for request
2948
4427
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2987,6 +4466,57 @@ export declare namespace servicenetworking_v1 {
2987
4466
  constructor(context: APIRequestContext);
2988
4467
  /**
2989
4468
  * Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project
4469
+ * @example
4470
+ * ```js
4471
+ * // Before running the sample:
4472
+ * // - Enable the API at:
4473
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4474
+ * // - Login into gcloud by running:
4475
+ * // ```sh
4476
+ * // $ gcloud auth application-default login
4477
+ * // ```
4478
+ * // - Install the npm module by running:
4479
+ * // ```sh
4480
+ * // $ npm install googleapis
4481
+ * // ```
4482
+ *
4483
+ * const {google} = require('googleapis');
4484
+ * const servicenetworking = google.servicenetworking('v1');
4485
+ *
4486
+ * async function main() {
4487
+ * const auth = new google.auth.GoogleAuth({
4488
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4489
+ * scopes: [
4490
+ * 'https://www.googleapis.com/auth/cloud-platform',
4491
+ * 'https://www.googleapis.com/auth/service.management',
4492
+ * ],
4493
+ * });
4494
+ *
4495
+ * // Acquire an auth client, and bind it to all future calls
4496
+ * const authClient = await auth.getClient();
4497
+ * google.options({auth: authClient});
4498
+ *
4499
+ * // Do the magic
4500
+ * const res =
4501
+ * await servicenetworking.services.projects.global.networks.dnsZones.get({
4502
+ * // Required. The network that the consumer is using to connect with services. Must be in the form of services/{service\}/projects/{project\}/global/networks/{network\}/dnsZones/{zoneName\} Where {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this {project\} is the project number, as in '12345' {network\} is the network name. {zoneName\} is the DNS zone name
4503
+ * name: 'services/my-service/projects/my-project/global/networks/my-network/dnsZones/my-dnsZone',
4504
+ * });
4505
+ * console.log(res.data);
4506
+ *
4507
+ * // Example response
4508
+ * // {
4509
+ * // "consumerPeeringZone": {},
4510
+ * // "producerPrivateZone": {}
4511
+ * // }
4512
+ * }
4513
+ *
4514
+ * main().catch(e => {
4515
+ * console.error(e);
4516
+ * throw e;
4517
+ * });
4518
+ *
4519
+ * ```
2990
4520
  *
2991
4521
  * @param params - Parameters for request
2992
4522
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3001,6 +4531,57 @@ export declare namespace servicenetworking_v1 {
3001
4531
  get(callback: BodyResponseCallback<Schema$GetDnsZoneResponse>): void;
3002
4532
  /**
3003
4533
  * * Service producers can use this method to retrieve a list of available DNS zones in the shared producer host project and the matching peering zones in the consumer project. *
4534
+ * @example
4535
+ * ```js
4536
+ * // Before running the sample:
4537
+ * // - Enable the API at:
4538
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4539
+ * // - Login into gcloud by running:
4540
+ * // ```sh
4541
+ * // $ gcloud auth application-default login
4542
+ * // ```
4543
+ * // - Install the npm module by running:
4544
+ * // ```sh
4545
+ * // $ npm install googleapis
4546
+ * // ```
4547
+ *
4548
+ * const {google} = require('googleapis');
4549
+ * const servicenetworking = google.servicenetworking('v1');
4550
+ *
4551
+ * async function main() {
4552
+ * const auth = new google.auth.GoogleAuth({
4553
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4554
+ * scopes: [
4555
+ * 'https://www.googleapis.com/auth/cloud-platform',
4556
+ * 'https://www.googleapis.com/auth/service.management',
4557
+ * ],
4558
+ * });
4559
+ *
4560
+ * // Acquire an auth client, and bind it to all future calls
4561
+ * const authClient = await auth.getClient();
4562
+ * google.options({auth: authClient});
4563
+ *
4564
+ * // Do the magic
4565
+ * const res =
4566
+ * await servicenetworking.services.projects.global.networks.dnsZones.list({
4567
+ * // Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service\}/projects/{project\}/global/networks/{network\} Service: The service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. Projects: the consumer project containing the consumer network. Network: The consumer network accessible from the tenant project.
4568
+ * parent:
4569
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4570
+ * });
4571
+ * console.log(res.data);
4572
+ *
4573
+ * // Example response
4574
+ * // {
4575
+ * // "dnsZonePairs": []
4576
+ * // }
4577
+ * }
4578
+ *
4579
+ * main().catch(e => {
4580
+ * console.error(e);
4581
+ * throw e;
4582
+ * });
4583
+ *
4584
+ * ```
3004
4585
  *
3005
4586
  * @param params - Parameters for request
3006
4587
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3031,6 +4612,72 @@ export declare namespace servicenetworking_v1 {
3031
4612
  constructor(context: APIRequestContext);
3032
4613
  /**
3033
4614
  * Creates a peered DNS domain which sends requests for records in given namespace originating in the service producer VPC network to the consumer VPC network to be resolved.
4615
+ * @example
4616
+ * ```js
4617
+ * // Before running the sample:
4618
+ * // - Enable the API at:
4619
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4620
+ * // - Login into gcloud by running:
4621
+ * // ```sh
4622
+ * // $ gcloud auth application-default login
4623
+ * // ```
4624
+ * // - Install the npm module by running:
4625
+ * // ```sh
4626
+ * // $ npm install googleapis
4627
+ * // ```
4628
+ *
4629
+ * const {google} = require('googleapis');
4630
+ * const servicenetworking = google.servicenetworking('v1');
4631
+ *
4632
+ * async function main() {
4633
+ * const auth = new google.auth.GoogleAuth({
4634
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4635
+ * scopes: [
4636
+ * 'https://www.googleapis.com/auth/cloud-platform',
4637
+ * 'https://www.googleapis.com/auth/service.management',
4638
+ * ],
4639
+ * });
4640
+ *
4641
+ * // Acquire an auth client, and bind it to all future calls
4642
+ * const authClient = await auth.getClient();
4643
+ * google.options({auth: authClient});
4644
+ *
4645
+ * // Do the magic
4646
+ * const res =
4647
+ * await servicenetworking.services.projects.global.networks.peeredDnsDomains.create(
4648
+ * {
4649
+ * // Required. Parent resource identifying the connection for which the peered DNS domain will be created in the format: `services/{service\}/projects/{project\}/global/networks/{network\}` {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network\} is the name of the service consumer's VPC network.
4650
+ * parent:
4651
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4652
+ *
4653
+ * // Request body metadata
4654
+ * requestBody: {
4655
+ * // request body parameters
4656
+ * // {
4657
+ * // "dnsSuffix": "my_dnsSuffix",
4658
+ * // "name": "my_name"
4659
+ * // }
4660
+ * },
4661
+ * },
4662
+ * );
4663
+ * console.log(res.data);
4664
+ *
4665
+ * // Example response
4666
+ * // {
4667
+ * // "done": false,
4668
+ * // "error": {},
4669
+ * // "metadata": {},
4670
+ * // "name": "my_name",
4671
+ * // "response": {}
4672
+ * // }
4673
+ * }
4674
+ *
4675
+ * main().catch(e => {
4676
+ * console.error(e);
4677
+ * throw e;
4678
+ * });
4679
+ *
4680
+ * ```
3034
4681
  *
3035
4682
  * @param params - Parameters for request
3036
4683
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3045,6 +4692,62 @@ export declare namespace servicenetworking_v1 {
3045
4692
  create(callback: BodyResponseCallback<Schema$Operation>): void;
3046
4693
  /**
3047
4694
  * Deletes a peered DNS domain.
4695
+ * @example
4696
+ * ```js
4697
+ * // Before running the sample:
4698
+ * // - Enable the API at:
4699
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4700
+ * // - Login into gcloud by running:
4701
+ * // ```sh
4702
+ * // $ gcloud auth application-default login
4703
+ * // ```
4704
+ * // - Install the npm module by running:
4705
+ * // ```sh
4706
+ * // $ npm install googleapis
4707
+ * // ```
4708
+ *
4709
+ * const {google} = require('googleapis');
4710
+ * const servicenetworking = google.servicenetworking('v1');
4711
+ *
4712
+ * async function main() {
4713
+ * const auth = new google.auth.GoogleAuth({
4714
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4715
+ * scopes: [
4716
+ * 'https://www.googleapis.com/auth/cloud-platform',
4717
+ * 'https://www.googleapis.com/auth/service.management',
4718
+ * ],
4719
+ * });
4720
+ *
4721
+ * // Acquire an auth client, and bind it to all future calls
4722
+ * const authClient = await auth.getClient();
4723
+ * google.options({auth: authClient});
4724
+ *
4725
+ * // Do the magic
4726
+ * const res =
4727
+ * await servicenetworking.services.projects.global.networks.peeredDnsDomains.delete(
4728
+ * {
4729
+ * // Required. The name of the peered DNS domain to delete in the format: `services/{service\}/projects/{project\}/global/networks/{network\}/peeredDnsDomains/{name\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network\} is the name of the service consumer's VPC network. {name\} is the name of the peered DNS domain.
4730
+ * name: 'services/my-service/projects/my-project/global/networks/my-network/peeredDnsDomains/my-peeredDnsDomain',
4731
+ * },
4732
+ * );
4733
+ * console.log(res.data);
4734
+ *
4735
+ * // Example response
4736
+ * // {
4737
+ * // "done": false,
4738
+ * // "error": {},
4739
+ * // "metadata": {},
4740
+ * // "name": "my_name",
4741
+ * // "response": {}
4742
+ * // }
4743
+ * }
4744
+ *
4745
+ * main().catch(e => {
4746
+ * console.error(e);
4747
+ * throw e;
4748
+ * });
4749
+ *
4750
+ * ```
3048
4751
  *
3049
4752
  * @param params - Parameters for request
3050
4753
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3059,6 +4762,59 @@ export declare namespace servicenetworking_v1 {
3059
4762
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
3060
4763
  /**
3061
4764
  * Lists peered DNS domains for a connection.
4765
+ * @example
4766
+ * ```js
4767
+ * // Before running the sample:
4768
+ * // - Enable the API at:
4769
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4770
+ * // - Login into gcloud by running:
4771
+ * // ```sh
4772
+ * // $ gcloud auth application-default login
4773
+ * // ```
4774
+ * // - Install the npm module by running:
4775
+ * // ```sh
4776
+ * // $ npm install googleapis
4777
+ * // ```
4778
+ *
4779
+ * const {google} = require('googleapis');
4780
+ * const servicenetworking = google.servicenetworking('v1');
4781
+ *
4782
+ * async function main() {
4783
+ * const auth = new google.auth.GoogleAuth({
4784
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4785
+ * scopes: [
4786
+ * 'https://www.googleapis.com/auth/cloud-platform',
4787
+ * 'https://www.googleapis.com/auth/service.management',
4788
+ * ],
4789
+ * });
4790
+ *
4791
+ * // Acquire an auth client, and bind it to all future calls
4792
+ * const authClient = await auth.getClient();
4793
+ * google.options({auth: authClient});
4794
+ *
4795
+ * // Do the magic
4796
+ * const res =
4797
+ * await servicenetworking.services.projects.global.networks.peeredDnsDomains.list(
4798
+ * {
4799
+ * // Required. Parent resource identifying the connection which owns this collection of peered DNS domains in the format: `services/{service\}/projects/{project\}/global/networks/{network\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is a project number e.g. `12345` that contains the service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
4800
+ * parent:
4801
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4802
+ * },
4803
+ * );
4804
+ * console.log(res.data);
4805
+ *
4806
+ * // Example response
4807
+ * // {
4808
+ * // "peeredDnsDomains": []
4809
+ * // }
4810
+ * }
4811
+ *
4812
+ * main().catch(e => {
4813
+ * console.error(e);
4814
+ * throw e;
4815
+ * });
4816
+ *
4817
+ * ```
3062
4818
  *
3063
4819
  * @param params - Parameters for request
3064
4820
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3099,6 +4855,68 @@ export declare namespace servicenetworking_v1 {
3099
4855
  constructor(context: APIRequestContext);
3100
4856
  /**
3101
4857
  * Service producers can use this method to add roles in the shared VPC host project. Each role is bound to the provided member. Each role must be selected from within an allowlisted set of roles. Each role is applied at only the granularity specified in the allowlist.
4858
+ * @example
4859
+ * ```js
4860
+ * // Before running the sample:
4861
+ * // - Enable the API at:
4862
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4863
+ * // - Login into gcloud by running:
4864
+ * // ```sh
4865
+ * // $ gcloud auth application-default login
4866
+ * // ```
4867
+ * // - Install the npm module by running:
4868
+ * // ```sh
4869
+ * // $ npm install googleapis
4870
+ * // ```
4871
+ *
4872
+ * const {google} = require('googleapis');
4873
+ * const servicenetworking = google.servicenetworking('v1');
4874
+ *
4875
+ * async function main() {
4876
+ * const auth = new google.auth.GoogleAuth({
4877
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4878
+ * scopes: [
4879
+ * 'https://www.googleapis.com/auth/cloud-platform',
4880
+ * 'https://www.googleapis.com/auth/service.management',
4881
+ * ],
4882
+ * });
4883
+ *
4884
+ * // Acquire an auth client, and bind it to all future calls
4885
+ * const authClient = await auth.getClient();
4886
+ * google.options({auth: authClient});
4887
+ *
4888
+ * // Do the magic
4889
+ * const res = await servicenetworking.services.roles.add({
4890
+ * // Required. This is in a form services/{service\} where {service\} is the name of the private access management service. For example 'service-peering.example.com'.
4891
+ * parent: 'services/my-service',
4892
+ *
4893
+ * // Request body metadata
4894
+ * requestBody: {
4895
+ * // request body parameters
4896
+ * // {
4897
+ * // "consumerNetwork": "my_consumerNetwork",
4898
+ * // "policyBinding": []
4899
+ * // }
4900
+ * },
4901
+ * });
4902
+ * console.log(res.data);
4903
+ *
4904
+ * // Example response
4905
+ * // {
4906
+ * // "done": false,
4907
+ * // "error": {},
4908
+ * // "metadata": {},
4909
+ * // "name": "my_name",
4910
+ * // "response": {}
4911
+ * // }
4912
+ * }
4913
+ *
4914
+ * main().catch(e => {
4915
+ * console.error(e);
4916
+ * throw e;
4917
+ * });
4918
+ *
4919
+ * ```
3102
4920
  *
3103
4921
  * @param params - Parameters for request
3104
4922
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.