@googleapis/networkservices 34.0.0 → 34.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/v1.ts CHANGED
@@ -124,10 +124,55 @@ export namespace networkservices_v1 {
124
124
  }
125
125
  }
126
126
 
127
+ /**
128
+ * AgentConnectivityTemplate represents a reusable network configuration.
129
+ */
130
+ export interface Schema$AgentConnectivityTemplate {
131
+ /**
132
+ * Required. Immutable. The path of the access. Maps roughly to ingress/egress, though we keep CLIENT_TO_AGENT and AGENT_TO_ANYWHERE as carryovers from Agent Gateway's original resource model. The path is immutable once set. Exactly one path can be set.
133
+ */
134
+ accessPath?: string | null;
135
+ /**
136
+ * Optional. The types of network access provided to the gateway. Both PUBLIC and PRIVATE can be configured.
137
+ */
138
+ accessTypes?: string[] | null;
139
+ /**
140
+ * Output only. The timestamp when the resource was created.
141
+ */
142
+ createTime?: string | null;
143
+ /**
144
+ * Optional. A free-text description of the resource. Max length 1024 characters.
145
+ */
146
+ description?: string | null;
147
+ /**
148
+ * Optional. Configuration for egress network traffic.
149
+ */
150
+ egressNetworkConfig?: Schema$EgressNetworkConfig;
151
+ /**
152
+ * Optional. Etag of the resource. If this is provided, it must match the server's etag. If the provided etag does not match the server's etag, the request will fail with a 409 ABORTED error.
153
+ */
154
+ etag?: string | null;
155
+ /**
156
+ * Optional. Set of label tags associated with the AgentConnectivityTemplate resource.
157
+ */
158
+ labels?: {[key: string]: string} | null;
159
+ /**
160
+ * Identifier. Name of the AgentConnectivityTemplate resource. It matches pattern `projects/x/locations/x/agentConnectivityTemplates/`.
161
+ */
162
+ name?: string | null;
163
+ /**
164
+ * Output only. The timestamp when the resource was updated.
165
+ */
166
+ updateTime?: string | null;
167
+ }
127
168
  /**
128
169
  * AgentGateway represents the agent gateway resource.
129
170
  */
130
171
  export interface Schema$AgentGateway {
172
+ /**
173
+ * Optional. The resource name of the AgentConnectivityTemplate. Format: projects/{project\}/locations/{location\}/agentConnectivityTemplates/{template\}
174
+ */
175
+ agentConnectivityTemplate?: string | null;
131
176
  /**
132
177
  * Output only. Field for populated AgentGateway card.
133
178
  */
@@ -363,6 +408,37 @@ export namespace networkservices_v1 {
363
408
  * The request message for Operations.CancelOperation.
364
409
  */
365
410
  export interface Schema$CancelOperationRequest {}
411
+ /**
412
+ * DNS Peering configuration.
413
+ */
414
+ export interface Schema$DnsPeeringConfig {
415
+ /**
416
+ * Optional. The domain to peer.
417
+ */
418
+ domain?: string | null;
419
+ /**
420
+ * Optional. The target network resource name for DNS peering. Format: projects/{project\}/global/networks/{network_id\}
421
+ */
422
+ targetNetwork?: string | null;
423
+ }
424
+ export interface Schema$EgressNetworkConfig {
425
+ /**
426
+ * Optional. DNS Peering configuration.
427
+ */
428
+ dnsPeeringConfig?: Schema$DnsPeeringConfig;
429
+ /**
430
+ * Optional. The network attachment resource name. Format: projects/{project\}/regions/{region\}/networkAttachments/{network_attachment_id\}
431
+ */
432
+ networkAttachment?: string | null;
433
+ /**
434
+ * Optional. Deprecated: Use tls_config instead. The trust config resource name. Format: projects/{project\}/locations/{location\}/trustConfigs/{trust_config\}
435
+ */
436
+ trustConfig?: string | null;
437
+ /**
438
+ * Optional. The VPC egress setting.
439
+ */
440
+ vpcEgress?: string | null;
441
+ }
366
442
  /**
367
443
  * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
368
444
  */
@@ -1423,6 +1499,23 @@ export namespace networkservices_v1 {
1423
1499
  */
1424
1500
  updateTime?: string | null;
1425
1501
  }
1502
+ /**
1503
+ * Response returned by the ListAgentConnectivityTemplates method.
1504
+ */
1505
+ export interface Schema$ListAgentConnectivityTemplatesResponse {
1506
+ /**
1507
+ * List of AgentConnectivityTemplate resources.
1508
+ */
1509
+ agentConnectivityTemplates?: Schema$AgentConnectivityTemplate[];
1510
+ /**
1511
+ * If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.
1512
+ */
1513
+ nextPageToken?: string | null;
1514
+ /**
1515
+ * Unordered list. Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.
1516
+ */
1517
+ unreachable?: string[] | null;
1518
+ }
1426
1519
  /**
1427
1520
  * Response returned by the ListAgentGateways method.
1428
1521
  */
@@ -2500,11 +2593,11 @@ export namespace networkservices_v1 {
2500
2593
  */
2501
2594
  enable?: boolean | null;
2502
2595
  /**
2503
- * Non-empty default. Specifies the lowest level of the plugin logs that are exported to Cloud Logging. This setting relates to the logs generated by using logging statements in your Wasm code. This field is can be set only if logging is enabled for the plugin. If the field is not provided when logging is enabled, it is set to `INFO` by default.
2596
+ * Optional. Non-empty default. Specifies the lowest level of the plugin logs that are exported to Cloud Logging. This setting relates to the logs generated by using logging statements in your Wasm code. This field is can be set only if logging is enabled for the plugin. If the field is not provided when logging is enabled, it is set to `INFO` by default.
2504
2597
  */
2505
2598
  minLogLevel?: string | null;
2506
2599
  /**
2507
- * Non-empty default. Configures the sampling rate of activity logs, where `1.0` means all logged activity is reported and `0.0` means no activity is reported. A floating point value between `0.0` and `1.0` indicates that a percentage of log messages is stored. The default value when logging is enabled is `1.0`. The value of the field must be between `0` and `1` (inclusive). This field can be specified only if logging is enabled for this plugin.
2600
+ * Optional. Non-empty default. Configures the sampling rate of activity logs, where `1.0` means all logged activity is reported and `0.0` means no activity is reported. A floating point value between `0.0` and `1.0` indicates that a percentage of log messages is stored. The default value when logging is enabled is `1.0`. The value of the field must be between `0` and `1` (inclusive). This field can be specified only if logging is enabled for this plugin.
2508
2601
  */
2509
2602
  sampleRate?: number | null;
2510
2603
  }
@@ -2615,6 +2708,7 @@ export namespace networkservices_v1 {
2615
2708
 
2616
2709
  export class Resource$Projects$Locations {
2617
2710
  context: APIRequestContext;
2711
+ agentConnectivityTemplates: Resource$Projects$Locations$Agentconnectivitytemplates;
2618
2712
  agentGateways: Resource$Projects$Locations$Agentgateways;
2619
2713
  authzExtensions: Resource$Projects$Locations$Authzextensions;
2620
2714
  edgeCacheKeysets: Resource$Projects$Locations$Edgecachekeysets;
@@ -2638,6 +2732,10 @@ export namespace networkservices_v1 {
2638
2732
  wasmPlugins: Resource$Projects$Locations$Wasmplugins;
2639
2733
  constructor(context: APIRequestContext) {
2640
2734
  this.context = context;
2735
+ this.agentConnectivityTemplates =
2736
+ new Resource$Projects$Locations$Agentconnectivitytemplates(
2737
+ this.context
2738
+ );
2641
2739
  this.agentGateways = new Resource$Projects$Locations$Agentgateways(
2642
2740
  this.context
2643
2741
  );
@@ -3009,6 +3107,843 @@ export namespace networkservices_v1 {
3009
3107
  pageToken?: string;
3010
3108
  }
3011
3109
 
3110
+ export class Resource$Projects$Locations$Agentconnectivitytemplates {
3111
+ context: APIRequestContext;
3112
+ constructor(context: APIRequestContext) {
3113
+ this.context = context;
3114
+ }
3115
+
3116
+ /**
3117
+ * Creates a new AgentConnectivityTemplate in a given project and location.
3118
+ * @example
3119
+ * ```js
3120
+ * // Before running the sample:
3121
+ * // - Enable the API at:
3122
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3123
+ * // - Login into gcloud by running:
3124
+ * // ```sh
3125
+ * // $ gcloud auth application-default login
3126
+ * // ```
3127
+ * // - Install the npm module by running:
3128
+ * // ```sh
3129
+ * // $ npm install googleapis
3130
+ * // ```
3131
+ *
3132
+ * const {google} = require('googleapis');
3133
+ * const networkservices = google.networkservices('v1');
3134
+ *
3135
+ * async function main() {
3136
+ * const auth = new google.auth.GoogleAuth({
3137
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3138
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3139
+ * });
3140
+ *
3141
+ * // Acquire an auth client, and bind it to all future calls
3142
+ * const authClient = await auth.getClient();
3143
+ * google.options({auth: authClient});
3144
+ *
3145
+ * // Do the magic
3146
+ * const res =
3147
+ * await networkservices.projects.locations.agentConnectivityTemplates.create({
3148
+ * // Required. Short name of the AgentConnectivityTemplate resource to be created.
3149
+ * agentConnectivityTemplateId: 'placeholder-value',
3150
+ * // Required. The parent resource of the AgentConnectivityTemplate. Must be in the format `projects/x/locations/x`.
3151
+ * parent: 'projects/my-project/locations/my-location',
3152
+ *
3153
+ * // Request body metadata
3154
+ * requestBody: {
3155
+ * // request body parameters
3156
+ * // {
3157
+ * // "accessPath": "my_accessPath",
3158
+ * // "accessTypes": [],
3159
+ * // "createTime": "my_createTime",
3160
+ * // "description": "my_description",
3161
+ * // "egressNetworkConfig": {},
3162
+ * // "etag": "my_etag",
3163
+ * // "labels": {},
3164
+ * // "name": "my_name",
3165
+ * // "updateTime": "my_updateTime"
3166
+ * // }
3167
+ * },
3168
+ * });
3169
+ * console.log(res.data);
3170
+ *
3171
+ * // Example response
3172
+ * // {
3173
+ * // "done": false,
3174
+ * // "error": {},
3175
+ * // "metadata": {},
3176
+ * // "name": "my_name",
3177
+ * // "response": {}
3178
+ * // }
3179
+ * }
3180
+ *
3181
+ * main().catch(e => {
3182
+ * console.error(e);
3183
+ * throw e;
3184
+ * });
3185
+ *
3186
+ * ```
3187
+ *
3188
+ * @param params - Parameters for request
3189
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3190
+ * @param callback - Optional callback that handles the response.
3191
+ * @returns A promise if used with async/await, or void if used with a callback.
3192
+ */
3193
+ create(
3194
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
3195
+ options: StreamMethodOptions
3196
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3197
+ create(
3198
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
3199
+ options?: MethodOptions
3200
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3201
+ create(
3202
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
3203
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3204
+ callback: BodyResponseCallback<Readable>
3205
+ ): void;
3206
+ create(
3207
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
3208
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3209
+ callback: BodyResponseCallback<Schema$Operation>
3210
+ ): void;
3211
+ create(
3212
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
3213
+ callback: BodyResponseCallback<Schema$Operation>
3214
+ ): void;
3215
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
3216
+ create(
3217
+ paramsOrCallback?:
3218
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create
3219
+ | BodyResponseCallback<Schema$Operation>
3220
+ | BodyResponseCallback<Readable>,
3221
+ optionsOrCallback?:
3222
+ | MethodOptions
3223
+ | StreamMethodOptions
3224
+ | BodyResponseCallback<Schema$Operation>
3225
+ | BodyResponseCallback<Readable>,
3226
+ callback?:
3227
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
3228
+ ):
3229
+ | void
3230
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3231
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3232
+ let params = (paramsOrCallback ||
3233
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create;
3234
+ let options = (optionsOrCallback || {}) as MethodOptions;
3235
+
3236
+ if (typeof paramsOrCallback === 'function') {
3237
+ callback = paramsOrCallback;
3238
+ params =
3239
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create;
3240
+ options = {};
3241
+ }
3242
+
3243
+ if (typeof optionsOrCallback === 'function') {
3244
+ callback = optionsOrCallback;
3245
+ options = {};
3246
+ }
3247
+
3248
+ const rootUrl =
3249
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3250
+ const parameters = {
3251
+ options: Object.assign(
3252
+ {
3253
+ url: (rootUrl + '/v1/{+parent}/agentConnectivityTemplates').replace(
3254
+ /([^:]\/)\/+/g,
3255
+ '$1'
3256
+ ),
3257
+ method: 'POST',
3258
+ apiVersion: '',
3259
+ },
3260
+ options
3261
+ ),
3262
+ params,
3263
+ requiredParams: ['parent'],
3264
+ pathParams: ['parent'],
3265
+ context: this.context,
3266
+ };
3267
+ if (callback) {
3268
+ createAPIRequest<Schema$Operation>(
3269
+ parameters,
3270
+ callback as BodyResponseCallback<unknown>
3271
+ );
3272
+ } else {
3273
+ return createAPIRequest<Schema$Operation>(parameters);
3274
+ }
3275
+ }
3276
+
3277
+ /**
3278
+ * Deletes a single AgentConnectivityTemplate.
3279
+ * @example
3280
+ * ```js
3281
+ * // Before running the sample:
3282
+ * // - Enable the API at:
3283
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3284
+ * // - Login into gcloud by running:
3285
+ * // ```sh
3286
+ * // $ gcloud auth application-default login
3287
+ * // ```
3288
+ * // - Install the npm module by running:
3289
+ * // ```sh
3290
+ * // $ npm install googleapis
3291
+ * // ```
3292
+ *
3293
+ * const {google} = require('googleapis');
3294
+ * const networkservices = google.networkservices('v1');
3295
+ *
3296
+ * async function main() {
3297
+ * const auth = new google.auth.GoogleAuth({
3298
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3299
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3300
+ * });
3301
+ *
3302
+ * // Acquire an auth client, and bind it to all future calls
3303
+ * const authClient = await auth.getClient();
3304
+ * google.options({auth: authClient});
3305
+ *
3306
+ * // Do the magic
3307
+ * const res =
3308
+ * await networkservices.projects.locations.agentConnectivityTemplates.delete({
3309
+ * // Optional. The etag of the AgentConnectivityTemplate to delete.
3310
+ * etag: 'placeholder-value',
3311
+ * // Required. A name of the AgentConnectivityTemplate to delete. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3312
+ * name: 'projects/my-project/locations/my-location/agentConnectivityTemplates/my-agentConnectivityTemplate',
3313
+ * });
3314
+ * console.log(res.data);
3315
+ *
3316
+ * // Example response
3317
+ * // {
3318
+ * // "done": false,
3319
+ * // "error": {},
3320
+ * // "metadata": {},
3321
+ * // "name": "my_name",
3322
+ * // "response": {}
3323
+ * // }
3324
+ * }
3325
+ *
3326
+ * main().catch(e => {
3327
+ * console.error(e);
3328
+ * throw e;
3329
+ * });
3330
+ *
3331
+ * ```
3332
+ *
3333
+ * @param params - Parameters for request
3334
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3335
+ * @param callback - Optional callback that handles the response.
3336
+ * @returns A promise if used with async/await, or void if used with a callback.
3337
+ */
3338
+ delete(
3339
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3340
+ options: StreamMethodOptions
3341
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3342
+ delete(
3343
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3344
+ options?: MethodOptions
3345
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3346
+ delete(
3347
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3348
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3349
+ callback: BodyResponseCallback<Readable>
3350
+ ): void;
3351
+ delete(
3352
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3353
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3354
+ callback: BodyResponseCallback<Schema$Operation>
3355
+ ): void;
3356
+ delete(
3357
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3358
+ callback: BodyResponseCallback<Schema$Operation>
3359
+ ): void;
3360
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
3361
+ delete(
3362
+ paramsOrCallback?:
3363
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete
3364
+ | BodyResponseCallback<Schema$Operation>
3365
+ | BodyResponseCallback<Readable>,
3366
+ optionsOrCallback?:
3367
+ | MethodOptions
3368
+ | StreamMethodOptions
3369
+ | BodyResponseCallback<Schema$Operation>
3370
+ | BodyResponseCallback<Readable>,
3371
+ callback?:
3372
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
3373
+ ):
3374
+ | void
3375
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3376
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3377
+ let params = (paramsOrCallback ||
3378
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete;
3379
+ let options = (optionsOrCallback || {}) as MethodOptions;
3380
+
3381
+ if (typeof paramsOrCallback === 'function') {
3382
+ callback = paramsOrCallback;
3383
+ params =
3384
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete;
3385
+ options = {};
3386
+ }
3387
+
3388
+ if (typeof optionsOrCallback === 'function') {
3389
+ callback = optionsOrCallback;
3390
+ options = {};
3391
+ }
3392
+
3393
+ const rootUrl =
3394
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3395
+ const parameters = {
3396
+ options: Object.assign(
3397
+ {
3398
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3399
+ method: 'DELETE',
3400
+ apiVersion: '',
3401
+ },
3402
+ options
3403
+ ),
3404
+ params,
3405
+ requiredParams: ['name'],
3406
+ pathParams: ['name'],
3407
+ context: this.context,
3408
+ };
3409
+ if (callback) {
3410
+ createAPIRequest<Schema$Operation>(
3411
+ parameters,
3412
+ callback as BodyResponseCallback<unknown>
3413
+ );
3414
+ } else {
3415
+ return createAPIRequest<Schema$Operation>(parameters);
3416
+ }
3417
+ }
3418
+
3419
+ /**
3420
+ * Gets details of a single AgentConnectivityTemplate.
3421
+ * @example
3422
+ * ```js
3423
+ * // Before running the sample:
3424
+ * // - Enable the API at:
3425
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3426
+ * // - Login into gcloud by running:
3427
+ * // ```sh
3428
+ * // $ gcloud auth application-default login
3429
+ * // ```
3430
+ * // - Install the npm module by running:
3431
+ * // ```sh
3432
+ * // $ npm install googleapis
3433
+ * // ```
3434
+ *
3435
+ * const {google} = require('googleapis');
3436
+ * const networkservices = google.networkservices('v1');
3437
+ *
3438
+ * async function main() {
3439
+ * const auth = new google.auth.GoogleAuth({
3440
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3441
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3442
+ * });
3443
+ *
3444
+ * // Acquire an auth client, and bind it to all future calls
3445
+ * const authClient = await auth.getClient();
3446
+ * google.options({auth: authClient});
3447
+ *
3448
+ * // Do the magic
3449
+ * const res =
3450
+ * await networkservices.projects.locations.agentConnectivityTemplates.get({
3451
+ * // Required. A name of the AgentConnectivityTemplate to get. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3452
+ * name: 'projects/my-project/locations/my-location/agentConnectivityTemplates/my-agentConnectivityTemplate',
3453
+ * });
3454
+ * console.log(res.data);
3455
+ *
3456
+ * // Example response
3457
+ * // {
3458
+ * // "accessPath": "my_accessPath",
3459
+ * // "accessTypes": [],
3460
+ * // "createTime": "my_createTime",
3461
+ * // "description": "my_description",
3462
+ * // "egressNetworkConfig": {},
3463
+ * // "etag": "my_etag",
3464
+ * // "labels": {},
3465
+ * // "name": "my_name",
3466
+ * // "updateTime": "my_updateTime"
3467
+ * // }
3468
+ * }
3469
+ *
3470
+ * main().catch(e => {
3471
+ * console.error(e);
3472
+ * throw e;
3473
+ * });
3474
+ *
3475
+ * ```
3476
+ *
3477
+ * @param params - Parameters for request
3478
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3479
+ * @param callback - Optional callback that handles the response.
3480
+ * @returns A promise if used with async/await, or void if used with a callback.
3481
+ */
3482
+ get(
3483
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3484
+ options: StreamMethodOptions
3485
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3486
+ get(
3487
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3488
+ options?: MethodOptions
3489
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AgentConnectivityTemplate>>;
3490
+ get(
3491
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3492
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3493
+ callback: BodyResponseCallback<Readable>
3494
+ ): void;
3495
+ get(
3496
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3497
+ options:
3498
+ MethodOptions | BodyResponseCallback<Schema$AgentConnectivityTemplate>,
3499
+ callback: BodyResponseCallback<Schema$AgentConnectivityTemplate>
3500
+ ): void;
3501
+ get(
3502
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3503
+ callback: BodyResponseCallback<Schema$AgentConnectivityTemplate>
3504
+ ): void;
3505
+ get(callback: BodyResponseCallback<Schema$AgentConnectivityTemplate>): void;
3506
+ get(
3507
+ paramsOrCallback?:
3508
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get
3509
+ | BodyResponseCallback<Schema$AgentConnectivityTemplate>
3510
+ | BodyResponseCallback<Readable>,
3511
+ optionsOrCallback?:
3512
+ | MethodOptions
3513
+ | StreamMethodOptions
3514
+ | BodyResponseCallback<Schema$AgentConnectivityTemplate>
3515
+ | BodyResponseCallback<Readable>,
3516
+ callback?:
3517
+ | BodyResponseCallback<Schema$AgentConnectivityTemplate>
3518
+ | BodyResponseCallback<Readable>
3519
+ ):
3520
+ | void
3521
+ | Promise<GaxiosResponseWithHTTP2<Schema$AgentConnectivityTemplate>>
3522
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3523
+ let params = (paramsOrCallback ||
3524
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get;
3525
+ let options = (optionsOrCallback || {}) as MethodOptions;
3526
+
3527
+ if (typeof paramsOrCallback === 'function') {
3528
+ callback = paramsOrCallback;
3529
+ params =
3530
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get;
3531
+ options = {};
3532
+ }
3533
+
3534
+ if (typeof optionsOrCallback === 'function') {
3535
+ callback = optionsOrCallback;
3536
+ options = {};
3537
+ }
3538
+
3539
+ const rootUrl =
3540
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3541
+ const parameters = {
3542
+ options: Object.assign(
3543
+ {
3544
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3545
+ method: 'GET',
3546
+ apiVersion: '',
3547
+ },
3548
+ options
3549
+ ),
3550
+ params,
3551
+ requiredParams: ['name'],
3552
+ pathParams: ['name'],
3553
+ context: this.context,
3554
+ };
3555
+ if (callback) {
3556
+ createAPIRequest<Schema$AgentConnectivityTemplate>(
3557
+ parameters,
3558
+ callback as BodyResponseCallback<unknown>
3559
+ );
3560
+ } else {
3561
+ return createAPIRequest<Schema$AgentConnectivityTemplate>(parameters);
3562
+ }
3563
+ }
3564
+
3565
+ /**
3566
+ * Lists AgentConnectivityTemplates in a given project and location.
3567
+ * @example
3568
+ * ```js
3569
+ * // Before running the sample:
3570
+ * // - Enable the API at:
3571
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3572
+ * // - Login into gcloud by running:
3573
+ * // ```sh
3574
+ * // $ gcloud auth application-default login
3575
+ * // ```
3576
+ * // - Install the npm module by running:
3577
+ * // ```sh
3578
+ * // $ npm install googleapis
3579
+ * // ```
3580
+ *
3581
+ * const {google} = require('googleapis');
3582
+ * const networkservices = google.networkservices('v1');
3583
+ *
3584
+ * async function main() {
3585
+ * const auth = new google.auth.GoogleAuth({
3586
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3587
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3588
+ * });
3589
+ *
3590
+ * // Acquire an auth client, and bind it to all future calls
3591
+ * const authClient = await auth.getClient();
3592
+ * google.options({auth: authClient});
3593
+ *
3594
+ * // Do the magic
3595
+ * const res =
3596
+ * await networkservices.projects.locations.agentConnectivityTemplates.list({
3597
+ * // Optional. Maximum number of AgentConnectivityTemplates to return per call.
3598
+ * pageSize: 'placeholder-value',
3599
+ * // Optional. The value returned by the last `ListAgentConnectivityTemplatesResponse` Indicates that this is a continuation of a prior `ListAgentConnectivityTemplates` call, and that the system should return the next page of data.
3600
+ * pageToken: 'placeholder-value',
3601
+ * // Required. The project and location from which the AgentConnectivityTemplates should be listed, specified in the format `projects/x/locations/x`.
3602
+ * parent: 'projects/my-project/locations/my-location',
3603
+ * // Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.
3604
+ * returnPartialSuccess: 'placeholder-value',
3605
+ * });
3606
+ * console.log(res.data);
3607
+ *
3608
+ * // Example response
3609
+ * // {
3610
+ * // "agentConnectivityTemplates": [],
3611
+ * // "nextPageToken": "my_nextPageToken",
3612
+ * // "unreachable": []
3613
+ * // }
3614
+ * }
3615
+ *
3616
+ * main().catch(e => {
3617
+ * console.error(e);
3618
+ * throw e;
3619
+ * });
3620
+ *
3621
+ * ```
3622
+ *
3623
+ * @param params - Parameters for request
3624
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3625
+ * @param callback - Optional callback that handles the response.
3626
+ * @returns A promise if used with async/await, or void if used with a callback.
3627
+ */
3628
+ list(
3629
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3630
+ options: StreamMethodOptions
3631
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3632
+ list(
3633
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3634
+ options?: MethodOptions
3635
+ ): Promise<
3636
+ GaxiosResponseWithHTTP2<Schema$ListAgentConnectivityTemplatesResponse>
3637
+ >;
3638
+ list(
3639
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3640
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3641
+ callback: BodyResponseCallback<Readable>
3642
+ ): void;
3643
+ list(
3644
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3645
+ options:
3646
+ | MethodOptions
3647
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>,
3648
+ callback: BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3649
+ ): void;
3650
+ list(
3651
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3652
+ callback: BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3653
+ ): void;
3654
+ list(
3655
+ callback: BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3656
+ ): void;
3657
+ list(
3658
+ paramsOrCallback?:
3659
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$List
3660
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3661
+ | BodyResponseCallback<Readable>,
3662
+ optionsOrCallback?:
3663
+ | MethodOptions
3664
+ | StreamMethodOptions
3665
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3666
+ | BodyResponseCallback<Readable>,
3667
+ callback?:
3668
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3669
+ | BodyResponseCallback<Readable>
3670
+ ):
3671
+ | void
3672
+ | Promise<
3673
+ GaxiosResponseWithHTTP2<Schema$ListAgentConnectivityTemplatesResponse>
3674
+ >
3675
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3676
+ let params = (paramsOrCallback ||
3677
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$List;
3678
+ let options = (optionsOrCallback || {}) as MethodOptions;
3679
+
3680
+ if (typeof paramsOrCallback === 'function') {
3681
+ callback = paramsOrCallback;
3682
+ params =
3683
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$List;
3684
+ options = {};
3685
+ }
3686
+
3687
+ if (typeof optionsOrCallback === 'function') {
3688
+ callback = optionsOrCallback;
3689
+ options = {};
3690
+ }
3691
+
3692
+ const rootUrl =
3693
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3694
+ const parameters = {
3695
+ options: Object.assign(
3696
+ {
3697
+ url: (rootUrl + '/v1/{+parent}/agentConnectivityTemplates').replace(
3698
+ /([^:]\/)\/+/g,
3699
+ '$1'
3700
+ ),
3701
+ method: 'GET',
3702
+ apiVersion: '',
3703
+ },
3704
+ options
3705
+ ),
3706
+ params,
3707
+ requiredParams: ['parent'],
3708
+ pathParams: ['parent'],
3709
+ context: this.context,
3710
+ };
3711
+ if (callback) {
3712
+ createAPIRequest<Schema$ListAgentConnectivityTemplatesResponse>(
3713
+ parameters,
3714
+ callback as BodyResponseCallback<unknown>
3715
+ );
3716
+ } else {
3717
+ return createAPIRequest<Schema$ListAgentConnectivityTemplatesResponse>(
3718
+ parameters
3719
+ );
3720
+ }
3721
+ }
3722
+
3723
+ /**
3724
+ * Updates the parameters of a single AgentConnectivityTemplate.
3725
+ * @example
3726
+ * ```js
3727
+ * // Before running the sample:
3728
+ * // - Enable the API at:
3729
+ * // https://console.developers.google.com/apis/api/networkservices.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 networkservices = google.networkservices('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: ['https://www.googleapis.com/auth/cloud-platform'],
3746
+ * });
3747
+ *
3748
+ * // Acquire an auth client, and bind it to all future calls
3749
+ * const authClient = await auth.getClient();
3750
+ * google.options({auth: authClient});
3751
+ *
3752
+ * // Do the magic
3753
+ * const res =
3754
+ * await networkservices.projects.locations.agentConnectivityTemplates.patch({
3755
+ * // Identifier. Name of the AgentConnectivityTemplate resource. It matches pattern `projects/x/locations/x/agentConnectivityTemplates/`.
3756
+ * name: 'projects/my-project/locations/my-location/agentConnectivityTemplates/my-agentConnectivityTemplate',
3757
+ * // Optional. Field mask is used to specify the fields to be overwritten in the AgentConnectivityTemplate resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
3758
+ * updateMask: 'placeholder-value',
3759
+ *
3760
+ * // Request body metadata
3761
+ * requestBody: {
3762
+ * // request body parameters
3763
+ * // {
3764
+ * // "accessPath": "my_accessPath",
3765
+ * // "accessTypes": [],
3766
+ * // "createTime": "my_createTime",
3767
+ * // "description": "my_description",
3768
+ * // "egressNetworkConfig": {},
3769
+ * // "etag": "my_etag",
3770
+ * // "labels": {},
3771
+ * // "name": "my_name",
3772
+ * // "updateTime": "my_updateTime"
3773
+ * // }
3774
+ * },
3775
+ * });
3776
+ * console.log(res.data);
3777
+ *
3778
+ * // Example response
3779
+ * // {
3780
+ * // "done": false,
3781
+ * // "error": {},
3782
+ * // "metadata": {},
3783
+ * // "name": "my_name",
3784
+ * // "response": {}
3785
+ * // }
3786
+ * }
3787
+ *
3788
+ * main().catch(e => {
3789
+ * console.error(e);
3790
+ * throw e;
3791
+ * });
3792
+ *
3793
+ * ```
3794
+ *
3795
+ * @param params - Parameters for request
3796
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3797
+ * @param callback - Optional callback that handles the response.
3798
+ * @returns A promise if used with async/await, or void if used with a callback.
3799
+ */
3800
+ patch(
3801
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3802
+ options: StreamMethodOptions
3803
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3804
+ patch(
3805
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3806
+ options?: MethodOptions
3807
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3808
+ patch(
3809
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3810
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3811
+ callback: BodyResponseCallback<Readable>
3812
+ ): void;
3813
+ patch(
3814
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3815
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3816
+ callback: BodyResponseCallback<Schema$Operation>
3817
+ ): void;
3818
+ patch(
3819
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3820
+ callback: BodyResponseCallback<Schema$Operation>
3821
+ ): void;
3822
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
3823
+ patch(
3824
+ paramsOrCallback?:
3825
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch
3826
+ | BodyResponseCallback<Schema$Operation>
3827
+ | BodyResponseCallback<Readable>,
3828
+ optionsOrCallback?:
3829
+ | MethodOptions
3830
+ | StreamMethodOptions
3831
+ | BodyResponseCallback<Schema$Operation>
3832
+ | BodyResponseCallback<Readable>,
3833
+ callback?:
3834
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
3835
+ ):
3836
+ | void
3837
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3838
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3839
+ let params = (paramsOrCallback ||
3840
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch;
3841
+ let options = (optionsOrCallback || {}) as MethodOptions;
3842
+
3843
+ if (typeof paramsOrCallback === 'function') {
3844
+ callback = paramsOrCallback;
3845
+ params =
3846
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch;
3847
+ options = {};
3848
+ }
3849
+
3850
+ if (typeof optionsOrCallback === 'function') {
3851
+ callback = optionsOrCallback;
3852
+ options = {};
3853
+ }
3854
+
3855
+ const rootUrl =
3856
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3857
+ const parameters = {
3858
+ options: Object.assign(
3859
+ {
3860
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3861
+ method: 'PATCH',
3862
+ apiVersion: '',
3863
+ },
3864
+ options
3865
+ ),
3866
+ params,
3867
+ requiredParams: ['name'],
3868
+ pathParams: ['name'],
3869
+ context: this.context,
3870
+ };
3871
+ if (callback) {
3872
+ createAPIRequest<Schema$Operation>(
3873
+ parameters,
3874
+ callback as BodyResponseCallback<unknown>
3875
+ );
3876
+ } else {
3877
+ return createAPIRequest<Schema$Operation>(parameters);
3878
+ }
3879
+ }
3880
+ }
3881
+
3882
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create extends StandardParameters {
3883
+ /**
3884
+ * Required. Short name of the AgentConnectivityTemplate resource to be created.
3885
+ */
3886
+ agentConnectivityTemplateId?: string;
3887
+ /**
3888
+ * Required. The parent resource of the AgentConnectivityTemplate. Must be in the format `projects/x/locations/x`.
3889
+ */
3890
+ parent?: string;
3891
+
3892
+ /**
3893
+ * Request body metadata
3894
+ */
3895
+ requestBody?: Schema$AgentConnectivityTemplate;
3896
+ }
3897
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete extends StandardParameters {
3898
+ /**
3899
+ * Optional. The etag of the AgentConnectivityTemplate to delete.
3900
+ */
3901
+ etag?: string;
3902
+ /**
3903
+ * Required. A name of the AgentConnectivityTemplate to delete. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3904
+ */
3905
+ name?: string;
3906
+ }
3907
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get extends StandardParameters {
3908
+ /**
3909
+ * Required. A name of the AgentConnectivityTemplate to get. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3910
+ */
3911
+ name?: string;
3912
+ }
3913
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$List extends StandardParameters {
3914
+ /**
3915
+ * Optional. Maximum number of AgentConnectivityTemplates to return per call.
3916
+ */
3917
+ pageSize?: number;
3918
+ /**
3919
+ * Optional. The value returned by the last `ListAgentConnectivityTemplatesResponse` Indicates that this is a continuation of a prior `ListAgentConnectivityTemplates` call, and that the system should return the next page of data.
3920
+ */
3921
+ pageToken?: string;
3922
+ /**
3923
+ * Required. The project and location from which the AgentConnectivityTemplates should be listed, specified in the format `projects/x/locations/x`.
3924
+ */
3925
+ parent?: string;
3926
+ /**
3927
+ * Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.
3928
+ */
3929
+ returnPartialSuccess?: boolean;
3930
+ }
3931
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch extends StandardParameters {
3932
+ /**
3933
+ * Identifier. Name of the AgentConnectivityTemplate resource. It matches pattern `projects/x/locations/x/agentConnectivityTemplates/`.
3934
+ */
3935
+ name?: string;
3936
+ /**
3937
+ * Optional. Field mask is used to specify the fields to be overwritten in the AgentConnectivityTemplate resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
3938
+ */
3939
+ updateMask?: string;
3940
+
3941
+ /**
3942
+ * Request body metadata
3943
+ */
3944
+ requestBody?: Schema$AgentConnectivityTemplate;
3945
+ }
3946
+
3012
3947
  export class Resource$Projects$Locations$Agentgateways {
3013
3948
  context: APIRequestContext;
3014
3949
  constructor(context: APIRequestContext) {
@@ -3055,6 +3990,7 @@ export namespace networkservices_v1 {
3055
3990
  * requestBody: {
3056
3991
  * // request body parameters
3057
3992
  * // {
3993
+ * // "agentConnectivityTemplate": "my_agentConnectivityTemplate",
3058
3994
  * // "agentGatewayCard": {},
3059
3995
  * // "createTime": "my_createTime",
3060
3996
  * // "description": "my_description",
@@ -3355,6 +4291,7 @@ export namespace networkservices_v1 {
3355
4291
  *
3356
4292
  * // Example response
3357
4293
  * // {
4294
+ * // "agentConnectivityTemplate": "my_agentConnectivityTemplate",
3358
4295
  * // "agentGatewayCard": {},
3359
4296
  * // "createTime": "my_createTime",
3360
4297
  * // "description": "my_description",
@@ -3652,6 +4589,7 @@ export namespace networkservices_v1 {
3652
4589
  * requestBody: {
3653
4590
  * // request body parameters
3654
4591
  * // {
4592
+ * // "agentConnectivityTemplate": "my_agentConnectivityTemplate",
3655
4593
  * // "agentGatewayCard": {},
3656
4594
  * // "createTime": "my_createTime",
3657
4595
  * // "description": "my_description",