@googleapis/networkservices 34.2.1 → 37.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1beta1.ts CHANGED
@@ -373,6 +373,48 @@ export namespace networkservices_v1beta1 {
373
373
  * The request message for Operations.CancelOperation.
374
374
  */
375
375
  export interface Schema$CancelOperationRequest {}
376
+ /**
377
+ * `CdnEdgeExtension` is a resource that lets the extension service modify the headers of both requests to the cache and responses from the cache served by an [`EdgeCacheService`](https://cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices).
378
+ */
379
+ export interface Schema$CdnEdgeExtension {
380
+ /**
381
+ * Output only. The timestamp when the resource was created.
382
+ */
383
+ createTime?: string | null;
384
+ /**
385
+ * Optional. A human-readable description of the resource.
386
+ */
387
+ description?: string | null;
388
+ /**
389
+ * Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.
390
+ */
391
+ extensionChains?: Schema$ExtensionChain[];
392
+ /**
393
+ * Optional. Set of labels associated with the `CdnEdgeExtension` resource. The format must comply with [the requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.
394
+ */
395
+ labels?: {[key: string]: string} | null;
396
+ /**
397
+ * Required. Identifier. Name of the `CdnEdgeExtension` resource in the following format: `projects/{project\}/locations/{location\}/cdnEdgeExtensions/{cdn_edge_extension\}`.
398
+ */
399
+ name?: string | null;
400
+ /**
401
+ * Required. Specifies the set of resources to which this extension should be applied to.
402
+ */
403
+ target?: Schema$CdnEdgeExtensionTarget;
404
+ /**
405
+ * Output only. The timestamp when the resource was updated.
406
+ */
407
+ updateTime?: string | null;
408
+ }
409
+ /**
410
+ * Specifies the set of targets to which `CdnEdgeExtension` should be applied to.
411
+ */
412
+ export interface Schema$CdnEdgeExtensionTarget {
413
+ /**
414
+ * Required. A list of references to the resources that are targeted by `CdnEdgeExtension`. Types of resources supported: `EdgeCacheService`. The format must be the full resource name of [EdgeCacheService](https://cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices) in the following format: `//networkservices.googleapis.com/projects/{project\}/locations/{location\}/edgeCacheServices/{edgeCacheService\}`.
415
+ */
416
+ resources?: string[] | null;
417
+ }
376
418
  /**
377
419
  * DNS Peering configuration.
378
420
  */
@@ -1682,6 +1724,23 @@ export namespace networkservices_v1beta1 {
1682
1724
  */
1683
1725
  unreachable?: string[] | null;
1684
1726
  }
1727
+ /**
1728
+ * Message for response to listing `CdnEdgeExtension` resources.
1729
+ */
1730
+ export interface Schema$ListCdnEdgeExtensionsResponse {
1731
+ /**
1732
+ * The list of `CdnEdgeExtension` resources.
1733
+ */
1734
+ cdnEdgeExtensions?: Schema$CdnEdgeExtension[];
1735
+ /**
1736
+ * A token identifying a page of results that the server returns.
1737
+ */
1738
+ nextPageToken?: string | null;
1739
+ /**
1740
+ * Locations that could not be reached.
1741
+ */
1742
+ unreachable?: string[] | null;
1743
+ }
1685
1744
  /**
1686
1745
  * Response returned by the ListEndpointPolicies method.
1687
1746
  */
@@ -2780,6 +2839,7 @@ export namespace networkservices_v1beta1 {
2780
2839
  agentConnectivityTemplates: Resource$Projects$Locations$Agentconnectivitytemplates;
2781
2840
  agentGateways: Resource$Projects$Locations$Agentgateways;
2782
2841
  authzExtensions: Resource$Projects$Locations$Authzextensions;
2842
+ cdnEdgeExtensions: Resource$Projects$Locations$Cdnedgeextensions;
2783
2843
  endpointPolicies: Resource$Projects$Locations$Endpointpolicies;
2784
2844
  extensionBindings: Resource$Projects$Locations$Extensionbindings;
2785
2845
  gateways: Resource$Projects$Locations$Gateways;
@@ -2809,6 +2869,8 @@ export namespace networkservices_v1beta1 {
2809
2869
  this.authzExtensions = new Resource$Projects$Locations$Authzextensions(
2810
2870
  this.context
2811
2871
  );
2872
+ this.cdnEdgeExtensions =
2873
+ new Resource$Projects$Locations$Cdnedgeextensions(this.context);
2812
2874
  this.endpointPolicies = new Resource$Projects$Locations$Endpointpolicies(
2813
2875
  this.context
2814
2876
  );
@@ -5692,6 +5754,848 @@ export namespace networkservices_v1beta1 {
5692
5754
  requestBody?: Schema$AuthzExtension;
5693
5755
  }
5694
5756
 
5757
+ export class Resource$Projects$Locations$Cdnedgeextensions {
5758
+ context: APIRequestContext;
5759
+ constructor(context: APIRequestContext) {
5760
+ this.context = context;
5761
+ }
5762
+
5763
+ /**
5764
+ * Creates a new `CdnEdgeExtension` resource in a given project and location.
5765
+ * @example
5766
+ * ```js
5767
+ * // Before running the sample:
5768
+ * // - Enable the API at:
5769
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
5770
+ * // - Login into gcloud by running:
5771
+ * // ```sh
5772
+ * // $ gcloud auth application-default login
5773
+ * // ```
5774
+ * // - Install the npm module by running:
5775
+ * // ```sh
5776
+ * // $ npm install googleapis
5777
+ * // ```
5778
+ *
5779
+ * const {google} = require('googleapis');
5780
+ * const networkservices = google.networkservices('v1beta1');
5781
+ *
5782
+ * async function main() {
5783
+ * const auth = new google.auth.GoogleAuth({
5784
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5785
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5786
+ * });
5787
+ *
5788
+ * // Acquire an auth client, and bind it to all future calls
5789
+ * const authClient = await auth.getClient();
5790
+ * google.options({auth: authClient});
5791
+ *
5792
+ * // Do the magic
5793
+ * const res = await networkservices.projects.locations.cdnEdgeExtensions.create(
5794
+ * {
5795
+ * // Required. User-provided ID of the `CdnEdgeExtension` resource to be created.
5796
+ * cdnEdgeExtensionId: 'placeholder-value',
5797
+ * // Required. The parent resource of the `CdnEdgeExtension` resource. Must be in the format `projects/{project\}/locations/{location\}`.
5798
+ * parent: 'projects/my-project/locations/my-location',
5799
+ * // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server ignores 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 supported (00000000-0000-0000-0000-000000000000).
5800
+ * requestId: 'placeholder-value',
5801
+ *
5802
+ * // Request body metadata
5803
+ * requestBody: {
5804
+ * // request body parameters
5805
+ * // {
5806
+ * // "createTime": "my_createTime",
5807
+ * // "description": "my_description",
5808
+ * // "extensionChains": [],
5809
+ * // "labels": {},
5810
+ * // "name": "my_name",
5811
+ * // "target": {},
5812
+ * // "updateTime": "my_updateTime"
5813
+ * // }
5814
+ * },
5815
+ * },
5816
+ * );
5817
+ * console.log(res.data);
5818
+ *
5819
+ * // Example response
5820
+ * // {
5821
+ * // "done": false,
5822
+ * // "error": {},
5823
+ * // "metadata": {},
5824
+ * // "name": "my_name",
5825
+ * // "response": {}
5826
+ * // }
5827
+ * }
5828
+ *
5829
+ * main().catch(e => {
5830
+ * console.error(e);
5831
+ * throw e;
5832
+ * });
5833
+ *
5834
+ * ```
5835
+ *
5836
+ * @param params - Parameters for request
5837
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
5838
+ * @param callback - Optional callback that handles the response.
5839
+ * @returns A promise if used with async/await, or void if used with a callback.
5840
+ */
5841
+ create(
5842
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Create,
5843
+ options: StreamMethodOptions
5844
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
5845
+ create(
5846
+ params?: Params$Resource$Projects$Locations$Cdnedgeextensions$Create,
5847
+ options?: MethodOptions
5848
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
5849
+ create(
5850
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Create,
5851
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
5852
+ callback: BodyResponseCallback<Readable>
5853
+ ): void;
5854
+ create(
5855
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Create,
5856
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
5857
+ callback: BodyResponseCallback<Schema$Operation>
5858
+ ): void;
5859
+ create(
5860
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Create,
5861
+ callback: BodyResponseCallback<Schema$Operation>
5862
+ ): void;
5863
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
5864
+ create(
5865
+ paramsOrCallback?:
5866
+ | Params$Resource$Projects$Locations$Cdnedgeextensions$Create
5867
+ | BodyResponseCallback<Schema$Operation>
5868
+ | BodyResponseCallback<Readable>,
5869
+ optionsOrCallback?:
5870
+ | MethodOptions
5871
+ | StreamMethodOptions
5872
+ | BodyResponseCallback<Schema$Operation>
5873
+ | BodyResponseCallback<Readable>,
5874
+ callback?:
5875
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
5876
+ ):
5877
+ | void
5878
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
5879
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
5880
+ let params = (paramsOrCallback ||
5881
+ {}) as Params$Resource$Projects$Locations$Cdnedgeextensions$Create;
5882
+ let options = (optionsOrCallback || {}) as MethodOptions;
5883
+
5884
+ if (typeof paramsOrCallback === 'function') {
5885
+ callback = paramsOrCallback;
5886
+ params =
5887
+ {} as Params$Resource$Projects$Locations$Cdnedgeextensions$Create;
5888
+ options = {};
5889
+ }
5890
+
5891
+ if (typeof optionsOrCallback === 'function') {
5892
+ callback = optionsOrCallback;
5893
+ options = {};
5894
+ }
5895
+
5896
+ const rootUrl =
5897
+ options.rootUrl || 'https://networkservices.googleapis.com/';
5898
+ const parameters = {
5899
+ options: Object.assign(
5900
+ {
5901
+ url: (rootUrl + '/v1beta1/{+parent}/cdnEdgeExtensions').replace(
5902
+ /([^:]\/)\/+/g,
5903
+ '$1'
5904
+ ),
5905
+ method: 'POST',
5906
+ apiVersion: '',
5907
+ },
5908
+ options
5909
+ ),
5910
+ params,
5911
+ requiredParams: ['parent'],
5912
+ pathParams: ['parent'],
5913
+ context: this.context,
5914
+ };
5915
+ if (callback) {
5916
+ createAPIRequest<Schema$Operation>(
5917
+ parameters,
5918
+ callback as BodyResponseCallback<unknown>
5919
+ );
5920
+ } else {
5921
+ return createAPIRequest<Schema$Operation>(parameters);
5922
+ }
5923
+ }
5924
+
5925
+ /**
5926
+ * Deletes the specified `CdnEdgeExtension` resource.
5927
+ * @example
5928
+ * ```js
5929
+ * // Before running the sample:
5930
+ * // - Enable the API at:
5931
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
5932
+ * // - Login into gcloud by running:
5933
+ * // ```sh
5934
+ * // $ gcloud auth application-default login
5935
+ * // ```
5936
+ * // - Install the npm module by running:
5937
+ * // ```sh
5938
+ * // $ npm install googleapis
5939
+ * // ```
5940
+ *
5941
+ * const {google} = require('googleapis');
5942
+ * const networkservices = google.networkservices('v1beta1');
5943
+ *
5944
+ * async function main() {
5945
+ * const auth = new google.auth.GoogleAuth({
5946
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5947
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5948
+ * });
5949
+ *
5950
+ * // Acquire an auth client, and bind it to all future calls
5951
+ * const authClient = await auth.getClient();
5952
+ * google.options({auth: authClient});
5953
+ *
5954
+ * // Do the magic
5955
+ * const res = await networkservices.projects.locations.cdnEdgeExtensions.delete(
5956
+ * {
5957
+ * // Required. The name of the `CdnEdgeExtension` resource to delete. Must be in the format `projects/{project\}/locations/{location\}/cdnEdgeExtensions/{cdn_edge_extension\}`.
5958
+ * name: 'projects/my-project/locations/my-location/cdnEdgeExtensions/my-cdnEdgeExtension',
5959
+ * // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server ignores 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 supported (00000000-0000-0000-0000-000000000000).
5960
+ * requestId: 'placeholder-value',
5961
+ * },
5962
+ * );
5963
+ * console.log(res.data);
5964
+ *
5965
+ * // Example response
5966
+ * // {
5967
+ * // "done": false,
5968
+ * // "error": {},
5969
+ * // "metadata": {},
5970
+ * // "name": "my_name",
5971
+ * // "response": {}
5972
+ * // }
5973
+ * }
5974
+ *
5975
+ * main().catch(e => {
5976
+ * console.error(e);
5977
+ * throw e;
5978
+ * });
5979
+ *
5980
+ * ```
5981
+ *
5982
+ * @param params - Parameters for request
5983
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
5984
+ * @param callback - Optional callback that handles the response.
5985
+ * @returns A promise if used with async/await, or void if used with a callback.
5986
+ */
5987
+ delete(
5988
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Delete,
5989
+ options: StreamMethodOptions
5990
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
5991
+ delete(
5992
+ params?: Params$Resource$Projects$Locations$Cdnedgeextensions$Delete,
5993
+ options?: MethodOptions
5994
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
5995
+ delete(
5996
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Delete,
5997
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
5998
+ callback: BodyResponseCallback<Readable>
5999
+ ): void;
6000
+ delete(
6001
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Delete,
6002
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
6003
+ callback: BodyResponseCallback<Schema$Operation>
6004
+ ): void;
6005
+ delete(
6006
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Delete,
6007
+ callback: BodyResponseCallback<Schema$Operation>
6008
+ ): void;
6009
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
6010
+ delete(
6011
+ paramsOrCallback?:
6012
+ | Params$Resource$Projects$Locations$Cdnedgeextensions$Delete
6013
+ | BodyResponseCallback<Schema$Operation>
6014
+ | BodyResponseCallback<Readable>,
6015
+ optionsOrCallback?:
6016
+ | MethodOptions
6017
+ | StreamMethodOptions
6018
+ | BodyResponseCallback<Schema$Operation>
6019
+ | BodyResponseCallback<Readable>,
6020
+ callback?:
6021
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
6022
+ ):
6023
+ | void
6024
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
6025
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6026
+ let params = (paramsOrCallback ||
6027
+ {}) as Params$Resource$Projects$Locations$Cdnedgeextensions$Delete;
6028
+ let options = (optionsOrCallback || {}) as MethodOptions;
6029
+
6030
+ if (typeof paramsOrCallback === 'function') {
6031
+ callback = paramsOrCallback;
6032
+ params =
6033
+ {} as Params$Resource$Projects$Locations$Cdnedgeextensions$Delete;
6034
+ options = {};
6035
+ }
6036
+
6037
+ if (typeof optionsOrCallback === 'function') {
6038
+ callback = optionsOrCallback;
6039
+ options = {};
6040
+ }
6041
+
6042
+ const rootUrl =
6043
+ options.rootUrl || 'https://networkservices.googleapis.com/';
6044
+ const parameters = {
6045
+ options: Object.assign(
6046
+ {
6047
+ url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
6048
+ method: 'DELETE',
6049
+ apiVersion: '',
6050
+ },
6051
+ options
6052
+ ),
6053
+ params,
6054
+ requiredParams: ['name'],
6055
+ pathParams: ['name'],
6056
+ context: this.context,
6057
+ };
6058
+ if (callback) {
6059
+ createAPIRequest<Schema$Operation>(
6060
+ parameters,
6061
+ callback as BodyResponseCallback<unknown>
6062
+ );
6063
+ } else {
6064
+ return createAPIRequest<Schema$Operation>(parameters);
6065
+ }
6066
+ }
6067
+
6068
+ /**
6069
+ * Gets details of the specified `CdnEdgeExtension` resource.
6070
+ * @example
6071
+ * ```js
6072
+ * // Before running the sample:
6073
+ * // - Enable the API at:
6074
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
6075
+ * // - Login into gcloud by running:
6076
+ * // ```sh
6077
+ * // $ gcloud auth application-default login
6078
+ * // ```
6079
+ * // - Install the npm module by running:
6080
+ * // ```sh
6081
+ * // $ npm install googleapis
6082
+ * // ```
6083
+ *
6084
+ * const {google} = require('googleapis');
6085
+ * const networkservices = google.networkservices('v1beta1');
6086
+ *
6087
+ * async function main() {
6088
+ * const auth = new google.auth.GoogleAuth({
6089
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6090
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6091
+ * });
6092
+ *
6093
+ * // Acquire an auth client, and bind it to all future calls
6094
+ * const authClient = await auth.getClient();
6095
+ * google.options({auth: authClient});
6096
+ *
6097
+ * // Do the magic
6098
+ * const res = await networkservices.projects.locations.cdnEdgeExtensions.get({
6099
+ * // Required. A name of the `CdnEdgeExtension` resource to get. Must be in the format `projects/{project\}/locations/{location\}/cdnEdgeExtensions/{cdn_edge_extension\}`.
6100
+ * name: 'projects/my-project/locations/my-location/cdnEdgeExtensions/my-cdnEdgeExtension',
6101
+ * });
6102
+ * console.log(res.data);
6103
+ *
6104
+ * // Example response
6105
+ * // {
6106
+ * // "createTime": "my_createTime",
6107
+ * // "description": "my_description",
6108
+ * // "extensionChains": [],
6109
+ * // "labels": {},
6110
+ * // "name": "my_name",
6111
+ * // "target": {},
6112
+ * // "updateTime": "my_updateTime"
6113
+ * // }
6114
+ * }
6115
+ *
6116
+ * main().catch(e => {
6117
+ * console.error(e);
6118
+ * throw e;
6119
+ * });
6120
+ *
6121
+ * ```
6122
+ *
6123
+ * @param params - Parameters for request
6124
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
6125
+ * @param callback - Optional callback that handles the response.
6126
+ * @returns A promise if used with async/await, or void if used with a callback.
6127
+ */
6128
+ get(
6129
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Get,
6130
+ options: StreamMethodOptions
6131
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6132
+ get(
6133
+ params?: Params$Resource$Projects$Locations$Cdnedgeextensions$Get,
6134
+ options?: MethodOptions
6135
+ ): Promise<GaxiosResponseWithHTTP2<Schema$CdnEdgeExtension>>;
6136
+ get(
6137
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Get,
6138
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
6139
+ callback: BodyResponseCallback<Readable>
6140
+ ): void;
6141
+ get(
6142
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Get,
6143
+ options: MethodOptions | BodyResponseCallback<Schema$CdnEdgeExtension>,
6144
+ callback: BodyResponseCallback<Schema$CdnEdgeExtension>
6145
+ ): void;
6146
+ get(
6147
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Get,
6148
+ callback: BodyResponseCallback<Schema$CdnEdgeExtension>
6149
+ ): void;
6150
+ get(callback: BodyResponseCallback<Schema$CdnEdgeExtension>): void;
6151
+ get(
6152
+ paramsOrCallback?:
6153
+ | Params$Resource$Projects$Locations$Cdnedgeextensions$Get
6154
+ | BodyResponseCallback<Schema$CdnEdgeExtension>
6155
+ | BodyResponseCallback<Readable>,
6156
+ optionsOrCallback?:
6157
+ | MethodOptions
6158
+ | StreamMethodOptions
6159
+ | BodyResponseCallback<Schema$CdnEdgeExtension>
6160
+ | BodyResponseCallback<Readable>,
6161
+ callback?:
6162
+ | BodyResponseCallback<Schema$CdnEdgeExtension>
6163
+ | BodyResponseCallback<Readable>
6164
+ ):
6165
+ | void
6166
+ | Promise<GaxiosResponseWithHTTP2<Schema$CdnEdgeExtension>>
6167
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6168
+ let params = (paramsOrCallback ||
6169
+ {}) as Params$Resource$Projects$Locations$Cdnedgeextensions$Get;
6170
+ let options = (optionsOrCallback || {}) as MethodOptions;
6171
+
6172
+ if (typeof paramsOrCallback === 'function') {
6173
+ callback = paramsOrCallback;
6174
+ params = {} as Params$Resource$Projects$Locations$Cdnedgeextensions$Get;
6175
+ options = {};
6176
+ }
6177
+
6178
+ if (typeof optionsOrCallback === 'function') {
6179
+ callback = optionsOrCallback;
6180
+ options = {};
6181
+ }
6182
+
6183
+ const rootUrl =
6184
+ options.rootUrl || 'https://networkservices.googleapis.com/';
6185
+ const parameters = {
6186
+ options: Object.assign(
6187
+ {
6188
+ url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
6189
+ method: 'GET',
6190
+ apiVersion: '',
6191
+ },
6192
+ options
6193
+ ),
6194
+ params,
6195
+ requiredParams: ['name'],
6196
+ pathParams: ['name'],
6197
+ context: this.context,
6198
+ };
6199
+ if (callback) {
6200
+ createAPIRequest<Schema$CdnEdgeExtension>(
6201
+ parameters,
6202
+ callback as BodyResponseCallback<unknown>
6203
+ );
6204
+ } else {
6205
+ return createAPIRequest<Schema$CdnEdgeExtension>(parameters);
6206
+ }
6207
+ }
6208
+
6209
+ /**
6210
+ * Lists `CdnEdgeExtensions` resources in a given project and location.
6211
+ * @example
6212
+ * ```js
6213
+ * // Before running the sample:
6214
+ * // - Enable the API at:
6215
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
6216
+ * // - Login into gcloud by running:
6217
+ * // ```sh
6218
+ * // $ gcloud auth application-default login
6219
+ * // ```
6220
+ * // - Install the npm module by running:
6221
+ * // ```sh
6222
+ * // $ npm install googleapis
6223
+ * // ```
6224
+ *
6225
+ * const {google} = require('googleapis');
6226
+ * const networkservices = google.networkservices('v1beta1');
6227
+ *
6228
+ * async function main() {
6229
+ * const auth = new google.auth.GoogleAuth({
6230
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6231
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6232
+ * });
6233
+ *
6234
+ * // Acquire an auth client, and bind it to all future calls
6235
+ * const authClient = await auth.getClient();
6236
+ * google.options({auth: authClient});
6237
+ *
6238
+ * // Do the magic
6239
+ * const res = await networkservices.projects.locations.cdnEdgeExtensions.list({
6240
+ * // Optional. Filtering results.
6241
+ * filter: 'placeholder-value',
6242
+ * // Optional. Hint about how to order the results.
6243
+ * orderBy: 'placeholder-value',
6244
+ * // Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.
6245
+ * pageSize: 'placeholder-value',
6246
+ * // Optional. A token identifying a page of results that the server returns.
6247
+ * pageToken: 'placeholder-value',
6248
+ * // Required. The project and location from which the `CdnEdgeExtension` resources are listed. These values are specified in the following format: `projects/{project\}/locations/{location\}`.
6249
+ * parent: 'projects/my-project/locations/my-location',
6250
+ * });
6251
+ * console.log(res.data);
6252
+ *
6253
+ * // Example response
6254
+ * // {
6255
+ * // "cdnEdgeExtensions": [],
6256
+ * // "nextPageToken": "my_nextPageToken",
6257
+ * // "unreachable": []
6258
+ * // }
6259
+ * }
6260
+ *
6261
+ * main().catch(e => {
6262
+ * console.error(e);
6263
+ * throw e;
6264
+ * });
6265
+ *
6266
+ * ```
6267
+ *
6268
+ * @param params - Parameters for request
6269
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
6270
+ * @param callback - Optional callback that handles the response.
6271
+ * @returns A promise if used with async/await, or void if used with a callback.
6272
+ */
6273
+ list(
6274
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$List,
6275
+ options: StreamMethodOptions
6276
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6277
+ list(
6278
+ params?: Params$Resource$Projects$Locations$Cdnedgeextensions$List,
6279
+ options?: MethodOptions
6280
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListCdnEdgeExtensionsResponse>>;
6281
+ list(
6282
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$List,
6283
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
6284
+ callback: BodyResponseCallback<Readable>
6285
+ ): void;
6286
+ list(
6287
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$List,
6288
+ options:
6289
+ | MethodOptions
6290
+ | BodyResponseCallback<Schema$ListCdnEdgeExtensionsResponse>,
6291
+ callback: BodyResponseCallback<Schema$ListCdnEdgeExtensionsResponse>
6292
+ ): void;
6293
+ list(
6294
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$List,
6295
+ callback: BodyResponseCallback<Schema$ListCdnEdgeExtensionsResponse>
6296
+ ): void;
6297
+ list(
6298
+ callback: BodyResponseCallback<Schema$ListCdnEdgeExtensionsResponse>
6299
+ ): void;
6300
+ list(
6301
+ paramsOrCallback?:
6302
+ | Params$Resource$Projects$Locations$Cdnedgeextensions$List
6303
+ | BodyResponseCallback<Schema$ListCdnEdgeExtensionsResponse>
6304
+ | BodyResponseCallback<Readable>,
6305
+ optionsOrCallback?:
6306
+ | MethodOptions
6307
+ | StreamMethodOptions
6308
+ | BodyResponseCallback<Schema$ListCdnEdgeExtensionsResponse>
6309
+ | BodyResponseCallback<Readable>,
6310
+ callback?:
6311
+ | BodyResponseCallback<Schema$ListCdnEdgeExtensionsResponse>
6312
+ | BodyResponseCallback<Readable>
6313
+ ):
6314
+ | void
6315
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListCdnEdgeExtensionsResponse>>
6316
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6317
+ let params = (paramsOrCallback ||
6318
+ {}) as Params$Resource$Projects$Locations$Cdnedgeextensions$List;
6319
+ let options = (optionsOrCallback || {}) as MethodOptions;
6320
+
6321
+ if (typeof paramsOrCallback === 'function') {
6322
+ callback = paramsOrCallback;
6323
+ params =
6324
+ {} as Params$Resource$Projects$Locations$Cdnedgeextensions$List;
6325
+ options = {};
6326
+ }
6327
+
6328
+ if (typeof optionsOrCallback === 'function') {
6329
+ callback = optionsOrCallback;
6330
+ options = {};
6331
+ }
6332
+
6333
+ const rootUrl =
6334
+ options.rootUrl || 'https://networkservices.googleapis.com/';
6335
+ const parameters = {
6336
+ options: Object.assign(
6337
+ {
6338
+ url: (rootUrl + '/v1beta1/{+parent}/cdnEdgeExtensions').replace(
6339
+ /([^:]\/)\/+/g,
6340
+ '$1'
6341
+ ),
6342
+ method: 'GET',
6343
+ apiVersion: '',
6344
+ },
6345
+ options
6346
+ ),
6347
+ params,
6348
+ requiredParams: ['parent'],
6349
+ pathParams: ['parent'],
6350
+ context: this.context,
6351
+ };
6352
+ if (callback) {
6353
+ createAPIRequest<Schema$ListCdnEdgeExtensionsResponse>(
6354
+ parameters,
6355
+ callback as BodyResponseCallback<unknown>
6356
+ );
6357
+ } else {
6358
+ return createAPIRequest<Schema$ListCdnEdgeExtensionsResponse>(
6359
+ parameters
6360
+ );
6361
+ }
6362
+ }
6363
+
6364
+ /**
6365
+ * Updates the parameters of the specified `CdnEdgeExtension` resource.
6366
+ * @example
6367
+ * ```js
6368
+ * // Before running the sample:
6369
+ * // - Enable the API at:
6370
+ * // https://console.developers.google.com/apis/api/networkservices.googleapis.com
6371
+ * // - Login into gcloud by running:
6372
+ * // ```sh
6373
+ * // $ gcloud auth application-default login
6374
+ * // ```
6375
+ * // - Install the npm module by running:
6376
+ * // ```sh
6377
+ * // $ npm install googleapis
6378
+ * // ```
6379
+ *
6380
+ * const {google} = require('googleapis');
6381
+ * const networkservices = google.networkservices('v1beta1');
6382
+ *
6383
+ * async function main() {
6384
+ * const auth = new google.auth.GoogleAuth({
6385
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6386
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6387
+ * });
6388
+ *
6389
+ * // Acquire an auth client, and bind it to all future calls
6390
+ * const authClient = await auth.getClient();
6391
+ * google.options({auth: authClient});
6392
+ *
6393
+ * // Do the magic
6394
+ * const res = await networkservices.projects.locations.cdnEdgeExtensions.patch({
6395
+ * // Required. Identifier. Name of the `CdnEdgeExtension` resource in the following format: `projects/{project\}/locations/{location\}/cdnEdgeExtensions/{cdn_edge_extension\}`.
6396
+ * name: 'projects/my-project/locations/my-location/cdnEdgeExtensions/my-cdnEdgeExtension',
6397
+ * // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server ignores 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 supported (00000000-0000-0000-0000-000000000000).
6398
+ * requestId: 'placeholder-value',
6399
+ * // Optional. Used to specify the fields to be overwritten in the `CdnEdgeExtension` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.
6400
+ * updateMask: 'placeholder-value',
6401
+ *
6402
+ * // Request body metadata
6403
+ * requestBody: {
6404
+ * // request body parameters
6405
+ * // {
6406
+ * // "createTime": "my_createTime",
6407
+ * // "description": "my_description",
6408
+ * // "extensionChains": [],
6409
+ * // "labels": {},
6410
+ * // "name": "my_name",
6411
+ * // "target": {},
6412
+ * // "updateTime": "my_updateTime"
6413
+ * // }
6414
+ * },
6415
+ * });
6416
+ * console.log(res.data);
6417
+ *
6418
+ * // Example response
6419
+ * // {
6420
+ * // "done": false,
6421
+ * // "error": {},
6422
+ * // "metadata": {},
6423
+ * // "name": "my_name",
6424
+ * // "response": {}
6425
+ * // }
6426
+ * }
6427
+ *
6428
+ * main().catch(e => {
6429
+ * console.error(e);
6430
+ * throw e;
6431
+ * });
6432
+ *
6433
+ * ```
6434
+ *
6435
+ * @param params - Parameters for request
6436
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
6437
+ * @param callback - Optional callback that handles the response.
6438
+ * @returns A promise if used with async/await, or void if used with a callback.
6439
+ */
6440
+ patch(
6441
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Patch,
6442
+ options: StreamMethodOptions
6443
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6444
+ patch(
6445
+ params?: Params$Resource$Projects$Locations$Cdnedgeextensions$Patch,
6446
+ options?: MethodOptions
6447
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
6448
+ patch(
6449
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Patch,
6450
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
6451
+ callback: BodyResponseCallback<Readable>
6452
+ ): void;
6453
+ patch(
6454
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Patch,
6455
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
6456
+ callback: BodyResponseCallback<Schema$Operation>
6457
+ ): void;
6458
+ patch(
6459
+ params: Params$Resource$Projects$Locations$Cdnedgeextensions$Patch,
6460
+ callback: BodyResponseCallback<Schema$Operation>
6461
+ ): void;
6462
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
6463
+ patch(
6464
+ paramsOrCallback?:
6465
+ | Params$Resource$Projects$Locations$Cdnedgeextensions$Patch
6466
+ | BodyResponseCallback<Schema$Operation>
6467
+ | BodyResponseCallback<Readable>,
6468
+ optionsOrCallback?:
6469
+ | MethodOptions
6470
+ | StreamMethodOptions
6471
+ | BodyResponseCallback<Schema$Operation>
6472
+ | BodyResponseCallback<Readable>,
6473
+ callback?:
6474
+ BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
6475
+ ):
6476
+ | void
6477
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
6478
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6479
+ let params = (paramsOrCallback ||
6480
+ {}) as Params$Resource$Projects$Locations$Cdnedgeextensions$Patch;
6481
+ let options = (optionsOrCallback || {}) as MethodOptions;
6482
+
6483
+ if (typeof paramsOrCallback === 'function') {
6484
+ callback = paramsOrCallback;
6485
+ params =
6486
+ {} as Params$Resource$Projects$Locations$Cdnedgeextensions$Patch;
6487
+ options = {};
6488
+ }
6489
+
6490
+ if (typeof optionsOrCallback === 'function') {
6491
+ callback = optionsOrCallback;
6492
+ options = {};
6493
+ }
6494
+
6495
+ const rootUrl =
6496
+ options.rootUrl || 'https://networkservices.googleapis.com/';
6497
+ const parameters = {
6498
+ options: Object.assign(
6499
+ {
6500
+ url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
6501
+ method: 'PATCH',
6502
+ apiVersion: '',
6503
+ },
6504
+ options
6505
+ ),
6506
+ params,
6507
+ requiredParams: ['name'],
6508
+ pathParams: ['name'],
6509
+ context: this.context,
6510
+ };
6511
+ if (callback) {
6512
+ createAPIRequest<Schema$Operation>(
6513
+ parameters,
6514
+ callback as BodyResponseCallback<unknown>
6515
+ );
6516
+ } else {
6517
+ return createAPIRequest<Schema$Operation>(parameters);
6518
+ }
6519
+ }
6520
+ }
6521
+
6522
+ export interface Params$Resource$Projects$Locations$Cdnedgeextensions$Create extends StandardParameters {
6523
+ /**
6524
+ * Required. User-provided ID of the `CdnEdgeExtension` resource to be created.
6525
+ */
6526
+ cdnEdgeExtensionId?: string;
6527
+ /**
6528
+ * Required. The parent resource of the `CdnEdgeExtension` resource. Must be in the format `projects/{project\}/locations/{location\}`.
6529
+ */
6530
+ parent?: string;
6531
+ /**
6532
+ * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server ignores 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 supported (00000000-0000-0000-0000-000000000000).
6533
+ */
6534
+ requestId?: string;
6535
+
6536
+ /**
6537
+ * Request body metadata
6538
+ */
6539
+ requestBody?: Schema$CdnEdgeExtension;
6540
+ }
6541
+ export interface Params$Resource$Projects$Locations$Cdnedgeextensions$Delete extends StandardParameters {
6542
+ /**
6543
+ * Required. The name of the `CdnEdgeExtension` resource to delete. Must be in the format `projects/{project\}/locations/{location\}/cdnEdgeExtensions/{cdn_edge_extension\}`.
6544
+ */
6545
+ name?: string;
6546
+ /**
6547
+ * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server ignores 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 supported (00000000-0000-0000-0000-000000000000).
6548
+ */
6549
+ requestId?: string;
6550
+ }
6551
+ export interface Params$Resource$Projects$Locations$Cdnedgeextensions$Get extends StandardParameters {
6552
+ /**
6553
+ * Required. A name of the `CdnEdgeExtension` resource to get. Must be in the format `projects/{project\}/locations/{location\}/cdnEdgeExtensions/{cdn_edge_extension\}`.
6554
+ */
6555
+ name?: string;
6556
+ }
6557
+ export interface Params$Resource$Projects$Locations$Cdnedgeextensions$List extends StandardParameters {
6558
+ /**
6559
+ * Optional. Filtering results.
6560
+ */
6561
+ filter?: string;
6562
+ /**
6563
+ * Optional. Hint about how to order the results.
6564
+ */
6565
+ orderBy?: string;
6566
+ /**
6567
+ * Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.
6568
+ */
6569
+ pageSize?: number;
6570
+ /**
6571
+ * Optional. A token identifying a page of results that the server returns.
6572
+ */
6573
+ pageToken?: string;
6574
+ /**
6575
+ * Required. The project and location from which the `CdnEdgeExtension` resources are listed. These values are specified in the following format: `projects/{project\}/locations/{location\}`.
6576
+ */
6577
+ parent?: string;
6578
+ }
6579
+ export interface Params$Resource$Projects$Locations$Cdnedgeextensions$Patch extends StandardParameters {
6580
+ /**
6581
+ * Required. Identifier. Name of the `CdnEdgeExtension` resource in the following format: `projects/{project\}/locations/{location\}/cdnEdgeExtensions/{cdn_edge_extension\}`.
6582
+ */
6583
+ name?: string;
6584
+ /**
6585
+ * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server ignores 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 supported (00000000-0000-0000-0000-000000000000).
6586
+ */
6587
+ requestId?: string;
6588
+ /**
6589
+ * Optional. Used to specify the fields to be overwritten in the `CdnEdgeExtension` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.
6590
+ */
6591
+ updateMask?: string;
6592
+
6593
+ /**
6594
+ * Request body metadata
6595
+ */
6596
+ requestBody?: Schema$CdnEdgeExtension;
6597
+ }
6598
+
5695
6599
  export class Resource$Projects$Locations$Endpointpolicies {
5696
6600
  context: APIRequestContext;
5697
6601
  constructor(context: APIRequestContext) {