@maxim_mazurok/gapi.client.networkconnectivity-v1 0.0.20230804 → 0.0.20230816

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.
Files changed (3) hide show
  1. package/index.d.ts +345 -2
  2. package/package.json +1 -1
  3. package/tests.ts +61 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://networkconnectivity.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230804
12
+ // Revision: 20230816
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -154,6 +154,20 @@ declare namespace gapi.client {
154
154
  title?:
155
155
  string;
156
156
  }
157
+ interface Filter {
158
+ /** Optional. The destination IP range of outgoing packets that this policy based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. */
159
+ destRange?:
160
+ string;
161
+ /** Optional. The IP protocol that this policy based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. */
162
+ ipProtocol?:
163
+ string;
164
+ /** Required. Internet protocol versions this policy based route applies to. For this version, only IPV4 is supported. */
165
+ protocolVersion?:
166
+ string;
167
+ /** Optional. The source IP range of outgoing packets that this policy based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. */
168
+ srcRange?:
169
+ string;
170
+ }
157
171
  // tslint:disable-next-line:no-empty-interface
158
172
  interface GoogleLongrunningCancelOperationRequest {
159
173
  }
@@ -301,6 +315,11 @@ declare namespace gapi.client {
301
315
  updateTime?:
302
316
  string;
303
317
  }
318
+ interface InterconnectAttachment {
319
+ /** Optional. Cloud region to install this policy based route on interconnect attachment. Use `all` to install it on all interconnect attachments. */
320
+ region?:
321
+ string;
322
+ }
304
323
  interface InternalRange {
305
324
  /** Time when the internal range was created. */
306
325
  createTime?:
@@ -460,6 +479,17 @@ declare namespace gapi.client {
460
479
  nextPageToken?:
461
480
  string;
462
481
  }
482
+ interface ListPolicyBasedRoutesResponse {
483
+ /** The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. */
484
+ nextPageToken?:
485
+ string;
486
+ /** Policy based routes to be returned. */
487
+ policyBasedRoutes?:
488
+ PolicyBasedRoute[];
489
+ /** Locations that could not be reached. */
490
+ unreachable?:
491
+ string[];
492
+ }
463
493
  interface ListRoutesResponse {
464
494
  /** The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results. */
465
495
  nextPageToken?:
@@ -622,6 +652,56 @@ declare namespace gapi.client {
622
652
  version?:
623
653
  number;
624
654
  }
655
+ interface PolicyBasedRoute {
656
+ /** Output only. Time when the PolicyBasedRoute was created. */
657
+ createTime?:
658
+ string;
659
+ /** Optional. An optional description of this resource. Provide this field when you create the resource. */
660
+ description?:
661
+ string;
662
+ /** Required. The filter to match L4 traffic. */
663
+ filter?:
664
+ Filter;
665
+ /** Optional. The interconnect attachments to which this route applies to. */
666
+ interconnectAttachment?:
667
+ InterconnectAttachment;
668
+ /** Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for Policy Based Route resources. */
669
+ kind?:
670
+ string;
671
+ /** User-defined labels. */
672
+ labels?:
673
+ { [P in string]: string };
674
+ /** Immutable. A unique name of the resource in the form of `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` */
675
+ name?:
676
+ string;
677
+ /** Required. Fully-qualified URL of the network that this route applies to. e.g. projects/my-project/global/networks/my-network. */
678
+ network?:
679
+ string;
680
+ /** Optional. The IP of a global access enabled L4 ILB that should be the next hop to handle matching packets. For this version, only next_hop_ilb_ip is supported. */
681
+ nextHopIlbIp?:
682
+ string;
683
+ /** Optional. Other routes that will be referenced to determine the next hop of the packet. */
684
+ nextHopOtherRoutes?:
685
+ string;
686
+ /**
687
+ * Optional. The priority of this policy based route. Priority is used to break ties in cases where there are more than one matching policy based routes found. In cases where multiple
688
+ * policy based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
689
+ */
690
+ priority?:
691
+ number;
692
+ /** Output only. Server-defined fully-qualified URL for this resource. */
693
+ selfLink?:
694
+ string;
695
+ /** Output only. Time when the PolicyBasedRoute was updated. */
696
+ updateTime?:
697
+ string;
698
+ /** Optional. VM instances to which this policy based route applies to. */
699
+ virtualMachine?:
700
+ VirtualMachine;
701
+ /** Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages. */
702
+ warnings?:
703
+ Warnings[];
704
+ }
625
705
  interface ProducerPscConfig {
626
706
  /** The resource path of a service attachment. Example: projects/{projectNumOrId}/regions/{region}/serviceAttachments/{resourceId}. */
627
707
  serviceAttachmentUri?:
@@ -943,7 +1023,7 @@ declare namespace gapi.client {
943
1023
  /** An optional description of the spoke. */
944
1024
  description?:
945
1025
  string;
946
- /** The name of the group that this spoke is associated with. */
1026
+ /** Optional. The name of the group that this spoke is associated with. */
947
1027
  group?:
948
1028
  string;
949
1029
  /** Immutable. The name of the hub that this spoke is attached to. */
@@ -1048,6 +1128,26 @@ declare namespace gapi.client {
1048
1128
  permissions?:
1049
1129
  string[];
1050
1130
  }
1131
+ interface VirtualMachine {
1132
+ /** Optional. A list of VM instance tags to which this policy based route applies to. VM instances that have ANY of tags specified here will install this PBR. */
1133
+ tags?:
1134
+ string[];
1135
+ }
1136
+ interface Warnings {
1137
+ /** Output only. A warning code, if applicable. */
1138
+ code?:
1139
+ string;
1140
+ /**
1141
+ * Output only. Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no
1142
+ * results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and
1143
+ * a suggested replacement.
1144
+ */
1145
+ data?:
1146
+ { [P in string]: string };
1147
+ /** Output only. A human-readable description of the warning code. */
1148
+ warningMessage?:
1149
+ string;
1150
+ }
1051
1151
  interface GroupsResource {
1052
1152
  /** Gets details about a Network Connectivity Center group. */
1053
1153
  get(request?: {
@@ -2031,6 +2131,198 @@ declare namespace gapi.client {
2031
2131
  RouteTablesResource;
2032
2132
  }
2033
2133
  interface PolicyBasedRoutesResource {
2134
+ /** Creates a new PolicyBasedRoute in a given project and location. */
2135
+ create(request: {
2136
+ /** V1 error format. */
2137
+ "$.xgafv"?:
2138
+ string;
2139
+ /** OAuth access token. */
2140
+ access_token?:
2141
+ string;
2142
+ /** Data format for response. */
2143
+ alt?:
2144
+ string;
2145
+ /** JSONP */
2146
+ callback?:
2147
+ string;
2148
+ /** Selector specifying which fields to include in a partial response. */
2149
+ fields?:
2150
+ string;
2151
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2152
+ key?:
2153
+ string;
2154
+ /** OAuth 2.0 token for the current user. */
2155
+ oauth_token?:
2156
+ string;
2157
+ /** Required. The parent resource's name of the PolicyBasedRoute. */
2158
+ parent:
2159
+ string;
2160
+ /** Required. Unique id for the Policy Based Route to create. */
2161
+ policyBasedRouteId?:
2162
+ string;
2163
+ /** Returns response with indentations and line breaks. */
2164
+ prettyPrint?:
2165
+ boolean;
2166
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2167
+ quotaUser?:
2168
+ string;
2169
+ /**
2170
+ * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
2171
+ * already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and
2172
+ * the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
2173
+ * ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
2174
+ * supported (00000000-0000-0000-0000-000000000000).
2175
+ */
2176
+ requestId?:
2177
+ string;
2178
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2179
+ upload_protocol?:
2180
+ string;
2181
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2182
+ uploadType?:
2183
+ string;
2184
+ /** Request body */
2185
+ resource:
2186
+ PolicyBasedRoute;
2187
+ }): Request<GoogleLongrunningOperation>;
2188
+ create(request: {
2189
+ /** V1 error format. */
2190
+ "$.xgafv"?:
2191
+ string;
2192
+ /** OAuth access token. */
2193
+ access_token?:
2194
+ string;
2195
+ /** Data format for response. */
2196
+ alt?:
2197
+ string;
2198
+ /** JSONP */
2199
+ callback?:
2200
+ string;
2201
+ /** Selector specifying which fields to include in a partial response. */
2202
+ fields?:
2203
+ string;
2204
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2205
+ key?:
2206
+ string;
2207
+ /** OAuth 2.0 token for the current user. */
2208
+ oauth_token?:
2209
+ string;
2210
+ /** Required. The parent resource's name of the PolicyBasedRoute. */
2211
+ parent:
2212
+ string;
2213
+ /** Required. Unique id for the Policy Based Route to create. */
2214
+ policyBasedRouteId?:
2215
+ string;
2216
+ /** Returns response with indentations and line breaks. */
2217
+ prettyPrint?:
2218
+ boolean;
2219
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2220
+ quotaUser?:
2221
+ string;
2222
+ /**
2223
+ * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
2224
+ * already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and
2225
+ * the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
2226
+ * ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
2227
+ * supported (00000000-0000-0000-0000-000000000000).
2228
+ */
2229
+ requestId?:
2230
+ string;
2231
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2232
+ upload_protocol?:
2233
+ string;
2234
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2235
+ uploadType?:
2236
+ string;
2237
+ },
2238
+ body: PolicyBasedRoute): Request<GoogleLongrunningOperation>;
2239
+ /** Deletes a single PolicyBasedRoute. */
2240
+ delete(request?: {
2241
+ /** V1 error format. */
2242
+ "$.xgafv"?:
2243
+ string;
2244
+ /** OAuth access token. */
2245
+ access_token?:
2246
+ string;
2247
+ /** Data format for response. */
2248
+ alt?:
2249
+ string;
2250
+ /** JSONP */
2251
+ callback?:
2252
+ string;
2253
+ /** Selector specifying which fields to include in a partial response. */
2254
+ fields?:
2255
+ string;
2256
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2257
+ key?:
2258
+ string;
2259
+ /** Required. Name of the PolicyBasedRoute resource to delete. */
2260
+ name:
2261
+ string;
2262
+ /** OAuth 2.0 token for the current user. */
2263
+ oauth_token?:
2264
+ string;
2265
+ /** Returns response with indentations and line breaks. */
2266
+ prettyPrint?:
2267
+ boolean;
2268
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2269
+ quotaUser?:
2270
+ string;
2271
+ /**
2272
+ * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
2273
+ * already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and
2274
+ * the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
2275
+ * ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
2276
+ * supported (00000000-0000-0000-0000-000000000000).
2277
+ */
2278
+ requestId?:
2279
+ string;
2280
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2281
+ upload_protocol?:
2282
+ string;
2283
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2284
+ uploadType?:
2285
+ string;
2286
+ }): Request<GoogleLongrunningOperation>;
2287
+ /** Gets details of a single PolicyBasedRoute. */
2288
+ get(request?: {
2289
+ /** V1 error format. */
2290
+ "$.xgafv"?:
2291
+ string;
2292
+ /** OAuth access token. */
2293
+ access_token?:
2294
+ string;
2295
+ /** Data format for response. */
2296
+ alt?:
2297
+ string;
2298
+ /** JSONP */
2299
+ callback?:
2300
+ string;
2301
+ /** Selector specifying which fields to include in a partial response. */
2302
+ fields?:
2303
+ string;
2304
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2305
+ key?:
2306
+ string;
2307
+ /** Required. Name of the PolicyBasedRoute resource to get. */
2308
+ name:
2309
+ string;
2310
+ /** OAuth 2.0 token for the current user. */
2311
+ oauth_token?:
2312
+ string;
2313
+ /** Returns response with indentations and line breaks. */
2314
+ prettyPrint?:
2315
+ boolean;
2316
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2317
+ quotaUser?:
2318
+ string;
2319
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2320
+ upload_protocol?:
2321
+ string;
2322
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2323
+ uploadType?:
2324
+ string;
2325
+ }): Request<PolicyBasedRoute>;
2034
2326
  /** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
2035
2327
  getIamPolicy(request?: {
2036
2328
  /** V1 error format. */
@@ -2082,6 +2374,57 @@ declare namespace gapi.client {
2082
2374
  uploadType?:
2083
2375
  string;
2084
2376
  }): Request<Policy>;
2377
+ /** Lists PolicyBasedRoutes in a given project and location. */
2378
+ list(request?: {
2379
+ /** V1 error format. */
2380
+ "$.xgafv"?:
2381
+ string;
2382
+ /** OAuth access token. */
2383
+ access_token?:
2384
+ string;
2385
+ /** Data format for response. */
2386
+ alt?:
2387
+ string;
2388
+ /** JSONP */
2389
+ callback?:
2390
+ string;
2391
+ /** Selector specifying which fields to include in a partial response. */
2392
+ fields?:
2393
+ string;
2394
+ /** A filter expression that filters the results listed in the response. */
2395
+ filter?:
2396
+ string;
2397
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2398
+ key?:
2399
+ string;
2400
+ /** OAuth 2.0 token for the current user. */
2401
+ oauth_token?:
2402
+ string;
2403
+ /** Sort the results by a certain order. */
2404
+ orderBy?:
2405
+ string;
2406
+ /** The maximum number of results per page that should be returned. */
2407
+ pageSize?:
2408
+ number;
2409
+ /** The page token. */
2410
+ pageToken?:
2411
+ string;
2412
+ /** Required. The parent resource's name. */
2413
+ parent:
2414
+ string;
2415
+ /** Returns response with indentations and line breaks. */
2416
+ prettyPrint?:
2417
+ boolean;
2418
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2419
+ quotaUser?:
2420
+ string;
2421
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2422
+ upload_protocol?:
2423
+ string;
2424
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2425
+ uploadType?:
2426
+ string;
2427
+ }): Request<ListPolicyBasedRoutesResponse>;
2085
2428
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
2086
2429
  setIamPolicy(request: {
2087
2430
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.networkconnectivity-v1",
3
- "version": "0.0.20230804",
3
+ "version": "0.0.20230816",
4
4
  "description": "TypeScript typings for Network Connectivity API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230804
6
+ // Revision: 20230816
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -302,11 +302,71 @@ gapi.load('client', async () => {
302
302
  pageToken: "Test string",
303
303
  parent: "Test string",
304
304
  });
305
+ /** Creates a new PolicyBasedRoute in a given project and location. */
306
+ await gapi.client.networkconnectivity.projects.locations.global.policyBasedRoutes.create({
307
+ parent: "Test string",
308
+ policyBasedRouteId: "Test string",
309
+ requestId: "Test string",
310
+ }, {
311
+ createTime: "Test string",
312
+ description: "Test string",
313
+ filter: {
314
+ destRange: "Test string",
315
+ ipProtocol: "Test string",
316
+ protocolVersion: "Test string",
317
+ srcRange: "Test string",
318
+ },
319
+ interconnectAttachment: {
320
+ region: "Test string",
321
+ },
322
+ kind: "Test string",
323
+ labels: {
324
+ A: "Test string"
325
+ },
326
+ name: "Test string",
327
+ network: "Test string",
328
+ nextHopIlbIp: "Test string",
329
+ nextHopOtherRoutes: "Test string",
330
+ priority: 42,
331
+ selfLink: "Test string",
332
+ updateTime: "Test string",
333
+ virtualMachine: {
334
+ tags: [
335
+ "Test string"
336
+ ],
337
+ },
338
+ warnings: [
339
+ {
340
+ code: "Test string",
341
+ data: {
342
+ A: "Test string"
343
+ },
344
+ warningMessage: "Test string",
345
+ }
346
+ ],
347
+ });
348
+ /** Deletes a single PolicyBasedRoute. */
349
+ await gapi.client.networkconnectivity.projects.locations.global.policyBasedRoutes.delete({
350
+ name: "Test string",
351
+ requestId: "Test string",
352
+ });
353
+ /** Gets details of a single PolicyBasedRoute. */
354
+ await gapi.client.networkconnectivity.projects.locations.global.policyBasedRoutes.get({
355
+ name: "Test string",
356
+ });
305
357
  /** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
306
358
  await gapi.client.networkconnectivity.projects.locations.global.policyBasedRoutes.getIamPolicy({
307
359
  "options.requestedPolicyVersion": 42,
308
360
  resource: "Test string",
309
361
  });
362
+ /** Lists PolicyBasedRoutes in a given project and location. */
363
+ await gapi.client.networkconnectivity.projects.locations.global.policyBasedRoutes.list({
364
+ filter: "Test string",
365
+ orderBy: "Test string",
366
+ pageSize: 42,
367
+ pageToken: "Test string",
368
+ parent: "Test string",
369
+ });
310
370
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
311
371
  await gapi.client.networkconnectivity.projects.locations.global.policyBasedRoutes.setIamPolicy({
312
372
  resource: "Test string",