@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/v1beta1.ts CHANGED
@@ -124,10 +124,55 @@ export namespace networkservices_v1beta1 {
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
  */
@@ -320,6 +365,37 @@ export namespace networkservices_v1beta1 {
320
365
  * The request message for Operations.CancelOperation.
321
366
  */
322
367
  export interface Schema$CancelOperationRequest {}
368
+ /**
369
+ * DNS Peering configuration.
370
+ */
371
+ export interface Schema$DnsPeeringConfig {
372
+ /**
373
+ * Optional. The domain to peer.
374
+ */
375
+ domain?: string | null;
376
+ /**
377
+ * Optional. The target network resource name for DNS peering. Format: projects/{project\}/global/networks/{network_id\}
378
+ */
379
+ targetNetwork?: string | null;
380
+ }
381
+ export interface Schema$EgressNetworkConfig {
382
+ /**
383
+ * Optional. DNS Peering configuration.
384
+ */
385
+ dnsPeeringConfig?: Schema$DnsPeeringConfig;
386
+ /**
387
+ * Optional. The network attachment resource name. Format: projects/{project\}/regions/{region\}/networkAttachments/{network_attachment_id\}
388
+ */
389
+ networkAttachment?: string | null;
390
+ /**
391
+ * Optional. Deprecated: Use tls_config instead. The trust config resource name. Format: projects/{project\}/locations/{location\}/trustConfigs/{trust_config\}
392
+ */
393
+ trustConfig?: string | null;
394
+ /**
395
+ * Optional. The VPC egress setting.
396
+ */
397
+ vpcEgress?: string | null;
398
+ }
323
399
  /**
324
400
  * 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); \}
325
401
  */
@@ -1378,6 +1454,23 @@ export namespace networkservices_v1beta1 {
1378
1454
  */
1379
1455
  updateTime?: string | null;
1380
1456
  }
1457
+ /**
1458
+ * Response returned by the ListAgentConnectivityTemplates method.
1459
+ */
1460
+ export interface Schema$ListAgentConnectivityTemplatesResponse {
1461
+ /**
1462
+ * List of AgentConnectivityTemplate resources.
1463
+ */
1464
+ agentConnectivityTemplates?: Schema$AgentConnectivityTemplate[];
1465
+ /**
1466
+ * 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`.
1467
+ */
1468
+ nextPageToken?: string | null;
1469
+ /**
1470
+ * Unordered list. Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.
1471
+ */
1472
+ unreachable?: string[] | null;
1473
+ }
1381
1474
  /**
1382
1475
  * Response returned by the ListAgentGateways method.
1383
1476
  */
@@ -2300,11 +2393,11 @@ export namespace networkservices_v1beta1 {
2300
2393
  */
2301
2394
  enable?: boolean | null;
2302
2395
  /**
2303
- * 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.
2396
+ * 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.
2304
2397
  */
2305
2398
  minLogLevel?: string | null;
2306
2399
  /**
2307
- * 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.
2400
+ * 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.
2308
2401
  */
2309
2402
  sampleRate?: number | null;
2310
2403
  }
@@ -2415,6 +2508,7 @@ export namespace networkservices_v1beta1 {
2415
2508
 
2416
2509
  export class Resource$Projects$Locations {
2417
2510
  context: APIRequestContext;
2511
+ agentConnectivityTemplates: Resource$Projects$Locations$Agentconnectivitytemplates;
2418
2512
  agentGateways: Resource$Projects$Locations$Agentgateways;
2419
2513
  authzExtensions: Resource$Projects$Locations$Authzextensions;
2420
2514
  endpointPolicies: Resource$Projects$Locations$Endpointpolicies;
@@ -2434,6 +2528,10 @@ export namespace networkservices_v1beta1 {
2434
2528
  wasmPlugins: Resource$Projects$Locations$Wasmplugins;
2435
2529
  constructor(context: APIRequestContext) {
2436
2530
  this.context = context;
2531
+ this.agentConnectivityTemplates =
2532
+ new Resource$Projects$Locations$Agentconnectivitytemplates(
2533
+ this.context
2534
+ );
2437
2535
  this.agentGateways = new Resource$Projects$Locations$Agentgateways(
2438
2536
  this.context
2439
2537
  );
@@ -2792,6 +2890,841 @@ export namespace networkservices_v1beta1 {
2792
2890
  pageToken?: string;
2793
2891
  }
2794
2892
 
2893
+ export class Resource$Projects$Locations$Agentconnectivitytemplates {
2894
+ context: APIRequestContext;
2895
+ constructor(context: APIRequestContext) {
2896
+ this.context = context;
2897
+ }
2898
+
2899
+ /**
2900
+ * Creates a new AgentConnectivityTemplate in a given project and location.
2901
+ * @example
2902
+ * ```js
2903
+ * // Before running the sample:
2904
+ * // - Enable the API at:
2905
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
2906
+ * // - Login into gcloud by running:
2907
+ * // ```sh
2908
+ * // $ gcloud auth application-default login
2909
+ * // ```
2910
+ * // - Install the npm module by running:
2911
+ * // ```sh
2912
+ * // $ npm install googleapis
2913
+ * // ```
2914
+ *
2915
+ * const {google} = require('googleapis');
2916
+ * const networkservices = google.networkservices('v1beta1');
2917
+ *
2918
+ * async function main() {
2919
+ * const auth = new google.auth.GoogleAuth({
2920
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2921
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2922
+ * });
2923
+ *
2924
+ * // Acquire an auth client, and bind it to all future calls
2925
+ * const authClient = await auth.getClient();
2926
+ * google.options({auth: authClient});
2927
+ *
2928
+ * // Do the magic
2929
+ * const res =
2930
+ * await networkservices.projects.locations.agentConnectivityTemplates.create({
2931
+ * // Required. Short name of the AgentConnectivityTemplate resource to be created.
2932
+ * agentConnectivityTemplateId: 'placeholder-value',
2933
+ * // Required. The parent resource of the AgentConnectivityTemplate. Must be in the format `projects/x/locations/x`.
2934
+ * parent: 'projects/my-project/locations/my-location',
2935
+ *
2936
+ * // Request body metadata
2937
+ * requestBody: {
2938
+ * // request body parameters
2939
+ * // {
2940
+ * // "accessPath": "my_accessPath",
2941
+ * // "accessTypes": [],
2942
+ * // "createTime": "my_createTime",
2943
+ * // "description": "my_description",
2944
+ * // "egressNetworkConfig": {},
2945
+ * // "etag": "my_etag",
2946
+ * // "labels": {},
2947
+ * // "name": "my_name",
2948
+ * // "updateTime": "my_updateTime"
2949
+ * // }
2950
+ * },
2951
+ * });
2952
+ * console.log(res.data);
2953
+ *
2954
+ * // Example response
2955
+ * // {
2956
+ * // "done": false,
2957
+ * // "error": {},
2958
+ * // "metadata": {},
2959
+ * // "name": "my_name",
2960
+ * // "response": {}
2961
+ * // }
2962
+ * }
2963
+ *
2964
+ * main().catch(e => {
2965
+ * console.error(e);
2966
+ * throw e;
2967
+ * });
2968
+ *
2969
+ * ```
2970
+ *
2971
+ * @param params - Parameters for request
2972
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2973
+ * @param callback - Optional callback that handles the response.
2974
+ * @returns A promise if used with async/await, or void if used with a callback.
2975
+ */
2976
+ create(
2977
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
2978
+ options: StreamMethodOptions
2979
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2980
+ create(
2981
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
2982
+ options?: MethodOptions
2983
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2984
+ create(
2985
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
2986
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2987
+ callback: BodyResponseCallback<Readable>
2988
+ ): void;
2989
+ create(
2990
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
2991
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2992
+ callback: BodyResponseCallback<Schema$Operation>
2993
+ ): void;
2994
+ create(
2995
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create,
2996
+ callback: BodyResponseCallback<Schema$Operation>
2997
+ ): void;
2998
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
2999
+ create(
3000
+ paramsOrCallback?:
3001
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create
3002
+ | BodyResponseCallback<Schema$Operation>
3003
+ | BodyResponseCallback<Readable>,
3004
+ optionsOrCallback?:
3005
+ | MethodOptions
3006
+ | StreamMethodOptions
3007
+ | BodyResponseCallback<Schema$Operation>
3008
+ | BodyResponseCallback<Readable>,
3009
+ callback?:
3010
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
3011
+ ):
3012
+ | void
3013
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3014
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3015
+ let params = (paramsOrCallback ||
3016
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create;
3017
+ let options = (optionsOrCallback || {}) as MethodOptions;
3018
+
3019
+ if (typeof paramsOrCallback === 'function') {
3020
+ callback = paramsOrCallback;
3021
+ params =
3022
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create;
3023
+ options = {};
3024
+ }
3025
+
3026
+ if (typeof optionsOrCallback === 'function') {
3027
+ callback = optionsOrCallback;
3028
+ options = {};
3029
+ }
3030
+
3031
+ const rootUrl =
3032
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3033
+ const parameters = {
3034
+ options: Object.assign(
3035
+ {
3036
+ url: (
3037
+ rootUrl + '/v1beta1/{+parent}/agentConnectivityTemplates'
3038
+ ).replace(/([^:]\/)\/+/g, '$1'),
3039
+ method: 'POST',
3040
+ apiVersion: '',
3041
+ },
3042
+ options
3043
+ ),
3044
+ params,
3045
+ requiredParams: ['parent'],
3046
+ pathParams: ['parent'],
3047
+ context: this.context,
3048
+ };
3049
+ if (callback) {
3050
+ createAPIRequest<Schema$Operation>(
3051
+ parameters,
3052
+ callback as BodyResponseCallback<unknown>
3053
+ );
3054
+ } else {
3055
+ return createAPIRequest<Schema$Operation>(parameters);
3056
+ }
3057
+ }
3058
+
3059
+ /**
3060
+ * Deletes a single AgentConnectivityTemplate.
3061
+ * @example
3062
+ * ```js
3063
+ * // Before running the sample:
3064
+ * // - Enable the API at:
3065
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3066
+ * // - Login into gcloud by running:
3067
+ * // ```sh
3068
+ * // $ gcloud auth application-default login
3069
+ * // ```
3070
+ * // - Install the npm module by running:
3071
+ * // ```sh
3072
+ * // $ npm install googleapis
3073
+ * // ```
3074
+ *
3075
+ * const {google} = require('googleapis');
3076
+ * const networkservices = google.networkservices('v1beta1');
3077
+ *
3078
+ * async function main() {
3079
+ * const auth = new google.auth.GoogleAuth({
3080
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3081
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3082
+ * });
3083
+ *
3084
+ * // Acquire an auth client, and bind it to all future calls
3085
+ * const authClient = await auth.getClient();
3086
+ * google.options({auth: authClient});
3087
+ *
3088
+ * // Do the magic
3089
+ * const res =
3090
+ * await networkservices.projects.locations.agentConnectivityTemplates.delete({
3091
+ * // Optional. The etag of the AgentConnectivityTemplate to delete.
3092
+ * etag: 'placeholder-value',
3093
+ * // Required. A name of the AgentConnectivityTemplate to delete. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3094
+ * name: 'projects/my-project/locations/my-location/agentConnectivityTemplates/my-agentConnectivityTemplate',
3095
+ * });
3096
+ * console.log(res.data);
3097
+ *
3098
+ * // Example response
3099
+ * // {
3100
+ * // "done": false,
3101
+ * // "error": {},
3102
+ * // "metadata": {},
3103
+ * // "name": "my_name",
3104
+ * // "response": {}
3105
+ * // }
3106
+ * }
3107
+ *
3108
+ * main().catch(e => {
3109
+ * console.error(e);
3110
+ * throw e;
3111
+ * });
3112
+ *
3113
+ * ```
3114
+ *
3115
+ * @param params - Parameters for request
3116
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3117
+ * @param callback - Optional callback that handles the response.
3118
+ * @returns A promise if used with async/await, or void if used with a callback.
3119
+ */
3120
+ delete(
3121
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3122
+ options: StreamMethodOptions
3123
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3124
+ delete(
3125
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3126
+ options?: MethodOptions
3127
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3128
+ delete(
3129
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3130
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3131
+ callback: BodyResponseCallback<Readable>
3132
+ ): void;
3133
+ delete(
3134
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3135
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3136
+ callback: BodyResponseCallback<Schema$Operation>
3137
+ ): void;
3138
+ delete(
3139
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete,
3140
+ callback: BodyResponseCallback<Schema$Operation>
3141
+ ): void;
3142
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
3143
+ delete(
3144
+ paramsOrCallback?:
3145
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete
3146
+ | BodyResponseCallback<Schema$Operation>
3147
+ | BodyResponseCallback<Readable>,
3148
+ optionsOrCallback?:
3149
+ | MethodOptions
3150
+ | StreamMethodOptions
3151
+ | BodyResponseCallback<Schema$Operation>
3152
+ | BodyResponseCallback<Readable>,
3153
+ callback?:
3154
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
3155
+ ):
3156
+ | void
3157
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3158
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3159
+ let params = (paramsOrCallback ||
3160
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete;
3161
+ let options = (optionsOrCallback || {}) as MethodOptions;
3162
+
3163
+ if (typeof paramsOrCallback === 'function') {
3164
+ callback = paramsOrCallback;
3165
+ params =
3166
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete;
3167
+ options = {};
3168
+ }
3169
+
3170
+ if (typeof optionsOrCallback === 'function') {
3171
+ callback = optionsOrCallback;
3172
+ options = {};
3173
+ }
3174
+
3175
+ const rootUrl =
3176
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3177
+ const parameters = {
3178
+ options: Object.assign(
3179
+ {
3180
+ url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3181
+ method: 'DELETE',
3182
+ apiVersion: '',
3183
+ },
3184
+ options
3185
+ ),
3186
+ params,
3187
+ requiredParams: ['name'],
3188
+ pathParams: ['name'],
3189
+ context: this.context,
3190
+ };
3191
+ if (callback) {
3192
+ createAPIRequest<Schema$Operation>(
3193
+ parameters,
3194
+ callback as BodyResponseCallback<unknown>
3195
+ );
3196
+ } else {
3197
+ return createAPIRequest<Schema$Operation>(parameters);
3198
+ }
3199
+ }
3200
+
3201
+ /**
3202
+ * Gets details of a single AgentConnectivityTemplate.
3203
+ * @example
3204
+ * ```js
3205
+ * // Before running the sample:
3206
+ * // - Enable the API at:
3207
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3208
+ * // - Login into gcloud by running:
3209
+ * // ```sh
3210
+ * // $ gcloud auth application-default login
3211
+ * // ```
3212
+ * // - Install the npm module by running:
3213
+ * // ```sh
3214
+ * // $ npm install googleapis
3215
+ * // ```
3216
+ *
3217
+ * const {google} = require('googleapis');
3218
+ * const networkservices = google.networkservices('v1beta1');
3219
+ *
3220
+ * async function main() {
3221
+ * const auth = new google.auth.GoogleAuth({
3222
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3223
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3224
+ * });
3225
+ *
3226
+ * // Acquire an auth client, and bind it to all future calls
3227
+ * const authClient = await auth.getClient();
3228
+ * google.options({auth: authClient});
3229
+ *
3230
+ * // Do the magic
3231
+ * const res =
3232
+ * await networkservices.projects.locations.agentConnectivityTemplates.get({
3233
+ * // Required. A name of the AgentConnectivityTemplate to get. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3234
+ * name: 'projects/my-project/locations/my-location/agentConnectivityTemplates/my-agentConnectivityTemplate',
3235
+ * });
3236
+ * console.log(res.data);
3237
+ *
3238
+ * // Example response
3239
+ * // {
3240
+ * // "accessPath": "my_accessPath",
3241
+ * // "accessTypes": [],
3242
+ * // "createTime": "my_createTime",
3243
+ * // "description": "my_description",
3244
+ * // "egressNetworkConfig": {},
3245
+ * // "etag": "my_etag",
3246
+ * // "labels": {},
3247
+ * // "name": "my_name",
3248
+ * // "updateTime": "my_updateTime"
3249
+ * // }
3250
+ * }
3251
+ *
3252
+ * main().catch(e => {
3253
+ * console.error(e);
3254
+ * throw e;
3255
+ * });
3256
+ *
3257
+ * ```
3258
+ *
3259
+ * @param params - Parameters for request
3260
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3261
+ * @param callback - Optional callback that handles the response.
3262
+ * @returns A promise if used with async/await, or void if used with a callback.
3263
+ */
3264
+ get(
3265
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3266
+ options: StreamMethodOptions
3267
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3268
+ get(
3269
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3270
+ options?: MethodOptions
3271
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AgentConnectivityTemplate>>;
3272
+ get(
3273
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3274
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3275
+ callback: BodyResponseCallback<Readable>
3276
+ ): void;
3277
+ get(
3278
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3279
+ options:
3280
+ MethodOptions | BodyResponseCallback<Schema$AgentConnectivityTemplate>,
3281
+ callback: BodyResponseCallback<Schema$AgentConnectivityTemplate>
3282
+ ): void;
3283
+ get(
3284
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get,
3285
+ callback: BodyResponseCallback<Schema$AgentConnectivityTemplate>
3286
+ ): void;
3287
+ get(callback: BodyResponseCallback<Schema$AgentConnectivityTemplate>): void;
3288
+ get(
3289
+ paramsOrCallback?:
3290
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get
3291
+ | BodyResponseCallback<Schema$AgentConnectivityTemplate>
3292
+ | BodyResponseCallback<Readable>,
3293
+ optionsOrCallback?:
3294
+ | MethodOptions
3295
+ | StreamMethodOptions
3296
+ | BodyResponseCallback<Schema$AgentConnectivityTemplate>
3297
+ | BodyResponseCallback<Readable>,
3298
+ callback?:
3299
+ | BodyResponseCallback<Schema$AgentConnectivityTemplate>
3300
+ | BodyResponseCallback<Readable>
3301
+ ):
3302
+ | void
3303
+ | Promise<GaxiosResponseWithHTTP2<Schema$AgentConnectivityTemplate>>
3304
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3305
+ let params = (paramsOrCallback ||
3306
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get;
3307
+ let options = (optionsOrCallback || {}) as MethodOptions;
3308
+
3309
+ if (typeof paramsOrCallback === 'function') {
3310
+ callback = paramsOrCallback;
3311
+ params =
3312
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get;
3313
+ options = {};
3314
+ }
3315
+
3316
+ if (typeof optionsOrCallback === 'function') {
3317
+ callback = optionsOrCallback;
3318
+ options = {};
3319
+ }
3320
+
3321
+ const rootUrl =
3322
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3323
+ const parameters = {
3324
+ options: Object.assign(
3325
+ {
3326
+ url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3327
+ method: 'GET',
3328
+ apiVersion: '',
3329
+ },
3330
+ options
3331
+ ),
3332
+ params,
3333
+ requiredParams: ['name'],
3334
+ pathParams: ['name'],
3335
+ context: this.context,
3336
+ };
3337
+ if (callback) {
3338
+ createAPIRequest<Schema$AgentConnectivityTemplate>(
3339
+ parameters,
3340
+ callback as BodyResponseCallback<unknown>
3341
+ );
3342
+ } else {
3343
+ return createAPIRequest<Schema$AgentConnectivityTemplate>(parameters);
3344
+ }
3345
+ }
3346
+
3347
+ /**
3348
+ * Lists AgentConnectivityTemplates in a given project and location.
3349
+ * @example
3350
+ * ```js
3351
+ * // Before running the sample:
3352
+ * // - Enable the API at:
3353
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3354
+ * // - Login into gcloud by running:
3355
+ * // ```sh
3356
+ * // $ gcloud auth application-default login
3357
+ * // ```
3358
+ * // - Install the npm module by running:
3359
+ * // ```sh
3360
+ * // $ npm install googleapis
3361
+ * // ```
3362
+ *
3363
+ * const {google} = require('googleapis');
3364
+ * const networkservices = google.networkservices('v1beta1');
3365
+ *
3366
+ * async function main() {
3367
+ * const auth = new google.auth.GoogleAuth({
3368
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3369
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3370
+ * });
3371
+ *
3372
+ * // Acquire an auth client, and bind it to all future calls
3373
+ * const authClient = await auth.getClient();
3374
+ * google.options({auth: authClient});
3375
+ *
3376
+ * // Do the magic
3377
+ * const res =
3378
+ * await networkservices.projects.locations.agentConnectivityTemplates.list({
3379
+ * // Optional. Maximum number of AgentConnectivityTemplates to return per call.
3380
+ * pageSize: 'placeholder-value',
3381
+ * // 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.
3382
+ * pageToken: 'placeholder-value',
3383
+ * // Required. The project and location from which the AgentConnectivityTemplates should be listed, specified in the format `projects/x/locations/x`.
3384
+ * parent: 'projects/my-project/locations/my-location',
3385
+ * // 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.
3386
+ * returnPartialSuccess: 'placeholder-value',
3387
+ * });
3388
+ * console.log(res.data);
3389
+ *
3390
+ * // Example response
3391
+ * // {
3392
+ * // "agentConnectivityTemplates": [],
3393
+ * // "nextPageToken": "my_nextPageToken",
3394
+ * // "unreachable": []
3395
+ * // }
3396
+ * }
3397
+ *
3398
+ * main().catch(e => {
3399
+ * console.error(e);
3400
+ * throw e;
3401
+ * });
3402
+ *
3403
+ * ```
3404
+ *
3405
+ * @param params - Parameters for request
3406
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3407
+ * @param callback - Optional callback that handles the response.
3408
+ * @returns A promise if used with async/await, or void if used with a callback.
3409
+ */
3410
+ list(
3411
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3412
+ options: StreamMethodOptions
3413
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3414
+ list(
3415
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3416
+ options?: MethodOptions
3417
+ ): Promise<
3418
+ GaxiosResponseWithHTTP2<Schema$ListAgentConnectivityTemplatesResponse>
3419
+ >;
3420
+ list(
3421
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3422
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3423
+ callback: BodyResponseCallback<Readable>
3424
+ ): void;
3425
+ list(
3426
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3427
+ options:
3428
+ | MethodOptions
3429
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>,
3430
+ callback: BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3431
+ ): void;
3432
+ list(
3433
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$List,
3434
+ callback: BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3435
+ ): void;
3436
+ list(
3437
+ callback: BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3438
+ ): void;
3439
+ list(
3440
+ paramsOrCallback?:
3441
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$List
3442
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3443
+ | BodyResponseCallback<Readable>,
3444
+ optionsOrCallback?:
3445
+ | MethodOptions
3446
+ | StreamMethodOptions
3447
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3448
+ | BodyResponseCallback<Readable>,
3449
+ callback?:
3450
+ | BodyResponseCallback<Schema$ListAgentConnectivityTemplatesResponse>
3451
+ | BodyResponseCallback<Readable>
3452
+ ):
3453
+ | void
3454
+ | Promise<
3455
+ GaxiosResponseWithHTTP2<Schema$ListAgentConnectivityTemplatesResponse>
3456
+ >
3457
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3458
+ let params = (paramsOrCallback ||
3459
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$List;
3460
+ let options = (optionsOrCallback || {}) as MethodOptions;
3461
+
3462
+ if (typeof paramsOrCallback === 'function') {
3463
+ callback = paramsOrCallback;
3464
+ params =
3465
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$List;
3466
+ options = {};
3467
+ }
3468
+
3469
+ if (typeof optionsOrCallback === 'function') {
3470
+ callback = optionsOrCallback;
3471
+ options = {};
3472
+ }
3473
+
3474
+ const rootUrl =
3475
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3476
+ const parameters = {
3477
+ options: Object.assign(
3478
+ {
3479
+ url: (
3480
+ rootUrl + '/v1beta1/{+parent}/agentConnectivityTemplates'
3481
+ ).replace(/([^:]\/)\/+/g, '$1'),
3482
+ method: 'GET',
3483
+ apiVersion: '',
3484
+ },
3485
+ options
3486
+ ),
3487
+ params,
3488
+ requiredParams: ['parent'],
3489
+ pathParams: ['parent'],
3490
+ context: this.context,
3491
+ };
3492
+ if (callback) {
3493
+ createAPIRequest<Schema$ListAgentConnectivityTemplatesResponse>(
3494
+ parameters,
3495
+ callback as BodyResponseCallback<unknown>
3496
+ );
3497
+ } else {
3498
+ return createAPIRequest<Schema$ListAgentConnectivityTemplatesResponse>(
3499
+ parameters
3500
+ );
3501
+ }
3502
+ }
3503
+
3504
+ /**
3505
+ * Updates the parameters of a single AgentConnectivityTemplate.
3506
+ * @example
3507
+ * ```js
3508
+ * // Before running the sample:
3509
+ * // - Enable the API at:
3510
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
3511
+ * // - Login into gcloud by running:
3512
+ * // ```sh
3513
+ * // $ gcloud auth application-default login
3514
+ * // ```
3515
+ * // - Install the npm module by running:
3516
+ * // ```sh
3517
+ * // $ npm install googleapis
3518
+ * // ```
3519
+ *
3520
+ * const {google} = require('googleapis');
3521
+ * const networkservices = google.networkservices('v1beta1');
3522
+ *
3523
+ * async function main() {
3524
+ * const auth = new google.auth.GoogleAuth({
3525
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3526
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3527
+ * });
3528
+ *
3529
+ * // Acquire an auth client, and bind it to all future calls
3530
+ * const authClient = await auth.getClient();
3531
+ * google.options({auth: authClient});
3532
+ *
3533
+ * // Do the magic
3534
+ * const res =
3535
+ * await networkservices.projects.locations.agentConnectivityTemplates.patch({
3536
+ * // Identifier. Name of the AgentConnectivityTemplate resource. It matches pattern `projects/x/locations/x/agentConnectivityTemplates/`.
3537
+ * name: 'projects/my-project/locations/my-location/agentConnectivityTemplates/my-agentConnectivityTemplate',
3538
+ * // 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.
3539
+ * updateMask: 'placeholder-value',
3540
+ *
3541
+ * // Request body metadata
3542
+ * requestBody: {
3543
+ * // request body parameters
3544
+ * // {
3545
+ * // "accessPath": "my_accessPath",
3546
+ * // "accessTypes": [],
3547
+ * // "createTime": "my_createTime",
3548
+ * // "description": "my_description",
3549
+ * // "egressNetworkConfig": {},
3550
+ * // "etag": "my_etag",
3551
+ * // "labels": {},
3552
+ * // "name": "my_name",
3553
+ * // "updateTime": "my_updateTime"
3554
+ * // }
3555
+ * },
3556
+ * });
3557
+ * console.log(res.data);
3558
+ *
3559
+ * // Example response
3560
+ * // {
3561
+ * // "done": false,
3562
+ * // "error": {},
3563
+ * // "metadata": {},
3564
+ * // "name": "my_name",
3565
+ * // "response": {}
3566
+ * // }
3567
+ * }
3568
+ *
3569
+ * main().catch(e => {
3570
+ * console.error(e);
3571
+ * throw e;
3572
+ * });
3573
+ *
3574
+ * ```
3575
+ *
3576
+ * @param params - Parameters for request
3577
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3578
+ * @param callback - Optional callback that handles the response.
3579
+ * @returns A promise if used with async/await, or void if used with a callback.
3580
+ */
3581
+ patch(
3582
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3583
+ options: StreamMethodOptions
3584
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3585
+ patch(
3586
+ params?: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3587
+ options?: MethodOptions
3588
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3589
+ patch(
3590
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3591
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3592
+ callback: BodyResponseCallback<Readable>
3593
+ ): void;
3594
+ patch(
3595
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3596
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3597
+ callback: BodyResponseCallback<Schema$Operation>
3598
+ ): void;
3599
+ patch(
3600
+ params: Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch,
3601
+ callback: BodyResponseCallback<Schema$Operation>
3602
+ ): void;
3603
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
3604
+ patch(
3605
+ paramsOrCallback?:
3606
+ | Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch
3607
+ | BodyResponseCallback<Schema$Operation>
3608
+ | BodyResponseCallback<Readable>,
3609
+ optionsOrCallback?:
3610
+ | MethodOptions
3611
+ | StreamMethodOptions
3612
+ | BodyResponseCallback<Schema$Operation>
3613
+ | BodyResponseCallback<Readable>,
3614
+ callback?:
3615
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
3616
+ ):
3617
+ | void
3618
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3619
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3620
+ let params = (paramsOrCallback ||
3621
+ {}) as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch;
3622
+ let options = (optionsOrCallback || {}) as MethodOptions;
3623
+
3624
+ if (typeof paramsOrCallback === 'function') {
3625
+ callback = paramsOrCallback;
3626
+ params =
3627
+ {} as Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch;
3628
+ options = {};
3629
+ }
3630
+
3631
+ if (typeof optionsOrCallback === 'function') {
3632
+ callback = optionsOrCallback;
3633
+ options = {};
3634
+ }
3635
+
3636
+ const rootUrl =
3637
+ options.rootUrl || 'https://networkservices.googleapis.com/';
3638
+ const parameters = {
3639
+ options: Object.assign(
3640
+ {
3641
+ url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3642
+ method: 'PATCH',
3643
+ apiVersion: '',
3644
+ },
3645
+ options
3646
+ ),
3647
+ params,
3648
+ requiredParams: ['name'],
3649
+ pathParams: ['name'],
3650
+ context: this.context,
3651
+ };
3652
+ if (callback) {
3653
+ createAPIRequest<Schema$Operation>(
3654
+ parameters,
3655
+ callback as BodyResponseCallback<unknown>
3656
+ );
3657
+ } else {
3658
+ return createAPIRequest<Schema$Operation>(parameters);
3659
+ }
3660
+ }
3661
+ }
3662
+
3663
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Create extends StandardParameters {
3664
+ /**
3665
+ * Required. Short name of the AgentConnectivityTemplate resource to be created.
3666
+ */
3667
+ agentConnectivityTemplateId?: string;
3668
+ /**
3669
+ * Required. The parent resource of the AgentConnectivityTemplate. Must be in the format `projects/x/locations/x`.
3670
+ */
3671
+ parent?: string;
3672
+
3673
+ /**
3674
+ * Request body metadata
3675
+ */
3676
+ requestBody?: Schema$AgentConnectivityTemplate;
3677
+ }
3678
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Delete extends StandardParameters {
3679
+ /**
3680
+ * Optional. The etag of the AgentConnectivityTemplate to delete.
3681
+ */
3682
+ etag?: string;
3683
+ /**
3684
+ * Required. A name of the AgentConnectivityTemplate to delete. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3685
+ */
3686
+ name?: string;
3687
+ }
3688
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Get extends StandardParameters {
3689
+ /**
3690
+ * Required. A name of the AgentConnectivityTemplate to get. Must be in the format `projects/x/locations/x/agentConnectivityTemplates/x`.
3691
+ */
3692
+ name?: string;
3693
+ }
3694
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$List extends StandardParameters {
3695
+ /**
3696
+ * Optional. Maximum number of AgentConnectivityTemplates to return per call.
3697
+ */
3698
+ pageSize?: number;
3699
+ /**
3700
+ * 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.
3701
+ */
3702
+ pageToken?: string;
3703
+ /**
3704
+ * Required. The project and location from which the AgentConnectivityTemplates should be listed, specified in the format `projects/x/locations/x`.
3705
+ */
3706
+ parent?: string;
3707
+ /**
3708
+ * 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.
3709
+ */
3710
+ returnPartialSuccess?: boolean;
3711
+ }
3712
+ export interface Params$Resource$Projects$Locations$Agentconnectivitytemplates$Patch extends StandardParameters {
3713
+ /**
3714
+ * Identifier. Name of the AgentConnectivityTemplate resource. It matches pattern `projects/x/locations/x/agentConnectivityTemplates/`.
3715
+ */
3716
+ name?: string;
3717
+ /**
3718
+ * 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.
3719
+ */
3720
+ updateMask?: string;
3721
+
3722
+ /**
3723
+ * Request body metadata
3724
+ */
3725
+ requestBody?: Schema$AgentConnectivityTemplate;
3726
+ }
3727
+
2795
3728
  export class Resource$Projects$Locations$Agentgateways {
2796
3729
  context: APIRequestContext;
2797
3730
  constructor(context: APIRequestContext) {
@@ -2838,6 +3771,7 @@ export namespace networkservices_v1beta1 {
2838
3771
  * requestBody: {
2839
3772
  * // request body parameters
2840
3773
  * // {
3774
+ * // "agentConnectivityTemplate": "my_agentConnectivityTemplate",
2841
3775
  * // "agentGatewayCard": {},
2842
3776
  * // "createTime": "my_createTime",
2843
3777
  * // "description": "my_description",
@@ -3138,6 +4072,7 @@ export namespace networkservices_v1beta1 {
3138
4072
  *
3139
4073
  * // Example response
3140
4074
  * // {
4075
+ * // "agentConnectivityTemplate": "my_agentConnectivityTemplate",
3141
4076
  * // "agentGatewayCard": {},
3142
4077
  * // "createTime": "my_createTime",
3143
4078
  * // "description": "my_description",
@@ -3435,6 +4370,7 @@ export namespace networkservices_v1beta1 {
3435
4370
  * requestBody: {
3436
4371
  * // request body parameters
3437
4372
  * // {
4373
+ * // "agentConnectivityTemplate": "my_agentConnectivityTemplate",
3438
4374
  * // "agentGatewayCard": {},
3439
4375
  * // "createTime": "my_createTime",
3440
4376
  * // "description": "my_description",