@googleapis/servicenetworking 21.7.0 → 23.1.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
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
3
  import { Readable } from 'stream';
4
4
  export declare namespace servicenetworking_v1 {
5
5
  export interface Options extends GlobalOptions {
@@ -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
  /**
@@ -283,7 +283,7 @@ export declare namespace servicenetworking_v1 {
283
283
  */
284
284
  kind?: string | null;
285
285
  /**
286
- * Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `apiserving/configaspects/proto`.
286
+ * Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `google/api/configaspects/proto`.
287
287
  */
288
288
  spec?: {
289
289
  [key: string]: any;
@@ -422,6 +422,73 @@ export declare namespace servicenetworking_v1 {
422
422
  */
423
423
  selector?: string | null;
424
424
  }
425
+ /**
426
+ * `BatchingConfigProto` defines the batching configuration for an API method.
427
+ */
428
+ export interface Schema$BatchingConfigProto {
429
+ /**
430
+ * The request and response fields used in batching.
431
+ */
432
+ batchDescriptor?: Schema$BatchingDescriptorProto;
433
+ /**
434
+ * The thresholds which trigger a batched request to be sent.
435
+ */
436
+ thresholds?: Schema$BatchingSettingsProto;
437
+ }
438
+ /**
439
+ * `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.
440
+ */
441
+ export interface Schema$BatchingDescriptorProto {
442
+ /**
443
+ * The repeated field in the request message to be aggregated by batching.
444
+ */
445
+ batchedField?: string | null;
446
+ /**
447
+ * 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.
448
+ */
449
+ discriminatorFields?: string[] | null;
450
+ /**
451
+ * 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.
452
+ */
453
+ subresponseField?: string | null;
454
+ }
455
+ /**
456
+ * `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.
457
+ */
458
+ export interface Schema$BatchingSettingsProto {
459
+ /**
460
+ * The duration after which a batch should be sent, starting from the addition of the first message to that batch.
461
+ */
462
+ delayThreshold?: string | null;
463
+ /**
464
+ * The maximum number of elements collected in a batch that could be accepted by server.
465
+ */
466
+ elementCountLimit?: number | null;
467
+ /**
468
+ * The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.
469
+ */
470
+ elementCountThreshold?: number | null;
471
+ /**
472
+ * The maximum size of data allowed by flow control.
473
+ */
474
+ flowControlByteLimit?: number | null;
475
+ /**
476
+ * The maximum number of elements allowed by flow control.
477
+ */
478
+ flowControlElementLimit?: number | null;
479
+ /**
480
+ * The behavior to take when the flow control limit is exceeded.
481
+ */
482
+ flowControlLimitExceededBehavior?: string | null;
483
+ /**
484
+ * The maximum size of the request that could be accepted by server.
485
+ */
486
+ requestByteLimit?: number | null;
487
+ /**
488
+ * 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.
489
+ */
490
+ requestByteThreshold?: string | null;
491
+ }
425
492
  /**
426
493
  * 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
494
  */
@@ -449,6 +516,11 @@ export declare namespace servicenetworking_v1 {
449
516
  */
450
517
  export interface Schema$CancelOperationRequest {
451
518
  }
519
+ /**
520
+ * Metadata provided through GetOperation request for the LRO generated by Cleanup Connection API
521
+ */
522
+ export interface Schema$CleanupConnectionMetadata {
523
+ }
452
524
  /**
453
525
  * Details about how and where to publish client libraries.
454
526
  */
@@ -503,15 +575,15 @@ export declare namespace servicenetworking_v1 {
503
575
  */
504
576
  export interface Schema$CloudSQLConfig {
505
577
  /**
506
- * Peering service used for peering with the Cloud SQL project.
578
+ * Required. Peering service used for peering with the Cloud SQL project.
507
579
  */
508
580
  service?: string | null;
509
581
  /**
510
- * The name of the umbrella network in the Cloud SQL umbrella project.
582
+ * Required. The name of the umbrella network in the Cloud SQL umbrella project.
511
583
  */
512
584
  umbrellaNetwork?: string | null;
513
585
  /**
514
- * The project number of the Cloud SQL umbrella project.
586
+ * Required. The project number of the Cloud SQL umbrella project.
515
587
  */
516
588
  umbrellaProject?: string | null;
517
589
  }
@@ -537,7 +609,7 @@ export declare namespace servicenetworking_v1 {
537
609
  */
538
610
  export interface Schema$Connection {
539
611
  /**
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.
612
+ * 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
613
  */
542
614
  network?: string | null;
543
615
  /**
@@ -1418,6 +1490,10 @@ export declare namespace servicenetworking_v1 {
1418
1490
  * 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
1491
  */
1420
1492
  autoPopulatedFields?: string[] | null;
1493
+ /**
1494
+ * 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
1495
+ */
1496
+ batching?: Schema$BatchingConfigProto;
1421
1497
  /**
1422
1498
  * 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
1499
  */
@@ -1673,7 +1749,7 @@ export declare namespace servicenetworking_v1 {
1673
1749
  */
1674
1750
  dnsSuffix?: string | null;
1675
1751
  /**
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.
1752
+ * 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
1753
  */
1678
1754
  name?: string | null;
1679
1755
  }
@@ -1690,6 +1766,10 @@ export declare namespace servicenetworking_v1 {
1690
1766
  * Some settings.
1691
1767
  */
1692
1768
  common?: Schema$CommonLanguageSettings;
1769
+ /**
1770
+ * 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
1771
+ */
1772
+ libraryPackage?: string | null;
1693
1773
  }
1694
1774
  /**
1695
1775
  * Grouping of IAM role and IAM member.
@@ -1949,7 +2029,7 @@ export declare namespace servicenetworking_v1 {
1949
2029
  */
1950
2030
  ipPrefixLength?: number | null;
1951
2031
  /**
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.
2032
+ * 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
2033
  */
1954
2034
  network?: string | null;
1955
2035
  }
@@ -2374,56 +2454,265 @@ export declare namespace servicenetworking_v1 {
2374
2454
  constructor(context: APIRequestContext);
2375
2455
  /**
2376
2456
  * 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`.
2457
+ * @example
2458
+ * ```js
2459
+ * // Before running the sample:
2460
+ * // - Enable the API at:
2461
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2462
+ * // - Login into gcloud by running:
2463
+ * // ```sh
2464
+ * // $ gcloud auth application-default login
2465
+ * // ```
2466
+ * // - Install the npm module by running:
2467
+ * // ```sh
2468
+ * // $ npm install googleapis
2469
+ * // ```
2470
+ *
2471
+ * const {google} = require('googleapis');
2472
+ * const servicenetworking = google.servicenetworking('v1');
2473
+ *
2474
+ * async function main() {
2475
+ * const auth = new google.auth.GoogleAuth({
2476
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2477
+ * scopes: [
2478
+ * 'https://www.googleapis.com/auth/cloud-platform',
2479
+ * 'https://www.googleapis.com/auth/service.management',
2480
+ * ],
2481
+ * });
2482
+ *
2483
+ * // Acquire an auth client, and bind it to all future calls
2484
+ * const authClient = await auth.getClient();
2485
+ * google.options({auth: authClient});
2486
+ *
2487
+ * // Do the magic
2488
+ * const res = await servicenetworking.operations.cancel({
2489
+ * // The name of the operation resource to be cancelled.
2490
+ * name: 'operations/.*',
2491
+ *
2492
+ * // Request body metadata
2493
+ * requestBody: {
2494
+ * // request body parameters
2495
+ * // {}
2496
+ * },
2497
+ * });
2498
+ * console.log(res.data);
2499
+ *
2500
+ * // Example response
2501
+ * // {}
2502
+ * }
2503
+ *
2504
+ * main().catch(e => {
2505
+ * console.error(e);
2506
+ * throw e;
2507
+ * });
2508
+ *
2509
+ * ```
2377
2510
  *
2378
2511
  * @param params - Parameters for request
2379
2512
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2380
2513
  * @param callback - Optional callback that handles the response.
2381
2514
  * @returns A promise if used with async/await, or void if used with a callback.
2382
2515
  */
2383
- cancel(params: Params$Resource$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
2384
- cancel(params?: Params$Resource$Operations$Cancel, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
2516
+ cancel(params: Params$Resource$Operations$Cancel, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2517
+ cancel(params?: Params$Resource$Operations$Cancel, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2385
2518
  cancel(params: Params$Resource$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2386
2519
  cancel(params: Params$Resource$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
2387
2520
  cancel(params: Params$Resource$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
2388
2521
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
2389
2522
  /**
2390
2523
  * 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`.
2524
+ * @example
2525
+ * ```js
2526
+ * // Before running the sample:
2527
+ * // - Enable the API at:
2528
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2529
+ * // - Login into gcloud by running:
2530
+ * // ```sh
2531
+ * // $ gcloud auth application-default login
2532
+ * // ```
2533
+ * // - Install the npm module by running:
2534
+ * // ```sh
2535
+ * // $ npm install googleapis
2536
+ * // ```
2537
+ *
2538
+ * const {google} = require('googleapis');
2539
+ * const servicenetworking = google.servicenetworking('v1');
2540
+ *
2541
+ * async function main() {
2542
+ * const auth = new google.auth.GoogleAuth({
2543
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2544
+ * scopes: [
2545
+ * 'https://www.googleapis.com/auth/cloud-platform',
2546
+ * 'https://www.googleapis.com/auth/service.management',
2547
+ * ],
2548
+ * });
2549
+ *
2550
+ * // Acquire an auth client, and bind it to all future calls
2551
+ * const authClient = await auth.getClient();
2552
+ * google.options({auth: authClient});
2553
+ *
2554
+ * // Do the magic
2555
+ * const res = await servicenetworking.operations.delete({
2556
+ * // The name of the operation resource to be deleted.
2557
+ * name: 'operations/.*',
2558
+ * });
2559
+ * console.log(res.data);
2560
+ *
2561
+ * // Example response
2562
+ * // {}
2563
+ * }
2564
+ *
2565
+ * main().catch(e => {
2566
+ * console.error(e);
2567
+ * throw e;
2568
+ * });
2569
+ *
2570
+ * ```
2391
2571
  *
2392
2572
  * @param params - Parameters for request
2393
2573
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2394
2574
  * @param callback - Optional callback that handles the response.
2395
2575
  * @returns A promise if used with async/await, or void if used with a callback.
2396
2576
  */
2397
- delete(params: Params$Resource$Operations$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
2398
- delete(params?: Params$Resource$Operations$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
2577
+ delete(params: Params$Resource$Operations$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2578
+ delete(params?: Params$Resource$Operations$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2399
2579
  delete(params: Params$Resource$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2400
2580
  delete(params: Params$Resource$Operations$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
2401
2581
  delete(params: Params$Resource$Operations$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
2402
2582
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
2403
2583
  /**
2404
2584
  * 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.
2585
+ * @example
2586
+ * ```js
2587
+ * // Before running the sample:
2588
+ * // - Enable the API at:
2589
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2590
+ * // - Login into gcloud by running:
2591
+ * // ```sh
2592
+ * // $ gcloud auth application-default login
2593
+ * // ```
2594
+ * // - Install the npm module by running:
2595
+ * // ```sh
2596
+ * // $ npm install googleapis
2597
+ * // ```
2598
+ *
2599
+ * const {google} = require('googleapis');
2600
+ * const servicenetworking = google.servicenetworking('v1');
2601
+ *
2602
+ * async function main() {
2603
+ * const auth = new google.auth.GoogleAuth({
2604
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2605
+ * scopes: [
2606
+ * 'https://www.googleapis.com/auth/cloud-platform',
2607
+ * 'https://www.googleapis.com/auth/service.management',
2608
+ * ],
2609
+ * });
2610
+ *
2611
+ * // Acquire an auth client, and bind it to all future calls
2612
+ * const authClient = await auth.getClient();
2613
+ * google.options({auth: authClient});
2614
+ *
2615
+ * // Do the magic
2616
+ * const res = await servicenetworking.operations.get({
2617
+ * // The name of the operation resource.
2618
+ * name: 'operations/my-operation',
2619
+ * });
2620
+ * console.log(res.data);
2621
+ *
2622
+ * // Example response
2623
+ * // {
2624
+ * // "done": false,
2625
+ * // "error": {},
2626
+ * // "metadata": {},
2627
+ * // "name": "my_name",
2628
+ * // "response": {}
2629
+ * // }
2630
+ * }
2631
+ *
2632
+ * main().catch(e => {
2633
+ * console.error(e);
2634
+ * throw e;
2635
+ * });
2636
+ *
2637
+ * ```
2405
2638
  *
2406
2639
  * @param params - Parameters for request
2407
2640
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2408
2641
  * @param callback - Optional callback that handles the response.
2409
2642
  * @returns A promise if used with async/await, or void if used with a callback.
2410
2643
  */
2411
- get(params: Params$Resource$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
2412
- get(params?: Params$Resource$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
2644
+ get(params: Params$Resource$Operations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2645
+ get(params?: Params$Resource$Operations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2413
2646
  get(params: Params$Resource$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2414
2647
  get(params: Params$Resource$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2415
2648
  get(params: Params$Resource$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
2416
2649
  get(callback: BodyResponseCallback<Schema$Operation>): void;
2417
2650
  /**
2418
2651
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2652
+ * @example
2653
+ * ```js
2654
+ * // Before running the sample:
2655
+ * // - Enable the API at:
2656
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2657
+ * // - Login into gcloud by running:
2658
+ * // ```sh
2659
+ * // $ gcloud auth application-default login
2660
+ * // ```
2661
+ * // - Install the npm module by running:
2662
+ * // ```sh
2663
+ * // $ npm install googleapis
2664
+ * // ```
2665
+ *
2666
+ * const {google} = require('googleapis');
2667
+ * const servicenetworking = google.servicenetworking('v1');
2668
+ *
2669
+ * async function main() {
2670
+ * const auth = new google.auth.GoogleAuth({
2671
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2672
+ * scopes: [
2673
+ * 'https://www.googleapis.com/auth/cloud-platform',
2674
+ * 'https://www.googleapis.com/auth/service.management',
2675
+ * ],
2676
+ * });
2677
+ *
2678
+ * // Acquire an auth client, and bind it to all future calls
2679
+ * const authClient = await auth.getClient();
2680
+ * google.options({auth: authClient});
2681
+ *
2682
+ * // Do the magic
2683
+ * const res = await servicenetworking.operations.list({
2684
+ * // The standard list filter.
2685
+ * filter: 'placeholder-value',
2686
+ * // The name of the operation's parent resource.
2687
+ * name: 'operations',
2688
+ * // The standard list page size.
2689
+ * pageSize: 'placeholder-value',
2690
+ * // The standard list page token.
2691
+ * pageToken: 'placeholder-value',
2692
+ * });
2693
+ * console.log(res.data);
2694
+ *
2695
+ * // Example response
2696
+ * // {
2697
+ * // "nextPageToken": "my_nextPageToken",
2698
+ * // "operations": []
2699
+ * // }
2700
+ * }
2701
+ *
2702
+ * main().catch(e => {
2703
+ * console.error(e);
2704
+ * throw e;
2705
+ * });
2706
+ *
2707
+ * ```
2419
2708
  *
2420
2709
  * @param params - Parameters for request
2421
2710
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2422
2711
  * @param callback - Optional callback that handles the response.
2423
2712
  * @returns A promise if used with async/await, or void if used with a callback.
2424
2713
  */
2425
- list(params: Params$Resource$Operations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2426
- list(params?: Params$Resource$Operations$List, options?: MethodOptions): GaxiosPromise<Schema$ListOperationsResponse>;
2714
+ list(params: Params$Resource$Operations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2715
+ list(params?: Params$Resource$Operations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
2427
2716
  list(params: Params$Resource$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2428
2717
  list(params: Params$Resource$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
2429
2718
  list(params: Params$Resource$Operations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
@@ -2479,70 +2768,397 @@ export declare namespace servicenetworking_v1 {
2479
2768
  constructor(context: APIRequestContext);
2480
2769
  /**
2481
2770
  * 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.
2771
+ * @example
2772
+ * ```js
2773
+ * // Before running the sample:
2774
+ * // - Enable the API at:
2775
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2776
+ * // - Login into gcloud by running:
2777
+ * // ```sh
2778
+ * // $ gcloud auth application-default login
2779
+ * // ```
2780
+ * // - Install the npm module by running:
2781
+ * // ```sh
2782
+ * // $ npm install googleapis
2783
+ * // ```
2784
+ *
2785
+ * const {google} = require('googleapis');
2786
+ * const servicenetworking = google.servicenetworking('v1');
2787
+ *
2788
+ * async function main() {
2789
+ * const auth = new google.auth.GoogleAuth({
2790
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2791
+ * scopes: [
2792
+ * 'https://www.googleapis.com/auth/cloud-platform',
2793
+ * 'https://www.googleapis.com/auth/service.management',
2794
+ * ],
2795
+ * });
2796
+ *
2797
+ * // Acquire an auth client, and bind it to all future calls
2798
+ * const authClient = await auth.getClient();
2799
+ * google.options({auth: authClient});
2800
+ *
2801
+ * // Do the magic
2802
+ * const res = await servicenetworking.services.addSubnetwork({
2803
+ * // 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.
2804
+ * parent: 'services/my-service/[^/]+/[^/]+',
2805
+ *
2806
+ * // Request body metadata
2807
+ * requestBody: {
2808
+ * // request body parameters
2809
+ * // {
2810
+ * // "allowSubnetCidrRoutesOverlap": false,
2811
+ * // "checkServiceNetworkingUsePermission": false,
2812
+ * // "computeIdempotencyWindow": "my_computeIdempotencyWindow",
2813
+ * // "consumer": "my_consumer",
2814
+ * // "consumerNetwork": "my_consumerNetwork",
2815
+ * // "description": "my_description",
2816
+ * // "internalRange": "my_internalRange",
2817
+ * // "ipPrefixLength": 0,
2818
+ * // "outsideAllocationPublicIpRange": "my_outsideAllocationPublicIpRange",
2819
+ * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
2820
+ * // "purpose": "my_purpose",
2821
+ * // "region": "my_region",
2822
+ * // "requestedAddress": "my_requestedAddress",
2823
+ * // "requestedRanges": [],
2824
+ * // "role": "my_role",
2825
+ * // "secondaryIpRangeSpecs": [],
2826
+ * // "skipRequestedAddressValidation": false,
2827
+ * // "subnetwork": "my_subnetwork",
2828
+ * // "subnetworkUsers": [],
2829
+ * // "useCustomComputeIdempotencyWindow": false
2830
+ * // }
2831
+ * },
2832
+ * });
2833
+ * console.log(res.data);
2834
+ *
2835
+ * // Example response
2836
+ * // {
2837
+ * // "done": false,
2838
+ * // "error": {},
2839
+ * // "metadata": {},
2840
+ * // "name": "my_name",
2841
+ * // "response": {}
2842
+ * // }
2843
+ * }
2844
+ *
2845
+ * main().catch(e => {
2846
+ * console.error(e);
2847
+ * throw e;
2848
+ * });
2849
+ *
2850
+ * ```
2482
2851
  *
2483
2852
  * @param params - Parameters for request
2484
2853
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2485
2854
  * @param callback - Optional callback that handles the response.
2486
2855
  * @returns A promise if used with async/await, or void if used with a callback.
2487
2856
  */
2488
- addSubnetwork(params: Params$Resource$Services$Addsubnetwork, options: StreamMethodOptions): GaxiosPromise<Readable>;
2489
- addSubnetwork(params?: Params$Resource$Services$Addsubnetwork, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
2857
+ addSubnetwork(params: Params$Resource$Services$Addsubnetwork, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2858
+ addSubnetwork(params?: Params$Resource$Services$Addsubnetwork, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2490
2859
  addSubnetwork(params: Params$Resource$Services$Addsubnetwork, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2491
2860
  addSubnetwork(params: Params$Resource$Services$Addsubnetwork, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2492
2861
  addSubnetwork(params: Params$Resource$Services$Addsubnetwork, callback: BodyResponseCallback<Schema$Operation>): void;
2493
2862
  addSubnetwork(callback: BodyResponseCallback<Schema$Operation>): void;
2494
2863
  /**
2495
2864
  * Disables VPC service controls for a connection.
2865
+ * @example
2866
+ * ```js
2867
+ * // Before running the sample:
2868
+ * // - Enable the API at:
2869
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2870
+ * // - Login into gcloud by running:
2871
+ * // ```sh
2872
+ * // $ gcloud auth application-default login
2873
+ * // ```
2874
+ * // - Install the npm module by running:
2875
+ * // ```sh
2876
+ * // $ npm install googleapis
2877
+ * // ```
2878
+ *
2879
+ * const {google} = require('googleapis');
2880
+ * const servicenetworking = google.servicenetworking('v1');
2881
+ *
2882
+ * async function main() {
2883
+ * const auth = new google.auth.GoogleAuth({
2884
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2885
+ * scopes: [
2886
+ * 'https://www.googleapis.com/auth/cloud-platform',
2887
+ * 'https://www.googleapis.com/auth/service.management',
2888
+ * ],
2889
+ * });
2890
+ *
2891
+ * // Acquire an auth client, and bind it to all future calls
2892
+ * const authClient = await auth.getClient();
2893
+ * google.options({auth: authClient});
2894
+ *
2895
+ * // Do the magic
2896
+ * const res = await servicenetworking.services.disableVpcServiceControls({
2897
+ * // 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`.
2898
+ * parent: 'services/my-service',
2899
+ *
2900
+ * // Request body metadata
2901
+ * requestBody: {
2902
+ * // request body parameters
2903
+ * // {
2904
+ * // "consumerNetwork": "my_consumerNetwork"
2905
+ * // }
2906
+ * },
2907
+ * });
2908
+ * console.log(res.data);
2909
+ *
2910
+ * // Example response
2911
+ * // {
2912
+ * // "done": false,
2913
+ * // "error": {},
2914
+ * // "metadata": {},
2915
+ * // "name": "my_name",
2916
+ * // "response": {}
2917
+ * // }
2918
+ * }
2919
+ *
2920
+ * main().catch(e => {
2921
+ * console.error(e);
2922
+ * throw e;
2923
+ * });
2924
+ *
2925
+ * ```
2496
2926
  *
2497
2927
  * @param params - Parameters for request
2498
2928
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2499
2929
  * @param callback - Optional callback that handles the response.
2500
2930
  * @returns A promise if used with async/await, or void if used with a callback.
2501
2931
  */
2502
- disableVpcServiceControls(params: Params$Resource$Services$Disablevpcservicecontrols, options: StreamMethodOptions): GaxiosPromise<Readable>;
2503
- disableVpcServiceControls(params?: Params$Resource$Services$Disablevpcservicecontrols, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
2932
+ disableVpcServiceControls(params: Params$Resource$Services$Disablevpcservicecontrols, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2933
+ disableVpcServiceControls(params?: Params$Resource$Services$Disablevpcservicecontrols, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2504
2934
  disableVpcServiceControls(params: Params$Resource$Services$Disablevpcservicecontrols, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2505
2935
  disableVpcServiceControls(params: Params$Resource$Services$Disablevpcservicecontrols, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2506
2936
  disableVpcServiceControls(params: Params$Resource$Services$Disablevpcservicecontrols, callback: BodyResponseCallback<Schema$Operation>): void;
2507
2937
  disableVpcServiceControls(callback: BodyResponseCallback<Schema$Operation>): void;
2508
2938
  /**
2509
2939
  * Enables VPC service controls for a connection.
2940
+ * @example
2941
+ * ```js
2942
+ * // Before running the sample:
2943
+ * // - Enable the API at:
2944
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2945
+ * // - Login into gcloud by running:
2946
+ * // ```sh
2947
+ * // $ gcloud auth application-default login
2948
+ * // ```
2949
+ * // - Install the npm module by running:
2950
+ * // ```sh
2951
+ * // $ npm install googleapis
2952
+ * // ```
2953
+ *
2954
+ * const {google} = require('googleapis');
2955
+ * const servicenetworking = google.servicenetworking('v1');
2956
+ *
2957
+ * async function main() {
2958
+ * const auth = new google.auth.GoogleAuth({
2959
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2960
+ * scopes: [
2961
+ * 'https://www.googleapis.com/auth/cloud-platform',
2962
+ * 'https://www.googleapis.com/auth/service.management',
2963
+ * ],
2964
+ * });
2965
+ *
2966
+ * // Acquire an auth client, and bind it to all future calls
2967
+ * const authClient = await auth.getClient();
2968
+ * google.options({auth: authClient});
2969
+ *
2970
+ * // Do the magic
2971
+ * const res = await servicenetworking.services.enableVpcServiceControls({
2972
+ * // 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`.
2973
+ * parent: 'services/my-service',
2974
+ *
2975
+ * // Request body metadata
2976
+ * requestBody: {
2977
+ * // request body parameters
2978
+ * // {
2979
+ * // "consumerNetwork": "my_consumerNetwork"
2980
+ * // }
2981
+ * },
2982
+ * });
2983
+ * console.log(res.data);
2984
+ *
2985
+ * // Example response
2986
+ * // {
2987
+ * // "done": false,
2988
+ * // "error": {},
2989
+ * // "metadata": {},
2990
+ * // "name": "my_name",
2991
+ * // "response": {}
2992
+ * // }
2993
+ * }
2994
+ *
2995
+ * main().catch(e => {
2996
+ * console.error(e);
2997
+ * throw e;
2998
+ * });
2999
+ *
3000
+ * ```
2510
3001
  *
2511
3002
  * @param params - Parameters for request
2512
3003
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2513
3004
  * @param callback - Optional callback that handles the response.
2514
3005
  * @returns A promise if used with async/await, or void if used with a callback.
2515
3006
  */
2516
- enableVpcServiceControls(params: Params$Resource$Services$Enablevpcservicecontrols, options: StreamMethodOptions): GaxiosPromise<Readable>;
2517
- enableVpcServiceControls(params?: Params$Resource$Services$Enablevpcservicecontrols, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3007
+ enableVpcServiceControls(params: Params$Resource$Services$Enablevpcservicecontrols, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3008
+ enableVpcServiceControls(params?: Params$Resource$Services$Enablevpcservicecontrols, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2518
3009
  enableVpcServiceControls(params: Params$Resource$Services$Enablevpcservicecontrols, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2519
3010
  enableVpcServiceControls(params: Params$Resource$Services$Enablevpcservicecontrols, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2520
3011
  enableVpcServiceControls(params: Params$Resource$Services$Enablevpcservicecontrols, callback: BodyResponseCallback<Schema$Operation>): void;
2521
3012
  enableVpcServiceControls(callback: BodyResponseCallback<Schema$Operation>): void;
2522
3013
  /**
2523
3014
  * 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).
3015
+ * @example
3016
+ * ```js
3017
+ * // Before running the sample:
3018
+ * // - Enable the API at:
3019
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3020
+ * // - Login into gcloud by running:
3021
+ * // ```sh
3022
+ * // $ gcloud auth application-default login
3023
+ * // ```
3024
+ * // - Install the npm module by running:
3025
+ * // ```sh
3026
+ * // $ npm install googleapis
3027
+ * // ```
3028
+ *
3029
+ * const {google} = require('googleapis');
3030
+ * const servicenetworking = google.servicenetworking('v1');
3031
+ *
3032
+ * async function main() {
3033
+ * const auth = new google.auth.GoogleAuth({
3034
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3035
+ * scopes: [
3036
+ * 'https://www.googleapis.com/auth/cloud-platform',
3037
+ * 'https://www.googleapis.com/auth/service.management',
3038
+ * ],
3039
+ * });
3040
+ *
3041
+ * // Acquire an auth client, and bind it to all future calls
3042
+ * const authClient = await auth.getClient();
3043
+ * google.options({auth: authClient});
3044
+ *
3045
+ * // Do the magic
3046
+ * const res = await servicenetworking.services.searchRange({
3047
+ * // Required. This is in a form services/{service\}. {service\} the name of the private access management service, for example 'service-peering.example.com'.
3048
+ * parent: 'services/my-service',
3049
+ *
3050
+ * // Request body metadata
3051
+ * requestBody: {
3052
+ * // request body parameters
3053
+ * // {
3054
+ * // "ipPrefixLength": 0,
3055
+ * // "network": "my_network"
3056
+ * // }
3057
+ * },
3058
+ * });
3059
+ * console.log(res.data);
3060
+ *
3061
+ * // Example response
3062
+ * // {
3063
+ * // "done": false,
3064
+ * // "error": {},
3065
+ * // "metadata": {},
3066
+ * // "name": "my_name",
3067
+ * // "response": {}
3068
+ * // }
3069
+ * }
3070
+ *
3071
+ * main().catch(e => {
3072
+ * console.error(e);
3073
+ * throw e;
3074
+ * });
3075
+ *
3076
+ * ```
2524
3077
  *
2525
3078
  * @param params - Parameters for request
2526
3079
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2527
3080
  * @param callback - Optional callback that handles the response.
2528
3081
  * @returns A promise if used with async/await, or void if used with a callback.
2529
3082
  */
2530
- searchRange(params: Params$Resource$Services$Searchrange, options: StreamMethodOptions): GaxiosPromise<Readable>;
2531
- searchRange(params?: Params$Resource$Services$Searchrange, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3083
+ searchRange(params: Params$Resource$Services$Searchrange, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3084
+ searchRange(params?: Params$Resource$Services$Searchrange, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2532
3085
  searchRange(params: Params$Resource$Services$Searchrange, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2533
3086
  searchRange(params: Params$Resource$Services$Searchrange, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2534
3087
  searchRange(params: Params$Resource$Services$Searchrange, callback: BodyResponseCallback<Schema$Operation>): void;
2535
3088
  searchRange(callback: BodyResponseCallback<Schema$Operation>): void;
2536
3089
  /**
2537
3090
  * 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.
3091
+ * @example
3092
+ * ```js
3093
+ * // Before running the sample:
3094
+ * // - Enable the API at:
3095
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3096
+ * // - Login into gcloud by running:
3097
+ * // ```sh
3098
+ * // $ gcloud auth application-default login
3099
+ * // ```
3100
+ * // - Install the npm module by running:
3101
+ * // ```sh
3102
+ * // $ npm install googleapis
3103
+ * // ```
3104
+ *
3105
+ * const {google} = require('googleapis');
3106
+ * const servicenetworking = google.servicenetworking('v1');
3107
+ *
3108
+ * async function main() {
3109
+ * const auth = new google.auth.GoogleAuth({
3110
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3111
+ * scopes: [
3112
+ * 'https://www.googleapis.com/auth/cloud-platform',
3113
+ * 'https://www.googleapis.com/auth/service.management',
3114
+ * ],
3115
+ * });
3116
+ *
3117
+ * // Acquire an auth client, and bind it to all future calls
3118
+ * const authClient = await auth.getClient();
3119
+ * google.options({auth: authClient});
3120
+ *
3121
+ * // Do the magic
3122
+ * const res = await servicenetworking.services.validate({
3123
+ * // 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'.
3124
+ * parent: 'services/my-service',
3125
+ *
3126
+ * // Request body metadata
3127
+ * requestBody: {
3128
+ * // request body parameters
3129
+ * // {
3130
+ * // "checkServiceNetworkingUsePermission": false,
3131
+ * // "consumerNetwork": "my_consumerNetwork",
3132
+ * // "consumerProject": {},
3133
+ * // "rangeReservation": {},
3134
+ * // "validateNetwork": false
3135
+ * // }
3136
+ * },
3137
+ * });
3138
+ * console.log(res.data);
3139
+ *
3140
+ * // Example response
3141
+ * // {
3142
+ * // "existingSubnetworkCandidates": [],
3143
+ * // "isValid": false,
3144
+ * // "validationError": "my_validationError"
3145
+ * // }
3146
+ * }
3147
+ *
3148
+ * main().catch(e => {
3149
+ * console.error(e);
3150
+ * throw e;
3151
+ * });
3152
+ *
3153
+ * ```
2538
3154
  *
2539
3155
  * @param params - Parameters for request
2540
3156
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2541
3157
  * @param callback - Optional callback that handles the response.
2542
3158
  * @returns A promise if used with async/await, or void if used with a callback.
2543
3159
  */
2544
- validate(params: Params$Resource$Services$Validate, options: StreamMethodOptions): GaxiosPromise<Readable>;
2545
- validate(params?: Params$Resource$Services$Validate, options?: MethodOptions): GaxiosPromise<Schema$ValidateConsumerConfigResponse>;
3160
+ validate(params: Params$Resource$Services$Validate, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3161
+ validate(params?: Params$Resource$Services$Validate, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ValidateConsumerConfigResponse>>;
2546
3162
  validate(params: Params$Resource$Services$Validate, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2547
3163
  validate(params: Params$Resource$Services$Validate, options: MethodOptions | BodyResponseCallback<Schema$ValidateConsumerConfigResponse>, callback: BodyResponseCallback<Schema$ValidateConsumerConfigResponse>): void;
2548
3164
  validate(params: Params$Resource$Services$Validate, callback: BodyResponseCallback<Schema$ValidateConsumerConfigResponse>): void;
@@ -2560,7 +3176,7 @@ export declare namespace servicenetworking_v1 {
2560
3176
  }
2561
3177
  export interface Params$Resource$Services$Disablevpcservicecontrols extends StandardParameters {
2562
3178
  /**
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`.
3179
+ * 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
3180
  */
2565
3181
  parent?: string;
2566
3182
  /**
@@ -2570,7 +3186,7 @@ export declare namespace servicenetworking_v1 {
2570
3186
  }
2571
3187
  export interface Params$Resource$Services$Enablevpcservicecontrols extends StandardParameters {
2572
3188
  /**
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`.
3189
+ * 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
3190
  */
2575
3191
  parent?: string;
2576
3192
  /**
@@ -2603,56 +3219,300 @@ export declare namespace servicenetworking_v1 {
2603
3219
  constructor(context: APIRequestContext);
2604
3220
  /**
2605
3221
  * 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.
3222
+ * @example
3223
+ * ```js
3224
+ * // Before running the sample:
3225
+ * // - Enable the API at:
3226
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3227
+ * // - Login into gcloud by running:
3228
+ * // ```sh
3229
+ * // $ gcloud auth application-default login
3230
+ * // ```
3231
+ * // - Install the npm module by running:
3232
+ * // ```sh
3233
+ * // $ npm install googleapis
3234
+ * // ```
3235
+ *
3236
+ * const {google} = require('googleapis');
3237
+ * const servicenetworking = google.servicenetworking('v1');
3238
+ *
3239
+ * async function main() {
3240
+ * const auth = new google.auth.GoogleAuth({
3241
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3242
+ * scopes: [
3243
+ * 'https://www.googleapis.com/auth/cloud-platform',
3244
+ * 'https://www.googleapis.com/auth/service.management',
3245
+ * ],
3246
+ * });
3247
+ *
3248
+ * // Acquire an auth client, and bind it to all future calls
3249
+ * const authClient = await auth.getClient();
3250
+ * google.options({auth: authClient});
3251
+ *
3252
+ * // Do the magic
3253
+ * const res = await servicenetworking.services.connections.create({
3254
+ * // 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`.
3255
+ * parent: 'services/my-service',
3256
+ *
3257
+ * // Request body metadata
3258
+ * requestBody: {
3259
+ * // request body parameters
3260
+ * // {
3261
+ * // "network": "my_network",
3262
+ * // "peering": "my_peering",
3263
+ * // "reservedPeeringRanges": [],
3264
+ * // "service": "my_service"
3265
+ * // }
3266
+ * },
3267
+ * });
3268
+ * console.log(res.data);
3269
+ *
3270
+ * // Example response
3271
+ * // {
3272
+ * // "done": false,
3273
+ * // "error": {},
3274
+ * // "metadata": {},
3275
+ * // "name": "my_name",
3276
+ * // "response": {}
3277
+ * // }
3278
+ * }
3279
+ *
3280
+ * main().catch(e => {
3281
+ * console.error(e);
3282
+ * throw e;
3283
+ * });
3284
+ *
3285
+ * ```
2606
3286
  *
2607
3287
  * @param params - Parameters for request
2608
3288
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2609
3289
  * @param callback - Optional callback that handles the response.
2610
3290
  * @returns A promise if used with async/await, or void if used with a callback.
2611
3291
  */
2612
- create(params: Params$Resource$Services$Connections$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
2613
- create(params?: Params$Resource$Services$Connections$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3292
+ create(params: Params$Resource$Services$Connections$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3293
+ create(params?: Params$Resource$Services$Connections$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2614
3294
  create(params: Params$Resource$Services$Connections$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2615
3295
  create(params: Params$Resource$Services$Connections$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2616
3296
  create(params: Params$Resource$Services$Connections$Create, callback: BodyResponseCallback<Schema$Operation>): void;
2617
3297
  create(callback: BodyResponseCallback<Schema$Operation>): void;
2618
3298
  /**
2619
3299
  * Deletes a private service access connection.
3300
+ * @example
3301
+ * ```js
3302
+ * // Before running the sample:
3303
+ * // - Enable the API at:
3304
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3305
+ * // - Login into gcloud by running:
3306
+ * // ```sh
3307
+ * // $ gcloud auth application-default login
3308
+ * // ```
3309
+ * // - Install the npm module by running:
3310
+ * // ```sh
3311
+ * // $ npm install googleapis
3312
+ * // ```
3313
+ *
3314
+ * const {google} = require('googleapis');
3315
+ * const servicenetworking = google.servicenetworking('v1');
3316
+ *
3317
+ * async function main() {
3318
+ * const auth = new google.auth.GoogleAuth({
3319
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3320
+ * scopes: [
3321
+ * 'https://www.googleapis.com/auth/cloud-platform',
3322
+ * 'https://www.googleapis.com/auth/service.management',
3323
+ * ],
3324
+ * });
3325
+ *
3326
+ * // Acquire an auth client, and bind it to all future calls
3327
+ * const authClient = await auth.getClient();
3328
+ * google.options({auth: authClient});
3329
+ *
3330
+ * // Do the magic
3331
+ * const res = await servicenetworking.services.connections.deleteConnection({
3332
+ * // 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`.
3333
+ * name: 'services/my-service/connections/my-connection',
3334
+ *
3335
+ * // Request body metadata
3336
+ * requestBody: {
3337
+ * // request body parameters
3338
+ * // {
3339
+ * // "consumerNetwork": "my_consumerNetwork"
3340
+ * // }
3341
+ * },
3342
+ * });
3343
+ * console.log(res.data);
3344
+ *
3345
+ * // Example response
3346
+ * // {
3347
+ * // "done": false,
3348
+ * // "error": {},
3349
+ * // "metadata": {},
3350
+ * // "name": "my_name",
3351
+ * // "response": {}
3352
+ * // }
3353
+ * }
3354
+ *
3355
+ * main().catch(e => {
3356
+ * console.error(e);
3357
+ * throw e;
3358
+ * });
3359
+ *
3360
+ * ```
2620
3361
  *
2621
3362
  * @param params - Parameters for request
2622
3363
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2623
3364
  * @param callback - Optional callback that handles the response.
2624
3365
  * @returns A promise if used with async/await, or void if used with a callback.
2625
3366
  */
2626
- deleteConnection(params: Params$Resource$Services$Connections$Deleteconnection, options: StreamMethodOptions): GaxiosPromise<Readable>;
2627
- deleteConnection(params?: Params$Resource$Services$Connections$Deleteconnection, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3367
+ deleteConnection(params: Params$Resource$Services$Connections$Deleteconnection, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3368
+ deleteConnection(params?: Params$Resource$Services$Connections$Deleteconnection, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2628
3369
  deleteConnection(params: Params$Resource$Services$Connections$Deleteconnection, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2629
3370
  deleteConnection(params: Params$Resource$Services$Connections$Deleteconnection, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2630
3371
  deleteConnection(params: Params$Resource$Services$Connections$Deleteconnection, callback: BodyResponseCallback<Schema$Operation>): void;
2631
3372
  deleteConnection(callback: BodyResponseCallback<Schema$Operation>): void;
2632
3373
  /**
2633
3374
  * List the private connections that are configured in a service consumer's VPC network.
3375
+ * @example
3376
+ * ```js
3377
+ * // Before running the sample:
3378
+ * // - Enable the API at:
3379
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3380
+ * // - Login into gcloud by running:
3381
+ * // ```sh
3382
+ * // $ gcloud auth application-default login
3383
+ * // ```
3384
+ * // - Install the npm module by running:
3385
+ * // ```sh
3386
+ * // $ npm install googleapis
3387
+ * // ```
3388
+ *
3389
+ * const {google} = require('googleapis');
3390
+ * const servicenetworking = google.servicenetworking('v1');
3391
+ *
3392
+ * async function main() {
3393
+ * const auth = new google.auth.GoogleAuth({
3394
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3395
+ * scopes: [
3396
+ * 'https://www.googleapis.com/auth/cloud-platform',
3397
+ * 'https://www.googleapis.com/auth/service.management',
3398
+ * ],
3399
+ * });
3400
+ *
3401
+ * // Acquire an auth client, and bind it to all future calls
3402
+ * const authClient = await auth.getClient();
3403
+ * google.options({auth: authClient});
3404
+ *
3405
+ * // Do the magic
3406
+ * const res = await servicenetworking.services.connections.list({
3407
+ * // 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.
3408
+ * network: 'placeholder-value',
3409
+ * // 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.
3410
+ * parent: 'services/my-service',
3411
+ * });
3412
+ * console.log(res.data);
3413
+ *
3414
+ * // Example response
3415
+ * // {
3416
+ * // "connections": []
3417
+ * // }
3418
+ * }
3419
+ *
3420
+ * main().catch(e => {
3421
+ * console.error(e);
3422
+ * throw e;
3423
+ * });
3424
+ *
3425
+ * ```
2634
3426
  *
2635
3427
  * @param params - Parameters for request
2636
3428
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2637
3429
  * @param callback - Optional callback that handles the response.
2638
3430
  * @returns A promise if used with async/await, or void if used with a callback.
2639
3431
  */
2640
- list(params: Params$Resource$Services$Connections$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2641
- list(params?: Params$Resource$Services$Connections$List, options?: MethodOptions): GaxiosPromise<Schema$ListConnectionsResponse>;
3432
+ list(params: Params$Resource$Services$Connections$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3433
+ list(params?: Params$Resource$Services$Connections$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListConnectionsResponse>>;
2642
3434
  list(params: Params$Resource$Services$Connections$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2643
3435
  list(params: Params$Resource$Services$Connections$List, options: MethodOptions | BodyResponseCallback<Schema$ListConnectionsResponse>, callback: BodyResponseCallback<Schema$ListConnectionsResponse>): void;
2644
3436
  list(params: Params$Resource$Services$Connections$List, callback: BodyResponseCallback<Schema$ListConnectionsResponse>): void;
2645
3437
  list(callback: BodyResponseCallback<Schema$ListConnectionsResponse>): void;
2646
3438
  /**
2647
3439
  * Updates the allocated ranges that are assigned to a connection.
3440
+ * @example
3441
+ * ```js
3442
+ * // Before running the sample:
3443
+ * // - Enable the API at:
3444
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3445
+ * // - Login into gcloud by running:
3446
+ * // ```sh
3447
+ * // $ gcloud auth application-default login
3448
+ * // ```
3449
+ * // - Install the npm module by running:
3450
+ * // ```sh
3451
+ * // $ npm install googleapis
3452
+ * // ```
3453
+ *
3454
+ * const {google} = require('googleapis');
3455
+ * const servicenetworking = google.servicenetworking('v1');
3456
+ *
3457
+ * async function main() {
3458
+ * const auth = new google.auth.GoogleAuth({
3459
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3460
+ * scopes: [
3461
+ * 'https://www.googleapis.com/auth/cloud-platform',
3462
+ * 'https://www.googleapis.com/auth/service.management',
3463
+ * ],
3464
+ * });
3465
+ *
3466
+ * // Acquire an auth client, and bind it to all future calls
3467
+ * const authClient = await auth.getClient();
3468
+ * google.options({auth: authClient});
3469
+ *
3470
+ * // Do the magic
3471
+ * const res = await servicenetworking.services.connections.patch({
3472
+ * // If a previously defined allocated range is removed, force flag must be set to true.
3473
+ * force: 'placeholder-value',
3474
+ * // 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`.
3475
+ * name: 'services/my-service/connections/my-connection',
3476
+ * // The update mask. If this is omitted, it defaults to "*". You can only update the listed peering ranges.
3477
+ * updateMask: 'placeholder-value',
3478
+ *
3479
+ * // Request body metadata
3480
+ * requestBody: {
3481
+ * // request body parameters
3482
+ * // {
3483
+ * // "network": "my_network",
3484
+ * // "peering": "my_peering",
3485
+ * // "reservedPeeringRanges": [],
3486
+ * // "service": "my_service"
3487
+ * // }
3488
+ * },
3489
+ * });
3490
+ * console.log(res.data);
3491
+ *
3492
+ * // Example response
3493
+ * // {
3494
+ * // "done": false,
3495
+ * // "error": {},
3496
+ * // "metadata": {},
3497
+ * // "name": "my_name",
3498
+ * // "response": {}
3499
+ * // }
3500
+ * }
3501
+ *
3502
+ * main().catch(e => {
3503
+ * console.error(e);
3504
+ * throw e;
3505
+ * });
3506
+ *
3507
+ * ```
2648
3508
  *
2649
3509
  * @param params - Parameters for request
2650
3510
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2651
3511
  * @param callback - Optional callback that handles the response.
2652
3512
  * @returns A promise if used with async/await, or void if used with a callback.
2653
3513
  */
2654
- patch(params: Params$Resource$Services$Connections$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
2655
- patch(params?: Params$Resource$Services$Connections$Patch, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3514
+ patch(params: Params$Resource$Services$Connections$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3515
+ patch(params?: Params$Resource$Services$Connections$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2656
3516
  patch(params: Params$Resource$Services$Connections$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2657
3517
  patch(params: Params$Resource$Services$Connections$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2658
3518
  patch(params: Params$Resource$Services$Connections$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
@@ -2660,7 +3520,7 @@ export declare namespace servicenetworking_v1 {
2660
3520
  }
2661
3521
  export interface Params$Resource$Services$Connections$Create extends StandardParameters {
2662
3522
  /**
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`.
3523
+ * 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
3524
  */
2665
3525
  parent?: string;
2666
3526
  /**
@@ -2680,11 +3540,11 @@ export declare namespace servicenetworking_v1 {
2680
3540
  }
2681
3541
  export interface Params$Resource$Services$Connections$List extends StandardParameters {
2682
3542
  /**
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.
3543
+ * 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
3544
  */
2685
3545
  network?: string;
2686
3546
  /**
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.
3547
+ * 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
3548
  */
2689
3549
  parent?: string;
2690
3550
  }
@@ -2694,7 +3554,7 @@ export declare namespace servicenetworking_v1 {
2694
3554
  */
2695
3555
  force?: boolean;
2696
3556
  /**
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`.
3557
+ * 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
3558
  */
2699
3559
  name?: string;
2700
3560
  /**
@@ -2711,70 +3571,373 @@ export declare namespace servicenetworking_v1 {
2711
3571
  constructor(context: APIRequestContext);
2712
3572
  /**
2713
3573
  * Service producers can use this method to add DNS record sets to private DNS zones in the shared producer host project.
3574
+ * @example
3575
+ * ```js
3576
+ * // Before running the sample:
3577
+ * // - Enable the API at:
3578
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3579
+ * // - Login into gcloud by running:
3580
+ * // ```sh
3581
+ * // $ gcloud auth application-default login
3582
+ * // ```
3583
+ * // - Install the npm module by running:
3584
+ * // ```sh
3585
+ * // $ npm install googleapis
3586
+ * // ```
3587
+ *
3588
+ * const {google} = require('googleapis');
3589
+ * const servicenetworking = google.servicenetworking('v1');
3590
+ *
3591
+ * async function main() {
3592
+ * const auth = new google.auth.GoogleAuth({
3593
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3594
+ * scopes: [
3595
+ * 'https://www.googleapis.com/auth/cloud-platform',
3596
+ * 'https://www.googleapis.com/auth/service.management',
3597
+ * ],
3598
+ * });
3599
+ *
3600
+ * // Acquire an auth client, and bind it to all future calls
3601
+ * const authClient = await auth.getClient();
3602
+ * google.options({auth: authClient});
3603
+ *
3604
+ * // Do the magic
3605
+ * const res = await servicenetworking.services.dnsRecordSets.add({
3606
+ * // 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`.
3607
+ * parent: 'services/my-service',
3608
+ *
3609
+ * // Request body metadata
3610
+ * requestBody: {
3611
+ * // request body parameters
3612
+ * // {
3613
+ * // "consumerNetwork": "my_consumerNetwork",
3614
+ * // "dnsRecordSet": {},
3615
+ * // "zone": "my_zone"
3616
+ * // }
3617
+ * },
3618
+ * });
3619
+ * console.log(res.data);
3620
+ *
3621
+ * // Example response
3622
+ * // {
3623
+ * // "done": false,
3624
+ * // "error": {},
3625
+ * // "metadata": {},
3626
+ * // "name": "my_name",
3627
+ * // "response": {}
3628
+ * // }
3629
+ * }
3630
+ *
3631
+ * main().catch(e => {
3632
+ * console.error(e);
3633
+ * throw e;
3634
+ * });
3635
+ *
3636
+ * ```
2714
3637
  *
2715
3638
  * @param params - Parameters for request
2716
3639
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2717
3640
  * @param callback - Optional callback that handles the response.
2718
3641
  * @returns A promise if used with async/await, or void if used with a callback.
2719
3642
  */
2720
- add(params: Params$Resource$Services$Dnsrecordsets$Add, options: StreamMethodOptions): GaxiosPromise<Readable>;
2721
- add(params?: Params$Resource$Services$Dnsrecordsets$Add, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3643
+ add(params: Params$Resource$Services$Dnsrecordsets$Add, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3644
+ add(params?: Params$Resource$Services$Dnsrecordsets$Add, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2722
3645
  add(params: Params$Resource$Services$Dnsrecordsets$Add, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2723
3646
  add(params: Params$Resource$Services$Dnsrecordsets$Add, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2724
3647
  add(params: Params$Resource$Services$Dnsrecordsets$Add, callback: BodyResponseCallback<Schema$Operation>): void;
2725
3648
  add(callback: BodyResponseCallback<Schema$Operation>): void;
2726
3649
  /**
2727
3650
  * 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.
3651
+ * @example
3652
+ * ```js
3653
+ * // Before running the sample:
3654
+ * // - Enable the API at:
3655
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3656
+ * // - Login into gcloud by running:
3657
+ * // ```sh
3658
+ * // $ gcloud auth application-default login
3659
+ * // ```
3660
+ * // - Install the npm module by running:
3661
+ * // ```sh
3662
+ * // $ npm install googleapis
3663
+ * // ```
3664
+ *
3665
+ * const {google} = require('googleapis');
3666
+ * const servicenetworking = google.servicenetworking('v1');
3667
+ *
3668
+ * async function main() {
3669
+ * const auth = new google.auth.GoogleAuth({
3670
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3671
+ * scopes: [
3672
+ * 'https://www.googleapis.com/auth/cloud-platform',
3673
+ * 'https://www.googleapis.com/auth/service.management',
3674
+ * ],
3675
+ * });
3676
+ *
3677
+ * // Acquire an auth client, and bind it to all future calls
3678
+ * const authClient = await auth.getClient();
3679
+ * google.options({auth: authClient});
3680
+ *
3681
+ * // Do the magic
3682
+ * const res = await servicenetworking.services.dnsRecordSets.get({
3683
+ * // Required. The consumer network containing the record set. Must be in the form of projects/{project\}/global/networks/{network\}
3684
+ * consumerNetwork: 'placeholder-value',
3685
+ * // Required. The domain name of the zone containing the recordset.
3686
+ * domain: 'placeholder-value',
3687
+ * // Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service\}.
3688
+ * parent: 'services/my-service',
3689
+ * // Required. RecordSet Type eg. type='A'. See the list of [Supported DNS Types](https://cloud.google.com/dns/records/json-record).
3690
+ * type: 'placeholder-value',
3691
+ * // Required. The name of the zone containing the record set.
3692
+ * zone: 'placeholder-value',
3693
+ * });
3694
+ * console.log(res.data);
3695
+ *
3696
+ * // Example response
3697
+ * // {
3698
+ * // "data": [],
3699
+ * // "domain": "my_domain",
3700
+ * // "ttl": "my_ttl",
3701
+ * // "type": "my_type"
3702
+ * // }
3703
+ * }
3704
+ *
3705
+ * main().catch(e => {
3706
+ * console.error(e);
3707
+ * throw e;
3708
+ * });
3709
+ *
3710
+ * ```
2728
3711
  *
2729
3712
  * @param params - Parameters for request
2730
3713
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2731
3714
  * @param callback - Optional callback that handles the response.
2732
3715
  * @returns A promise if used with async/await, or void if used with a callback.
2733
3716
  */
2734
- get(params: Params$Resource$Services$Dnsrecordsets$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
2735
- get(params?: Params$Resource$Services$Dnsrecordsets$Get, options?: MethodOptions): GaxiosPromise<Schema$DnsRecordSet>;
3717
+ get(params: Params$Resource$Services$Dnsrecordsets$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3718
+ get(params?: Params$Resource$Services$Dnsrecordsets$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$DnsRecordSet>>;
2736
3719
  get(params: Params$Resource$Services$Dnsrecordsets$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2737
3720
  get(params: Params$Resource$Services$Dnsrecordsets$Get, options: MethodOptions | BodyResponseCallback<Schema$DnsRecordSet>, callback: BodyResponseCallback<Schema$DnsRecordSet>): void;
2738
3721
  get(params: Params$Resource$Services$Dnsrecordsets$Get, callback: BodyResponseCallback<Schema$DnsRecordSet>): void;
2739
3722
  get(callback: BodyResponseCallback<Schema$DnsRecordSet>): void;
2740
3723
  /**
2741
3724
  * 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.
3725
+ * @example
3726
+ * ```js
3727
+ * // Before running the sample:
3728
+ * // - Enable the API at:
3729
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3730
+ * // - Login into gcloud by running:
3731
+ * // ```sh
3732
+ * // $ gcloud auth application-default login
3733
+ * // ```
3734
+ * // - Install the npm module by running:
3735
+ * // ```sh
3736
+ * // $ npm install googleapis
3737
+ * // ```
3738
+ *
3739
+ * const {google} = require('googleapis');
3740
+ * const servicenetworking = google.servicenetworking('v1');
3741
+ *
3742
+ * async function main() {
3743
+ * const auth = new google.auth.GoogleAuth({
3744
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3745
+ * scopes: [
3746
+ * 'https://www.googleapis.com/auth/cloud-platform',
3747
+ * 'https://www.googleapis.com/auth/service.management',
3748
+ * ],
3749
+ * });
3750
+ *
3751
+ * // Acquire an auth client, and bind it to all future calls
3752
+ * const authClient = await auth.getClient();
3753
+ * google.options({auth: authClient});
3754
+ *
3755
+ * // Do the magic
3756
+ * const res = await servicenetworking.services.dnsRecordSets.list({
3757
+ * // 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.
3758
+ * consumerNetwork: 'placeholder-value',
3759
+ * // 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`.
3760
+ * parent: 'services/my-service',
3761
+ * // Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.
3762
+ * zone: 'placeholder-value',
3763
+ * });
3764
+ * console.log(res.data);
3765
+ *
3766
+ * // Example response
3767
+ * // {
3768
+ * // "dnsRecordSets": []
3769
+ * // }
3770
+ * }
3771
+ *
3772
+ * main().catch(e => {
3773
+ * console.error(e);
3774
+ * throw e;
3775
+ * });
3776
+ *
3777
+ * ```
2742
3778
  *
2743
3779
  * @param params - Parameters for request
2744
3780
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2745
3781
  * @param callback - Optional callback that handles the response.
2746
3782
  * @returns A promise if used with async/await, or void if used with a callback.
2747
3783
  */
2748
- list(params: Params$Resource$Services$Dnsrecordsets$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2749
- list(params?: Params$Resource$Services$Dnsrecordsets$List, options?: MethodOptions): GaxiosPromise<Schema$ListDnsRecordSetsResponse>;
3784
+ list(params: Params$Resource$Services$Dnsrecordsets$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3785
+ list(params?: Params$Resource$Services$Dnsrecordsets$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListDnsRecordSetsResponse>>;
2750
3786
  list(params: Params$Resource$Services$Dnsrecordsets$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2751
3787
  list(params: Params$Resource$Services$Dnsrecordsets$List, options: MethodOptions | BodyResponseCallback<Schema$ListDnsRecordSetsResponse>, callback: BodyResponseCallback<Schema$ListDnsRecordSetsResponse>): void;
2752
3788
  list(params: Params$Resource$Services$Dnsrecordsets$List, callback: BodyResponseCallback<Schema$ListDnsRecordSetsResponse>): void;
2753
3789
  list(callback: BodyResponseCallback<Schema$ListDnsRecordSetsResponse>): void;
2754
3790
  /**
2755
3791
  * Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project.
3792
+ * @example
3793
+ * ```js
3794
+ * // Before running the sample:
3795
+ * // - Enable the API at:
3796
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3797
+ * // - Login into gcloud by running:
3798
+ * // ```sh
3799
+ * // $ gcloud auth application-default login
3800
+ * // ```
3801
+ * // - Install the npm module by running:
3802
+ * // ```sh
3803
+ * // $ npm install googleapis
3804
+ * // ```
3805
+ *
3806
+ * const {google} = require('googleapis');
3807
+ * const servicenetworking = google.servicenetworking('v1');
3808
+ *
3809
+ * async function main() {
3810
+ * const auth = new google.auth.GoogleAuth({
3811
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3812
+ * scopes: [
3813
+ * 'https://www.googleapis.com/auth/cloud-platform',
3814
+ * 'https://www.googleapis.com/auth/service.management',
3815
+ * ],
3816
+ * });
3817
+ *
3818
+ * // Acquire an auth client, and bind it to all future calls
3819
+ * const authClient = await auth.getClient();
3820
+ * google.options({auth: authClient});
3821
+ *
3822
+ * // Do the magic
3823
+ * const res = await servicenetworking.services.dnsRecordSets.remove({
3824
+ * // 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`.
3825
+ * parent: 'services/my-service',
3826
+ *
3827
+ * // Request body metadata
3828
+ * requestBody: {
3829
+ * // request body parameters
3830
+ * // {
3831
+ * // "consumerNetwork": "my_consumerNetwork",
3832
+ * // "dnsRecordSet": {},
3833
+ * // "zone": "my_zone"
3834
+ * // }
3835
+ * },
3836
+ * });
3837
+ * console.log(res.data);
3838
+ *
3839
+ * // Example response
3840
+ * // {
3841
+ * // "done": false,
3842
+ * // "error": {},
3843
+ * // "metadata": {},
3844
+ * // "name": "my_name",
3845
+ * // "response": {}
3846
+ * // }
3847
+ * }
3848
+ *
3849
+ * main().catch(e => {
3850
+ * console.error(e);
3851
+ * throw e;
3852
+ * });
3853
+ *
3854
+ * ```
2756
3855
  *
2757
3856
  * @param params - Parameters for request
2758
3857
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2759
3858
  * @param callback - Optional callback that handles the response.
2760
3859
  * @returns A promise if used with async/await, or void if used with a callback.
2761
3860
  */
2762
- remove(params: Params$Resource$Services$Dnsrecordsets$Remove, options: StreamMethodOptions): GaxiosPromise<Readable>;
2763
- remove(params?: Params$Resource$Services$Dnsrecordsets$Remove, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3861
+ remove(params: Params$Resource$Services$Dnsrecordsets$Remove, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3862
+ remove(params?: Params$Resource$Services$Dnsrecordsets$Remove, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2764
3863
  remove(params: Params$Resource$Services$Dnsrecordsets$Remove, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2765
3864
  remove(params: Params$Resource$Services$Dnsrecordsets$Remove, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2766
3865
  remove(params: Params$Resource$Services$Dnsrecordsets$Remove, callback: BodyResponseCallback<Schema$Operation>): void;
2767
3866
  remove(callback: BodyResponseCallback<Schema$Operation>): void;
2768
3867
  /**
2769
3868
  * Service producers can use this method to update DNS record sets from private DNS zones in the shared producer host project.
3869
+ * @example
3870
+ * ```js
3871
+ * // Before running the sample:
3872
+ * // - Enable the API at:
3873
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
3874
+ * // - Login into gcloud by running:
3875
+ * // ```sh
3876
+ * // $ gcloud auth application-default login
3877
+ * // ```
3878
+ * // - Install the npm module by running:
3879
+ * // ```sh
3880
+ * // $ npm install googleapis
3881
+ * // ```
3882
+ *
3883
+ * const {google} = require('googleapis');
3884
+ * const servicenetworking = google.servicenetworking('v1');
3885
+ *
3886
+ * async function main() {
3887
+ * const auth = new google.auth.GoogleAuth({
3888
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3889
+ * scopes: [
3890
+ * 'https://www.googleapis.com/auth/cloud-platform',
3891
+ * 'https://www.googleapis.com/auth/service.management',
3892
+ * ],
3893
+ * });
3894
+ *
3895
+ * // Acquire an auth client, and bind it to all future calls
3896
+ * const authClient = await auth.getClient();
3897
+ * google.options({auth: authClient});
3898
+ *
3899
+ * // Do the magic
3900
+ * const res = await servicenetworking.services.dnsRecordSets.update({
3901
+ * // 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`.
3902
+ * parent: 'services/my-service',
3903
+ *
3904
+ * // Request body metadata
3905
+ * requestBody: {
3906
+ * // request body parameters
3907
+ * // {
3908
+ * // "consumerNetwork": "my_consumerNetwork",
3909
+ * // "existingDnsRecordSet": {},
3910
+ * // "newDnsRecordSet": {},
3911
+ * // "zone": "my_zone"
3912
+ * // }
3913
+ * },
3914
+ * });
3915
+ * console.log(res.data);
3916
+ *
3917
+ * // Example response
3918
+ * // {
3919
+ * // "done": false,
3920
+ * // "error": {},
3921
+ * // "metadata": {},
3922
+ * // "name": "my_name",
3923
+ * // "response": {}
3924
+ * // }
3925
+ * }
3926
+ *
3927
+ * main().catch(e => {
3928
+ * console.error(e);
3929
+ * throw e;
3930
+ * });
3931
+ *
3932
+ * ```
2770
3933
  *
2771
3934
  * @param params - Parameters for request
2772
3935
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2773
3936
  * @param callback - Optional callback that handles the response.
2774
3937
  * @returns A promise if used with async/await, or void if used with a callback.
2775
3938
  */
2776
- update(params: Params$Resource$Services$Dnsrecordsets$Update, options: StreamMethodOptions): GaxiosPromise<Readable>;
2777
- update(params?: Params$Resource$Services$Dnsrecordsets$Update, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
3939
+ update(params: Params$Resource$Services$Dnsrecordsets$Update, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3940
+ update(params?: Params$Resource$Services$Dnsrecordsets$Update, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2778
3941
  update(params: Params$Resource$Services$Dnsrecordsets$Update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2779
3942
  update(params: Params$Resource$Services$Dnsrecordsets$Update, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2780
3943
  update(params: Params$Resource$Services$Dnsrecordsets$Update, callback: BodyResponseCallback<Schema$Operation>): void;
@@ -2851,28 +4014,153 @@ export declare namespace servicenetworking_v1 {
2851
4014
  constructor(context: APIRequestContext);
2852
4015
  /**
2853
4016
  * 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.
4017
+ * @example
4018
+ * ```js
4019
+ * // Before running the sample:
4020
+ * // - Enable the API at:
4021
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4022
+ * // - Login into gcloud by running:
4023
+ * // ```sh
4024
+ * // $ gcloud auth application-default login
4025
+ * // ```
4026
+ * // - Install the npm module by running:
4027
+ * // ```sh
4028
+ * // $ npm install googleapis
4029
+ * // ```
4030
+ *
4031
+ * const {google} = require('googleapis');
4032
+ * const servicenetworking = google.servicenetworking('v1');
4033
+ *
4034
+ * async function main() {
4035
+ * const auth = new google.auth.GoogleAuth({
4036
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4037
+ * scopes: [
4038
+ * 'https://www.googleapis.com/auth/cloud-platform',
4039
+ * 'https://www.googleapis.com/auth/service.management',
4040
+ * ],
4041
+ * });
4042
+ *
4043
+ * // Acquire an auth client, and bind it to all future calls
4044
+ * const authClient = await auth.getClient();
4045
+ * google.options({auth: authClient});
4046
+ *
4047
+ * // Do the magic
4048
+ * const res = await servicenetworking.services.dnsZones.add({
4049
+ * // 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`.
4050
+ * parent: 'services/my-service',
4051
+ *
4052
+ * // Request body metadata
4053
+ * requestBody: {
4054
+ * // request body parameters
4055
+ * // {
4056
+ * // "consumerNetwork": "my_consumerNetwork",
4057
+ * // "dnsSuffix": "my_dnsSuffix",
4058
+ * // "name": "my_name"
4059
+ * // }
4060
+ * },
4061
+ * });
4062
+ * console.log(res.data);
4063
+ *
4064
+ * // Example response
4065
+ * // {
4066
+ * // "done": false,
4067
+ * // "error": {},
4068
+ * // "metadata": {},
4069
+ * // "name": "my_name",
4070
+ * // "response": {}
4071
+ * // }
4072
+ * }
4073
+ *
4074
+ * main().catch(e => {
4075
+ * console.error(e);
4076
+ * throw e;
4077
+ * });
4078
+ *
4079
+ * ```
2854
4080
  *
2855
4081
  * @param params - Parameters for request
2856
4082
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2857
4083
  * @param callback - Optional callback that handles the response.
2858
4084
  * @returns A promise if used with async/await, or void if used with a callback.
2859
4085
  */
2860
- add(params: Params$Resource$Services$Dnszones$Add, options: StreamMethodOptions): GaxiosPromise<Readable>;
2861
- add(params?: Params$Resource$Services$Dnszones$Add, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
4086
+ add(params: Params$Resource$Services$Dnszones$Add, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4087
+ add(params?: Params$Resource$Services$Dnszones$Add, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2862
4088
  add(params: Params$Resource$Services$Dnszones$Add, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2863
4089
  add(params: Params$Resource$Services$Dnszones$Add, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2864
4090
  add(params: Params$Resource$Services$Dnszones$Add, callback: BodyResponseCallback<Schema$Operation>): void;
2865
4091
  add(callback: BodyResponseCallback<Schema$Operation>): void;
2866
4092
  /**
2867
4093
  * 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.
4094
+ * @example
4095
+ * ```js
4096
+ * // Before running the sample:
4097
+ * // - Enable the API at:
4098
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4099
+ * // - Login into gcloud by running:
4100
+ * // ```sh
4101
+ * // $ gcloud auth application-default login
4102
+ * // ```
4103
+ * // - Install the npm module by running:
4104
+ * // ```sh
4105
+ * // $ npm install googleapis
4106
+ * // ```
4107
+ *
4108
+ * const {google} = require('googleapis');
4109
+ * const servicenetworking = google.servicenetworking('v1');
4110
+ *
4111
+ * async function main() {
4112
+ * const auth = new google.auth.GoogleAuth({
4113
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4114
+ * scopes: [
4115
+ * 'https://www.googleapis.com/auth/cloud-platform',
4116
+ * 'https://www.googleapis.com/auth/service.management',
4117
+ * ],
4118
+ * });
4119
+ *
4120
+ * // Acquire an auth client, and bind it to all future calls
4121
+ * const authClient = await auth.getClient();
4122
+ * google.options({auth: authClient});
4123
+ *
4124
+ * // Do the magic
4125
+ * const res = await servicenetworking.services.dnsZones.remove({
4126
+ * // 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`.
4127
+ * parent: 'services/my-service',
4128
+ *
4129
+ * // Request body metadata
4130
+ * requestBody: {
4131
+ * // request body parameters
4132
+ * // {
4133
+ * // "consumerNetwork": "my_consumerNetwork",
4134
+ * // "name": "my_name"
4135
+ * // }
4136
+ * },
4137
+ * });
4138
+ * console.log(res.data);
4139
+ *
4140
+ * // Example response
4141
+ * // {
4142
+ * // "done": false,
4143
+ * // "error": {},
4144
+ * // "metadata": {},
4145
+ * // "name": "my_name",
4146
+ * // "response": {}
4147
+ * // }
4148
+ * }
4149
+ *
4150
+ * main().catch(e => {
4151
+ * console.error(e);
4152
+ * throw e;
4153
+ * });
4154
+ *
4155
+ * ```
2868
4156
  *
2869
4157
  * @param params - Parameters for request
2870
4158
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2871
4159
  * @param callback - Optional callback that handles the response.
2872
4160
  * @returns A promise if used with async/await, or void if used with a callback.
2873
4161
  */
2874
- remove(params: Params$Resource$Services$Dnszones$Remove, options: StreamMethodOptions): GaxiosPromise<Readable>;
2875
- remove(params?: Params$Resource$Services$Dnszones$Remove, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
4162
+ remove(params: Params$Resource$Services$Dnszones$Remove, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4163
+ remove(params?: Params$Resource$Services$Dnszones$Remove, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2876
4164
  remove(params: Params$Resource$Services$Dnszones$Remove, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2877
4165
  remove(params: Params$Resource$Services$Dnszones$Remove, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2878
4166
  remove(params: Params$Resource$Services$Dnszones$Remove, callback: BodyResponseCallback<Schema$Operation>): void;
@@ -2915,42 +4203,222 @@ export declare namespace servicenetworking_v1 {
2915
4203
  constructor(context: APIRequestContext);
2916
4204
  /**
2917
4205
  * 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.
4206
+ * @example
4207
+ * ```js
4208
+ * // Before running the sample:
4209
+ * // - Enable the API at:
4210
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4211
+ * // - Login into gcloud by running:
4212
+ * // ```sh
4213
+ * // $ gcloud auth application-default login
4214
+ * // ```
4215
+ * // - Install the npm module by running:
4216
+ * // ```sh
4217
+ * // $ npm install googleapis
4218
+ * // ```
4219
+ *
4220
+ * const {google} = require('googleapis');
4221
+ * const servicenetworking = google.servicenetworking('v1');
4222
+ *
4223
+ * async function main() {
4224
+ * const auth = new google.auth.GoogleAuth({
4225
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4226
+ * scopes: [
4227
+ * 'https://www.googleapis.com/auth/cloud-platform',
4228
+ * 'https://www.googleapis.com/auth/service.management',
4229
+ * ],
4230
+ * });
4231
+ *
4232
+ * // Acquire an auth client, and bind it to all future calls
4233
+ * const authClient = await auth.getClient();
4234
+ * google.options({auth: authClient});
4235
+ *
4236
+ * // Do the magic
4237
+ * const res = await servicenetworking.services.projects.global.networks.get({
4238
+ * // 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
4239
+ * includeUsedIpRanges: 'placeholder-value',
4240
+ * // 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.
4241
+ * name: 'services/my-service/projects/my-project/global/networks/my-network',
4242
+ * });
4243
+ * console.log(res.data);
4244
+ *
4245
+ * // Example response
4246
+ * // {
4247
+ * // "cloudsqlConfigs": [],
4248
+ * // "consumerExportCustomRoutes": false,
4249
+ * // "consumerExportSubnetRoutesWithPublicIp": false,
4250
+ * // "consumerImportCustomRoutes": false,
4251
+ * // "consumerImportSubnetRoutesWithPublicIp": false,
4252
+ * // "producerExportCustomRoutes": false,
4253
+ * // "producerExportSubnetRoutesWithPublicIp": false,
4254
+ * // "producerImportCustomRoutes": false,
4255
+ * // "producerImportSubnetRoutesWithPublicIp": false,
4256
+ * // "producerNetwork": "my_producerNetwork",
4257
+ * // "reservedRanges": [],
4258
+ * // "usedIpRanges": [],
4259
+ * // "vpcScReferenceArchitectureEnabled": false
4260
+ * // }
4261
+ * }
4262
+ *
4263
+ * main().catch(e => {
4264
+ * console.error(e);
4265
+ * throw e;
4266
+ * });
4267
+ *
4268
+ * ```
2918
4269
  *
2919
4270
  * @param params - Parameters for request
2920
4271
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2921
4272
  * @param callback - Optional callback that handles the response.
2922
4273
  * @returns A promise if used with async/await, or void if used with a callback.
2923
4274
  */
2924
- get(params: Params$Resource$Services$Projects$Global$Networks$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
2925
- get(params?: Params$Resource$Services$Projects$Global$Networks$Get, options?: MethodOptions): GaxiosPromise<Schema$ConsumerConfig>;
4275
+ get(params: Params$Resource$Services$Projects$Global$Networks$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4276
+ get(params?: Params$Resource$Services$Projects$Global$Networks$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ConsumerConfig>>;
2926
4277
  get(params: Params$Resource$Services$Projects$Global$Networks$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2927
4278
  get(params: Params$Resource$Services$Projects$Global$Networks$Get, options: MethodOptions | BodyResponseCallback<Schema$ConsumerConfig>, callback: BodyResponseCallback<Schema$ConsumerConfig>): void;
2928
4279
  get(params: Params$Resource$Services$Projects$Global$Networks$Get, callback: BodyResponseCallback<Schema$ConsumerConfig>): void;
2929
4280
  get(callback: BodyResponseCallback<Schema$ConsumerConfig>): void;
2930
4281
  /**
2931
4282
  * Consumers use this method to find out the state of VPC Service Controls. The controls could be enabled or disabled for a connection.
4283
+ * @example
4284
+ * ```js
4285
+ * // Before running the sample:
4286
+ * // - Enable the API at:
4287
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4288
+ * // - Login into gcloud by running:
4289
+ * // ```sh
4290
+ * // $ gcloud auth application-default login
4291
+ * // ```
4292
+ * // - Install the npm module by running:
4293
+ * // ```sh
4294
+ * // $ npm install googleapis
4295
+ * // ```
4296
+ *
4297
+ * const {google} = require('googleapis');
4298
+ * const servicenetworking = google.servicenetworking('v1');
4299
+ *
4300
+ * async function main() {
4301
+ * const auth = new google.auth.GoogleAuth({
4302
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4303
+ * scopes: [
4304
+ * 'https://www.googleapis.com/auth/cloud-platform',
4305
+ * 'https://www.googleapis.com/auth/service.management',
4306
+ * ],
4307
+ * });
4308
+ *
4309
+ * // Acquire an auth client, and bind it to all future calls
4310
+ * const authClient = await auth.getClient();
4311
+ * google.options({auth: authClient});
4312
+ *
4313
+ * // Do the magic
4314
+ * const res =
4315
+ * await servicenetworking.services.projects.global.networks.getVpcServiceControls(
4316
+ * {
4317
+ * // 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.
4318
+ * name: 'services/my-service/projects/my-project/global/networks/my-network',
4319
+ * },
4320
+ * );
4321
+ * console.log(res.data);
4322
+ *
4323
+ * // Example response
4324
+ * // {
4325
+ * // "enabled": false
4326
+ * // }
4327
+ * }
4328
+ *
4329
+ * main().catch(e => {
4330
+ * console.error(e);
4331
+ * throw e;
4332
+ * });
4333
+ *
4334
+ * ```
2932
4335
  *
2933
4336
  * @param params - Parameters for request
2934
4337
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2935
4338
  * @param callback - Optional callback that handles the response.
2936
4339
  * @returns A promise if used with async/await, or void if used with a callback.
2937
4340
  */
2938
- getVpcServiceControls(params: Params$Resource$Services$Projects$Global$Networks$Getvpcservicecontrols, options: StreamMethodOptions): GaxiosPromise<Readable>;
2939
- getVpcServiceControls(params?: Params$Resource$Services$Projects$Global$Networks$Getvpcservicecontrols, options?: MethodOptions): GaxiosPromise<Schema$VpcServiceControls>;
4341
+ getVpcServiceControls(params: Params$Resource$Services$Projects$Global$Networks$Getvpcservicecontrols, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4342
+ getVpcServiceControls(params?: Params$Resource$Services$Projects$Global$Networks$Getvpcservicecontrols, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$VpcServiceControls>>;
2940
4343
  getVpcServiceControls(params: Params$Resource$Services$Projects$Global$Networks$Getvpcservicecontrols, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2941
4344
  getVpcServiceControls(params: Params$Resource$Services$Projects$Global$Networks$Getvpcservicecontrols, options: MethodOptions | BodyResponseCallback<Schema$VpcServiceControls>, callback: BodyResponseCallback<Schema$VpcServiceControls>): void;
2942
4345
  getVpcServiceControls(params: Params$Resource$Services$Projects$Global$Networks$Getvpcservicecontrols, callback: BodyResponseCallback<Schema$VpcServiceControls>): void;
2943
4346
  getVpcServiceControls(callback: BodyResponseCallback<Schema$VpcServiceControls>): void;
2944
4347
  /**
2945
4348
  * 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.
4349
+ * @example
4350
+ * ```js
4351
+ * // Before running the sample:
4352
+ * // - Enable the API at:
4353
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4354
+ * // - Login into gcloud by running:
4355
+ * // ```sh
4356
+ * // $ gcloud auth application-default login
4357
+ * // ```
4358
+ * // - Install the npm module by running:
4359
+ * // ```sh
4360
+ * // $ npm install googleapis
4361
+ * // ```
4362
+ *
4363
+ * const {google} = require('googleapis');
4364
+ * const servicenetworking = google.servicenetworking('v1');
4365
+ *
4366
+ * async function main() {
4367
+ * const auth = new google.auth.GoogleAuth({
4368
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4369
+ * scopes: [
4370
+ * 'https://www.googleapis.com/auth/cloud-platform',
4371
+ * 'https://www.googleapis.com/auth/service.management',
4372
+ * ],
4373
+ * });
4374
+ *
4375
+ * // Acquire an auth client, and bind it to all future calls
4376
+ * const authClient = await auth.getClient();
4377
+ * google.options({auth: authClient});
4378
+ *
4379
+ * // Do the magic
4380
+ * const res =
4381
+ * await servicenetworking.services.projects.global.networks.updateConsumerConfig(
4382
+ * {
4383
+ * // 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.
4384
+ * parent:
4385
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4386
+ *
4387
+ * // Request body metadata
4388
+ * requestBody: {
4389
+ * // request body parameters
4390
+ * // {
4391
+ * // "consumerConfig": {}
4392
+ * // }
4393
+ * },
4394
+ * },
4395
+ * );
4396
+ * console.log(res.data);
4397
+ *
4398
+ * // Example response
4399
+ * // {
4400
+ * // "done": false,
4401
+ * // "error": {},
4402
+ * // "metadata": {},
4403
+ * // "name": "my_name",
4404
+ * // "response": {}
4405
+ * // }
4406
+ * }
4407
+ *
4408
+ * main().catch(e => {
4409
+ * console.error(e);
4410
+ * throw e;
4411
+ * });
4412
+ *
4413
+ * ```
2946
4414
  *
2947
4415
  * @param params - Parameters for request
2948
4416
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2949
4417
  * @param callback - Optional callback that handles the response.
2950
4418
  * @returns A promise if used with async/await, or void if used with a callback.
2951
4419
  */
2952
- updateConsumerConfig(params: Params$Resource$Services$Projects$Global$Networks$Updateconsumerconfig, options: StreamMethodOptions): GaxiosPromise<Readable>;
2953
- updateConsumerConfig(params?: Params$Resource$Services$Projects$Global$Networks$Updateconsumerconfig, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
4420
+ updateConsumerConfig(params: Params$Resource$Services$Projects$Global$Networks$Updateconsumerconfig, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4421
+ updateConsumerConfig(params?: Params$Resource$Services$Projects$Global$Networks$Updateconsumerconfig, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2954
4422
  updateConsumerConfig(params: Params$Resource$Services$Projects$Global$Networks$Updateconsumerconfig, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2955
4423
  updateConsumerConfig(params: Params$Resource$Services$Projects$Global$Networks$Updateconsumerconfig, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2956
4424
  updateConsumerConfig(params: Params$Resource$Services$Projects$Global$Networks$Updateconsumerconfig, callback: BodyResponseCallback<Schema$Operation>): void;
@@ -2987,28 +4455,130 @@ export declare namespace servicenetworking_v1 {
2987
4455
  constructor(context: APIRequestContext);
2988
4456
  /**
2989
4457
  * 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
4458
+ * @example
4459
+ * ```js
4460
+ * // Before running the sample:
4461
+ * // - Enable the API at:
4462
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4463
+ * // - Login into gcloud by running:
4464
+ * // ```sh
4465
+ * // $ gcloud auth application-default login
4466
+ * // ```
4467
+ * // - Install the npm module by running:
4468
+ * // ```sh
4469
+ * // $ npm install googleapis
4470
+ * // ```
4471
+ *
4472
+ * const {google} = require('googleapis');
4473
+ * const servicenetworking = google.servicenetworking('v1');
4474
+ *
4475
+ * async function main() {
4476
+ * const auth = new google.auth.GoogleAuth({
4477
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4478
+ * scopes: [
4479
+ * 'https://www.googleapis.com/auth/cloud-platform',
4480
+ * 'https://www.googleapis.com/auth/service.management',
4481
+ * ],
4482
+ * });
4483
+ *
4484
+ * // Acquire an auth client, and bind it to all future calls
4485
+ * const authClient = await auth.getClient();
4486
+ * google.options({auth: authClient});
4487
+ *
4488
+ * // Do the magic
4489
+ * const res =
4490
+ * await servicenetworking.services.projects.global.networks.dnsZones.get({
4491
+ * // 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
4492
+ * name: 'services/my-service/projects/my-project/global/networks/my-network/dnsZones/my-dnsZone',
4493
+ * });
4494
+ * console.log(res.data);
4495
+ *
4496
+ * // Example response
4497
+ * // {
4498
+ * // "consumerPeeringZone": {},
4499
+ * // "producerPrivateZone": {}
4500
+ * // }
4501
+ * }
4502
+ *
4503
+ * main().catch(e => {
4504
+ * console.error(e);
4505
+ * throw e;
4506
+ * });
4507
+ *
4508
+ * ```
2990
4509
  *
2991
4510
  * @param params - Parameters for request
2992
4511
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2993
4512
  * @param callback - Optional callback that handles the response.
2994
4513
  * @returns A promise if used with async/await, or void if used with a callback.
2995
4514
  */
2996
- get(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
2997
- get(params?: Params$Resource$Services$Projects$Global$Networks$Dnszones$Get, options?: MethodOptions): GaxiosPromise<Schema$GetDnsZoneResponse>;
4515
+ get(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4516
+ get(params?: Params$Resource$Services$Projects$Global$Networks$Dnszones$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GetDnsZoneResponse>>;
2998
4517
  get(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2999
4518
  get(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$Get, options: MethodOptions | BodyResponseCallback<Schema$GetDnsZoneResponse>, callback: BodyResponseCallback<Schema$GetDnsZoneResponse>): void;
3000
4519
  get(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$Get, callback: BodyResponseCallback<Schema$GetDnsZoneResponse>): void;
3001
4520
  get(callback: BodyResponseCallback<Schema$GetDnsZoneResponse>): void;
3002
4521
  /**
3003
4522
  * * 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. *
4523
+ * @example
4524
+ * ```js
4525
+ * // Before running the sample:
4526
+ * // - Enable the API at:
4527
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4528
+ * // - Login into gcloud by running:
4529
+ * // ```sh
4530
+ * // $ gcloud auth application-default login
4531
+ * // ```
4532
+ * // - Install the npm module by running:
4533
+ * // ```sh
4534
+ * // $ npm install googleapis
4535
+ * // ```
4536
+ *
4537
+ * const {google} = require('googleapis');
4538
+ * const servicenetworking = google.servicenetworking('v1');
4539
+ *
4540
+ * async function main() {
4541
+ * const auth = new google.auth.GoogleAuth({
4542
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4543
+ * scopes: [
4544
+ * 'https://www.googleapis.com/auth/cloud-platform',
4545
+ * 'https://www.googleapis.com/auth/service.management',
4546
+ * ],
4547
+ * });
4548
+ *
4549
+ * // Acquire an auth client, and bind it to all future calls
4550
+ * const authClient = await auth.getClient();
4551
+ * google.options({auth: authClient});
4552
+ *
4553
+ * // Do the magic
4554
+ * const res =
4555
+ * await servicenetworking.services.projects.global.networks.dnsZones.list({
4556
+ * // 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.
4557
+ * parent:
4558
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4559
+ * });
4560
+ * console.log(res.data);
4561
+ *
4562
+ * // Example response
4563
+ * // {
4564
+ * // "dnsZonePairs": []
4565
+ * // }
4566
+ * }
4567
+ *
4568
+ * main().catch(e => {
4569
+ * console.error(e);
4570
+ * throw e;
4571
+ * });
4572
+ *
4573
+ * ```
3004
4574
  *
3005
4575
  * @param params - Parameters for request
3006
4576
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3007
4577
  * @param callback - Optional callback that handles the response.
3008
4578
  * @returns A promise if used with async/await, or void if used with a callback.
3009
4579
  */
3010
- list(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
3011
- list(params?: Params$Resource$Services$Projects$Global$Networks$Dnszones$List, options?: MethodOptions): GaxiosPromise<Schema$ListDnsZonesResponse>;
4580
+ list(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4581
+ list(params?: Params$Resource$Services$Projects$Global$Networks$Dnszones$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListDnsZonesResponse>>;
3012
4582
  list(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
3013
4583
  list(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$List, options: MethodOptions | BodyResponseCallback<Schema$ListDnsZonesResponse>, callback: BodyResponseCallback<Schema$ListDnsZonesResponse>): void;
3014
4584
  list(params: Params$Resource$Services$Projects$Global$Networks$Dnszones$List, callback: BodyResponseCallback<Schema$ListDnsZonesResponse>): void;
@@ -3031,42 +4601,217 @@ export declare namespace servicenetworking_v1 {
3031
4601
  constructor(context: APIRequestContext);
3032
4602
  /**
3033
4603
  * 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.
4604
+ * @example
4605
+ * ```js
4606
+ * // Before running the sample:
4607
+ * // - Enable the API at:
4608
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4609
+ * // - Login into gcloud by running:
4610
+ * // ```sh
4611
+ * // $ gcloud auth application-default login
4612
+ * // ```
4613
+ * // - Install the npm module by running:
4614
+ * // ```sh
4615
+ * // $ npm install googleapis
4616
+ * // ```
4617
+ *
4618
+ * const {google} = require('googleapis');
4619
+ * const servicenetworking = google.servicenetworking('v1');
4620
+ *
4621
+ * async function main() {
4622
+ * const auth = new google.auth.GoogleAuth({
4623
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4624
+ * scopes: [
4625
+ * 'https://www.googleapis.com/auth/cloud-platform',
4626
+ * 'https://www.googleapis.com/auth/service.management',
4627
+ * ],
4628
+ * });
4629
+ *
4630
+ * // Acquire an auth client, and bind it to all future calls
4631
+ * const authClient = await auth.getClient();
4632
+ * google.options({auth: authClient});
4633
+ *
4634
+ * // Do the magic
4635
+ * const res =
4636
+ * await servicenetworking.services.projects.global.networks.peeredDnsDomains.create(
4637
+ * {
4638
+ * // 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.
4639
+ * parent:
4640
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4641
+ *
4642
+ * // Request body metadata
4643
+ * requestBody: {
4644
+ * // request body parameters
4645
+ * // {
4646
+ * // "dnsSuffix": "my_dnsSuffix",
4647
+ * // "name": "my_name"
4648
+ * // }
4649
+ * },
4650
+ * },
4651
+ * );
4652
+ * console.log(res.data);
4653
+ *
4654
+ * // Example response
4655
+ * // {
4656
+ * // "done": false,
4657
+ * // "error": {},
4658
+ * // "metadata": {},
4659
+ * // "name": "my_name",
4660
+ * // "response": {}
4661
+ * // }
4662
+ * }
4663
+ *
4664
+ * main().catch(e => {
4665
+ * console.error(e);
4666
+ * throw e;
4667
+ * });
4668
+ *
4669
+ * ```
3034
4670
  *
3035
4671
  * @param params - Parameters for request
3036
4672
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3037
4673
  * @param callback - Optional callback that handles the response.
3038
4674
  * @returns A promise if used with async/await, or void if used with a callback.
3039
4675
  */
3040
- create(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
3041
- create(params?: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
4676
+ create(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4677
+ create(params?: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3042
4678
  create(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
3043
4679
  create(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
3044
4680
  create(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Create, callback: BodyResponseCallback<Schema$Operation>): void;
3045
4681
  create(callback: BodyResponseCallback<Schema$Operation>): void;
3046
4682
  /**
3047
4683
  * Deletes a peered DNS domain.
4684
+ * @example
4685
+ * ```js
4686
+ * // Before running the sample:
4687
+ * // - Enable the API at:
4688
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4689
+ * // - Login into gcloud by running:
4690
+ * // ```sh
4691
+ * // $ gcloud auth application-default login
4692
+ * // ```
4693
+ * // - Install the npm module by running:
4694
+ * // ```sh
4695
+ * // $ npm install googleapis
4696
+ * // ```
4697
+ *
4698
+ * const {google} = require('googleapis');
4699
+ * const servicenetworking = google.servicenetworking('v1');
4700
+ *
4701
+ * async function main() {
4702
+ * const auth = new google.auth.GoogleAuth({
4703
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4704
+ * scopes: [
4705
+ * 'https://www.googleapis.com/auth/cloud-platform',
4706
+ * 'https://www.googleapis.com/auth/service.management',
4707
+ * ],
4708
+ * });
4709
+ *
4710
+ * // Acquire an auth client, and bind it to all future calls
4711
+ * const authClient = await auth.getClient();
4712
+ * google.options({auth: authClient});
4713
+ *
4714
+ * // Do the magic
4715
+ * const res =
4716
+ * await servicenetworking.services.projects.global.networks.peeredDnsDomains.delete(
4717
+ * {
4718
+ * // 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.
4719
+ * name: 'services/my-service/projects/my-project/global/networks/my-network/peeredDnsDomains/my-peeredDnsDomain',
4720
+ * },
4721
+ * );
4722
+ * console.log(res.data);
4723
+ *
4724
+ * // Example response
4725
+ * // {
4726
+ * // "done": false,
4727
+ * // "error": {},
4728
+ * // "metadata": {},
4729
+ * // "name": "my_name",
4730
+ * // "response": {}
4731
+ * // }
4732
+ * }
4733
+ *
4734
+ * main().catch(e => {
4735
+ * console.error(e);
4736
+ * throw e;
4737
+ * });
4738
+ *
4739
+ * ```
3048
4740
  *
3049
4741
  * @param params - Parameters for request
3050
4742
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3051
4743
  * @param callback - Optional callback that handles the response.
3052
4744
  * @returns A promise if used with async/await, or void if used with a callback.
3053
4745
  */
3054
- delete(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
3055
- delete(params?: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Delete, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
4746
+ delete(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4747
+ delete(params?: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3056
4748
  delete(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
3057
4749
  delete(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
3058
4750
  delete(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
3059
4751
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
3060
4752
  /**
3061
4753
  * Lists peered DNS domains for a connection.
4754
+ * @example
4755
+ * ```js
4756
+ * // Before running the sample:
4757
+ * // - Enable the API at:
4758
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4759
+ * // - Login into gcloud by running:
4760
+ * // ```sh
4761
+ * // $ gcloud auth application-default login
4762
+ * // ```
4763
+ * // - Install the npm module by running:
4764
+ * // ```sh
4765
+ * // $ npm install googleapis
4766
+ * // ```
4767
+ *
4768
+ * const {google} = require('googleapis');
4769
+ * const servicenetworking = google.servicenetworking('v1');
4770
+ *
4771
+ * async function main() {
4772
+ * const auth = new google.auth.GoogleAuth({
4773
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4774
+ * scopes: [
4775
+ * 'https://www.googleapis.com/auth/cloud-platform',
4776
+ * 'https://www.googleapis.com/auth/service.management',
4777
+ * ],
4778
+ * });
4779
+ *
4780
+ * // Acquire an auth client, and bind it to all future calls
4781
+ * const authClient = await auth.getClient();
4782
+ * google.options({auth: authClient});
4783
+ *
4784
+ * // Do the magic
4785
+ * const res =
4786
+ * await servicenetworking.services.projects.global.networks.peeredDnsDomains.list(
4787
+ * {
4788
+ * // 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.
4789
+ * parent:
4790
+ * 'services/my-service/projects/my-project/global/networks/my-network',
4791
+ * },
4792
+ * );
4793
+ * console.log(res.data);
4794
+ *
4795
+ * // Example response
4796
+ * // {
4797
+ * // "peeredDnsDomains": []
4798
+ * // }
4799
+ * }
4800
+ *
4801
+ * main().catch(e => {
4802
+ * console.error(e);
4803
+ * throw e;
4804
+ * });
4805
+ *
4806
+ * ```
3062
4807
  *
3063
4808
  * @param params - Parameters for request
3064
4809
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3065
4810
  * @param callback - Optional callback that handles the response.
3066
4811
  * @returns A promise if used with async/await, or void if used with a callback.
3067
4812
  */
3068
- list(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
3069
- list(params?: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$List, options?: MethodOptions): GaxiosPromise<Schema$ListPeeredDnsDomainsResponse>;
4813
+ list(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4814
+ list(params?: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListPeeredDnsDomainsResponse>>;
3070
4815
  list(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
3071
4816
  list(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$List, options: MethodOptions | BodyResponseCallback<Schema$ListPeeredDnsDomainsResponse>, callback: BodyResponseCallback<Schema$ListPeeredDnsDomainsResponse>): void;
3072
4817
  list(params: Params$Resource$Services$Projects$Global$Networks$Peereddnsdomains$List, callback: BodyResponseCallback<Schema$ListPeeredDnsDomainsResponse>): void;
@@ -3099,14 +4844,76 @@ export declare namespace servicenetworking_v1 {
3099
4844
  constructor(context: APIRequestContext);
3100
4845
  /**
3101
4846
  * 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.
4847
+ * @example
4848
+ * ```js
4849
+ * // Before running the sample:
4850
+ * // - Enable the API at:
4851
+ * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
4852
+ * // - Login into gcloud by running:
4853
+ * // ```sh
4854
+ * // $ gcloud auth application-default login
4855
+ * // ```
4856
+ * // - Install the npm module by running:
4857
+ * // ```sh
4858
+ * // $ npm install googleapis
4859
+ * // ```
4860
+ *
4861
+ * const {google} = require('googleapis');
4862
+ * const servicenetworking = google.servicenetworking('v1');
4863
+ *
4864
+ * async function main() {
4865
+ * const auth = new google.auth.GoogleAuth({
4866
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4867
+ * scopes: [
4868
+ * 'https://www.googleapis.com/auth/cloud-platform',
4869
+ * 'https://www.googleapis.com/auth/service.management',
4870
+ * ],
4871
+ * });
4872
+ *
4873
+ * // Acquire an auth client, and bind it to all future calls
4874
+ * const authClient = await auth.getClient();
4875
+ * google.options({auth: authClient});
4876
+ *
4877
+ * // Do the magic
4878
+ * const res = await servicenetworking.services.roles.add({
4879
+ * // 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'.
4880
+ * parent: 'services/my-service',
4881
+ *
4882
+ * // Request body metadata
4883
+ * requestBody: {
4884
+ * // request body parameters
4885
+ * // {
4886
+ * // "consumerNetwork": "my_consumerNetwork",
4887
+ * // "policyBinding": []
4888
+ * // }
4889
+ * },
4890
+ * });
4891
+ * console.log(res.data);
4892
+ *
4893
+ * // Example response
4894
+ * // {
4895
+ * // "done": false,
4896
+ * // "error": {},
4897
+ * // "metadata": {},
4898
+ * // "name": "my_name",
4899
+ * // "response": {}
4900
+ * // }
4901
+ * }
4902
+ *
4903
+ * main().catch(e => {
4904
+ * console.error(e);
4905
+ * throw e;
4906
+ * });
4907
+ *
4908
+ * ```
3102
4909
  *
3103
4910
  * @param params - Parameters for request
3104
4911
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3105
4912
  * @param callback - Optional callback that handles the response.
3106
4913
  * @returns A promise if used with async/await, or void if used with a callback.
3107
4914
  */
3108
- add(params: Params$Resource$Services$Roles$Add, options: StreamMethodOptions): GaxiosPromise<Readable>;
3109
- add(params?: Params$Resource$Services$Roles$Add, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
4915
+ add(params: Params$Resource$Services$Roles$Add, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4916
+ add(params?: Params$Resource$Services$Roles$Add, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3110
4917
  add(params: Params$Resource$Services$Roles$Add, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
3111
4918
  add(params: Params$Resource$Services$Roles$Add, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
3112
4919
  add(params: Params$Resource$Services$Roles$Add, callback: BodyResponseCallback<Schema$Operation>): void;