@googleapis/securityposture 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1.ts ADDED
@@ -0,0 +1,3466 @@
1
+ // Copyright 2020 Google LLC
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15
+ /* eslint-disable @typescript-eslint/no-unused-vars */
16
+ /* eslint-disable @typescript-eslint/no-empty-interface */
17
+ /* eslint-disable @typescript-eslint/no-namespace */
18
+ /* eslint-disable no-irregular-whitespace */
19
+
20
+ import {
21
+ OAuth2Client,
22
+ JWT,
23
+ Compute,
24
+ UserRefreshClient,
25
+ BaseExternalAccountClient,
26
+ GaxiosResponseWithHTTP2,
27
+ GoogleConfigurable,
28
+ createAPIRequest,
29
+ MethodOptions,
30
+ StreamMethodOptions,
31
+ GlobalOptions,
32
+ GoogleAuth,
33
+ BodyResponseCallback,
34
+ APIRequestContext,
35
+ } from 'googleapis-common';
36
+ import {Readable} from 'stream';
37
+
38
+ export namespace securityposture_v1 {
39
+ export interface Options extends GlobalOptions {
40
+ version: 'v1';
41
+ }
42
+
43
+ interface StandardParameters {
44
+ /**
45
+ * Auth client or API Key for the request
46
+ */
47
+ auth?:
48
+ | string
49
+ | OAuth2Client
50
+ | JWT
51
+ | Compute
52
+ | UserRefreshClient
53
+ | BaseExternalAccountClient
54
+ | GoogleAuth;
55
+
56
+ /**
57
+ * V1 error format.
58
+ */
59
+ '$.xgafv'?: string;
60
+ /**
61
+ * OAuth access token.
62
+ */
63
+ access_token?: string;
64
+ /**
65
+ * Data format for response.
66
+ */
67
+ alt?: string;
68
+ /**
69
+ * JSONP
70
+ */
71
+ callback?: string;
72
+ /**
73
+ * Selector specifying which fields to include in a partial response.
74
+ */
75
+ fields?: string;
76
+ /**
77
+ * 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.
78
+ */
79
+ key?: string;
80
+ /**
81
+ * OAuth 2.0 token for the current user.
82
+ */
83
+ oauth_token?: string;
84
+ /**
85
+ * Returns response with indentations and line breaks.
86
+ */
87
+ prettyPrint?: boolean;
88
+ /**
89
+ * 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.
90
+ */
91
+ quotaUser?: string;
92
+ /**
93
+ * Legacy upload protocol for media (e.g. "media", "multipart").
94
+ */
95
+ uploadType?: string;
96
+ /**
97
+ * Upload protocol for media (e.g. "raw", "multipart").
98
+ */
99
+ upload_protocol?: string;
100
+ }
101
+
102
+ /**
103
+ * Security Posture API
104
+ *
105
+ * Defines, assesses, and monitors the overall status of your security in Google Cloud. You can use security postures to evaluate your current cloud security against defined benchmarks and help maintain the level of security that your organization requires.
106
+ *
107
+ * @example
108
+ * ```js
109
+ * const {google} = require('googleapis');
110
+ * const securityposture = google.securityposture('v1');
111
+ * ```
112
+ */
113
+ export class Securityposture {
114
+ context: APIRequestContext;
115
+ organizations: Resource$Organizations;
116
+ projects: Resource$Projects;
117
+
118
+ constructor(options: GlobalOptions, google?: GoogleConfigurable) {
119
+ this.context = {
120
+ _options: options || {},
121
+ google,
122
+ };
123
+
124
+ this.organizations = new Resource$Organizations(this.context);
125
+ this.projects = new Resource$Projects(this.context);
126
+ }
127
+ }
128
+
129
+ /**
130
+ * Details of a Cloud Asset Inventory asset that caused a violation.
131
+ */
132
+ export interface Schema$AssetDetails {
133
+ /**
134
+ * Information about the Cloud Asset Inventory asset that violated a policy. The format of this information can change at any time without prior notice. Your application must not depend on this information in any way.
135
+ */
136
+ asset?: string | null;
137
+ /**
138
+ * The type of Cloud Asset Inventory asset. For a list of asset types, see [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types).
139
+ */
140
+ assetType?: string | null;
141
+ }
142
+ /**
143
+ * The request message for Operations.CancelOperation.
144
+ */
145
+ export interface Schema$CancelOperationRequest {}
146
+ /**
147
+ * Information about a compliance standard that the policy helps enforce.
148
+ */
149
+ export interface Schema$ComplianceStandard {
150
+ /**
151
+ * Optional. The control in the compliance standard that the policy helps enforce. For example, `AC-3`.
152
+ */
153
+ control?: string | null;
154
+ /**
155
+ * Optional. The compliance standard that the policy helps enforce. For example, `NIST SP 800-53`.
156
+ */
157
+ standard?: string | null;
158
+ }
159
+ /**
160
+ * Metadata for a constraint in a Policy.
161
+ */
162
+ export interface Schema$Constraint {
163
+ /**
164
+ * Optional. A predefined organization policy constraint.
165
+ */
166
+ orgPolicyConstraint?: Schema$OrgPolicyConstraint;
167
+ /**
168
+ * Optional. A custom organization policy constraint.
169
+ */
170
+ orgPolicyConstraintCustom?: Schema$OrgPolicyConstraintCustom;
171
+ /**
172
+ * Optional. A custom module for Security Health Analytics.
173
+ */
174
+ securityHealthAnalyticsCustomModule?: Schema$SecurityHealthAnalyticsCustomModule;
175
+ /**
176
+ * Optional. A built-in detector for Security Health Analytics.
177
+ */
178
+ securityHealthAnalyticsModule?: Schema$SecurityHealthAnalyticsModule;
179
+ }
180
+ /**
181
+ * Request message for CreateIaCValidationReport.
182
+ */
183
+ export interface Schema$CreateIaCValidationReportRequest {
184
+ /**
185
+ * Required. The infrastructure-as-code (IaC) configuration to validate.
186
+ */
187
+ iac?: Schema$IaC;
188
+ }
189
+ /**
190
+ * A custom module configuration for Security Health Analytics. Use `CustomConfig` to create custom detectors that generate custom findings for resources that you specify.
191
+ */
192
+ export interface Schema$CustomConfig {
193
+ /**
194
+ * Optional. Definitions of custom source properties to include in findings.
195
+ */
196
+ customOutput?: Schema$CustomOutputSpec;
197
+ /**
198
+ * Optional. A description of the vulnerability or misconfiguration that the custom module detects. The description appears in each finding. Provide enough information to help an investigator understand the finding. The value must be enclosed in quotation marks.
199
+ */
200
+ description?: string | null;
201
+ /**
202
+ * Required. The Common Expression Language (CEL) expression to evaluate. When the expression evaluates to `true` for a resource, a finding is generated.
203
+ */
204
+ predicate?: Schema$Expr;
205
+ /**
206
+ * Required. An explanation of the steps that security teams can take to resolve the detected issue. The explanation appears in each finding.
207
+ */
208
+ recommendation?: string | null;
209
+ /**
210
+ * Required. The resource types that the custom module operates on.
211
+ */
212
+ resourceSelector?: Schema$ResourceSelector;
213
+ /**
214
+ * Required. The severity of findings generated by the custom module.
215
+ */
216
+ severity?: string | null;
217
+ }
218
+ /**
219
+ * Definitions of custom source properties that can appear in findings.
220
+ */
221
+ export interface Schema$CustomOutputSpec {
222
+ /**
223
+ * Optional. The custom source properties that can appear in findings.
224
+ */
225
+ properties?: Schema$Property[];
226
+ }
227
+ /**
228
+ * 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); \}
229
+ */
230
+ export interface Schema$Empty {}
231
+ /**
232
+ * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
233
+ */
234
+ export interface Schema$Expr {
235
+ /**
236
+ * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
237
+ */
238
+ description?: string | null;
239
+ /**
240
+ * Textual representation of an expression in Common Expression Language syntax.
241
+ */
242
+ expression?: string | null;
243
+ /**
244
+ * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
245
+ */
246
+ location?: string | null;
247
+ /**
248
+ * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
249
+ */
250
+ title?: string | null;
251
+ }
252
+ /**
253
+ * Request message for ExtractPosture.
254
+ */
255
+ export interface Schema$ExtractPostureRequest {
256
+ /**
257
+ * Required. An identifier for the posture.
258
+ */
259
+ postureId?: string | null;
260
+ /**
261
+ * Required. The organization, folder, or project from which policies are extracted. Must be within the organization defined in parent. Use one of the following formats: * `organization/{organization_number\}` * `folder/{folder_number\}` * `project/{project_number\}`
262
+ */
263
+ workload?: string | null;
264
+ }
265
+ /**
266
+ * A custom, user-defined constraint. You can apply the constraint only to the resource types specified in the constraint, and only within the organization where the constraint is defined. _When you create a custom constraint, it is not enforced automatically._ You must use an organization policy to [enforce the constraint](https://cloud.google.com/resource-manager/help/organization-policy/constraints/enforce).
267
+ */
268
+ export interface Schema$GoogleCloudSecuritypostureV1CustomConstraint {
269
+ /**
270
+ * Whether to allow or deny the action.
271
+ */
272
+ actionType?: string | null;
273
+ /**
274
+ * A Common Expression Language (CEL) condition expression that must evaluate to `true` for the constraint to be enforced. The maximum length is 1000 characters. For example: + `resource.instanceName.matches('(production|test)_(.+_)?[\d]+')`: Evaluates to `true` if the resource's `instanceName` attribute contains the following: + The prefix `production` or `test` + An underscore (`_`) + Optional: One or more characters, followed by an underscore (`_`) + One or more digits + `resource.management.auto_upgrade == true`: Evaluates to `true` if the resource's `management.auto_upgrade` attribute is `true`.
275
+ */
276
+ condition?: string | null;
277
+ /**
278
+ * A description of the constraint. The maximum length is 2000 characters.
279
+ */
280
+ description?: string | null;
281
+ /**
282
+ * A display name for the constraint. The maximum length is 200 characters.
283
+ */
284
+ displayName?: string | null;
285
+ /**
286
+ * The types of operations that the constraint applies to.
287
+ */
288
+ methodTypes?: string[] | null;
289
+ /**
290
+ * Immutable. The name of the constraint, in the format `organizations/{organization_id\}/customConstraints/custom.{custom_constraint_id\}`. For example, `organizations/123456789012/customConstraints/custom.createOnlyE2TypeVms`. Must contain 1 to 62 characters, excluding the prefix `organizations/{organization_id\}/customConstraints/custom.`.
291
+ */
292
+ name?: string | null;
293
+ /**
294
+ * Immutable. The resource type that the constraint applies to, in the format `{canonical_service_name\}/{resource_type_name\}`. For example, `compute.googleapis.com/Instance`.
295
+ */
296
+ resourceTypes?: string[] | null;
297
+ /**
298
+ * Output only. The last time at which the constraint was updated or created.
299
+ */
300
+ updateTime?: string | null;
301
+ }
302
+ /**
303
+ * A rule that defines the allowed and denied values for an organization policy constraint.
304
+ */
305
+ export interface Schema$GoogleCloudSecuritypostureV1PolicyRule {
306
+ /**
307
+ * Whether to allow any value for a list constraint. Valid only for list constraints.
308
+ */
309
+ allowAll?: boolean | null;
310
+ /**
311
+ * A condition that determines whether this rule is used to evaluate the policy. When set, the google.type.Expr.expression field must contain 1 to 10 subexpressions, joined by the `||` or `&&` operators. Each subexpression must use the `resource.matchTag()` or `resource.matchTagId()` Common Expression Language (CEL) function. The `resource.matchTag()` function takes the following arguments: * `key_name`: the namespaced name of the tag key, with the organization ID and a slash (`/`) as a prefix; for example, `123456789012/environment` * `value_name`: the short name of the tag value For example: `resource.matchTag('123456789012/environment, 'prod')` The `resource.matchTagId()` function takes the following arguments: * `key_id`: the permanent ID of the tag key; for example, `tagKeys/123456789012` * `value_id`: the permanent ID of the tag value; for example, `tagValues/567890123456` For example: `resource.matchTagId('tagKeys/123456789012', 'tagValues/567890123456')`
312
+ */
313
+ condition?: Schema$Expr;
314
+ /**
315
+ * Whether to deny all values for a list constraint. Valid only for list constraints.
316
+ */
317
+ denyAll?: boolean | null;
318
+ /**
319
+ * Whether to enforce the constraint. Valid only for boolean constraints.
320
+ */
321
+ enforce?: boolean | null;
322
+ /**
323
+ * Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true \}
324
+ */
325
+ parameters?: {[key: string]: any} | null;
326
+ /**
327
+ * Optional. The resource types policies can support, only used for managed constraints. Method type is `GOVERN_TAGS`.
328
+ */
329
+ resourceTypes?: Schema$ResourceTypes;
330
+ /**
331
+ * The allowed and denied values for a list constraint. Valid only for list constraints.
332
+ */
333
+ values?: Schema$GoogleCloudSecuritypostureV1PolicyRuleStringValues;
334
+ }
335
+ /**
336
+ * The allowed and denied values for a list constraint. For all constraints, these fields can contain literal values. Optionally, you can add the `is:` prefix to these values. If the value contains a colon (`:`), then the `is:` prefix is required. Some constraints allow you to specify a portion of the resource hierarchy, known as a [_hierarchy subtree_](https://cloud.google.com/resource-manager/help/organization-policy/hierarchy-subtree), that the constraint applies to. To specify a hierarchy subtree, use the `under:` prefix, followed by a value with one of these formats: - `projects/{project_id\}` (for example, `projects/tokyo-rain-123`) - `folders/{folder_id\}` (for example, `folders/1234567890123`) - `organizations/{organization_id\}` (for example, `organizations/123456789012`) A constraint's `supports_under` field indicates whether you can specify a hierarchy subtree. To learn which predefined constraints let you specify a hierarchy subtree, see the [constraints reference](https://cloud.google.com/resource-manager/help/organization-policy/constraints/reference).
337
+ */
338
+ export interface Schema$GoogleCloudSecuritypostureV1PolicyRuleStringValues {
339
+ /**
340
+ * The allowed values for the constraint.
341
+ */
342
+ allowedValues?: string[] | null;
343
+ /**
344
+ * The denied values for the constraint.
345
+ */
346
+ deniedValues?: string[] | null;
347
+ }
348
+ /**
349
+ * Details of an infrastructure-as-code (IaC) configuration.
350
+ */
351
+ export interface Schema$IaC {
352
+ /**
353
+ * Optional. A Terraform plan file, formatted as a stringified JSON object. To learn how to generate a Terraform plan file in JSON format, see [JSON output format](https://developer.hashicorp.com/terraform/internals/json-format) in the Terraform documentation.
354
+ */
355
+ tfPlan?: string | null;
356
+ }
357
+ /**
358
+ * Details of an infrastructure-as-code (IaC) validation report.
359
+ */
360
+ export interface Schema$IaCValidationReport {
361
+ /**
362
+ * Additional information about the report.
363
+ */
364
+ note?: string | null;
365
+ /**
366
+ * A list of every Violation found in the IaC configuration.
367
+ */
368
+ violations?: Schema$Violation[];
369
+ }
370
+ /**
371
+ * The response message for Locations.ListLocations.
372
+ */
373
+ export interface Schema$ListLocationsResponse {
374
+ /**
375
+ * A list of locations that matches the specified filter in the request.
376
+ */
377
+ locations?: Schema$Location[];
378
+ /**
379
+ * The standard List next-page token.
380
+ */
381
+ nextPageToken?: string | null;
382
+ }
383
+ /**
384
+ * The response message for Operations.ListOperations.
385
+ */
386
+ export interface Schema$ListOperationsResponse {
387
+ /**
388
+ * The standard List next-page token.
389
+ */
390
+ nextPageToken?: string | null;
391
+ /**
392
+ * A list of operations that matches the specified filter in the request.
393
+ */
394
+ operations?: Schema$Operation[];
395
+ }
396
+ /**
397
+ * Response message for ListPostureDeployments.
398
+ */
399
+ export interface Schema$ListPostureDeploymentsResponse {
400
+ /**
401
+ * A pagination token. To retrieve the next page of results, call the method again with this token.
402
+ */
403
+ nextPageToken?: string | null;
404
+ /**
405
+ * The list of PostureDeployment resources.
406
+ */
407
+ postureDeployments?: Schema$PostureDeployment[];
408
+ /**
409
+ * Locations that were temporarily unavailable and could not be reached.
410
+ */
411
+ unreachable?: string[] | null;
412
+ }
413
+ /**
414
+ * Response message for ListPostureRevisions.
415
+ */
416
+ export interface Schema$ListPostureRevisionsResponse {
417
+ /**
418
+ * A pagination token. To retrieve the next page of results, call the method again with this token.
419
+ */
420
+ nextPageToken?: string | null;
421
+ /**
422
+ * The list of revisions for the Posture.
423
+ */
424
+ revisions?: Schema$Posture[];
425
+ }
426
+ /**
427
+ * Response message for ListPostures.
428
+ */
429
+ export interface Schema$ListPosturesResponse {
430
+ /**
431
+ * A pagination token. To retrieve the next page of results, call the method again with this token.
432
+ */
433
+ nextPageToken?: string | null;
434
+ /**
435
+ * The list of Posture resources.
436
+ */
437
+ postures?: Schema$Posture[];
438
+ /**
439
+ * Locations that were temporarily unavailable and could not be reached.
440
+ */
441
+ unreachable?: string[] | null;
442
+ }
443
+ /**
444
+ * Response message for ListPostureTemplates.
445
+ */
446
+ export interface Schema$ListPostureTemplatesResponse {
447
+ /**
448
+ * A pagination token. To retrieve the next page of results, call the method again with this token.
449
+ */
450
+ nextPageToken?: string | null;
451
+ /**
452
+ * The list of PostureTemplate resources.
453
+ */
454
+ postureTemplates?: Schema$PostureTemplate[];
455
+ }
456
+ /**
457
+ * Response message for ListReports.
458
+ */
459
+ export interface Schema$ListReportsResponse {
460
+ /**
461
+ * A pagination token. To retrieve the next page of results, call the method again with this token.
462
+ */
463
+ nextPageToken?: string | null;
464
+ /**
465
+ * The list of Report resources.
466
+ */
467
+ reports?: Schema$Report[];
468
+ /**
469
+ * Locations that were temporarily unavailable and could not be reached.
470
+ */
471
+ unreachable?: string[] | null;
472
+ }
473
+ /**
474
+ * A resource that represents a Google Cloud location.
475
+ */
476
+ export interface Schema$Location {
477
+ /**
478
+ * The friendly name for this location, typically a nearby city name. For example, "Tokyo".
479
+ */
480
+ displayName?: string | null;
481
+ /**
482
+ * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\}
483
+ */
484
+ labels?: {[key: string]: string} | null;
485
+ /**
486
+ * The canonical id for this location. For example: `"us-east1"`.
487
+ */
488
+ locationId?: string | null;
489
+ /**
490
+ * Service-specific metadata. For example the available capacity at the given location.
491
+ */
492
+ metadata?: {[key: string]: any} | null;
493
+ /**
494
+ * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"`
495
+ */
496
+ name?: string | null;
497
+ }
498
+ /**
499
+ * This resource represents a long-running operation that is the result of a network API call.
500
+ */
501
+ export interface Schema$Operation {
502
+ /**
503
+ * If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
504
+ */
505
+ done?: boolean | null;
506
+ /**
507
+ * The error result of the operation in case of failure or cancellation.
508
+ */
509
+ error?: Schema$Status;
510
+ /**
511
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
512
+ */
513
+ metadata?: {[key: string]: any} | null;
514
+ /**
515
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`.
516
+ */
517
+ name?: string | null;
518
+ /**
519
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
520
+ */
521
+ response?: {[key: string]: any} | null;
522
+ }
523
+ /**
524
+ * Metadata for an Operation.
525
+ */
526
+ export interface Schema$OperationMetadata {
527
+ /**
528
+ * Output only. The API version used to start the operation.
529
+ */
530
+ apiVersion?: string | null;
531
+ /**
532
+ * Output only. The time at which the operation was created.
533
+ */
534
+ createTime?: string | null;
535
+ /**
536
+ * Output only. The time at which the operation finished running.
537
+ */
538
+ endTime?: string | null;
539
+ /**
540
+ * Output only. An error message. Returned when a PostureDeployment enters a failure state like UPDATE_FAILED.
541
+ */
542
+ errorMessage?: string | null;
543
+ /**
544
+ * Output only. Whether a request to cancel the operation has been received. For operations that have been cancelled successfully, the Operation.error field contains the error code CANCELLED.
545
+ */
546
+ requestedCancellation?: boolean | null;
547
+ /**
548
+ * Output only. The status of the operation, if any.
549
+ */
550
+ statusMessage?: string | null;
551
+ /**
552
+ * Output only. The server-defined resource path for the target of the operation.
553
+ */
554
+ target?: string | null;
555
+ /**
556
+ * Output only. The name of the action executed by the operation.
557
+ */
558
+ verb?: string | null;
559
+ }
560
+ /**
561
+ * A predefined organization policy constraint.
562
+ */
563
+ export interface Schema$OrgPolicyConstraint {
564
+ /**
565
+ * Required. A unique identifier for the constraint.
566
+ */
567
+ cannedConstraintId?: string | null;
568
+ /**
569
+ * Required. The rules enforced by the constraint.
570
+ */
571
+ policyRules?: Schema$GoogleCloudSecuritypostureV1PolicyRule[];
572
+ }
573
+ /**
574
+ * A custom organization policy constraint.
575
+ */
576
+ export interface Schema$OrgPolicyConstraintCustom {
577
+ /**
578
+ * Required. Metadata for the constraint.
579
+ */
580
+ customConstraint?: Schema$GoogleCloudSecuritypostureV1CustomConstraint;
581
+ /**
582
+ * Required. The rules enforced by the constraint.
583
+ */
584
+ policyRules?: Schema$GoogleCloudSecuritypostureV1PolicyRule[];
585
+ }
586
+ /**
587
+ * The details of a policy, including the constraints that it includes.
588
+ */
589
+ export interface Schema$Policy {
590
+ /**
591
+ * Optional. The compliance standards that the policy helps enforce.
592
+ */
593
+ complianceStandards?: Schema$ComplianceStandard[];
594
+ /**
595
+ * Required. The constraints that the policy includes.
596
+ */
597
+ constraint?: Schema$Constraint;
598
+ /**
599
+ * Optional. A description of the policy.
600
+ */
601
+ description?: string | null;
602
+ /**
603
+ * Required. A user-specified identifier for the policy. In a PolicySet, each policy must have a unique identifier.
604
+ */
605
+ policyId?: string | null;
606
+ }
607
+ /**
608
+ * Details of a policy that was violated.
609
+ */
610
+ export interface Schema$PolicyDetails {
611
+ /**
612
+ * The compliance standards that the policy maps to. For example, `CIS-2.0 1.15`.
613
+ */
614
+ complianceStandards?: string[] | null;
615
+ /**
616
+ * Information about the constraint that was violated. The format of this information can change at any time without prior notice. Your application must not depend on this information in any way.
617
+ */
618
+ constraint?: string | null;
619
+ /**
620
+ * The type of constraint that was violated.
621
+ */
622
+ constraintType?: string | null;
623
+ /**
624
+ * A description of the policy.
625
+ */
626
+ description?: string | null;
627
+ }
628
+ /**
629
+ * A group of one or more Policy resources.
630
+ */
631
+ export interface Schema$PolicySet {
632
+ /**
633
+ * Optional. A description of the policy set.
634
+ */
635
+ description?: string | null;
636
+ /**
637
+ * Required. The Policy resources in the policy set. Each policy must have a policy_id that's unique within the policy set.
638
+ */
639
+ policies?: Schema$Policy[];
640
+ /**
641
+ * Required. An identifier for the policy set.
642
+ */
643
+ policySetId?: string | null;
644
+ }
645
+ /**
646
+ * The details of a posture.
647
+ */
648
+ export interface Schema$Posture {
649
+ /**
650
+ * Optional. The user-specified annotations for the posture. For details about the values you can use in an annotation, see [AIP-148: Standard fields](https://google.aip.dev/148#annotations).
651
+ */
652
+ annotations?: {[key: string]: string} | null;
653
+ /**
654
+ * Output only. The categories that the posture belongs to, as determined by the Security Posture API.
655
+ */
656
+ categories?: string[] | null;
657
+ /**
658
+ * Output only. The time at which the posture was created.
659
+ */
660
+ createTime?: string | null;
661
+ /**
662
+ * Optional. A description of the posture.
663
+ */
664
+ description?: string | null;
665
+ /**
666
+ * Optional. An opaque identifier for the current version of the posture at the specified `revision_id`. To prevent concurrent updates from overwriting each other, always provide the `etag` when you update a posture. You can also provide the `etag` when you delete a posture, to help ensure that you're deleting the intended version of the posture.
667
+ */
668
+ etag?: string | null;
669
+ /**
670
+ * Required. Identifier. The name of the posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
671
+ */
672
+ name?: string | null;
673
+ /**
674
+ * Required. The PolicySet resources that the posture includes.
675
+ */
676
+ policySets?: Schema$PolicySet[];
677
+ /**
678
+ * Output only. Whether the posture is in the process of being updated.
679
+ */
680
+ reconciling?: boolean | null;
681
+ /**
682
+ * Output only. Immutable. An opaque eight-character string that identifies the revision of the posture. A posture can have multiple revisions; when you deploy a posture, you deploy a specific revision of the posture.
683
+ */
684
+ revisionId?: string | null;
685
+ /**
686
+ * Required. The state of the posture at the specified `revision_id`.
687
+ */
688
+ state?: string | null;
689
+ /**
690
+ * Output only. The time at which the posture was last updated.
691
+ */
692
+ updateTime?: string | null;
693
+ }
694
+ /**
695
+ * Details for a Posture deployment on an organization, folder, or project. You can deploy at most one posture to each organization, folder, or project. The parent resource for a posture deployment is always the organization, even if the deployment applies to a folder or project.
696
+ */
697
+ export interface Schema$PostureDeployment {
698
+ /**
699
+ * Optional. The user-specified annotations for the posture deployment. For details about the values you can use in an annotation, see [AIP-148: Standard fields](https://google.aip.dev/148#annotations).
700
+ */
701
+ annotations?: {[key: string]: string} | null;
702
+ /**
703
+ * Output only. The categories that the posture deployment belongs to, as determined by the Security Posture API.
704
+ */
705
+ categories?: string[] | null;
706
+ /**
707
+ * Output only. The time at which the posture deployment was created.
708
+ */
709
+ createTime?: string | null;
710
+ /**
711
+ * Optional. A description of the posture deployment.
712
+ */
713
+ description?: string | null;
714
+ /**
715
+ * Output only. The posture ID that was specified for the deployment. Present only if the posture deployment is in a failed state.
716
+ */
717
+ desiredPostureId?: string | null;
718
+ /**
719
+ * Output only. The revision ID of the posture that was specified for the deployment. Present only if the deployment is in a failed state.
720
+ */
721
+ desiredPostureRevisionId?: string | null;
722
+ /**
723
+ * Optional. An opaque identifier for the current version of the posture deployment. To prevent concurrent updates from overwriting each other, always provide the `etag` when you update a posture deployment. You can also provide the `etag` when you delete a posture deployment, to help ensure that you're deleting the intended posture deployment.
724
+ */
725
+ etag?: string | null;
726
+ /**
727
+ * Output only. A description of why the posture deployment failed. Present only if the deployment is in a failed state.
728
+ */
729
+ failureMessage?: string | null;
730
+ /**
731
+ * Required. Identifier. The name of the posture deployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{deployment_id\}`.
732
+ */
733
+ name?: string | null;
734
+ /**
735
+ * Required. The posture used in the deployment, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
736
+ */
737
+ postureId?: string | null;
738
+ /**
739
+ * Required. The revision ID of the posture used in the deployment.
740
+ */
741
+ postureRevisionId?: string | null;
742
+ /**
743
+ * Output only. Whether the posture deployment is in the process of being updated.
744
+ */
745
+ reconciling?: boolean | null;
746
+ /**
747
+ * Output only. The state of the posture deployment.
748
+ */
749
+ state?: string | null;
750
+ /**
751
+ * Required. The organization, folder, or project where the posture is deployed. Uses one of the following formats: * `organizations/{organization_number\}` * `folders/{folder_number\}` * `projects/{project_number\}`
752
+ */
753
+ targetResource?: string | null;
754
+ /**
755
+ * Output only. The time at which the posture deployment was last updated.
756
+ */
757
+ updateTime?: string | null;
758
+ }
759
+ /**
760
+ * Details of a posture deployment.
761
+ */
762
+ export interface Schema$PostureDetails {
763
+ /**
764
+ * The identifier for the PolicySet that the relevant policy belongs to.
765
+ */
766
+ policySet?: string | null;
767
+ /**
768
+ * The posture used in the deployment, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
769
+ */
770
+ posture?: string | null;
771
+ /**
772
+ * The name of the posture deployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{deployment_id\}`.
773
+ */
774
+ postureDeployment?: string | null;
775
+ /**
776
+ * The organization, folder, or project where the posture is deployed. Uses one of the following formats: * `organizations/{organization_number\}` * `folders/{folder_number\}` * `projects/{project_number\}`
777
+ */
778
+ postureDeploymentTargetResource?: string | null;
779
+ /**
780
+ * The revision ID of the posture used in the deployment.
781
+ */
782
+ postureRevisionId?: string | null;
783
+ }
784
+ /**
785
+ * The details of a posture template.
786
+ */
787
+ export interface Schema$PostureTemplate {
788
+ /**
789
+ * Output only. The categories that the posture template belongs to, as determined by the Security Posture API.
790
+ */
791
+ categories?: string[] | null;
792
+ /**
793
+ * Output only. A description of the posture template.
794
+ */
795
+ description?: string | null;
796
+ /**
797
+ * Output only. Identifier. The name of the posture template, in the format `organizations/{organization\}/locations/global/postureTemplates/{posture_template\}`.
798
+ */
799
+ name?: string | null;
800
+ /**
801
+ * Output only. The PolicySet resources that the posture template includes.
802
+ */
803
+ policySets?: Schema$PolicySet[];
804
+ /**
805
+ * Output only. A string that identifies the revision of the posture template.
806
+ */
807
+ revisionId?: string | null;
808
+ /**
809
+ * Output only. The state of the posture template at the specified `revision_id`.
810
+ */
811
+ state?: string | null;
812
+ }
813
+ /**
814
+ * A name-value pair used as a custom source property.
815
+ */
816
+ export interface Schema$Property {
817
+ /**
818
+ * Required. The name of the custom source property.
819
+ */
820
+ name?: string | null;
821
+ /**
822
+ * Optional. The CEL expression for the value of the custom source property. For resource properties, you can return the value of the property or a string enclosed in quotation marks.
823
+ */
824
+ valueExpression?: Schema$Expr;
825
+ }
826
+ /**
827
+ * Details of a report.
828
+ */
829
+ export interface Schema$Report {
830
+ /**
831
+ * Output only. The time at which the report was created.
832
+ */
833
+ createTime?: string | null;
834
+ /**
835
+ * Output only. An infrastructure-as-code (IaC) validation report.
836
+ */
837
+ iacValidationReport?: Schema$IaCValidationReport;
838
+ /**
839
+ * Required. The name of the report, in the format `organizations/{organization\}/locations/global/reports/{report_id\}`.
840
+ */
841
+ name?: string | null;
842
+ /**
843
+ * Output only. The time at which the report was last updated.
844
+ */
845
+ updateTime?: string | null;
846
+ }
847
+ /**
848
+ * A selector for the resource types to run the detector on.
849
+ */
850
+ export interface Schema$ResourceSelector {
851
+ /**
852
+ * Required. The resource types to run the detector on. Each custom module can specify up to 5 resource types.
853
+ */
854
+ resourceTypes?: string[] | null;
855
+ }
856
+ /**
857
+ * Set multiple resource types for one policy, for example: resourceTypes: included: - compute.googleapis.com/Instance - compute.googleapis.com/Disk Constraint definition contains an empty resource type in order to support multiple resource types in the policy. Only supports managed constraints. Method type is `GOVERN_TAGS`. Refer go/multi-resource-support-force-tags-gmc to get more details.
858
+ */
859
+ export interface Schema$ResourceTypes {
860
+ /**
861
+ * Optional. The resource types we currently support. cloud/orgpolicy/customconstraintconfig/prod/resource_types.prototext
862
+ */
863
+ included?: string[] | null;
864
+ }
865
+ /**
866
+ * A custom module for Security Health Analytics.
867
+ */
868
+ export interface Schema$SecurityHealthAnalyticsCustomModule {
869
+ /**
870
+ * Required. Configuration settings for the custom module.
871
+ */
872
+ config?: Schema$CustomConfig;
873
+ /**
874
+ * Optional. The display name of the custom module. This value is used as the finding category for all the asset violation findings that the custom module returns. The display name must contain between 1 and 128 alphanumeric characters or underscores, and it must start with a lowercase letter.
875
+ */
876
+ displayName?: string | null;
877
+ /**
878
+ * Output only. Immutable. The unique identifier for the custom module. Contains 1 to 20 digits.
879
+ */
880
+ id?: string | null;
881
+ /**
882
+ * Whether the custom module is enabled at a specified level of the resource hierarchy.
883
+ */
884
+ moduleEnablementState?: string | null;
885
+ }
886
+ /**
887
+ * A built-in detector for Security Health Analytics.
888
+ */
889
+ export interface Schema$SecurityHealthAnalyticsModule {
890
+ /**
891
+ * Whether the detector is enabled at a specified level of the resource hierarchy.
892
+ */
893
+ moduleEnablementState?: string | null;
894
+ /**
895
+ * Required. The name of the detector. For example, `BIGQUERY_TABLE_CMEK_DISABLED`. This field is also used as the finding category for all the asset violation findings that the detector returns.
896
+ */
897
+ moduleName?: string | null;
898
+ }
899
+ /**
900
+ * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
901
+ */
902
+ export interface Schema$Status {
903
+ /**
904
+ * The status code, which should be an enum value of google.rpc.Code.
905
+ */
906
+ code?: number | null;
907
+ /**
908
+ * A list of messages that carry the error details. There is a common set of message types for APIs to use.
909
+ */
910
+ details?: Array<{[key: string]: any}> | null;
911
+ /**
912
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
913
+ */
914
+ message?: string | null;
915
+ }
916
+ /**
917
+ * Details of a violation.
918
+ */
919
+ export interface Schema$Violation {
920
+ /**
921
+ * The full resource name of the asset that caused the violation. For details about the format of the full resource name for each asset type, see [Resource name format](https://cloud.google.com/asset-inventory/docs/resource-name-format).
922
+ */
923
+ assetId?: string | null;
924
+ /**
925
+ * A description of the steps that you can take to fix the violation.
926
+ */
927
+ nextSteps?: string | null;
928
+ /**
929
+ * The policy that was violated.
930
+ */
931
+ policyId?: string | null;
932
+ /**
933
+ * The severity of the violation.
934
+ */
935
+ severity?: string | null;
936
+ /**
937
+ * Details of the Cloud Asset Inventory asset that caused the violation.
938
+ */
939
+ violatedAsset?: Schema$AssetDetails;
940
+ /**
941
+ * Details of the policy that was violated.
942
+ */
943
+ violatedPolicy?: Schema$PolicyDetails;
944
+ /**
945
+ * Details for the posture that was violated. This field is present only if the violated policy belongs to a deployed posture.
946
+ */
947
+ violatedPosture?: Schema$PostureDetails;
948
+ }
949
+
950
+ export class Resource$Organizations {
951
+ context: APIRequestContext;
952
+ locations: Resource$Organizations$Locations;
953
+ constructor(context: APIRequestContext) {
954
+ this.context = context;
955
+ this.locations = new Resource$Organizations$Locations(this.context);
956
+ }
957
+ }
958
+
959
+ export class Resource$Organizations$Locations {
960
+ context: APIRequestContext;
961
+ operations: Resource$Organizations$Locations$Operations;
962
+ postureDeployments: Resource$Organizations$Locations$Posturedeployments;
963
+ postures: Resource$Organizations$Locations$Postures;
964
+ postureTemplates: Resource$Organizations$Locations$Posturetemplates;
965
+ reports: Resource$Organizations$Locations$Reports;
966
+ constructor(context: APIRequestContext) {
967
+ this.context = context;
968
+ this.operations = new Resource$Organizations$Locations$Operations(
969
+ this.context
970
+ );
971
+ this.postureDeployments =
972
+ new Resource$Organizations$Locations$Posturedeployments(this.context);
973
+ this.postures = new Resource$Organizations$Locations$Postures(
974
+ this.context
975
+ );
976
+ this.postureTemplates =
977
+ new Resource$Organizations$Locations$Posturetemplates(this.context);
978
+ this.reports = new Resource$Organizations$Locations$Reports(this.context);
979
+ }
980
+ }
981
+
982
+ export class Resource$Organizations$Locations$Operations {
983
+ context: APIRequestContext;
984
+ constructor(context: APIRequestContext) {
985
+ this.context = context;
986
+ }
987
+
988
+ /**
989
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
990
+ *
991
+ * @param params - Parameters for request
992
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
993
+ * @param callback - Optional callback that handles the response.
994
+ * @returns A promise if used with async/await, or void if used with a callback.
995
+ */
996
+ cancel(
997
+ params: Params$Resource$Organizations$Locations$Operations$Cancel,
998
+ options: StreamMethodOptions
999
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1000
+ cancel(
1001
+ params?: Params$Resource$Organizations$Locations$Operations$Cancel,
1002
+ options?: MethodOptions
1003
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
1004
+ cancel(
1005
+ params: Params$Resource$Organizations$Locations$Operations$Cancel,
1006
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1007
+ callback: BodyResponseCallback<Readable>
1008
+ ): void;
1009
+ cancel(
1010
+ params: Params$Resource$Organizations$Locations$Operations$Cancel,
1011
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
1012
+ callback: BodyResponseCallback<Schema$Empty>
1013
+ ): void;
1014
+ cancel(
1015
+ params: Params$Resource$Organizations$Locations$Operations$Cancel,
1016
+ callback: BodyResponseCallback<Schema$Empty>
1017
+ ): void;
1018
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
1019
+ cancel(
1020
+ paramsOrCallback?:
1021
+ | Params$Resource$Organizations$Locations$Operations$Cancel
1022
+ | BodyResponseCallback<Schema$Empty>
1023
+ | BodyResponseCallback<Readable>,
1024
+ optionsOrCallback?:
1025
+ | MethodOptions
1026
+ | StreamMethodOptions
1027
+ | BodyResponseCallback<Schema$Empty>
1028
+ | BodyResponseCallback<Readable>,
1029
+ callback?:
1030
+ | BodyResponseCallback<Schema$Empty>
1031
+ | BodyResponseCallback<Readable>
1032
+ ):
1033
+ | void
1034
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
1035
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1036
+ let params = (paramsOrCallback ||
1037
+ {}) as Params$Resource$Organizations$Locations$Operations$Cancel;
1038
+ let options = (optionsOrCallback || {}) as MethodOptions;
1039
+
1040
+ if (typeof paramsOrCallback === 'function') {
1041
+ callback = paramsOrCallback;
1042
+ params =
1043
+ {} as Params$Resource$Organizations$Locations$Operations$Cancel;
1044
+ options = {};
1045
+ }
1046
+
1047
+ if (typeof optionsOrCallback === 'function') {
1048
+ callback = optionsOrCallback;
1049
+ options = {};
1050
+ }
1051
+
1052
+ const rootUrl =
1053
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1054
+ const parameters = {
1055
+ options: Object.assign(
1056
+ {
1057
+ url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
1058
+ method: 'POST',
1059
+ apiVersion: '',
1060
+ },
1061
+ options
1062
+ ),
1063
+ params,
1064
+ requiredParams: ['name'],
1065
+ pathParams: ['name'],
1066
+ context: this.context,
1067
+ };
1068
+ if (callback) {
1069
+ createAPIRequest<Schema$Empty>(
1070
+ parameters,
1071
+ callback as BodyResponseCallback<unknown>
1072
+ );
1073
+ } else {
1074
+ return createAPIRequest<Schema$Empty>(parameters);
1075
+ }
1076
+ }
1077
+
1078
+ /**
1079
+ * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1080
+ *
1081
+ * @param params - Parameters for request
1082
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1083
+ * @param callback - Optional callback that handles the response.
1084
+ * @returns A promise if used with async/await, or void if used with a callback.
1085
+ */
1086
+ delete(
1087
+ params: Params$Resource$Organizations$Locations$Operations$Delete,
1088
+ options: StreamMethodOptions
1089
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1090
+ delete(
1091
+ params?: Params$Resource$Organizations$Locations$Operations$Delete,
1092
+ options?: MethodOptions
1093
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
1094
+ delete(
1095
+ params: Params$Resource$Organizations$Locations$Operations$Delete,
1096
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1097
+ callback: BodyResponseCallback<Readable>
1098
+ ): void;
1099
+ delete(
1100
+ params: Params$Resource$Organizations$Locations$Operations$Delete,
1101
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
1102
+ callback: BodyResponseCallback<Schema$Empty>
1103
+ ): void;
1104
+ delete(
1105
+ params: Params$Resource$Organizations$Locations$Operations$Delete,
1106
+ callback: BodyResponseCallback<Schema$Empty>
1107
+ ): void;
1108
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
1109
+ delete(
1110
+ paramsOrCallback?:
1111
+ | Params$Resource$Organizations$Locations$Operations$Delete
1112
+ | BodyResponseCallback<Schema$Empty>
1113
+ | BodyResponseCallback<Readable>,
1114
+ optionsOrCallback?:
1115
+ | MethodOptions
1116
+ | StreamMethodOptions
1117
+ | BodyResponseCallback<Schema$Empty>
1118
+ | BodyResponseCallback<Readable>,
1119
+ callback?:
1120
+ | BodyResponseCallback<Schema$Empty>
1121
+ | BodyResponseCallback<Readable>
1122
+ ):
1123
+ | void
1124
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
1125
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1126
+ let params = (paramsOrCallback ||
1127
+ {}) as Params$Resource$Organizations$Locations$Operations$Delete;
1128
+ let options = (optionsOrCallback || {}) as MethodOptions;
1129
+
1130
+ if (typeof paramsOrCallback === 'function') {
1131
+ callback = paramsOrCallback;
1132
+ params =
1133
+ {} as Params$Resource$Organizations$Locations$Operations$Delete;
1134
+ options = {};
1135
+ }
1136
+
1137
+ if (typeof optionsOrCallback === 'function') {
1138
+ callback = optionsOrCallback;
1139
+ options = {};
1140
+ }
1141
+
1142
+ const rootUrl =
1143
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1144
+ const parameters = {
1145
+ options: Object.assign(
1146
+ {
1147
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1148
+ method: 'DELETE',
1149
+ apiVersion: '',
1150
+ },
1151
+ options
1152
+ ),
1153
+ params,
1154
+ requiredParams: ['name'],
1155
+ pathParams: ['name'],
1156
+ context: this.context,
1157
+ };
1158
+ if (callback) {
1159
+ createAPIRequest<Schema$Empty>(
1160
+ parameters,
1161
+ callback as BodyResponseCallback<unknown>
1162
+ );
1163
+ } else {
1164
+ return createAPIRequest<Schema$Empty>(parameters);
1165
+ }
1166
+ }
1167
+
1168
+ /**
1169
+ * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
1170
+ *
1171
+ * @param params - Parameters for request
1172
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1173
+ * @param callback - Optional callback that handles the response.
1174
+ * @returns A promise if used with async/await, or void if used with a callback.
1175
+ */
1176
+ get(
1177
+ params: Params$Resource$Organizations$Locations$Operations$Get,
1178
+ options: StreamMethodOptions
1179
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1180
+ get(
1181
+ params?: Params$Resource$Organizations$Locations$Operations$Get,
1182
+ options?: MethodOptions
1183
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1184
+ get(
1185
+ params: Params$Resource$Organizations$Locations$Operations$Get,
1186
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1187
+ callback: BodyResponseCallback<Readable>
1188
+ ): void;
1189
+ get(
1190
+ params: Params$Resource$Organizations$Locations$Operations$Get,
1191
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1192
+ callback: BodyResponseCallback<Schema$Operation>
1193
+ ): void;
1194
+ get(
1195
+ params: Params$Resource$Organizations$Locations$Operations$Get,
1196
+ callback: BodyResponseCallback<Schema$Operation>
1197
+ ): void;
1198
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
1199
+ get(
1200
+ paramsOrCallback?:
1201
+ | Params$Resource$Organizations$Locations$Operations$Get
1202
+ | BodyResponseCallback<Schema$Operation>
1203
+ | BodyResponseCallback<Readable>,
1204
+ optionsOrCallback?:
1205
+ | MethodOptions
1206
+ | StreamMethodOptions
1207
+ | BodyResponseCallback<Schema$Operation>
1208
+ | BodyResponseCallback<Readable>,
1209
+ callback?:
1210
+ | BodyResponseCallback<Schema$Operation>
1211
+ | BodyResponseCallback<Readable>
1212
+ ):
1213
+ | void
1214
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
1215
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1216
+ let params = (paramsOrCallback ||
1217
+ {}) as Params$Resource$Organizations$Locations$Operations$Get;
1218
+ let options = (optionsOrCallback || {}) as MethodOptions;
1219
+
1220
+ if (typeof paramsOrCallback === 'function') {
1221
+ callback = paramsOrCallback;
1222
+ params = {} as Params$Resource$Organizations$Locations$Operations$Get;
1223
+ options = {};
1224
+ }
1225
+
1226
+ if (typeof optionsOrCallback === 'function') {
1227
+ callback = optionsOrCallback;
1228
+ options = {};
1229
+ }
1230
+
1231
+ const rootUrl =
1232
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1233
+ const parameters = {
1234
+ options: Object.assign(
1235
+ {
1236
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1237
+ method: 'GET',
1238
+ apiVersion: '',
1239
+ },
1240
+ options
1241
+ ),
1242
+ params,
1243
+ requiredParams: ['name'],
1244
+ pathParams: ['name'],
1245
+ context: this.context,
1246
+ };
1247
+ if (callback) {
1248
+ createAPIRequest<Schema$Operation>(
1249
+ parameters,
1250
+ callback as BodyResponseCallback<unknown>
1251
+ );
1252
+ } else {
1253
+ return createAPIRequest<Schema$Operation>(parameters);
1254
+ }
1255
+ }
1256
+
1257
+ /**
1258
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
1259
+ *
1260
+ * @param params - Parameters for request
1261
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1262
+ * @param callback - Optional callback that handles the response.
1263
+ * @returns A promise if used with async/await, or void if used with a callback.
1264
+ */
1265
+ list(
1266
+ params: Params$Resource$Organizations$Locations$Operations$List,
1267
+ options: StreamMethodOptions
1268
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1269
+ list(
1270
+ params?: Params$Resource$Organizations$Locations$Operations$List,
1271
+ options?: MethodOptions
1272
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
1273
+ list(
1274
+ params: Params$Resource$Organizations$Locations$Operations$List,
1275
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1276
+ callback: BodyResponseCallback<Readable>
1277
+ ): void;
1278
+ list(
1279
+ params: Params$Resource$Organizations$Locations$Operations$List,
1280
+ options:
1281
+ | MethodOptions
1282
+ | BodyResponseCallback<Schema$ListOperationsResponse>,
1283
+ callback: BodyResponseCallback<Schema$ListOperationsResponse>
1284
+ ): void;
1285
+ list(
1286
+ params: Params$Resource$Organizations$Locations$Operations$List,
1287
+ callback: BodyResponseCallback<Schema$ListOperationsResponse>
1288
+ ): void;
1289
+ list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1290
+ list(
1291
+ paramsOrCallback?:
1292
+ | Params$Resource$Organizations$Locations$Operations$List
1293
+ | BodyResponseCallback<Schema$ListOperationsResponse>
1294
+ | BodyResponseCallback<Readable>,
1295
+ optionsOrCallback?:
1296
+ | MethodOptions
1297
+ | StreamMethodOptions
1298
+ | BodyResponseCallback<Schema$ListOperationsResponse>
1299
+ | BodyResponseCallback<Readable>,
1300
+ callback?:
1301
+ | BodyResponseCallback<Schema$ListOperationsResponse>
1302
+ | BodyResponseCallback<Readable>
1303
+ ):
1304
+ | void
1305
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
1306
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1307
+ let params = (paramsOrCallback ||
1308
+ {}) as Params$Resource$Organizations$Locations$Operations$List;
1309
+ let options = (optionsOrCallback || {}) as MethodOptions;
1310
+
1311
+ if (typeof paramsOrCallback === 'function') {
1312
+ callback = paramsOrCallback;
1313
+ params = {} as Params$Resource$Organizations$Locations$Operations$List;
1314
+ options = {};
1315
+ }
1316
+
1317
+ if (typeof optionsOrCallback === 'function') {
1318
+ callback = optionsOrCallback;
1319
+ options = {};
1320
+ }
1321
+
1322
+ const rootUrl =
1323
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1324
+ const parameters = {
1325
+ options: Object.assign(
1326
+ {
1327
+ url: (rootUrl + '/v1/{+name}/operations').replace(
1328
+ /([^:]\/)\/+/g,
1329
+ '$1'
1330
+ ),
1331
+ method: 'GET',
1332
+ apiVersion: '',
1333
+ },
1334
+ options
1335
+ ),
1336
+ params,
1337
+ requiredParams: ['name'],
1338
+ pathParams: ['name'],
1339
+ context: this.context,
1340
+ };
1341
+ if (callback) {
1342
+ createAPIRequest<Schema$ListOperationsResponse>(
1343
+ parameters,
1344
+ callback as BodyResponseCallback<unknown>
1345
+ );
1346
+ } else {
1347
+ return createAPIRequest<Schema$ListOperationsResponse>(parameters);
1348
+ }
1349
+ }
1350
+ }
1351
+
1352
+ export interface Params$Resource$Organizations$Locations$Operations$Cancel
1353
+ extends StandardParameters {
1354
+ /**
1355
+ * The name of the operation resource to be cancelled.
1356
+ */
1357
+ name?: string;
1358
+
1359
+ /**
1360
+ * Request body metadata
1361
+ */
1362
+ requestBody?: Schema$CancelOperationRequest;
1363
+ }
1364
+ export interface Params$Resource$Organizations$Locations$Operations$Delete
1365
+ extends StandardParameters {
1366
+ /**
1367
+ * The name of the operation resource to be deleted.
1368
+ */
1369
+ name?: string;
1370
+ }
1371
+ export interface Params$Resource$Organizations$Locations$Operations$Get
1372
+ extends StandardParameters {
1373
+ /**
1374
+ * The name of the operation resource.
1375
+ */
1376
+ name?: string;
1377
+ }
1378
+ export interface Params$Resource$Organizations$Locations$Operations$List
1379
+ extends StandardParameters {
1380
+ /**
1381
+ * The standard list filter.
1382
+ */
1383
+ filter?: string;
1384
+ /**
1385
+ * The name of the operation's parent resource.
1386
+ */
1387
+ name?: string;
1388
+ /**
1389
+ * The standard list page size.
1390
+ */
1391
+ pageSize?: number;
1392
+ /**
1393
+ * The standard list page token.
1394
+ */
1395
+ pageToken?: string;
1396
+ }
1397
+
1398
+ export class Resource$Organizations$Locations$Posturedeployments {
1399
+ context: APIRequestContext;
1400
+ constructor(context: APIRequestContext) {
1401
+ this.context = context;
1402
+ }
1403
+
1404
+ /**
1405
+ * Creates a new PostureDeployment in a given project and location.
1406
+ *
1407
+ * @param params - Parameters for request
1408
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1409
+ * @param callback - Optional callback that handles the response.
1410
+ * @returns A promise if used with async/await, or void if used with a callback.
1411
+ */
1412
+ create(
1413
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Create,
1414
+ options: StreamMethodOptions
1415
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1416
+ create(
1417
+ params?: Params$Resource$Organizations$Locations$Posturedeployments$Create,
1418
+ options?: MethodOptions
1419
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1420
+ create(
1421
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Create,
1422
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1423
+ callback: BodyResponseCallback<Readable>
1424
+ ): void;
1425
+ create(
1426
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Create,
1427
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1428
+ callback: BodyResponseCallback<Schema$Operation>
1429
+ ): void;
1430
+ create(
1431
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Create,
1432
+ callback: BodyResponseCallback<Schema$Operation>
1433
+ ): void;
1434
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
1435
+ create(
1436
+ paramsOrCallback?:
1437
+ | Params$Resource$Organizations$Locations$Posturedeployments$Create
1438
+ | BodyResponseCallback<Schema$Operation>
1439
+ | BodyResponseCallback<Readable>,
1440
+ optionsOrCallback?:
1441
+ | MethodOptions
1442
+ | StreamMethodOptions
1443
+ | BodyResponseCallback<Schema$Operation>
1444
+ | BodyResponseCallback<Readable>,
1445
+ callback?:
1446
+ | BodyResponseCallback<Schema$Operation>
1447
+ | BodyResponseCallback<Readable>
1448
+ ):
1449
+ | void
1450
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
1451
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1452
+ let params = (paramsOrCallback ||
1453
+ {}) as Params$Resource$Organizations$Locations$Posturedeployments$Create;
1454
+ let options = (optionsOrCallback || {}) as MethodOptions;
1455
+
1456
+ if (typeof paramsOrCallback === 'function') {
1457
+ callback = paramsOrCallback;
1458
+ params =
1459
+ {} as Params$Resource$Organizations$Locations$Posturedeployments$Create;
1460
+ options = {};
1461
+ }
1462
+
1463
+ if (typeof optionsOrCallback === 'function') {
1464
+ callback = optionsOrCallback;
1465
+ options = {};
1466
+ }
1467
+
1468
+ const rootUrl =
1469
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1470
+ const parameters = {
1471
+ options: Object.assign(
1472
+ {
1473
+ url: (rootUrl + '/v1/{+parent}/postureDeployments').replace(
1474
+ /([^:]\/)\/+/g,
1475
+ '$1'
1476
+ ),
1477
+ method: 'POST',
1478
+ apiVersion: '',
1479
+ },
1480
+ options
1481
+ ),
1482
+ params,
1483
+ requiredParams: ['parent'],
1484
+ pathParams: ['parent'],
1485
+ context: this.context,
1486
+ };
1487
+ if (callback) {
1488
+ createAPIRequest<Schema$Operation>(
1489
+ parameters,
1490
+ callback as BodyResponseCallback<unknown>
1491
+ );
1492
+ } else {
1493
+ return createAPIRequest<Schema$Operation>(parameters);
1494
+ }
1495
+ }
1496
+
1497
+ /**
1498
+ * Deletes a PostureDeployment.
1499
+ *
1500
+ * @param params - Parameters for request
1501
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1502
+ * @param callback - Optional callback that handles the response.
1503
+ * @returns A promise if used with async/await, or void if used with a callback.
1504
+ */
1505
+ delete(
1506
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Delete,
1507
+ options: StreamMethodOptions
1508
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1509
+ delete(
1510
+ params?: Params$Resource$Organizations$Locations$Posturedeployments$Delete,
1511
+ options?: MethodOptions
1512
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1513
+ delete(
1514
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Delete,
1515
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1516
+ callback: BodyResponseCallback<Readable>
1517
+ ): void;
1518
+ delete(
1519
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Delete,
1520
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1521
+ callback: BodyResponseCallback<Schema$Operation>
1522
+ ): void;
1523
+ delete(
1524
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Delete,
1525
+ callback: BodyResponseCallback<Schema$Operation>
1526
+ ): void;
1527
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
1528
+ delete(
1529
+ paramsOrCallback?:
1530
+ | Params$Resource$Organizations$Locations$Posturedeployments$Delete
1531
+ | BodyResponseCallback<Schema$Operation>
1532
+ | BodyResponseCallback<Readable>,
1533
+ optionsOrCallback?:
1534
+ | MethodOptions
1535
+ | StreamMethodOptions
1536
+ | BodyResponseCallback<Schema$Operation>
1537
+ | BodyResponseCallback<Readable>,
1538
+ callback?:
1539
+ | BodyResponseCallback<Schema$Operation>
1540
+ | BodyResponseCallback<Readable>
1541
+ ):
1542
+ | void
1543
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
1544
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1545
+ let params = (paramsOrCallback ||
1546
+ {}) as Params$Resource$Organizations$Locations$Posturedeployments$Delete;
1547
+ let options = (optionsOrCallback || {}) as MethodOptions;
1548
+
1549
+ if (typeof paramsOrCallback === 'function') {
1550
+ callback = paramsOrCallback;
1551
+ params =
1552
+ {} as Params$Resource$Organizations$Locations$Posturedeployments$Delete;
1553
+ options = {};
1554
+ }
1555
+
1556
+ if (typeof optionsOrCallback === 'function') {
1557
+ callback = optionsOrCallback;
1558
+ options = {};
1559
+ }
1560
+
1561
+ const rootUrl =
1562
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1563
+ const parameters = {
1564
+ options: Object.assign(
1565
+ {
1566
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1567
+ method: 'DELETE',
1568
+ apiVersion: '',
1569
+ },
1570
+ options
1571
+ ),
1572
+ params,
1573
+ requiredParams: ['name'],
1574
+ pathParams: ['name'],
1575
+ context: this.context,
1576
+ };
1577
+ if (callback) {
1578
+ createAPIRequest<Schema$Operation>(
1579
+ parameters,
1580
+ callback as BodyResponseCallback<unknown>
1581
+ );
1582
+ } else {
1583
+ return createAPIRequest<Schema$Operation>(parameters);
1584
+ }
1585
+ }
1586
+
1587
+ /**
1588
+ * Gets details for a PostureDeployment.
1589
+ *
1590
+ * @param params - Parameters for request
1591
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1592
+ * @param callback - Optional callback that handles the response.
1593
+ * @returns A promise if used with async/await, or void if used with a callback.
1594
+ */
1595
+ get(
1596
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Get,
1597
+ options: StreamMethodOptions
1598
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1599
+ get(
1600
+ params?: Params$Resource$Organizations$Locations$Posturedeployments$Get,
1601
+ options?: MethodOptions
1602
+ ): Promise<GaxiosResponseWithHTTP2<Schema$PostureDeployment>>;
1603
+ get(
1604
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Get,
1605
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1606
+ callback: BodyResponseCallback<Readable>
1607
+ ): void;
1608
+ get(
1609
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Get,
1610
+ options: MethodOptions | BodyResponseCallback<Schema$PostureDeployment>,
1611
+ callback: BodyResponseCallback<Schema$PostureDeployment>
1612
+ ): void;
1613
+ get(
1614
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Get,
1615
+ callback: BodyResponseCallback<Schema$PostureDeployment>
1616
+ ): void;
1617
+ get(callback: BodyResponseCallback<Schema$PostureDeployment>): void;
1618
+ get(
1619
+ paramsOrCallback?:
1620
+ | Params$Resource$Organizations$Locations$Posturedeployments$Get
1621
+ | BodyResponseCallback<Schema$PostureDeployment>
1622
+ | BodyResponseCallback<Readable>,
1623
+ optionsOrCallback?:
1624
+ | MethodOptions
1625
+ | StreamMethodOptions
1626
+ | BodyResponseCallback<Schema$PostureDeployment>
1627
+ | BodyResponseCallback<Readable>,
1628
+ callback?:
1629
+ | BodyResponseCallback<Schema$PostureDeployment>
1630
+ | BodyResponseCallback<Readable>
1631
+ ):
1632
+ | void
1633
+ | Promise<GaxiosResponseWithHTTP2<Schema$PostureDeployment>>
1634
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1635
+ let params = (paramsOrCallback ||
1636
+ {}) as Params$Resource$Organizations$Locations$Posturedeployments$Get;
1637
+ let options = (optionsOrCallback || {}) as MethodOptions;
1638
+
1639
+ if (typeof paramsOrCallback === 'function') {
1640
+ callback = paramsOrCallback;
1641
+ params =
1642
+ {} as Params$Resource$Organizations$Locations$Posturedeployments$Get;
1643
+ options = {};
1644
+ }
1645
+
1646
+ if (typeof optionsOrCallback === 'function') {
1647
+ callback = optionsOrCallback;
1648
+ options = {};
1649
+ }
1650
+
1651
+ const rootUrl =
1652
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1653
+ const parameters = {
1654
+ options: Object.assign(
1655
+ {
1656
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1657
+ method: 'GET',
1658
+ apiVersion: '',
1659
+ },
1660
+ options
1661
+ ),
1662
+ params,
1663
+ requiredParams: ['name'],
1664
+ pathParams: ['name'],
1665
+ context: this.context,
1666
+ };
1667
+ if (callback) {
1668
+ createAPIRequest<Schema$PostureDeployment>(
1669
+ parameters,
1670
+ callback as BodyResponseCallback<unknown>
1671
+ );
1672
+ } else {
1673
+ return createAPIRequest<Schema$PostureDeployment>(parameters);
1674
+ }
1675
+ }
1676
+
1677
+ /**
1678
+ * Lists every PostureDeployment in a project and location.
1679
+ *
1680
+ * @param params - Parameters for request
1681
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1682
+ * @param callback - Optional callback that handles the response.
1683
+ * @returns A promise if used with async/await, or void if used with a callback.
1684
+ */
1685
+ list(
1686
+ params: Params$Resource$Organizations$Locations$Posturedeployments$List,
1687
+ options: StreamMethodOptions
1688
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1689
+ list(
1690
+ params?: Params$Resource$Organizations$Locations$Posturedeployments$List,
1691
+ options?: MethodOptions
1692
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListPostureDeploymentsResponse>>;
1693
+ list(
1694
+ params: Params$Resource$Organizations$Locations$Posturedeployments$List,
1695
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1696
+ callback: BodyResponseCallback<Readable>
1697
+ ): void;
1698
+ list(
1699
+ params: Params$Resource$Organizations$Locations$Posturedeployments$List,
1700
+ options:
1701
+ | MethodOptions
1702
+ | BodyResponseCallback<Schema$ListPostureDeploymentsResponse>,
1703
+ callback: BodyResponseCallback<Schema$ListPostureDeploymentsResponse>
1704
+ ): void;
1705
+ list(
1706
+ params: Params$Resource$Organizations$Locations$Posturedeployments$List,
1707
+ callback: BodyResponseCallback<Schema$ListPostureDeploymentsResponse>
1708
+ ): void;
1709
+ list(
1710
+ callback: BodyResponseCallback<Schema$ListPostureDeploymentsResponse>
1711
+ ): void;
1712
+ list(
1713
+ paramsOrCallback?:
1714
+ | Params$Resource$Organizations$Locations$Posturedeployments$List
1715
+ | BodyResponseCallback<Schema$ListPostureDeploymentsResponse>
1716
+ | BodyResponseCallback<Readable>,
1717
+ optionsOrCallback?:
1718
+ | MethodOptions
1719
+ | StreamMethodOptions
1720
+ | BodyResponseCallback<Schema$ListPostureDeploymentsResponse>
1721
+ | BodyResponseCallback<Readable>,
1722
+ callback?:
1723
+ | BodyResponseCallback<Schema$ListPostureDeploymentsResponse>
1724
+ | BodyResponseCallback<Readable>
1725
+ ):
1726
+ | void
1727
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListPostureDeploymentsResponse>>
1728
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1729
+ let params = (paramsOrCallback ||
1730
+ {}) as Params$Resource$Organizations$Locations$Posturedeployments$List;
1731
+ let options = (optionsOrCallback || {}) as MethodOptions;
1732
+
1733
+ if (typeof paramsOrCallback === 'function') {
1734
+ callback = paramsOrCallback;
1735
+ params =
1736
+ {} as Params$Resource$Organizations$Locations$Posturedeployments$List;
1737
+ options = {};
1738
+ }
1739
+
1740
+ if (typeof optionsOrCallback === 'function') {
1741
+ callback = optionsOrCallback;
1742
+ options = {};
1743
+ }
1744
+
1745
+ const rootUrl =
1746
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1747
+ const parameters = {
1748
+ options: Object.assign(
1749
+ {
1750
+ url: (rootUrl + '/v1/{+parent}/postureDeployments').replace(
1751
+ /([^:]\/)\/+/g,
1752
+ '$1'
1753
+ ),
1754
+ method: 'GET',
1755
+ apiVersion: '',
1756
+ },
1757
+ options
1758
+ ),
1759
+ params,
1760
+ requiredParams: ['parent'],
1761
+ pathParams: ['parent'],
1762
+ context: this.context,
1763
+ };
1764
+ if (callback) {
1765
+ createAPIRequest<Schema$ListPostureDeploymentsResponse>(
1766
+ parameters,
1767
+ callback as BodyResponseCallback<unknown>
1768
+ );
1769
+ } else {
1770
+ return createAPIRequest<Schema$ListPostureDeploymentsResponse>(
1771
+ parameters
1772
+ );
1773
+ }
1774
+ }
1775
+
1776
+ /**
1777
+ * Updates an existing PostureDeployment. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture deployment: 1. Call GetPostureDeployment to get the current version of the deployment. 2. Update the fields in the deployment as needed. 3. Call UpdatePostureDeployment to update the deployment. Ensure that your request includes the `etag` value from the GetPostureDeployment response. **Important:** If you omit the `etag` when you call UpdatePostureDeployment, then the updated deployment unconditionally overwrites the existing deployment.
1778
+ *
1779
+ * @param params - Parameters for request
1780
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1781
+ * @param callback - Optional callback that handles the response.
1782
+ * @returns A promise if used with async/await, or void if used with a callback.
1783
+ */
1784
+ patch(
1785
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Patch,
1786
+ options: StreamMethodOptions
1787
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1788
+ patch(
1789
+ params?: Params$Resource$Organizations$Locations$Posturedeployments$Patch,
1790
+ options?: MethodOptions
1791
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1792
+ patch(
1793
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Patch,
1794
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1795
+ callback: BodyResponseCallback<Readable>
1796
+ ): void;
1797
+ patch(
1798
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Patch,
1799
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1800
+ callback: BodyResponseCallback<Schema$Operation>
1801
+ ): void;
1802
+ patch(
1803
+ params: Params$Resource$Organizations$Locations$Posturedeployments$Patch,
1804
+ callback: BodyResponseCallback<Schema$Operation>
1805
+ ): void;
1806
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
1807
+ patch(
1808
+ paramsOrCallback?:
1809
+ | Params$Resource$Organizations$Locations$Posturedeployments$Patch
1810
+ | BodyResponseCallback<Schema$Operation>
1811
+ | BodyResponseCallback<Readable>,
1812
+ optionsOrCallback?:
1813
+ | MethodOptions
1814
+ | StreamMethodOptions
1815
+ | BodyResponseCallback<Schema$Operation>
1816
+ | BodyResponseCallback<Readable>,
1817
+ callback?:
1818
+ | BodyResponseCallback<Schema$Operation>
1819
+ | BodyResponseCallback<Readable>
1820
+ ):
1821
+ | void
1822
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
1823
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1824
+ let params = (paramsOrCallback ||
1825
+ {}) as Params$Resource$Organizations$Locations$Posturedeployments$Patch;
1826
+ let options = (optionsOrCallback || {}) as MethodOptions;
1827
+
1828
+ if (typeof paramsOrCallback === 'function') {
1829
+ callback = paramsOrCallback;
1830
+ params =
1831
+ {} as Params$Resource$Organizations$Locations$Posturedeployments$Patch;
1832
+ options = {};
1833
+ }
1834
+
1835
+ if (typeof optionsOrCallback === 'function') {
1836
+ callback = optionsOrCallback;
1837
+ options = {};
1838
+ }
1839
+
1840
+ const rootUrl =
1841
+ options.rootUrl || 'https://securityposture.googleapis.com/';
1842
+ const parameters = {
1843
+ options: Object.assign(
1844
+ {
1845
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1846
+ method: 'PATCH',
1847
+ apiVersion: '',
1848
+ },
1849
+ options
1850
+ ),
1851
+ params,
1852
+ requiredParams: ['name'],
1853
+ pathParams: ['name'],
1854
+ context: this.context,
1855
+ };
1856
+ if (callback) {
1857
+ createAPIRequest<Schema$Operation>(
1858
+ parameters,
1859
+ callback as BodyResponseCallback<unknown>
1860
+ );
1861
+ } else {
1862
+ return createAPIRequest<Schema$Operation>(parameters);
1863
+ }
1864
+ }
1865
+ }
1866
+
1867
+ export interface Params$Resource$Organizations$Locations$Posturedeployments$Create
1868
+ extends StandardParameters {
1869
+ /**
1870
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
1871
+ */
1872
+ parent?: string;
1873
+ /**
1874
+ * Required. An identifier for the posture deployment.
1875
+ */
1876
+ postureDeploymentId?: string;
1877
+
1878
+ /**
1879
+ * Request body metadata
1880
+ */
1881
+ requestBody?: Schema$PostureDeployment;
1882
+ }
1883
+ export interface Params$Resource$Organizations$Locations$Posturedeployments$Delete
1884
+ extends StandardParameters {
1885
+ /**
1886
+ * Optional. An opaque identifier for the current version of the posture deployment. If you provide this value, then it must match the existing value. If the values don't match, then the request fails with an ABORTED error. If you omit this value, then the posture deployment is deleted regardless of its current `etag` value.
1887
+ */
1888
+ etag?: string;
1889
+ /**
1890
+ * Required. The name of the posture deployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{posture_id\}`.
1891
+ */
1892
+ name?: string;
1893
+ }
1894
+ export interface Params$Resource$Organizations$Locations$Posturedeployments$Get
1895
+ extends StandardParameters {
1896
+ /**
1897
+ * Required. The name of the PostureDeployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{posture_deployment_id\}`.
1898
+ */
1899
+ name?: string;
1900
+ }
1901
+ export interface Params$Resource$Organizations$Locations$Posturedeployments$List
1902
+ extends StandardParameters {
1903
+ /**
1904
+ * Optional. A filter to apply to the list of postures, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
1905
+ */
1906
+ filter?: string;
1907
+ /**
1908
+ * Optional. The maximum number of posture deployments to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
1909
+ */
1910
+ pageSize?: number;
1911
+ /**
1912
+ * Optional. A pagination token returned from a previous request to list posture deployments. Provide this token to retrieve the next page of results.
1913
+ */
1914
+ pageToken?: string;
1915
+ /**
1916
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
1917
+ */
1918
+ parent?: string;
1919
+ }
1920
+ export interface Params$Resource$Organizations$Locations$Posturedeployments$Patch
1921
+ extends StandardParameters {
1922
+ /**
1923
+ * Required. Identifier. The name of the posture deployment, in the format `organizations/{organization\}/locations/global/postureDeployments/{deployment_id\}`.
1924
+ */
1925
+ name?: string;
1926
+ /**
1927
+ * Required. The fields in the PostureDeployment to update. You can update only the following fields: * PostureDeployment.posture_id * PostureDeployment.posture_revision_id
1928
+ */
1929
+ updateMask?: string;
1930
+
1931
+ /**
1932
+ * Request body metadata
1933
+ */
1934
+ requestBody?: Schema$PostureDeployment;
1935
+ }
1936
+
1937
+ export class Resource$Organizations$Locations$Postures {
1938
+ context: APIRequestContext;
1939
+ constructor(context: APIRequestContext) {
1940
+ this.context = context;
1941
+ }
1942
+
1943
+ /**
1944
+ * Creates a new Posture.
1945
+ *
1946
+ * @param params - Parameters for request
1947
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1948
+ * @param callback - Optional callback that handles the response.
1949
+ * @returns A promise if used with async/await, or void if used with a callback.
1950
+ */
1951
+ create(
1952
+ params: Params$Resource$Organizations$Locations$Postures$Create,
1953
+ options: StreamMethodOptions
1954
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1955
+ create(
1956
+ params?: Params$Resource$Organizations$Locations$Postures$Create,
1957
+ options?: MethodOptions
1958
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1959
+ create(
1960
+ params: Params$Resource$Organizations$Locations$Postures$Create,
1961
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1962
+ callback: BodyResponseCallback<Readable>
1963
+ ): void;
1964
+ create(
1965
+ params: Params$Resource$Organizations$Locations$Postures$Create,
1966
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1967
+ callback: BodyResponseCallback<Schema$Operation>
1968
+ ): void;
1969
+ create(
1970
+ params: Params$Resource$Organizations$Locations$Postures$Create,
1971
+ callback: BodyResponseCallback<Schema$Operation>
1972
+ ): void;
1973
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
1974
+ create(
1975
+ paramsOrCallback?:
1976
+ | Params$Resource$Organizations$Locations$Postures$Create
1977
+ | BodyResponseCallback<Schema$Operation>
1978
+ | BodyResponseCallback<Readable>,
1979
+ optionsOrCallback?:
1980
+ | MethodOptions
1981
+ | StreamMethodOptions
1982
+ | BodyResponseCallback<Schema$Operation>
1983
+ | BodyResponseCallback<Readable>,
1984
+ callback?:
1985
+ | BodyResponseCallback<Schema$Operation>
1986
+ | BodyResponseCallback<Readable>
1987
+ ):
1988
+ | void
1989
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
1990
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1991
+ let params = (paramsOrCallback ||
1992
+ {}) as Params$Resource$Organizations$Locations$Postures$Create;
1993
+ let options = (optionsOrCallback || {}) as MethodOptions;
1994
+
1995
+ if (typeof paramsOrCallback === 'function') {
1996
+ callback = paramsOrCallback;
1997
+ params = {} as Params$Resource$Organizations$Locations$Postures$Create;
1998
+ options = {};
1999
+ }
2000
+
2001
+ if (typeof optionsOrCallback === 'function') {
2002
+ callback = optionsOrCallback;
2003
+ options = {};
2004
+ }
2005
+
2006
+ const rootUrl =
2007
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2008
+ const parameters = {
2009
+ options: Object.assign(
2010
+ {
2011
+ url: (rootUrl + '/v1/{+parent}/postures').replace(
2012
+ /([^:]\/)\/+/g,
2013
+ '$1'
2014
+ ),
2015
+ method: 'POST',
2016
+ apiVersion: '',
2017
+ },
2018
+ options
2019
+ ),
2020
+ params,
2021
+ requiredParams: ['parent'],
2022
+ pathParams: ['parent'],
2023
+ context: this.context,
2024
+ };
2025
+ if (callback) {
2026
+ createAPIRequest<Schema$Operation>(
2027
+ parameters,
2028
+ callback as BodyResponseCallback<unknown>
2029
+ );
2030
+ } else {
2031
+ return createAPIRequest<Schema$Operation>(parameters);
2032
+ }
2033
+ }
2034
+
2035
+ /**
2036
+ * Deletes all revisions of a Posture. You can only delete a posture if none of its revisions are deployed.
2037
+ *
2038
+ * @param params - Parameters for request
2039
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2040
+ * @param callback - Optional callback that handles the response.
2041
+ * @returns A promise if used with async/await, or void if used with a callback.
2042
+ */
2043
+ delete(
2044
+ params: Params$Resource$Organizations$Locations$Postures$Delete,
2045
+ options: StreamMethodOptions
2046
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2047
+ delete(
2048
+ params?: Params$Resource$Organizations$Locations$Postures$Delete,
2049
+ options?: MethodOptions
2050
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2051
+ delete(
2052
+ params: Params$Resource$Organizations$Locations$Postures$Delete,
2053
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2054
+ callback: BodyResponseCallback<Readable>
2055
+ ): void;
2056
+ delete(
2057
+ params: Params$Resource$Organizations$Locations$Postures$Delete,
2058
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2059
+ callback: BodyResponseCallback<Schema$Operation>
2060
+ ): void;
2061
+ delete(
2062
+ params: Params$Resource$Organizations$Locations$Postures$Delete,
2063
+ callback: BodyResponseCallback<Schema$Operation>
2064
+ ): void;
2065
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
2066
+ delete(
2067
+ paramsOrCallback?:
2068
+ | Params$Resource$Organizations$Locations$Postures$Delete
2069
+ | BodyResponseCallback<Schema$Operation>
2070
+ | BodyResponseCallback<Readable>,
2071
+ optionsOrCallback?:
2072
+ | MethodOptions
2073
+ | StreamMethodOptions
2074
+ | BodyResponseCallback<Schema$Operation>
2075
+ | BodyResponseCallback<Readable>,
2076
+ callback?:
2077
+ | BodyResponseCallback<Schema$Operation>
2078
+ | BodyResponseCallback<Readable>
2079
+ ):
2080
+ | void
2081
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2082
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2083
+ let params = (paramsOrCallback ||
2084
+ {}) as Params$Resource$Organizations$Locations$Postures$Delete;
2085
+ let options = (optionsOrCallback || {}) as MethodOptions;
2086
+
2087
+ if (typeof paramsOrCallback === 'function') {
2088
+ callback = paramsOrCallback;
2089
+ params = {} as Params$Resource$Organizations$Locations$Postures$Delete;
2090
+ options = {};
2091
+ }
2092
+
2093
+ if (typeof optionsOrCallback === 'function') {
2094
+ callback = optionsOrCallback;
2095
+ options = {};
2096
+ }
2097
+
2098
+ const rootUrl =
2099
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2100
+ const parameters = {
2101
+ options: Object.assign(
2102
+ {
2103
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2104
+ method: 'DELETE',
2105
+ apiVersion: '',
2106
+ },
2107
+ options
2108
+ ),
2109
+ params,
2110
+ requiredParams: ['name'],
2111
+ pathParams: ['name'],
2112
+ context: this.context,
2113
+ };
2114
+ if (callback) {
2115
+ createAPIRequest<Schema$Operation>(
2116
+ parameters,
2117
+ callback as BodyResponseCallback<unknown>
2118
+ );
2119
+ } else {
2120
+ return createAPIRequest<Schema$Operation>(parameters);
2121
+ }
2122
+ }
2123
+
2124
+ /**
2125
+ * Extracts existing policies from an organization, folder, or project, and applies them to another organization, folder, or project as a Posture. If the other organization, folder, or project already has a posture, then the result of the long-running operation is an ALREADY_EXISTS error.
2126
+ *
2127
+ * @param params - Parameters for request
2128
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2129
+ * @param callback - Optional callback that handles the response.
2130
+ * @returns A promise if used with async/await, or void if used with a callback.
2131
+ */
2132
+ extract(
2133
+ params: Params$Resource$Organizations$Locations$Postures$Extract,
2134
+ options: StreamMethodOptions
2135
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2136
+ extract(
2137
+ params?: Params$Resource$Organizations$Locations$Postures$Extract,
2138
+ options?: MethodOptions
2139
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2140
+ extract(
2141
+ params: Params$Resource$Organizations$Locations$Postures$Extract,
2142
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2143
+ callback: BodyResponseCallback<Readable>
2144
+ ): void;
2145
+ extract(
2146
+ params: Params$Resource$Organizations$Locations$Postures$Extract,
2147
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2148
+ callback: BodyResponseCallback<Schema$Operation>
2149
+ ): void;
2150
+ extract(
2151
+ params: Params$Resource$Organizations$Locations$Postures$Extract,
2152
+ callback: BodyResponseCallback<Schema$Operation>
2153
+ ): void;
2154
+ extract(callback: BodyResponseCallback<Schema$Operation>): void;
2155
+ extract(
2156
+ paramsOrCallback?:
2157
+ | Params$Resource$Organizations$Locations$Postures$Extract
2158
+ | BodyResponseCallback<Schema$Operation>
2159
+ | BodyResponseCallback<Readable>,
2160
+ optionsOrCallback?:
2161
+ | MethodOptions
2162
+ | StreamMethodOptions
2163
+ | BodyResponseCallback<Schema$Operation>
2164
+ | BodyResponseCallback<Readable>,
2165
+ callback?:
2166
+ | BodyResponseCallback<Schema$Operation>
2167
+ | BodyResponseCallback<Readable>
2168
+ ):
2169
+ | void
2170
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2171
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2172
+ let params = (paramsOrCallback ||
2173
+ {}) as Params$Resource$Organizations$Locations$Postures$Extract;
2174
+ let options = (optionsOrCallback || {}) as MethodOptions;
2175
+
2176
+ if (typeof paramsOrCallback === 'function') {
2177
+ callback = paramsOrCallback;
2178
+ params = {} as Params$Resource$Organizations$Locations$Postures$Extract;
2179
+ options = {};
2180
+ }
2181
+
2182
+ if (typeof optionsOrCallback === 'function') {
2183
+ callback = optionsOrCallback;
2184
+ options = {};
2185
+ }
2186
+
2187
+ const rootUrl =
2188
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2189
+ const parameters = {
2190
+ options: Object.assign(
2191
+ {
2192
+ url: (rootUrl + '/v1/{+parent}/postures:extract').replace(
2193
+ /([^:]\/)\/+/g,
2194
+ '$1'
2195
+ ),
2196
+ method: 'POST',
2197
+ apiVersion: '',
2198
+ },
2199
+ options
2200
+ ),
2201
+ params,
2202
+ requiredParams: ['parent'],
2203
+ pathParams: ['parent'],
2204
+ context: this.context,
2205
+ };
2206
+ if (callback) {
2207
+ createAPIRequest<Schema$Operation>(
2208
+ parameters,
2209
+ callback as BodyResponseCallback<unknown>
2210
+ );
2211
+ } else {
2212
+ return createAPIRequest<Schema$Operation>(parameters);
2213
+ }
2214
+ }
2215
+
2216
+ /**
2217
+ * Gets a single revision of a Posture.
2218
+ *
2219
+ * @param params - Parameters for request
2220
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2221
+ * @param callback - Optional callback that handles the response.
2222
+ * @returns A promise if used with async/await, or void if used with a callback.
2223
+ */
2224
+ get(
2225
+ params: Params$Resource$Organizations$Locations$Postures$Get,
2226
+ options: StreamMethodOptions
2227
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2228
+ get(
2229
+ params?: Params$Resource$Organizations$Locations$Postures$Get,
2230
+ options?: MethodOptions
2231
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Posture>>;
2232
+ get(
2233
+ params: Params$Resource$Organizations$Locations$Postures$Get,
2234
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2235
+ callback: BodyResponseCallback<Readable>
2236
+ ): void;
2237
+ get(
2238
+ params: Params$Resource$Organizations$Locations$Postures$Get,
2239
+ options: MethodOptions | BodyResponseCallback<Schema$Posture>,
2240
+ callback: BodyResponseCallback<Schema$Posture>
2241
+ ): void;
2242
+ get(
2243
+ params: Params$Resource$Organizations$Locations$Postures$Get,
2244
+ callback: BodyResponseCallback<Schema$Posture>
2245
+ ): void;
2246
+ get(callback: BodyResponseCallback<Schema$Posture>): void;
2247
+ get(
2248
+ paramsOrCallback?:
2249
+ | Params$Resource$Organizations$Locations$Postures$Get
2250
+ | BodyResponseCallback<Schema$Posture>
2251
+ | BodyResponseCallback<Readable>,
2252
+ optionsOrCallback?:
2253
+ | MethodOptions
2254
+ | StreamMethodOptions
2255
+ | BodyResponseCallback<Schema$Posture>
2256
+ | BodyResponseCallback<Readable>,
2257
+ callback?:
2258
+ | BodyResponseCallback<Schema$Posture>
2259
+ | BodyResponseCallback<Readable>
2260
+ ):
2261
+ | void
2262
+ | Promise<GaxiosResponseWithHTTP2<Schema$Posture>>
2263
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2264
+ let params = (paramsOrCallback ||
2265
+ {}) as Params$Resource$Organizations$Locations$Postures$Get;
2266
+ let options = (optionsOrCallback || {}) as MethodOptions;
2267
+
2268
+ if (typeof paramsOrCallback === 'function') {
2269
+ callback = paramsOrCallback;
2270
+ params = {} as Params$Resource$Organizations$Locations$Postures$Get;
2271
+ options = {};
2272
+ }
2273
+
2274
+ if (typeof optionsOrCallback === 'function') {
2275
+ callback = optionsOrCallback;
2276
+ options = {};
2277
+ }
2278
+
2279
+ const rootUrl =
2280
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2281
+ const parameters = {
2282
+ options: Object.assign(
2283
+ {
2284
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2285
+ method: 'GET',
2286
+ apiVersion: '',
2287
+ },
2288
+ options
2289
+ ),
2290
+ params,
2291
+ requiredParams: ['name'],
2292
+ pathParams: ['name'],
2293
+ context: this.context,
2294
+ };
2295
+ if (callback) {
2296
+ createAPIRequest<Schema$Posture>(
2297
+ parameters,
2298
+ callback as BodyResponseCallback<unknown>
2299
+ );
2300
+ } else {
2301
+ return createAPIRequest<Schema$Posture>(parameters);
2302
+ }
2303
+ }
2304
+
2305
+ /**
2306
+ * Lists the most recent revisions of all Posture resources in a specified organization and location.
2307
+ *
2308
+ * @param params - Parameters for request
2309
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2310
+ * @param callback - Optional callback that handles the response.
2311
+ * @returns A promise if used with async/await, or void if used with a callback.
2312
+ */
2313
+ list(
2314
+ params: Params$Resource$Organizations$Locations$Postures$List,
2315
+ options: StreamMethodOptions
2316
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2317
+ list(
2318
+ params?: Params$Resource$Organizations$Locations$Postures$List,
2319
+ options?: MethodOptions
2320
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListPosturesResponse>>;
2321
+ list(
2322
+ params: Params$Resource$Organizations$Locations$Postures$List,
2323
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2324
+ callback: BodyResponseCallback<Readable>
2325
+ ): void;
2326
+ list(
2327
+ params: Params$Resource$Organizations$Locations$Postures$List,
2328
+ options:
2329
+ | MethodOptions
2330
+ | BodyResponseCallback<Schema$ListPosturesResponse>,
2331
+ callback: BodyResponseCallback<Schema$ListPosturesResponse>
2332
+ ): void;
2333
+ list(
2334
+ params: Params$Resource$Organizations$Locations$Postures$List,
2335
+ callback: BodyResponseCallback<Schema$ListPosturesResponse>
2336
+ ): void;
2337
+ list(callback: BodyResponseCallback<Schema$ListPosturesResponse>): void;
2338
+ list(
2339
+ paramsOrCallback?:
2340
+ | Params$Resource$Organizations$Locations$Postures$List
2341
+ | BodyResponseCallback<Schema$ListPosturesResponse>
2342
+ | BodyResponseCallback<Readable>,
2343
+ optionsOrCallback?:
2344
+ | MethodOptions
2345
+ | StreamMethodOptions
2346
+ | BodyResponseCallback<Schema$ListPosturesResponse>
2347
+ | BodyResponseCallback<Readable>,
2348
+ callback?:
2349
+ | BodyResponseCallback<Schema$ListPosturesResponse>
2350
+ | BodyResponseCallback<Readable>
2351
+ ):
2352
+ | void
2353
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListPosturesResponse>>
2354
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2355
+ let params = (paramsOrCallback ||
2356
+ {}) as Params$Resource$Organizations$Locations$Postures$List;
2357
+ let options = (optionsOrCallback || {}) as MethodOptions;
2358
+
2359
+ if (typeof paramsOrCallback === 'function') {
2360
+ callback = paramsOrCallback;
2361
+ params = {} as Params$Resource$Organizations$Locations$Postures$List;
2362
+ options = {};
2363
+ }
2364
+
2365
+ if (typeof optionsOrCallback === 'function') {
2366
+ callback = optionsOrCallback;
2367
+ options = {};
2368
+ }
2369
+
2370
+ const rootUrl =
2371
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2372
+ const parameters = {
2373
+ options: Object.assign(
2374
+ {
2375
+ url: (rootUrl + '/v1/{+parent}/postures').replace(
2376
+ /([^:]\/)\/+/g,
2377
+ '$1'
2378
+ ),
2379
+ method: 'GET',
2380
+ apiVersion: '',
2381
+ },
2382
+ options
2383
+ ),
2384
+ params,
2385
+ requiredParams: ['parent'],
2386
+ pathParams: ['parent'],
2387
+ context: this.context,
2388
+ };
2389
+ if (callback) {
2390
+ createAPIRequest<Schema$ListPosturesResponse>(
2391
+ parameters,
2392
+ callback as BodyResponseCallback<unknown>
2393
+ );
2394
+ } else {
2395
+ return createAPIRequest<Schema$ListPosturesResponse>(parameters);
2396
+ }
2397
+ }
2398
+
2399
+ /**
2400
+ * Lists all revisions of a single Posture.
2401
+ *
2402
+ * @param params - Parameters for request
2403
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2404
+ * @param callback - Optional callback that handles the response.
2405
+ * @returns A promise if used with async/await, or void if used with a callback.
2406
+ */
2407
+ listRevisions(
2408
+ params: Params$Resource$Organizations$Locations$Postures$Listrevisions,
2409
+ options: StreamMethodOptions
2410
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2411
+ listRevisions(
2412
+ params?: Params$Resource$Organizations$Locations$Postures$Listrevisions,
2413
+ options?: MethodOptions
2414
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListPostureRevisionsResponse>>;
2415
+ listRevisions(
2416
+ params: Params$Resource$Organizations$Locations$Postures$Listrevisions,
2417
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2418
+ callback: BodyResponseCallback<Readable>
2419
+ ): void;
2420
+ listRevisions(
2421
+ params: Params$Resource$Organizations$Locations$Postures$Listrevisions,
2422
+ options:
2423
+ | MethodOptions
2424
+ | BodyResponseCallback<Schema$ListPostureRevisionsResponse>,
2425
+ callback: BodyResponseCallback<Schema$ListPostureRevisionsResponse>
2426
+ ): void;
2427
+ listRevisions(
2428
+ params: Params$Resource$Organizations$Locations$Postures$Listrevisions,
2429
+ callback: BodyResponseCallback<Schema$ListPostureRevisionsResponse>
2430
+ ): void;
2431
+ listRevisions(
2432
+ callback: BodyResponseCallback<Schema$ListPostureRevisionsResponse>
2433
+ ): void;
2434
+ listRevisions(
2435
+ paramsOrCallback?:
2436
+ | Params$Resource$Organizations$Locations$Postures$Listrevisions
2437
+ | BodyResponseCallback<Schema$ListPostureRevisionsResponse>
2438
+ | BodyResponseCallback<Readable>,
2439
+ optionsOrCallback?:
2440
+ | MethodOptions
2441
+ | StreamMethodOptions
2442
+ | BodyResponseCallback<Schema$ListPostureRevisionsResponse>
2443
+ | BodyResponseCallback<Readable>,
2444
+ callback?:
2445
+ | BodyResponseCallback<Schema$ListPostureRevisionsResponse>
2446
+ | BodyResponseCallback<Readable>
2447
+ ):
2448
+ | void
2449
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListPostureRevisionsResponse>>
2450
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2451
+ let params = (paramsOrCallback ||
2452
+ {}) as Params$Resource$Organizations$Locations$Postures$Listrevisions;
2453
+ let options = (optionsOrCallback || {}) as MethodOptions;
2454
+
2455
+ if (typeof paramsOrCallback === 'function') {
2456
+ callback = paramsOrCallback;
2457
+ params =
2458
+ {} as Params$Resource$Organizations$Locations$Postures$Listrevisions;
2459
+ options = {};
2460
+ }
2461
+
2462
+ if (typeof optionsOrCallback === 'function') {
2463
+ callback = optionsOrCallback;
2464
+ options = {};
2465
+ }
2466
+
2467
+ const rootUrl =
2468
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2469
+ const parameters = {
2470
+ options: Object.assign(
2471
+ {
2472
+ url: (rootUrl + '/v1/{+name}:listRevisions').replace(
2473
+ /([^:]\/)\/+/g,
2474
+ '$1'
2475
+ ),
2476
+ method: 'GET',
2477
+ apiVersion: '',
2478
+ },
2479
+ options
2480
+ ),
2481
+ params,
2482
+ requiredParams: ['name'],
2483
+ pathParams: ['name'],
2484
+ context: this.context,
2485
+ };
2486
+ if (callback) {
2487
+ createAPIRequest<Schema$ListPostureRevisionsResponse>(
2488
+ parameters,
2489
+ callback as BodyResponseCallback<unknown>
2490
+ );
2491
+ } else {
2492
+ return createAPIRequest<Schema$ListPostureRevisionsResponse>(
2493
+ parameters
2494
+ );
2495
+ }
2496
+ }
2497
+
2498
+ /**
2499
+ * Updates a revision of an existing Posture. If the posture revision that you update is currently deployed, then a new revision of the posture is created. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture: 1. Call GetPosture to get the current version of the posture. 2. Update the fields in the posture as needed. 3. Call UpdatePosture to update the posture. Ensure that your request includes the `etag` value from the GetPosture response. **Important:** If you omit the `etag` when you call UpdatePosture, then the updated posture unconditionally overwrites the existing posture.
2500
+ *
2501
+ * @param params - Parameters for request
2502
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2503
+ * @param callback - Optional callback that handles the response.
2504
+ * @returns A promise if used with async/await, or void if used with a callback.
2505
+ */
2506
+ patch(
2507
+ params: Params$Resource$Organizations$Locations$Postures$Patch,
2508
+ options: StreamMethodOptions
2509
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2510
+ patch(
2511
+ params?: Params$Resource$Organizations$Locations$Postures$Patch,
2512
+ options?: MethodOptions
2513
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2514
+ patch(
2515
+ params: Params$Resource$Organizations$Locations$Postures$Patch,
2516
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2517
+ callback: BodyResponseCallback<Readable>
2518
+ ): void;
2519
+ patch(
2520
+ params: Params$Resource$Organizations$Locations$Postures$Patch,
2521
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2522
+ callback: BodyResponseCallback<Schema$Operation>
2523
+ ): void;
2524
+ patch(
2525
+ params: Params$Resource$Organizations$Locations$Postures$Patch,
2526
+ callback: BodyResponseCallback<Schema$Operation>
2527
+ ): void;
2528
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
2529
+ patch(
2530
+ paramsOrCallback?:
2531
+ | Params$Resource$Organizations$Locations$Postures$Patch
2532
+ | BodyResponseCallback<Schema$Operation>
2533
+ | BodyResponseCallback<Readable>,
2534
+ optionsOrCallback?:
2535
+ | MethodOptions
2536
+ | StreamMethodOptions
2537
+ | BodyResponseCallback<Schema$Operation>
2538
+ | BodyResponseCallback<Readable>,
2539
+ callback?:
2540
+ | BodyResponseCallback<Schema$Operation>
2541
+ | BodyResponseCallback<Readable>
2542
+ ):
2543
+ | void
2544
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2545
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2546
+ let params = (paramsOrCallback ||
2547
+ {}) as Params$Resource$Organizations$Locations$Postures$Patch;
2548
+ let options = (optionsOrCallback || {}) as MethodOptions;
2549
+
2550
+ if (typeof paramsOrCallback === 'function') {
2551
+ callback = paramsOrCallback;
2552
+ params = {} as Params$Resource$Organizations$Locations$Postures$Patch;
2553
+ options = {};
2554
+ }
2555
+
2556
+ if (typeof optionsOrCallback === 'function') {
2557
+ callback = optionsOrCallback;
2558
+ options = {};
2559
+ }
2560
+
2561
+ const rootUrl =
2562
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2563
+ const parameters = {
2564
+ options: Object.assign(
2565
+ {
2566
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2567
+ method: 'PATCH',
2568
+ apiVersion: '',
2569
+ },
2570
+ options
2571
+ ),
2572
+ params,
2573
+ requiredParams: ['name'],
2574
+ pathParams: ['name'],
2575
+ context: this.context,
2576
+ };
2577
+ if (callback) {
2578
+ createAPIRequest<Schema$Operation>(
2579
+ parameters,
2580
+ callback as BodyResponseCallback<unknown>
2581
+ );
2582
+ } else {
2583
+ return createAPIRequest<Schema$Operation>(parameters);
2584
+ }
2585
+ }
2586
+ }
2587
+
2588
+ export interface Params$Resource$Organizations$Locations$Postures$Create
2589
+ extends StandardParameters {
2590
+ /**
2591
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2592
+ */
2593
+ parent?: string;
2594
+ /**
2595
+ * Required. An identifier for the posture.
2596
+ */
2597
+ postureId?: string;
2598
+
2599
+ /**
2600
+ * Request body metadata
2601
+ */
2602
+ requestBody?: Schema$Posture;
2603
+ }
2604
+ export interface Params$Resource$Organizations$Locations$Postures$Delete
2605
+ extends StandardParameters {
2606
+ /**
2607
+ * Optional. An opaque identifier for the current version of the posture. If you provide this value, then it must match the existing value. If the values don't match, then the request fails with an ABORTED error. If you omit this value, then the posture is deleted regardless of its current `etag` value.
2608
+ */
2609
+ etag?: string;
2610
+ /**
2611
+ * Required. The name of the Posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
2612
+ */
2613
+ name?: string;
2614
+ }
2615
+ export interface Params$Resource$Organizations$Locations$Postures$Extract
2616
+ extends StandardParameters {
2617
+ /**
2618
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2619
+ */
2620
+ parent?: string;
2621
+
2622
+ /**
2623
+ * Request body metadata
2624
+ */
2625
+ requestBody?: Schema$ExtractPostureRequest;
2626
+ }
2627
+ export interface Params$Resource$Organizations$Locations$Postures$Get
2628
+ extends StandardParameters {
2629
+ /**
2630
+ * Required. The name of the Posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
2631
+ */
2632
+ name?: string;
2633
+ /**
2634
+ * Optional. The posture revision to retrieve. If not specified, the most recently updated revision is retrieved.
2635
+ */
2636
+ revisionId?: string;
2637
+ }
2638
+ export interface Params$Resource$Organizations$Locations$Postures$List
2639
+ extends StandardParameters {
2640
+ /**
2641
+ * Optional. A filter to apply to the list of postures, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
2642
+ */
2643
+ filter?: string;
2644
+ /**
2645
+ * The maximum number of postures to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
2646
+ */
2647
+ pageSize?: number;
2648
+ /**
2649
+ * A pagination token returned from a previous request to list postures. Provide this token to retrieve the next page of results.
2650
+ */
2651
+ pageToken?: string;
2652
+ /**
2653
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2654
+ */
2655
+ parent?: string;
2656
+ }
2657
+ export interface Params$Resource$Organizations$Locations$Postures$Listrevisions
2658
+ extends StandardParameters {
2659
+ /**
2660
+ * Required. The name of the Posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
2661
+ */
2662
+ name?: string;
2663
+ /**
2664
+ * Optional. The maximum number of posture revisions to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
2665
+ */
2666
+ pageSize?: number;
2667
+ /**
2668
+ * Optional. A pagination token from a previous request to list posture revisions. Provide this token to retrieve the next page of results.
2669
+ */
2670
+ pageToken?: string;
2671
+ }
2672
+ export interface Params$Resource$Organizations$Locations$Postures$Patch
2673
+ extends StandardParameters {
2674
+ /**
2675
+ * Required. Identifier. The name of the posture, in the format `organizations/{organization\}/locations/global/postures/{posture_id\}`.
2676
+ */
2677
+ name?: string;
2678
+ /**
2679
+ * Required. The revision ID of the posture to update. If the posture revision that you update is currently deployed, then a new revision of the posture is created.
2680
+ */
2681
+ revisionId?: string;
2682
+ /**
2683
+ * Required. The fields in the Posture to update. You can update only the following fields: * Posture.description * Posture.policy_sets * Posture.state
2684
+ */
2685
+ updateMask?: string;
2686
+
2687
+ /**
2688
+ * Request body metadata
2689
+ */
2690
+ requestBody?: Schema$Posture;
2691
+ }
2692
+
2693
+ export class Resource$Organizations$Locations$Posturetemplates {
2694
+ context: APIRequestContext;
2695
+ constructor(context: APIRequestContext) {
2696
+ this.context = context;
2697
+ }
2698
+
2699
+ /**
2700
+ * Gets a single revision of a PostureTemplate.
2701
+ *
2702
+ * @param params - Parameters for request
2703
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2704
+ * @param callback - Optional callback that handles the response.
2705
+ * @returns A promise if used with async/await, or void if used with a callback.
2706
+ */
2707
+ get(
2708
+ params: Params$Resource$Organizations$Locations$Posturetemplates$Get,
2709
+ options: StreamMethodOptions
2710
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2711
+ get(
2712
+ params?: Params$Resource$Organizations$Locations$Posturetemplates$Get,
2713
+ options?: MethodOptions
2714
+ ): Promise<GaxiosResponseWithHTTP2<Schema$PostureTemplate>>;
2715
+ get(
2716
+ params: Params$Resource$Organizations$Locations$Posturetemplates$Get,
2717
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2718
+ callback: BodyResponseCallback<Readable>
2719
+ ): void;
2720
+ get(
2721
+ params: Params$Resource$Organizations$Locations$Posturetemplates$Get,
2722
+ options: MethodOptions | BodyResponseCallback<Schema$PostureTemplate>,
2723
+ callback: BodyResponseCallback<Schema$PostureTemplate>
2724
+ ): void;
2725
+ get(
2726
+ params: Params$Resource$Organizations$Locations$Posturetemplates$Get,
2727
+ callback: BodyResponseCallback<Schema$PostureTemplate>
2728
+ ): void;
2729
+ get(callback: BodyResponseCallback<Schema$PostureTemplate>): void;
2730
+ get(
2731
+ paramsOrCallback?:
2732
+ | Params$Resource$Organizations$Locations$Posturetemplates$Get
2733
+ | BodyResponseCallback<Schema$PostureTemplate>
2734
+ | BodyResponseCallback<Readable>,
2735
+ optionsOrCallback?:
2736
+ | MethodOptions
2737
+ | StreamMethodOptions
2738
+ | BodyResponseCallback<Schema$PostureTemplate>
2739
+ | BodyResponseCallback<Readable>,
2740
+ callback?:
2741
+ | BodyResponseCallback<Schema$PostureTemplate>
2742
+ | BodyResponseCallback<Readable>
2743
+ ):
2744
+ | void
2745
+ | Promise<GaxiosResponseWithHTTP2<Schema$PostureTemplate>>
2746
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2747
+ let params = (paramsOrCallback ||
2748
+ {}) as Params$Resource$Organizations$Locations$Posturetemplates$Get;
2749
+ let options = (optionsOrCallback || {}) as MethodOptions;
2750
+
2751
+ if (typeof paramsOrCallback === 'function') {
2752
+ callback = paramsOrCallback;
2753
+ params =
2754
+ {} as Params$Resource$Organizations$Locations$Posturetemplates$Get;
2755
+ options = {};
2756
+ }
2757
+
2758
+ if (typeof optionsOrCallback === 'function') {
2759
+ callback = optionsOrCallback;
2760
+ options = {};
2761
+ }
2762
+
2763
+ const rootUrl =
2764
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2765
+ const parameters = {
2766
+ options: Object.assign(
2767
+ {
2768
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2769
+ method: 'GET',
2770
+ apiVersion: '',
2771
+ },
2772
+ options
2773
+ ),
2774
+ params,
2775
+ requiredParams: ['name'],
2776
+ pathParams: ['name'],
2777
+ context: this.context,
2778
+ };
2779
+ if (callback) {
2780
+ createAPIRequest<Schema$PostureTemplate>(
2781
+ parameters,
2782
+ callback as BodyResponseCallback<unknown>
2783
+ );
2784
+ } else {
2785
+ return createAPIRequest<Schema$PostureTemplate>(parameters);
2786
+ }
2787
+ }
2788
+
2789
+ /**
2790
+ * Lists every PostureTemplate in a given organization and location.
2791
+ *
2792
+ * @param params - Parameters for request
2793
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2794
+ * @param callback - Optional callback that handles the response.
2795
+ * @returns A promise if used with async/await, or void if used with a callback.
2796
+ */
2797
+ list(
2798
+ params: Params$Resource$Organizations$Locations$Posturetemplates$List,
2799
+ options: StreamMethodOptions
2800
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2801
+ list(
2802
+ params?: Params$Resource$Organizations$Locations$Posturetemplates$List,
2803
+ options?: MethodOptions
2804
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListPostureTemplatesResponse>>;
2805
+ list(
2806
+ params: Params$Resource$Organizations$Locations$Posturetemplates$List,
2807
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2808
+ callback: BodyResponseCallback<Readable>
2809
+ ): void;
2810
+ list(
2811
+ params: Params$Resource$Organizations$Locations$Posturetemplates$List,
2812
+ options:
2813
+ | MethodOptions
2814
+ | BodyResponseCallback<Schema$ListPostureTemplatesResponse>,
2815
+ callback: BodyResponseCallback<Schema$ListPostureTemplatesResponse>
2816
+ ): void;
2817
+ list(
2818
+ params: Params$Resource$Organizations$Locations$Posturetemplates$List,
2819
+ callback: BodyResponseCallback<Schema$ListPostureTemplatesResponse>
2820
+ ): void;
2821
+ list(
2822
+ callback: BodyResponseCallback<Schema$ListPostureTemplatesResponse>
2823
+ ): void;
2824
+ list(
2825
+ paramsOrCallback?:
2826
+ | Params$Resource$Organizations$Locations$Posturetemplates$List
2827
+ | BodyResponseCallback<Schema$ListPostureTemplatesResponse>
2828
+ | BodyResponseCallback<Readable>,
2829
+ optionsOrCallback?:
2830
+ | MethodOptions
2831
+ | StreamMethodOptions
2832
+ | BodyResponseCallback<Schema$ListPostureTemplatesResponse>
2833
+ | BodyResponseCallback<Readable>,
2834
+ callback?:
2835
+ | BodyResponseCallback<Schema$ListPostureTemplatesResponse>
2836
+ | BodyResponseCallback<Readable>
2837
+ ):
2838
+ | void
2839
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListPostureTemplatesResponse>>
2840
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2841
+ let params = (paramsOrCallback ||
2842
+ {}) as Params$Resource$Organizations$Locations$Posturetemplates$List;
2843
+ let options = (optionsOrCallback || {}) as MethodOptions;
2844
+
2845
+ if (typeof paramsOrCallback === 'function') {
2846
+ callback = paramsOrCallback;
2847
+ params =
2848
+ {} as Params$Resource$Organizations$Locations$Posturetemplates$List;
2849
+ options = {};
2850
+ }
2851
+
2852
+ if (typeof optionsOrCallback === 'function') {
2853
+ callback = optionsOrCallback;
2854
+ options = {};
2855
+ }
2856
+
2857
+ const rootUrl =
2858
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2859
+ const parameters = {
2860
+ options: Object.assign(
2861
+ {
2862
+ url: (rootUrl + '/v1/{+parent}/postureTemplates').replace(
2863
+ /([^:]\/)\/+/g,
2864
+ '$1'
2865
+ ),
2866
+ method: 'GET',
2867
+ apiVersion: '',
2868
+ },
2869
+ options
2870
+ ),
2871
+ params,
2872
+ requiredParams: ['parent'],
2873
+ pathParams: ['parent'],
2874
+ context: this.context,
2875
+ };
2876
+ if (callback) {
2877
+ createAPIRequest<Schema$ListPostureTemplatesResponse>(
2878
+ parameters,
2879
+ callback as BodyResponseCallback<unknown>
2880
+ );
2881
+ } else {
2882
+ return createAPIRequest<Schema$ListPostureTemplatesResponse>(
2883
+ parameters
2884
+ );
2885
+ }
2886
+ }
2887
+ }
2888
+
2889
+ export interface Params$Resource$Organizations$Locations$Posturetemplates$Get
2890
+ extends StandardParameters {
2891
+ /**
2892
+ * Required. The name of the PostureTemplate, in the format `organizations/{organization\}/locations/global/postureTemplates/{posture_template\}`.
2893
+ */
2894
+ name?: string;
2895
+ /**
2896
+ * Optional. The posture template revision to retrieve. If not specified, the most recently updated revision is retrieved.
2897
+ */
2898
+ revisionId?: string;
2899
+ }
2900
+ export interface Params$Resource$Organizations$Locations$Posturetemplates$List
2901
+ extends StandardParameters {
2902
+ /**
2903
+ * Optional. A filter to apply to the list of postures, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
2904
+ */
2905
+ filter?: string;
2906
+ /**
2907
+ * Optional. The maximum number of posture templates to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
2908
+ */
2909
+ pageSize?: number;
2910
+ /**
2911
+ * Optional. A pagination token returned from a previous request to list posture templates. Provide this token to retrieve the next page of results.
2912
+ */
2913
+ pageToken?: string;
2914
+ /**
2915
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
2916
+ */
2917
+ parent?: string;
2918
+ }
2919
+
2920
+ export class Resource$Organizations$Locations$Reports {
2921
+ context: APIRequestContext;
2922
+ constructor(context: APIRequestContext) {
2923
+ this.context = context;
2924
+ }
2925
+
2926
+ /**
2927
+ * Validates a specified infrastructure-as-code (IaC) configuration, and creates a Report with the validation results. Only Terraform configurations are supported. Only modified assets are validated.
2928
+ *
2929
+ * @param params - Parameters for request
2930
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2931
+ * @param callback - Optional callback that handles the response.
2932
+ * @returns A promise if used with async/await, or void if used with a callback.
2933
+ */
2934
+ createIaCValidationReport(
2935
+ params: Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport,
2936
+ options: StreamMethodOptions
2937
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2938
+ createIaCValidationReport(
2939
+ params?: Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport,
2940
+ options?: MethodOptions
2941
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2942
+ createIaCValidationReport(
2943
+ params: Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport,
2944
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2945
+ callback: BodyResponseCallback<Readable>
2946
+ ): void;
2947
+ createIaCValidationReport(
2948
+ params: Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport,
2949
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2950
+ callback: BodyResponseCallback<Schema$Operation>
2951
+ ): void;
2952
+ createIaCValidationReport(
2953
+ params: Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport,
2954
+ callback: BodyResponseCallback<Schema$Operation>
2955
+ ): void;
2956
+ createIaCValidationReport(
2957
+ callback: BodyResponseCallback<Schema$Operation>
2958
+ ): void;
2959
+ createIaCValidationReport(
2960
+ paramsOrCallback?:
2961
+ | Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport
2962
+ | BodyResponseCallback<Schema$Operation>
2963
+ | BodyResponseCallback<Readable>,
2964
+ optionsOrCallback?:
2965
+ | MethodOptions
2966
+ | StreamMethodOptions
2967
+ | BodyResponseCallback<Schema$Operation>
2968
+ | BodyResponseCallback<Readable>,
2969
+ callback?:
2970
+ | BodyResponseCallback<Schema$Operation>
2971
+ | BodyResponseCallback<Readable>
2972
+ ):
2973
+ | void
2974
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2975
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2976
+ let params = (paramsOrCallback ||
2977
+ {}) as Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport;
2978
+ let options = (optionsOrCallback || {}) as MethodOptions;
2979
+
2980
+ if (typeof paramsOrCallback === 'function') {
2981
+ callback = paramsOrCallback;
2982
+ params =
2983
+ {} as Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport;
2984
+ options = {};
2985
+ }
2986
+
2987
+ if (typeof optionsOrCallback === 'function') {
2988
+ callback = optionsOrCallback;
2989
+ options = {};
2990
+ }
2991
+
2992
+ const rootUrl =
2993
+ options.rootUrl || 'https://securityposture.googleapis.com/';
2994
+ const parameters = {
2995
+ options: Object.assign(
2996
+ {
2997
+ url: (
2998
+ rootUrl + '/v1/{+parent}/reports:createIaCValidationReport'
2999
+ ).replace(/([^:]\/)\/+/g, '$1'),
3000
+ method: 'POST',
3001
+ apiVersion: '',
3002
+ },
3003
+ options
3004
+ ),
3005
+ params,
3006
+ requiredParams: ['parent'],
3007
+ pathParams: ['parent'],
3008
+ context: this.context,
3009
+ };
3010
+ if (callback) {
3011
+ createAPIRequest<Schema$Operation>(
3012
+ parameters,
3013
+ callback as BodyResponseCallback<unknown>
3014
+ );
3015
+ } else {
3016
+ return createAPIRequest<Schema$Operation>(parameters);
3017
+ }
3018
+ }
3019
+
3020
+ /**
3021
+ * Gets details for a Report.
3022
+ *
3023
+ * @param params - Parameters for request
3024
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3025
+ * @param callback - Optional callback that handles the response.
3026
+ * @returns A promise if used with async/await, or void if used with a callback.
3027
+ */
3028
+ get(
3029
+ params: Params$Resource$Organizations$Locations$Reports$Get,
3030
+ options: StreamMethodOptions
3031
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3032
+ get(
3033
+ params?: Params$Resource$Organizations$Locations$Reports$Get,
3034
+ options?: MethodOptions
3035
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Report>>;
3036
+ get(
3037
+ params: Params$Resource$Organizations$Locations$Reports$Get,
3038
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3039
+ callback: BodyResponseCallback<Readable>
3040
+ ): void;
3041
+ get(
3042
+ params: Params$Resource$Organizations$Locations$Reports$Get,
3043
+ options: MethodOptions | BodyResponseCallback<Schema$Report>,
3044
+ callback: BodyResponseCallback<Schema$Report>
3045
+ ): void;
3046
+ get(
3047
+ params: Params$Resource$Organizations$Locations$Reports$Get,
3048
+ callback: BodyResponseCallback<Schema$Report>
3049
+ ): void;
3050
+ get(callback: BodyResponseCallback<Schema$Report>): void;
3051
+ get(
3052
+ paramsOrCallback?:
3053
+ | Params$Resource$Organizations$Locations$Reports$Get
3054
+ | BodyResponseCallback<Schema$Report>
3055
+ | BodyResponseCallback<Readable>,
3056
+ optionsOrCallback?:
3057
+ | MethodOptions
3058
+ | StreamMethodOptions
3059
+ | BodyResponseCallback<Schema$Report>
3060
+ | BodyResponseCallback<Readable>,
3061
+ callback?:
3062
+ | BodyResponseCallback<Schema$Report>
3063
+ | BodyResponseCallback<Readable>
3064
+ ):
3065
+ | void
3066
+ | Promise<GaxiosResponseWithHTTP2<Schema$Report>>
3067
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3068
+ let params = (paramsOrCallback ||
3069
+ {}) as Params$Resource$Organizations$Locations$Reports$Get;
3070
+ let options = (optionsOrCallback || {}) as MethodOptions;
3071
+
3072
+ if (typeof paramsOrCallback === 'function') {
3073
+ callback = paramsOrCallback;
3074
+ params = {} as Params$Resource$Organizations$Locations$Reports$Get;
3075
+ options = {};
3076
+ }
3077
+
3078
+ if (typeof optionsOrCallback === 'function') {
3079
+ callback = optionsOrCallback;
3080
+ options = {};
3081
+ }
3082
+
3083
+ const rootUrl =
3084
+ options.rootUrl || 'https://securityposture.googleapis.com/';
3085
+ const parameters = {
3086
+ options: Object.assign(
3087
+ {
3088
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3089
+ method: 'GET',
3090
+ apiVersion: '',
3091
+ },
3092
+ options
3093
+ ),
3094
+ params,
3095
+ requiredParams: ['name'],
3096
+ pathParams: ['name'],
3097
+ context: this.context,
3098
+ };
3099
+ if (callback) {
3100
+ createAPIRequest<Schema$Report>(
3101
+ parameters,
3102
+ callback as BodyResponseCallback<unknown>
3103
+ );
3104
+ } else {
3105
+ return createAPIRequest<Schema$Report>(parameters);
3106
+ }
3107
+ }
3108
+
3109
+ /**
3110
+ * Lists every Report in a given organization and location.
3111
+ *
3112
+ * @param params - Parameters for request
3113
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3114
+ * @param callback - Optional callback that handles the response.
3115
+ * @returns A promise if used with async/await, or void if used with a callback.
3116
+ */
3117
+ list(
3118
+ params: Params$Resource$Organizations$Locations$Reports$List,
3119
+ options: StreamMethodOptions
3120
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3121
+ list(
3122
+ params?: Params$Resource$Organizations$Locations$Reports$List,
3123
+ options?: MethodOptions
3124
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListReportsResponse>>;
3125
+ list(
3126
+ params: Params$Resource$Organizations$Locations$Reports$List,
3127
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3128
+ callback: BodyResponseCallback<Readable>
3129
+ ): void;
3130
+ list(
3131
+ params: Params$Resource$Organizations$Locations$Reports$List,
3132
+ options: MethodOptions | BodyResponseCallback<Schema$ListReportsResponse>,
3133
+ callback: BodyResponseCallback<Schema$ListReportsResponse>
3134
+ ): void;
3135
+ list(
3136
+ params: Params$Resource$Organizations$Locations$Reports$List,
3137
+ callback: BodyResponseCallback<Schema$ListReportsResponse>
3138
+ ): void;
3139
+ list(callback: BodyResponseCallback<Schema$ListReportsResponse>): void;
3140
+ list(
3141
+ paramsOrCallback?:
3142
+ | Params$Resource$Organizations$Locations$Reports$List
3143
+ | BodyResponseCallback<Schema$ListReportsResponse>
3144
+ | BodyResponseCallback<Readable>,
3145
+ optionsOrCallback?:
3146
+ | MethodOptions
3147
+ | StreamMethodOptions
3148
+ | BodyResponseCallback<Schema$ListReportsResponse>
3149
+ | BodyResponseCallback<Readable>,
3150
+ callback?:
3151
+ | BodyResponseCallback<Schema$ListReportsResponse>
3152
+ | BodyResponseCallback<Readable>
3153
+ ):
3154
+ | void
3155
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListReportsResponse>>
3156
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3157
+ let params = (paramsOrCallback ||
3158
+ {}) as Params$Resource$Organizations$Locations$Reports$List;
3159
+ let options = (optionsOrCallback || {}) as MethodOptions;
3160
+
3161
+ if (typeof paramsOrCallback === 'function') {
3162
+ callback = paramsOrCallback;
3163
+ params = {} as Params$Resource$Organizations$Locations$Reports$List;
3164
+ options = {};
3165
+ }
3166
+
3167
+ if (typeof optionsOrCallback === 'function') {
3168
+ callback = optionsOrCallback;
3169
+ options = {};
3170
+ }
3171
+
3172
+ const rootUrl =
3173
+ options.rootUrl || 'https://securityposture.googleapis.com/';
3174
+ const parameters = {
3175
+ options: Object.assign(
3176
+ {
3177
+ url: (rootUrl + '/v1/{+parent}/reports').replace(
3178
+ /([^:]\/)\/+/g,
3179
+ '$1'
3180
+ ),
3181
+ method: 'GET',
3182
+ apiVersion: '',
3183
+ },
3184
+ options
3185
+ ),
3186
+ params,
3187
+ requiredParams: ['parent'],
3188
+ pathParams: ['parent'],
3189
+ context: this.context,
3190
+ };
3191
+ if (callback) {
3192
+ createAPIRequest<Schema$ListReportsResponse>(
3193
+ parameters,
3194
+ callback as BodyResponseCallback<unknown>
3195
+ );
3196
+ } else {
3197
+ return createAPIRequest<Schema$ListReportsResponse>(parameters);
3198
+ }
3199
+ }
3200
+ }
3201
+
3202
+ export interface Params$Resource$Organizations$Locations$Reports$Createiacvalidationreport
3203
+ extends StandardParameters {
3204
+ /**
3205
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
3206
+ */
3207
+ parent?: string;
3208
+
3209
+ /**
3210
+ * Request body metadata
3211
+ */
3212
+ requestBody?: Schema$CreateIaCValidationReportRequest;
3213
+ }
3214
+ export interface Params$Resource$Organizations$Locations$Reports$Get
3215
+ extends StandardParameters {
3216
+ /**
3217
+ * Required. The name of the report, in the format `organizations/{organization\}/locations/global/reports/{report_id\}`.
3218
+ */
3219
+ name?: string;
3220
+ }
3221
+ export interface Params$Resource$Organizations$Locations$Reports$List
3222
+ extends StandardParameters {
3223
+ /**
3224
+ * Optional. A filter to apply to the list of reports, in the format defined in [AIP-160: Filtering](https://google.aip.dev/160).
3225
+ */
3226
+ filter?: string;
3227
+ /**
3228
+ * Optional. The maximum number of reports to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.
3229
+ */
3230
+ pageSize?: number;
3231
+ /**
3232
+ * Optional. A pagination token returned from a previous request to list reports. Provide this token to retrieve the next page of results.
3233
+ */
3234
+ pageToken?: string;
3235
+ /**
3236
+ * Required. The parent resource name, in the format `organizations/{organization\}/locations/global`.
3237
+ */
3238
+ parent?: string;
3239
+ }
3240
+
3241
+ export class Resource$Projects {
3242
+ context: APIRequestContext;
3243
+ locations: Resource$Projects$Locations;
3244
+ constructor(context: APIRequestContext) {
3245
+ this.context = context;
3246
+ this.locations = new Resource$Projects$Locations(this.context);
3247
+ }
3248
+ }
3249
+
3250
+ export class Resource$Projects$Locations {
3251
+ context: APIRequestContext;
3252
+ constructor(context: APIRequestContext) {
3253
+ this.context = context;
3254
+ }
3255
+
3256
+ /**
3257
+ * Gets information about a location.
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$Get,
3266
+ options: StreamMethodOptions
3267
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3268
+ get(
3269
+ params?: Params$Resource$Projects$Locations$Get,
3270
+ options?: MethodOptions
3271
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Location>>;
3272
+ get(
3273
+ params: Params$Resource$Projects$Locations$Get,
3274
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3275
+ callback: BodyResponseCallback<Readable>
3276
+ ): void;
3277
+ get(
3278
+ params: Params$Resource$Projects$Locations$Get,
3279
+ options: MethodOptions | BodyResponseCallback<Schema$Location>,
3280
+ callback: BodyResponseCallback<Schema$Location>
3281
+ ): void;
3282
+ get(
3283
+ params: Params$Resource$Projects$Locations$Get,
3284
+ callback: BodyResponseCallback<Schema$Location>
3285
+ ): void;
3286
+ get(callback: BodyResponseCallback<Schema$Location>): void;
3287
+ get(
3288
+ paramsOrCallback?:
3289
+ | Params$Resource$Projects$Locations$Get
3290
+ | BodyResponseCallback<Schema$Location>
3291
+ | BodyResponseCallback<Readable>,
3292
+ optionsOrCallback?:
3293
+ | MethodOptions
3294
+ | StreamMethodOptions
3295
+ | BodyResponseCallback<Schema$Location>
3296
+ | BodyResponseCallback<Readable>,
3297
+ callback?:
3298
+ | BodyResponseCallback<Schema$Location>
3299
+ | BodyResponseCallback<Readable>
3300
+ ):
3301
+ | void
3302
+ | Promise<GaxiosResponseWithHTTP2<Schema$Location>>
3303
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3304
+ let params = (paramsOrCallback ||
3305
+ {}) as Params$Resource$Projects$Locations$Get;
3306
+ let options = (optionsOrCallback || {}) as MethodOptions;
3307
+
3308
+ if (typeof paramsOrCallback === 'function') {
3309
+ callback = paramsOrCallback;
3310
+ params = {} as Params$Resource$Projects$Locations$Get;
3311
+ options = {};
3312
+ }
3313
+
3314
+ if (typeof optionsOrCallback === 'function') {
3315
+ callback = optionsOrCallback;
3316
+ options = {};
3317
+ }
3318
+
3319
+ const rootUrl =
3320
+ options.rootUrl || 'https://securityposture.googleapis.com/';
3321
+ const parameters = {
3322
+ options: Object.assign(
3323
+ {
3324
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3325
+ method: 'GET',
3326
+ apiVersion: '',
3327
+ },
3328
+ options
3329
+ ),
3330
+ params,
3331
+ requiredParams: ['name'],
3332
+ pathParams: ['name'],
3333
+ context: this.context,
3334
+ };
3335
+ if (callback) {
3336
+ createAPIRequest<Schema$Location>(
3337
+ parameters,
3338
+ callback as BodyResponseCallback<unknown>
3339
+ );
3340
+ } else {
3341
+ return createAPIRequest<Schema$Location>(parameters);
3342
+ }
3343
+ }
3344
+
3345
+ /**
3346
+ * Lists information about the supported locations for this service.
3347
+ *
3348
+ * @param params - Parameters for request
3349
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3350
+ * @param callback - Optional callback that handles the response.
3351
+ * @returns A promise if used with async/await, or void if used with a callback.
3352
+ */
3353
+ list(
3354
+ params: Params$Resource$Projects$Locations$List,
3355
+ options: StreamMethodOptions
3356
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3357
+ list(
3358
+ params?: Params$Resource$Projects$Locations$List,
3359
+ options?: MethodOptions
3360
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>;
3361
+ list(
3362
+ params: Params$Resource$Projects$Locations$List,
3363
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3364
+ callback: BodyResponseCallback<Readable>
3365
+ ): void;
3366
+ list(
3367
+ params: Params$Resource$Projects$Locations$List,
3368
+ options:
3369
+ | MethodOptions
3370
+ | BodyResponseCallback<Schema$ListLocationsResponse>,
3371
+ callback: BodyResponseCallback<Schema$ListLocationsResponse>
3372
+ ): void;
3373
+ list(
3374
+ params: Params$Resource$Projects$Locations$List,
3375
+ callback: BodyResponseCallback<Schema$ListLocationsResponse>
3376
+ ): void;
3377
+ list(callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
3378
+ list(
3379
+ paramsOrCallback?:
3380
+ | Params$Resource$Projects$Locations$List
3381
+ | BodyResponseCallback<Schema$ListLocationsResponse>
3382
+ | BodyResponseCallback<Readable>,
3383
+ optionsOrCallback?:
3384
+ | MethodOptions
3385
+ | StreamMethodOptions
3386
+ | BodyResponseCallback<Schema$ListLocationsResponse>
3387
+ | BodyResponseCallback<Readable>,
3388
+ callback?:
3389
+ | BodyResponseCallback<Schema$ListLocationsResponse>
3390
+ | BodyResponseCallback<Readable>
3391
+ ):
3392
+ | void
3393
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>
3394
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3395
+ let params = (paramsOrCallback ||
3396
+ {}) as Params$Resource$Projects$Locations$List;
3397
+ let options = (optionsOrCallback || {}) as MethodOptions;
3398
+
3399
+ if (typeof paramsOrCallback === 'function') {
3400
+ callback = paramsOrCallback;
3401
+ params = {} as Params$Resource$Projects$Locations$List;
3402
+ options = {};
3403
+ }
3404
+
3405
+ if (typeof optionsOrCallback === 'function') {
3406
+ callback = optionsOrCallback;
3407
+ options = {};
3408
+ }
3409
+
3410
+ const rootUrl =
3411
+ options.rootUrl || 'https://securityposture.googleapis.com/';
3412
+ const parameters = {
3413
+ options: Object.assign(
3414
+ {
3415
+ url: (rootUrl + '/v1/{+name}/locations').replace(
3416
+ /([^:]\/)\/+/g,
3417
+ '$1'
3418
+ ),
3419
+ method: 'GET',
3420
+ apiVersion: '',
3421
+ },
3422
+ options
3423
+ ),
3424
+ params,
3425
+ requiredParams: ['name'],
3426
+ pathParams: ['name'],
3427
+ context: this.context,
3428
+ };
3429
+ if (callback) {
3430
+ createAPIRequest<Schema$ListLocationsResponse>(
3431
+ parameters,
3432
+ callback as BodyResponseCallback<unknown>
3433
+ );
3434
+ } else {
3435
+ return createAPIRequest<Schema$ListLocationsResponse>(parameters);
3436
+ }
3437
+ }
3438
+ }
3439
+
3440
+ export interface Params$Resource$Projects$Locations$Get
3441
+ extends StandardParameters {
3442
+ /**
3443
+ * Resource name for the location.
3444
+ */
3445
+ name?: string;
3446
+ }
3447
+ export interface Params$Resource$Projects$Locations$List
3448
+ extends StandardParameters {
3449
+ /**
3450
+ * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
3451
+ */
3452
+ filter?: string;
3453
+ /**
3454
+ * The resource that owns the locations collection, if applicable.
3455
+ */
3456
+ name?: string;
3457
+ /**
3458
+ * The maximum number of results to return. If not set, the service selects a default.
3459
+ */
3460
+ pageSize?: number;
3461
+ /**
3462
+ * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
3463
+ */
3464
+ pageToken?: string;
3465
+ }
3466
+ }