@googleapis/securitycenter 12.0.0 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1beta1.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -224,6 +224,39 @@ export namespace securitycenter_v1beta1 {
224
224
  */
225
225
  count?: string | null;
226
226
  }
227
+ /**
228
+ * Contains information about the AI model associated with the finding.
229
+ */
230
+ export interface Schema$AiModel {
231
+ /**
232
+ * The platform on which the model is deployed.
233
+ */
234
+ deploymentPlatform?: string | null;
235
+ /**
236
+ * The user defined display name of model. Ex. baseline-classification-model
237
+ */
238
+ displayName?: string | null;
239
+ /**
240
+ * The domain of the model, for example, “image-classification”.
241
+ */
242
+ domain?: string | null;
243
+ /**
244
+ * The name of the model library, for example, “transformers”.
245
+ */
246
+ library?: string | null;
247
+ /**
248
+ * The region in which the model is used, for example, “us-central1”.
249
+ */
250
+ location?: string | null;
251
+ /**
252
+ * The name of the AI model, for example, "gemini:1.0.0".
253
+ */
254
+ name?: string | null;
255
+ /**
256
+ * The publisher of the model, for example, “google” or “nvidia”.
257
+ */
258
+ publisher?: string | null;
259
+ }
227
260
  /**
228
261
  * Allowed IP rule.
229
262
  */
@@ -542,6 +575,15 @@ export namespace securitycenter_v1beta1 {
542
575
  */
543
576
  storagePool?: string | null;
544
577
  }
578
+ /**
579
+ * The destination big query dataset to export findings to.
580
+ */
581
+ export interface Schema$BigQueryDestination {
582
+ /**
583
+ * Required. The relative resource name of the destination dataset, in the form projects/{projectId\}/datasets/{datasetId\}.
584
+ */
585
+ dataset?: string | null;
586
+ }
545
587
  /**
546
588
  * Associates `members`, or principals, with a `role`.
547
589
  */
@@ -936,6 +978,23 @@ export namespace securitycenter_v1beta1 {
936
978
  */
937
979
  maxRetentionAllowed?: string | null;
938
980
  }
981
+ /**
982
+ * Vertex AI dataset associated with the finding.
983
+ */
984
+ export interface Schema$Dataset {
985
+ /**
986
+ * The user defined display name of dataset, e.g. plants-dataset
987
+ */
988
+ displayName?: string | null;
989
+ /**
990
+ * Resource name of the dataset, e.g. projects/{project\}/locations/{location\}/datasets/2094040236064505856
991
+ */
992
+ name?: string | null;
993
+ /**
994
+ * Data source, such as BigQuery source URI, e.g. bq://scc-nexus-test.AIPPtest.gsod
995
+ */
996
+ source?: string | null;
997
+ }
939
998
  /**
940
999
  * Denied IP rule.
941
1000
  */
@@ -1040,6 +1099,23 @@ export namespace securitycenter_v1beta1 {
1040
1099
  */
1041
1100
  totalExfiltratedBytes?: string | null;
1042
1101
  }
1102
+ /**
1103
+ * The LRO metadata for a ExportFindings request.
1104
+ */
1105
+ export interface Schema$ExportFindingsMetadata {
1106
+ /**
1107
+ * Required. The destination big query dataset to export findings to.
1108
+ */
1109
+ bigQueryDestination?: Schema$BigQueryDestination;
1110
+ /**
1111
+ * Optional. Timestamp at which export was started
1112
+ */
1113
+ exportStartTime?: string | null;
1114
+ }
1115
+ /**
1116
+ * The response to a ExportFindings request. Contains the LRO information.
1117
+ */
1118
+ export interface Schema$ExportFindingsResponse {}
1043
1119
  /**
1044
1120
  * 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.
1045
1121
  */
@@ -1077,6 +1153,10 @@ export namespace securitycenter_v1beta1 {
1077
1153
  * The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
1078
1154
  */
1079
1155
  hashedSize?: string | null;
1156
+ /**
1157
+ * Operation(s) performed on a file.
1158
+ */
1159
+ operations?: Schema$FileOperation[];
1080
1160
  /**
1081
1161
  * True when the hash covers only a prefix of the file.
1082
1162
  */
@@ -1094,6 +1174,15 @@ export namespace securitycenter_v1beta1 {
1094
1174
  */
1095
1175
  size?: string | null;
1096
1176
  }
1177
+ /**
1178
+ * Operation(s) performed on a file.
1179
+ */
1180
+ export interface Schema$FileOperation {
1181
+ /**
1182
+ * The type of the operation
1183
+ */
1184
+ type?: string | null;
1185
+ }
1097
1186
  /**
1098
1187
  * Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.
1099
1188
  */
@@ -1106,6 +1195,10 @@ export namespace securitycenter_v1beta1 {
1106
1195
  * AffectedResources associated with the finding.
1107
1196
  */
1108
1197
  affectedResources?: Schema$AffectedResources;
1198
+ /**
1199
+ * The AI model associated with the finding.
1200
+ */
1201
+ aiModel?: Schema$AiModel;
1109
1202
  /**
1110
1203
  * Represents an application associated with the finding.
1111
1204
  */
@@ -1332,6 +1425,10 @@ export namespace securitycenter_v1beta1 {
1332
1425
  * Contains details about a group of security issues that, when the issues occur together, represent a greater risk than when the issues occur independently. A group of such issues is referred to as a toxic combination. This field cannot be updated. Its value is ignored in all update requests.
1333
1426
  */
1334
1427
  toxicCombination?: Schema$ToxicCombination;
1428
+ /**
1429
+ * VertexAi associated with the finding.
1430
+ */
1431
+ vertexAi?: Schema$VertexAi;
1335
1432
  /**
1336
1433
  * Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)
1337
1434
  */
@@ -2154,6 +2251,39 @@ export namespace securitycenter_v1beta1 {
2154
2251
  */
2155
2252
  count?: string | null;
2156
2253
  }
2254
+ /**
2255
+ * Contains information about the AI model associated with the finding.
2256
+ */
2257
+ export interface Schema$GoogleCloudSecuritycenterV2AiModel {
2258
+ /**
2259
+ * The platform on which the model is deployed.
2260
+ */
2261
+ deploymentPlatform?: string | null;
2262
+ /**
2263
+ * The user defined display name of model. Ex. baseline-classification-model
2264
+ */
2265
+ displayName?: string | null;
2266
+ /**
2267
+ * The domain of the model, for example, “image-classification”.
2268
+ */
2269
+ domain?: string | null;
2270
+ /**
2271
+ * The name of the model library, for example, “transformers”.
2272
+ */
2273
+ library?: string | null;
2274
+ /**
2275
+ * The region in which the model is used, for example, “us-central1”.
2276
+ */
2277
+ location?: string | null;
2278
+ /**
2279
+ * The name of the AI model, for example, "gemini:1.0.0".
2280
+ */
2281
+ name?: string | null;
2282
+ /**
2283
+ * The publisher of the model, for example, “google” or “nvidia”.
2284
+ */
2285
+ publisher?: string | null;
2286
+ }
2157
2287
  /**
2158
2288
  * Allowed IP rule.
2159
2289
  */
@@ -2839,6 +2969,23 @@ export namespace securitycenter_v1beta1 {
2839
2969
  */
2840
2970
  maxRetentionAllowed?: string | null;
2841
2971
  }
2972
+ /**
2973
+ * Vertex AI dataset associated with the finding.
2974
+ */
2975
+ export interface Schema$GoogleCloudSecuritycenterV2Dataset {
2976
+ /**
2977
+ * The user defined display name of dataset, e.g. plants-dataset
2978
+ */
2979
+ displayName?: string | null;
2980
+ /**
2981
+ * Resource name of the dataset, e.g. projects/{project\}/locations/{location\}/datasets/2094040236064505856
2982
+ */
2983
+ name?: string | null;
2984
+ /**
2985
+ * Data source, such as a BigQuery source URI, e.g. bq://scc-nexus-test.AIPPtest.gsod
2986
+ */
2987
+ source?: string | null;
2988
+ }
2842
2989
  /**
2843
2990
  * Denied IP rule.
2844
2991
  */
@@ -3004,6 +3151,10 @@ export namespace securitycenter_v1beta1 {
3004
3151
  * The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
3005
3152
  */
3006
3153
  hashedSize?: string | null;
3154
+ /**
3155
+ * Operation(s) performed on a file.
3156
+ */
3157
+ operations?: Schema$GoogleCloudSecuritycenterV2FileOperation[];
3007
3158
  /**
3008
3159
  * True when the hash covers only a prefix of the file.
3009
3160
  */
@@ -3021,6 +3172,15 @@ export namespace securitycenter_v1beta1 {
3021
3172
  */
3022
3173
  size?: string | null;
3023
3174
  }
3175
+ /**
3176
+ * Operation(s) performed on a file.
3177
+ */
3178
+ export interface Schema$GoogleCloudSecuritycenterV2FileOperation {
3179
+ /**
3180
+ * The type of the operation
3181
+ */
3182
+ type?: string | null;
3183
+ }
3024
3184
  /**
3025
3185
  * Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.
3026
3186
  */
@@ -3033,6 +3193,10 @@ export namespace securitycenter_v1beta1 {
3033
3193
  * AffectedResources associated with the finding.
3034
3194
  */
3035
3195
  affectedResources?: Schema$GoogleCloudSecuritycenterV2AffectedResources;
3196
+ /**
3197
+ * The AI model associated with the finding.
3198
+ */
3199
+ aiModel?: Schema$GoogleCloudSecuritycenterV2AiModel;
3036
3200
  /**
3037
3201
  * Represents an application associated with the finding.
3038
3202
  */
@@ -3202,7 +3366,7 @@ export namespace securitycenter_v1beta1 {
3202
3366
  */
3203
3367
  muteUpdateTime?: string | null;
3204
3368
  /**
3205
- * The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. The following list shows some examples: + `organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}` + `organizations/{organization_id\}/sources/{source_id\}/locations/{location_id\}/findings/{finding_id\}` + `folders/{folder_id\}/sources/{source_id\}/findings/{finding_id\}` + `folders/{folder_id\}/sources/{source_id\}/locations/{location_id\}/findings/{finding_id\}` + `projects/{project_id\}/sources/{source_id\}/findings/{finding_id\}` + `projects/{project_id\}/sources/{source_id\}/locations/{location_id\}/findings/{finding_id\}`
3369
+ * Identifier. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. The following list shows some examples: + `organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}` + `organizations/{organization_id\}/sources/{source_id\}/locations/{location_id\}/findings/{finding_id\}` + `folders/{folder_id\}/sources/{source_id\}/findings/{finding_id\}` + `folders/{folder_id\}/sources/{source_id\}/locations/{location_id\}/findings/{finding_id\}` + `projects/{project_id\}/sources/{source_id\}/findings/{finding_id\}` + `projects/{project_id\}/sources/{source_id\}/locations/{location_id\}/findings/{finding_id\}`
3206
3370
  */
3207
3371
  name?: string | null;
3208
3372
  /**
@@ -3261,6 +3425,10 @@ export namespace securitycenter_v1beta1 {
3261
3425
  * Contains details about a group of security issues that, when the issues occur together, represent a greater risk than when the issues occur independently. A group of such issues is referred to as a toxic combination. This field cannot be updated. Its value is ignored in all update requests.
3262
3426
  */
3263
3427
  toxicCombination?: Schema$GoogleCloudSecuritycenterV2ToxicCombination;
3428
+ /**
3429
+ * VertexAi associated with the finding.
3430
+ */
3431
+ vertexAi?: Schema$GoogleCloudSecuritycenterV2VertexAi;
3264
3432
  /**
3265
3433
  * Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)
3266
3434
  */
@@ -3982,6 +4150,19 @@ export namespace securitycenter_v1beta1 {
3982
4150
  */
3983
4151
  packageVersion?: string | null;
3984
4152
  }
4153
+ /**
4154
+ * Vertex AI training pipeline associated with the finding.
4155
+ */
4156
+ export interface Schema$GoogleCloudSecuritycenterV2Pipeline {
4157
+ /**
4158
+ * The user-defined display name of pipeline, e.g. plants-classification
4159
+ */
4160
+ displayName?: string | null;
4161
+ /**
4162
+ * Resource name of the pipeline, e.g. projects/{project\}/locations/{location\}/trainingPipelines/5253428229225578496
4163
+ */
4164
+ name?: string | null;
4165
+ }
3985
4166
  /**
3986
4167
  * A Kubernetes Pod.
3987
4168
  */
@@ -4077,6 +4258,10 @@ export namespace securitycenter_v1beta1 {
4077
4258
  * When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter.
4078
4259
  */
4079
4260
  script?: Schema$GoogleCloudSecuritycenterV2File;
4261
+ /**
4262
+ * The ID of the user that executed the process. E.g. If this is the root user this will always be 0.
4263
+ */
4264
+ userId?: string | null;
4080
4265
  }
4081
4266
  /**
4082
4267
  * Indicates what signature matched this process.
@@ -4456,6 +4641,19 @@ export namespace securitycenter_v1beta1 {
4456
4641
  */
4457
4642
  relatedFindings?: string[] | null;
4458
4643
  }
4644
+ /**
4645
+ * Vertex AI-related information associated with the finding.
4646
+ */
4647
+ export interface Schema$GoogleCloudSecuritycenterV2VertexAi {
4648
+ /**
4649
+ * Datasets associated with the finding.
4650
+ */
4651
+ datasets?: Schema$GoogleCloudSecuritycenterV2Dataset[];
4652
+ /**
4653
+ * Pipelines associated with the finding.
4654
+ */
4655
+ pipelines?: Schema$GoogleCloudSecuritycenterV2Pipeline[];
4656
+ }
4459
4657
  /**
4460
4658
  * Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
4461
4659
  */
@@ -5099,6 +5297,19 @@ export namespace securitycenter_v1beta1 {
5099
5297
  */
5100
5298
  packageVersion?: string | null;
5101
5299
  }
5300
+ /**
5301
+ * Vertex AI training pipeline associated with the finding.
5302
+ */
5303
+ export interface Schema$Pipeline {
5304
+ /**
5305
+ * The user defined display name of pipeline, e.g. plants-classification
5306
+ */
5307
+ displayName?: string | null;
5308
+ /**
5309
+ * Resource name of the pipeline, e.g. projects/{project\}/locations/{location\}/trainingPipelines/5253428229225578496
5310
+ */
5311
+ name?: string | null;
5312
+ }
5102
5313
  /**
5103
5314
  * A Kubernetes Pod.
5104
5315
  */
@@ -5215,6 +5426,10 @@ export namespace securitycenter_v1beta1 {
5215
5426
  * When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter.
5216
5427
  */
5217
5428
  script?: Schema$File;
5429
+ /**
5430
+ * The ID of the user that executed the process. E.g. If this is the root user this will always be 0.
5431
+ */
5432
+ userId?: string | null;
5218
5433
  }
5219
5434
  /**
5220
5435
  * Indicates what signature matched this process.
@@ -5590,6 +5805,19 @@ export namespace securitycenter_v1beta1 {
5590
5805
  */
5591
5806
  relatedFindings?: string[] | null;
5592
5807
  }
5808
+ /**
5809
+ * Vertex AI-related information associated with the finding.
5810
+ */
5811
+ export interface Schema$VertexAi {
5812
+ /**
5813
+ * Datasets associated with the finding.
5814
+ */
5815
+ datasets?: Schema$Dataset[];
5816
+ /**
5817
+ * Pipelines associated with the finding.
5818
+ */
5819
+ pipelines?: Schema$Pipeline[];
5820
+ }
5593
5821
  /**
5594
5822
  * Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
5595
5823
  */
@@ -5677,6 +5905,54 @@ export namespace securitycenter_v1beta1 {
5677
5905
 
5678
5906
  /**
5679
5907
  * Gets the settings for an organization.
5908
+ * @example
5909
+ * ```js
5910
+ * // Before running the sample:
5911
+ * // - Enable the API at:
5912
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
5913
+ * // - Login into gcloud by running:
5914
+ * // ```sh
5915
+ * // $ gcloud auth application-default login
5916
+ * // ```
5917
+ * // - Install the npm module by running:
5918
+ * // ```sh
5919
+ * // $ npm install googleapis
5920
+ * // ```
5921
+ *
5922
+ * const {google} = require('googleapis');
5923
+ * const securitycenter = google.securitycenter('v1beta1');
5924
+ *
5925
+ * async function main() {
5926
+ * const auth = new google.auth.GoogleAuth({
5927
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5928
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5929
+ * });
5930
+ *
5931
+ * // Acquire an auth client, and bind it to all future calls
5932
+ * const authClient = await auth.getClient();
5933
+ * google.options({auth: authClient});
5934
+ *
5935
+ * // Do the magic
5936
+ * const res = await securitycenter.organizations.getOrganizationSettings({
5937
+ * // Required. Name of the organization to get organization settings for. Its format is "organizations/[organization_id]/organizationSettings".
5938
+ * name: 'organizations/my-organization/organizationSettings',
5939
+ * });
5940
+ * console.log(res.data);
5941
+ *
5942
+ * // Example response
5943
+ * // {
5944
+ * // "assetDiscoveryConfig": {},
5945
+ * // "enableAssetDiscovery": false,
5946
+ * // "name": "my_name"
5947
+ * // }
5948
+ * }
5949
+ *
5950
+ * main().catch(e => {
5951
+ * console.error(e);
5952
+ * throw e;
5953
+ * });
5954
+ *
5955
+ * ```
5680
5956
  *
5681
5957
  * @param params - Parameters for request
5682
5958
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -5686,11 +5962,11 @@ export namespace securitycenter_v1beta1 {
5686
5962
  getOrganizationSettings(
5687
5963
  params: Params$Resource$Organizations$Getorganizationsettings,
5688
5964
  options: StreamMethodOptions
5689
- ): GaxiosPromise<Readable>;
5965
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
5690
5966
  getOrganizationSettings(
5691
5967
  params?: Params$Resource$Organizations$Getorganizationsettings,
5692
5968
  options?: MethodOptions
5693
- ): GaxiosPromise<Schema$OrganizationSettings>;
5969
+ ): Promise<GaxiosResponseWithHTTP2<Schema$OrganizationSettings>>;
5694
5970
  getOrganizationSettings(
5695
5971
  params: Params$Resource$Organizations$Getorganizationsettings,
5696
5972
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -5725,8 +6001,8 @@ export namespace securitycenter_v1beta1 {
5725
6001
  | BodyResponseCallback<Readable>
5726
6002
  ):
5727
6003
  | void
5728
- | GaxiosPromise<Schema$OrganizationSettings>
5729
- | GaxiosPromise<Readable> {
6004
+ | Promise<GaxiosResponseWithHTTP2<Schema$OrganizationSettings>>
6005
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
5730
6006
  let params = (paramsOrCallback ||
5731
6007
  {}) as Params$Resource$Organizations$Getorganizationsettings;
5732
6008
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -5770,6 +6046,66 @@ export namespace securitycenter_v1beta1 {
5770
6046
 
5771
6047
  /**
5772
6048
  * Updates an organization's settings.
6049
+ * @example
6050
+ * ```js
6051
+ * // Before running the sample:
6052
+ * // - Enable the API at:
6053
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6054
+ * // - Login into gcloud by running:
6055
+ * // ```sh
6056
+ * // $ gcloud auth application-default login
6057
+ * // ```
6058
+ * // - Install the npm module by running:
6059
+ * // ```sh
6060
+ * // $ npm install googleapis
6061
+ * // ```
6062
+ *
6063
+ * const {google} = require('googleapis');
6064
+ * const securitycenter = google.securitycenter('v1beta1');
6065
+ *
6066
+ * async function main() {
6067
+ * const auth = new google.auth.GoogleAuth({
6068
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6069
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6070
+ * });
6071
+ *
6072
+ * // Acquire an auth client, and bind it to all future calls
6073
+ * const authClient = await auth.getClient();
6074
+ * google.options({auth: authClient});
6075
+ *
6076
+ * // Do the magic
6077
+ * const res = await securitycenter.organizations.updateOrganizationSettings({
6078
+ * // The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/organizationSettings".
6079
+ * name: 'organizations/my-organization/organizationSettings',
6080
+ * // The FieldMask to use when updating the settings resource.
6081
+ * updateMask: 'placeholder-value',
6082
+ *
6083
+ * // Request body metadata
6084
+ * requestBody: {
6085
+ * // request body parameters
6086
+ * // {
6087
+ * // "assetDiscoveryConfig": {},
6088
+ * // "enableAssetDiscovery": false,
6089
+ * // "name": "my_name"
6090
+ * // }
6091
+ * },
6092
+ * });
6093
+ * console.log(res.data);
6094
+ *
6095
+ * // Example response
6096
+ * // {
6097
+ * // "assetDiscoveryConfig": {},
6098
+ * // "enableAssetDiscovery": false,
6099
+ * // "name": "my_name"
6100
+ * // }
6101
+ * }
6102
+ *
6103
+ * main().catch(e => {
6104
+ * console.error(e);
6105
+ * throw e;
6106
+ * });
6107
+ *
6108
+ * ```
5773
6109
  *
5774
6110
  * @param params - Parameters for request
5775
6111
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -5779,11 +6115,11 @@ export namespace securitycenter_v1beta1 {
5779
6115
  updateOrganizationSettings(
5780
6116
  params: Params$Resource$Organizations$Updateorganizationsettings,
5781
6117
  options: StreamMethodOptions
5782
- ): GaxiosPromise<Readable>;
6118
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
5783
6119
  updateOrganizationSettings(
5784
6120
  params?: Params$Resource$Organizations$Updateorganizationsettings,
5785
6121
  options?: MethodOptions
5786
- ): GaxiosPromise<Schema$OrganizationSettings>;
6122
+ ): Promise<GaxiosResponseWithHTTP2<Schema$OrganizationSettings>>;
5787
6123
  updateOrganizationSettings(
5788
6124
  params: Params$Resource$Organizations$Updateorganizationsettings,
5789
6125
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -5818,8 +6154,8 @@ export namespace securitycenter_v1beta1 {
5818
6154
  | BodyResponseCallback<Readable>
5819
6155
  ):
5820
6156
  | void
5821
- | GaxiosPromise<Schema$OrganizationSettings>
5822
- | GaxiosPromise<Readable> {
6157
+ | Promise<GaxiosResponseWithHTTP2<Schema$OrganizationSettings>>
6158
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
5823
6159
  let params = (paramsOrCallback ||
5824
6160
  {}) as Params$Resource$Organizations$Updateorganizationsettings;
5825
6161
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -5894,6 +6230,67 @@ export namespace securitycenter_v1beta1 {
5894
6230
 
5895
6231
  /**
5896
6232
  * Filters an organization's assets and groups them by their specified properties.
6233
+ * @example
6234
+ * ```js
6235
+ * // Before running the sample:
6236
+ * // - Enable the API at:
6237
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6238
+ * // - Login into gcloud by running:
6239
+ * // ```sh
6240
+ * // $ gcloud auth application-default login
6241
+ * // ```
6242
+ * // - Install the npm module by running:
6243
+ * // ```sh
6244
+ * // $ npm install googleapis
6245
+ * // ```
6246
+ *
6247
+ * const {google} = require('googleapis');
6248
+ * const securitycenter = google.securitycenter('v1beta1');
6249
+ *
6250
+ * async function main() {
6251
+ * const auth = new google.auth.GoogleAuth({
6252
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6253
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6254
+ * });
6255
+ *
6256
+ * // Acquire an auth client, and bind it to all future calls
6257
+ * const authClient = await auth.getClient();
6258
+ * google.options({auth: authClient});
6259
+ *
6260
+ * // Do the magic
6261
+ * const res = await securitycenter.organizations.assets.group({
6262
+ * // Required. Name of the organization to groupBy. Its format is "organizations/[organization_id]".
6263
+ * parent: 'organizations/my-organization',
6264
+ *
6265
+ * // Request body metadata
6266
+ * requestBody: {
6267
+ * // request body parameters
6268
+ * // {
6269
+ * // "compareDuration": "my_compareDuration",
6270
+ * // "filter": "my_filter",
6271
+ * // "groupBy": "my_groupBy",
6272
+ * // "pageSize": 0,
6273
+ * // "pageToken": "my_pageToken",
6274
+ * // "readTime": "my_readTime"
6275
+ * // }
6276
+ * },
6277
+ * });
6278
+ * console.log(res.data);
6279
+ *
6280
+ * // Example response
6281
+ * // {
6282
+ * // "groupByResults": [],
6283
+ * // "nextPageToken": "my_nextPageToken",
6284
+ * // "readTime": "my_readTime"
6285
+ * // }
6286
+ * }
6287
+ *
6288
+ * main().catch(e => {
6289
+ * console.error(e);
6290
+ * throw e;
6291
+ * });
6292
+ *
6293
+ * ```
5897
6294
  *
5898
6295
  * @param params - Parameters for request
5899
6296
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -5903,11 +6300,11 @@ export namespace securitycenter_v1beta1 {
5903
6300
  group(
5904
6301
  params: Params$Resource$Organizations$Assets$Group,
5905
6302
  options: StreamMethodOptions
5906
- ): GaxiosPromise<Readable>;
6303
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
5907
6304
  group(
5908
6305
  params?: Params$Resource$Organizations$Assets$Group,
5909
6306
  options?: MethodOptions
5910
- ): GaxiosPromise<Schema$GroupAssetsResponse>;
6307
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GroupAssetsResponse>>;
5911
6308
  group(
5912
6309
  params: Params$Resource$Organizations$Assets$Group,
5913
6310
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -5938,8 +6335,8 @@ export namespace securitycenter_v1beta1 {
5938
6335
  | BodyResponseCallback<Readable>
5939
6336
  ):
5940
6337
  | void
5941
- | GaxiosPromise<Schema$GroupAssetsResponse>
5942
- | GaxiosPromise<Readable> {
6338
+ | Promise<GaxiosResponseWithHTTP2<Schema$GroupAssetsResponse>>
6339
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
5943
6340
  let params = (paramsOrCallback ||
5944
6341
  {}) as Params$Resource$Organizations$Assets$Group;
5945
6342
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -5986,6 +6383,69 @@ export namespace securitycenter_v1beta1 {
5986
6383
 
5987
6384
  /**
5988
6385
  * Lists an organization's assets.
6386
+ * @example
6387
+ * ```js
6388
+ * // Before running the sample:
6389
+ * // - Enable the API at:
6390
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6391
+ * // - Login into gcloud by running:
6392
+ * // ```sh
6393
+ * // $ gcloud auth application-default login
6394
+ * // ```
6395
+ * // - Install the npm module by running:
6396
+ * // ```sh
6397
+ * // $ npm install googleapis
6398
+ * // ```
6399
+ *
6400
+ * const {google} = require('googleapis');
6401
+ * const securitycenter = google.securitycenter('v1beta1');
6402
+ *
6403
+ * async function main() {
6404
+ * const auth = new google.auth.GoogleAuth({
6405
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6406
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6407
+ * });
6408
+ *
6409
+ * // Acquire an auth client, and bind it to all future calls
6410
+ * const authClient = await auth.getClient();
6411
+ * google.options({auth: authClient});
6412
+ *
6413
+ * // Do the magic
6414
+ * const res = await securitycenter.organizations.assets.list({
6415
+ * // When compare_duration is set, the ListAssetResult's "state" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible "state" values when compare_duration is specified: * "ADDED": indicates that the asset was not present before compare_duration, but present at read_time. * "REMOVED": indicates that the asset was present at the start of compare_duration, but not present at read_time. * "ACTIVE": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state is "UNUSED", which indicates that the asset is present at read_time.
6416
+ * compareDuration: 'placeholder-value',
6417
+ * // Optional. A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.
6418
+ * fieldMask: 'placeholder-value',
6419
+ * // Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are not supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\>`, `<`, `\>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. For example, `resource_properties.size = 100` is a valid filter string.
6420
+ * filter: 'placeholder-value',
6421
+ * // Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be appended to the field name. For example: "name desc,resource_properties.a_property". Redundant space characters in the syntax are insignificant. "name desc,resource_properties.a_property" and " name desc , resource_properties.a_property " are equivalent.
6422
+ * orderBy: 'placeholder-value',
6423
+ * // The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
6424
+ * pageSize: 'placeholder-value',
6425
+ * // The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.
6426
+ * pageToken: 'placeholder-value',
6427
+ * // Required. Name of the organization assets should belong to. Its format is "organizations/[organization_id]".
6428
+ * parent: 'organizations/my-organization',
6429
+ * // Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.
6430
+ * readTime: 'placeholder-value',
6431
+ * });
6432
+ * console.log(res.data);
6433
+ *
6434
+ * // Example response
6435
+ * // {
6436
+ * // "listAssetsResults": [],
6437
+ * // "nextPageToken": "my_nextPageToken",
6438
+ * // "readTime": "my_readTime",
6439
+ * // "totalSize": 0
6440
+ * // }
6441
+ * }
6442
+ *
6443
+ * main().catch(e => {
6444
+ * console.error(e);
6445
+ * throw e;
6446
+ * });
6447
+ *
6448
+ * ```
5989
6449
  *
5990
6450
  * @param params - Parameters for request
5991
6451
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -5995,11 +6455,11 @@ export namespace securitycenter_v1beta1 {
5995
6455
  list(
5996
6456
  params: Params$Resource$Organizations$Assets$List,
5997
6457
  options: StreamMethodOptions
5998
- ): GaxiosPromise<Readable>;
6458
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
5999
6459
  list(
6000
6460
  params?: Params$Resource$Organizations$Assets$List,
6001
6461
  options?: MethodOptions
6002
- ): GaxiosPromise<Schema$ListAssetsResponse>;
6462
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListAssetsResponse>>;
6003
6463
  list(
6004
6464
  params: Params$Resource$Organizations$Assets$List,
6005
6465
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6030,8 +6490,8 @@ export namespace securitycenter_v1beta1 {
6030
6490
  | BodyResponseCallback<Readable>
6031
6491
  ):
6032
6492
  | void
6033
- | GaxiosPromise<Schema$ListAssetsResponse>
6034
- | GaxiosPromise<Readable> {
6493
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListAssetsResponse>>
6494
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6035
6495
  let params = (paramsOrCallback ||
6036
6496
  {}) as Params$Resource$Organizations$Assets$List;
6037
6497
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6078,6 +6538,62 @@ export namespace securitycenter_v1beta1 {
6078
6538
 
6079
6539
  /**
6080
6540
  * Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.
6541
+ * @example
6542
+ * ```js
6543
+ * // Before running the sample:
6544
+ * // - Enable the API at:
6545
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6546
+ * // - Login into gcloud by running:
6547
+ * // ```sh
6548
+ * // $ gcloud auth application-default login
6549
+ * // ```
6550
+ * // - Install the npm module by running:
6551
+ * // ```sh
6552
+ * // $ npm install googleapis
6553
+ * // ```
6554
+ *
6555
+ * const {google} = require('googleapis');
6556
+ * const securitycenter = google.securitycenter('v1beta1');
6557
+ *
6558
+ * async function main() {
6559
+ * const auth = new google.auth.GoogleAuth({
6560
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6561
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6562
+ * });
6563
+ *
6564
+ * // Acquire an auth client, and bind it to all future calls
6565
+ * const authClient = await auth.getClient();
6566
+ * google.options({auth: authClient});
6567
+ *
6568
+ * // Do the magic
6569
+ * const res = await securitycenter.organizations.assets.runDiscovery({
6570
+ * // Required. Name of the organization to run asset discovery for. Its format is "organizations/[organization_id]".
6571
+ * parent: 'organizations/my-organization',
6572
+ *
6573
+ * // Request body metadata
6574
+ * requestBody: {
6575
+ * // request body parameters
6576
+ * // {}
6577
+ * },
6578
+ * });
6579
+ * console.log(res.data);
6580
+ *
6581
+ * // Example response
6582
+ * // {
6583
+ * // "done": false,
6584
+ * // "error": {},
6585
+ * // "metadata": {},
6586
+ * // "name": "my_name",
6587
+ * // "response": {}
6588
+ * // }
6589
+ * }
6590
+ *
6591
+ * main().catch(e => {
6592
+ * console.error(e);
6593
+ * throw e;
6594
+ * });
6595
+ *
6596
+ * ```
6081
6597
  *
6082
6598
  * @param params - Parameters for request
6083
6599
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6087,11 +6603,11 @@ export namespace securitycenter_v1beta1 {
6087
6603
  runDiscovery(
6088
6604
  params: Params$Resource$Organizations$Assets$Rundiscovery,
6089
6605
  options: StreamMethodOptions
6090
- ): GaxiosPromise<Readable>;
6606
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6091
6607
  runDiscovery(
6092
6608
  params?: Params$Resource$Organizations$Assets$Rundiscovery,
6093
6609
  options?: MethodOptions
6094
- ): GaxiosPromise<Schema$Operation>;
6610
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
6095
6611
  runDiscovery(
6096
6612
  params: Params$Resource$Organizations$Assets$Rundiscovery,
6097
6613
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6120,7 +6636,10 @@ export namespace securitycenter_v1beta1 {
6120
6636
  callback?:
6121
6637
  | BodyResponseCallback<Schema$Operation>
6122
6638
  | BodyResponseCallback<Readable>
6123
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
6639
+ ):
6640
+ | void
6641
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
6642
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6124
6643
  let params = (paramsOrCallback ||
6125
6644
  {}) as Params$Resource$Organizations$Assets$Rundiscovery;
6126
6645
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6167,6 +6686,66 @@ export namespace securitycenter_v1beta1 {
6167
6686
 
6168
6687
  /**
6169
6688
  * Updates security marks.
6689
+ * @example
6690
+ * ```js
6691
+ * // Before running the sample:
6692
+ * // - Enable the API at:
6693
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6694
+ * // - Login into gcloud by running:
6695
+ * // ```sh
6696
+ * // $ gcloud auth application-default login
6697
+ * // ```
6698
+ * // - Install the npm module by running:
6699
+ * // ```sh
6700
+ * // $ npm install googleapis
6701
+ * // ```
6702
+ *
6703
+ * const {google} = require('googleapis');
6704
+ * const securitycenter = google.securitycenter('v1beta1');
6705
+ *
6706
+ * async function main() {
6707
+ * const auth = new google.auth.GoogleAuth({
6708
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6709
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6710
+ * });
6711
+ *
6712
+ * // Acquire an auth client, and bind it to all future calls
6713
+ * const authClient = await auth.getClient();
6714
+ * google.options({auth: authClient});
6715
+ *
6716
+ * // Do the magic
6717
+ * const res = await securitycenter.organizations.assets.updateSecurityMarks({
6718
+ * // The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id\}/assets/{asset_id\}/securityMarks" "organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}/securityMarks".
6719
+ * name: 'organizations/my-organization/assets/my-asset/securityMarks',
6720
+ * // The time at which the updated SecurityMarks take effect.
6721
+ * startTime: 'placeholder-value',
6722
+ * // The FieldMask to use when updating the security marks resource.
6723
+ * updateMask: 'placeholder-value',
6724
+ *
6725
+ * // Request body metadata
6726
+ * requestBody: {
6727
+ * // request body parameters
6728
+ * // {
6729
+ * // "marks": {},
6730
+ * // "name": "my_name"
6731
+ * // }
6732
+ * },
6733
+ * });
6734
+ * console.log(res.data);
6735
+ *
6736
+ * // Example response
6737
+ * // {
6738
+ * // "marks": {},
6739
+ * // "name": "my_name"
6740
+ * // }
6741
+ * }
6742
+ *
6743
+ * main().catch(e => {
6744
+ * console.error(e);
6745
+ * throw e;
6746
+ * });
6747
+ *
6748
+ * ```
6170
6749
  *
6171
6750
  * @param params - Parameters for request
6172
6751
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6176,11 +6755,13 @@ export namespace securitycenter_v1beta1 {
6176
6755
  updateSecurityMarks(
6177
6756
  params: Params$Resource$Organizations$Assets$Updatesecuritymarks,
6178
6757
  options: StreamMethodOptions
6179
- ): GaxiosPromise<Readable>;
6758
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6180
6759
  updateSecurityMarks(
6181
6760
  params?: Params$Resource$Organizations$Assets$Updatesecuritymarks,
6182
6761
  options?: MethodOptions
6183
- ): GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>;
6762
+ ): Promise<
6763
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>
6764
+ >;
6184
6765
  updateSecurityMarks(
6185
6766
  params: Params$Resource$Organizations$Assets$Updatesecuritymarks,
6186
6767
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6215,8 +6796,10 @@ export namespace securitycenter_v1beta1 {
6215
6796
  | BodyResponseCallback<Readable>
6216
6797
  ):
6217
6798
  | void
6218
- | GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>
6219
- | GaxiosPromise<Readable> {
6799
+ | Promise<
6800
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>
6801
+ >
6802
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6220
6803
  let params = (paramsOrCallback ||
6221
6804
  {}) as Params$Resource$Organizations$Assets$Updatesecuritymarks;
6222
6805
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6349,6 +6932,56 @@ export namespace securitycenter_v1beta1 {
6349
6932
 
6350
6933
  /**
6351
6934
  * 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`.
6935
+ * @example
6936
+ * ```js
6937
+ * // Before running the sample:
6938
+ * // - Enable the API at:
6939
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
6940
+ * // - Login into gcloud by running:
6941
+ * // ```sh
6942
+ * // $ gcloud auth application-default login
6943
+ * // ```
6944
+ * // - Install the npm module by running:
6945
+ * // ```sh
6946
+ * // $ npm install googleapis
6947
+ * // ```
6948
+ *
6949
+ * const {google} = require('googleapis');
6950
+ * const securitycenter = google.securitycenter('v1beta1');
6951
+ *
6952
+ * async function main() {
6953
+ * const auth = new google.auth.GoogleAuth({
6954
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
6955
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
6956
+ * });
6957
+ *
6958
+ * // Acquire an auth client, and bind it to all future calls
6959
+ * const authClient = await auth.getClient();
6960
+ * google.options({auth: authClient});
6961
+ *
6962
+ * // Do the magic
6963
+ * const res = await securitycenter.organizations.operations.cancel({
6964
+ * // The name of the operation resource to be cancelled.
6965
+ * name: 'organizations/my-organization/operations/my-operation',
6966
+ *
6967
+ * // Request body metadata
6968
+ * requestBody: {
6969
+ * // request body parameters
6970
+ * // {}
6971
+ * },
6972
+ * });
6973
+ * console.log(res.data);
6974
+ *
6975
+ * // Example response
6976
+ * // {}
6977
+ * }
6978
+ *
6979
+ * main().catch(e => {
6980
+ * console.error(e);
6981
+ * throw e;
6982
+ * });
6983
+ *
6984
+ * ```
6352
6985
  *
6353
6986
  * @param params - Parameters for request
6354
6987
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6358,11 +6991,11 @@ export namespace securitycenter_v1beta1 {
6358
6991
  cancel(
6359
6992
  params: Params$Resource$Organizations$Operations$Cancel,
6360
6993
  options: StreamMethodOptions
6361
- ): GaxiosPromise<Readable>;
6994
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6362
6995
  cancel(
6363
6996
  params?: Params$Resource$Organizations$Operations$Cancel,
6364
6997
  options?: MethodOptions
6365
- ): GaxiosPromise<Schema$Empty>;
6998
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
6366
6999
  cancel(
6367
7000
  params: Params$Resource$Organizations$Operations$Cancel,
6368
7001
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6391,7 +7024,10 @@ export namespace securitycenter_v1beta1 {
6391
7024
  callback?:
6392
7025
  | BodyResponseCallback<Schema$Empty>
6393
7026
  | BodyResponseCallback<Readable>
6394
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
7027
+ ):
7028
+ | void
7029
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
7030
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6395
7031
  let params = (paramsOrCallback ||
6396
7032
  {}) as Params$Resource$Organizations$Operations$Cancel;
6397
7033
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6438,6 +7074,50 @@ export namespace securitycenter_v1beta1 {
6438
7074
 
6439
7075
  /**
6440
7076
  * 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`.
7077
+ * @example
7078
+ * ```js
7079
+ * // Before running the sample:
7080
+ * // - Enable the API at:
7081
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7082
+ * // - Login into gcloud by running:
7083
+ * // ```sh
7084
+ * // $ gcloud auth application-default login
7085
+ * // ```
7086
+ * // - Install the npm module by running:
7087
+ * // ```sh
7088
+ * // $ npm install googleapis
7089
+ * // ```
7090
+ *
7091
+ * const {google} = require('googleapis');
7092
+ * const securitycenter = google.securitycenter('v1beta1');
7093
+ *
7094
+ * async function main() {
7095
+ * const auth = new google.auth.GoogleAuth({
7096
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7097
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7098
+ * });
7099
+ *
7100
+ * // Acquire an auth client, and bind it to all future calls
7101
+ * const authClient = await auth.getClient();
7102
+ * google.options({auth: authClient});
7103
+ *
7104
+ * // Do the magic
7105
+ * const res = await securitycenter.organizations.operations.delete({
7106
+ * // The name of the operation resource to be deleted.
7107
+ * name: 'organizations/my-organization/operations/my-operation',
7108
+ * });
7109
+ * console.log(res.data);
7110
+ *
7111
+ * // Example response
7112
+ * // {}
7113
+ * }
7114
+ *
7115
+ * main().catch(e => {
7116
+ * console.error(e);
7117
+ * throw e;
7118
+ * });
7119
+ *
7120
+ * ```
6441
7121
  *
6442
7122
  * @param params - Parameters for request
6443
7123
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6447,11 +7127,11 @@ export namespace securitycenter_v1beta1 {
6447
7127
  delete(
6448
7128
  params: Params$Resource$Organizations$Operations$Delete,
6449
7129
  options: StreamMethodOptions
6450
- ): GaxiosPromise<Readable>;
7130
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6451
7131
  delete(
6452
7132
  params?: Params$Resource$Organizations$Operations$Delete,
6453
7133
  options?: MethodOptions
6454
- ): GaxiosPromise<Schema$Empty>;
7134
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
6455
7135
  delete(
6456
7136
  params: Params$Resource$Organizations$Operations$Delete,
6457
7137
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6480,7 +7160,10 @@ export namespace securitycenter_v1beta1 {
6480
7160
  callback?:
6481
7161
  | BodyResponseCallback<Schema$Empty>
6482
7162
  | BodyResponseCallback<Readable>
6483
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
7163
+ ):
7164
+ | void
7165
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
7166
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6484
7167
  let params = (paramsOrCallback ||
6485
7168
  {}) as Params$Resource$Organizations$Operations$Delete;
6486
7169
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6524,6 +7207,56 @@ export namespace securitycenter_v1beta1 {
6524
7207
 
6525
7208
  /**
6526
7209
  * 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.
7210
+ * @example
7211
+ * ```js
7212
+ * // Before running the sample:
7213
+ * // - Enable the API at:
7214
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7215
+ * // - Login into gcloud by running:
7216
+ * // ```sh
7217
+ * // $ gcloud auth application-default login
7218
+ * // ```
7219
+ * // - Install the npm module by running:
7220
+ * // ```sh
7221
+ * // $ npm install googleapis
7222
+ * // ```
7223
+ *
7224
+ * const {google} = require('googleapis');
7225
+ * const securitycenter = google.securitycenter('v1beta1');
7226
+ *
7227
+ * async function main() {
7228
+ * const auth = new google.auth.GoogleAuth({
7229
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7230
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7231
+ * });
7232
+ *
7233
+ * // Acquire an auth client, and bind it to all future calls
7234
+ * const authClient = await auth.getClient();
7235
+ * google.options({auth: authClient});
7236
+ *
7237
+ * // Do the magic
7238
+ * const res = await securitycenter.organizations.operations.get({
7239
+ * // The name of the operation resource.
7240
+ * name: 'organizations/my-organization/operations/my-operation',
7241
+ * });
7242
+ * console.log(res.data);
7243
+ *
7244
+ * // Example response
7245
+ * // {
7246
+ * // "done": false,
7247
+ * // "error": {},
7248
+ * // "metadata": {},
7249
+ * // "name": "my_name",
7250
+ * // "response": {}
7251
+ * // }
7252
+ * }
7253
+ *
7254
+ * main().catch(e => {
7255
+ * console.error(e);
7256
+ * throw e;
7257
+ * });
7258
+ *
7259
+ * ```
6527
7260
  *
6528
7261
  * @param params - Parameters for request
6529
7262
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6533,11 +7266,11 @@ export namespace securitycenter_v1beta1 {
6533
7266
  get(
6534
7267
  params: Params$Resource$Organizations$Operations$Get,
6535
7268
  options: StreamMethodOptions
6536
- ): GaxiosPromise<Readable>;
7269
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6537
7270
  get(
6538
7271
  params?: Params$Resource$Organizations$Operations$Get,
6539
7272
  options?: MethodOptions
6540
- ): GaxiosPromise<Schema$Operation>;
7273
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
6541
7274
  get(
6542
7275
  params: Params$Resource$Organizations$Operations$Get,
6543
7276
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6566,7 +7299,10 @@ export namespace securitycenter_v1beta1 {
6566
7299
  callback?:
6567
7300
  | BodyResponseCallback<Schema$Operation>
6568
7301
  | BodyResponseCallback<Readable>
6569
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
7302
+ ):
7303
+ | void
7304
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
7305
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6570
7306
  let params = (paramsOrCallback ||
6571
7307
  {}) as Params$Resource$Organizations$Operations$Get;
6572
7308
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6610,6 +7346,59 @@ export namespace securitycenter_v1beta1 {
6610
7346
 
6611
7347
  /**
6612
7348
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
7349
+ * @example
7350
+ * ```js
7351
+ * // Before running the sample:
7352
+ * // - Enable the API at:
7353
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7354
+ * // - Login into gcloud by running:
7355
+ * // ```sh
7356
+ * // $ gcloud auth application-default login
7357
+ * // ```
7358
+ * // - Install the npm module by running:
7359
+ * // ```sh
7360
+ * // $ npm install googleapis
7361
+ * // ```
7362
+ *
7363
+ * const {google} = require('googleapis');
7364
+ * const securitycenter = google.securitycenter('v1beta1');
7365
+ *
7366
+ * async function main() {
7367
+ * const auth = new google.auth.GoogleAuth({
7368
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7369
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7370
+ * });
7371
+ *
7372
+ * // Acquire an auth client, and bind it to all future calls
7373
+ * const authClient = await auth.getClient();
7374
+ * google.options({auth: authClient});
7375
+ *
7376
+ * // Do the magic
7377
+ * const res = await securitycenter.organizations.operations.list({
7378
+ * // The standard list filter.
7379
+ * filter: 'placeholder-value',
7380
+ * // The name of the operation's parent resource.
7381
+ * name: 'organizations/my-organization/operations',
7382
+ * // The standard list page size.
7383
+ * pageSize: 'placeholder-value',
7384
+ * // The standard list page token.
7385
+ * pageToken: 'placeholder-value',
7386
+ * });
7387
+ * console.log(res.data);
7388
+ *
7389
+ * // Example response
7390
+ * // {
7391
+ * // "nextPageToken": "my_nextPageToken",
7392
+ * // "operations": []
7393
+ * // }
7394
+ * }
7395
+ *
7396
+ * main().catch(e => {
7397
+ * console.error(e);
7398
+ * throw e;
7399
+ * });
7400
+ *
7401
+ * ```
6613
7402
  *
6614
7403
  * @param params - Parameters for request
6615
7404
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6619,11 +7408,11 @@ export namespace securitycenter_v1beta1 {
6619
7408
  list(
6620
7409
  params: Params$Resource$Organizations$Operations$List,
6621
7410
  options: StreamMethodOptions
6622
- ): GaxiosPromise<Readable>;
7411
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6623
7412
  list(
6624
7413
  params?: Params$Resource$Organizations$Operations$List,
6625
7414
  options?: MethodOptions
6626
- ): GaxiosPromise<Schema$ListOperationsResponse>;
7415
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
6627
7416
  list(
6628
7417
  params: Params$Resource$Organizations$Operations$List,
6629
7418
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6656,8 +7445,8 @@ export namespace securitycenter_v1beta1 {
6656
7445
  | BodyResponseCallback<Readable>
6657
7446
  ):
6658
7447
  | void
6659
- | GaxiosPromise<Schema$ListOperationsResponse>
6660
- | GaxiosPromise<Readable> {
7448
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
7449
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6661
7450
  let params = (paramsOrCallback ||
6662
7451
  {}) as Params$Resource$Organizations$Operations$List;
6663
7452
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6756,6 +7545,64 @@ export namespace securitycenter_v1beta1 {
6756
7545
 
6757
7546
  /**
6758
7547
  * Creates a source.
7548
+ * @example
7549
+ * ```js
7550
+ * // Before running the sample:
7551
+ * // - Enable the API at:
7552
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7553
+ * // - Login into gcloud by running:
7554
+ * // ```sh
7555
+ * // $ gcloud auth application-default login
7556
+ * // ```
7557
+ * // - Install the npm module by running:
7558
+ * // ```sh
7559
+ * // $ npm install googleapis
7560
+ * // ```
7561
+ *
7562
+ * const {google} = require('googleapis');
7563
+ * const securitycenter = google.securitycenter('v1beta1');
7564
+ *
7565
+ * async function main() {
7566
+ * const auth = new google.auth.GoogleAuth({
7567
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7568
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7569
+ * });
7570
+ *
7571
+ * // Acquire an auth client, and bind it to all future calls
7572
+ * const authClient = await auth.getClient();
7573
+ * google.options({auth: authClient});
7574
+ *
7575
+ * // Do the magic
7576
+ * const res = await securitycenter.organizations.sources.create({
7577
+ * // Required. Resource name of the new source's parent. Its format should be "organizations/[organization_id]".
7578
+ * parent: 'organizations/my-organization',
7579
+ *
7580
+ * // Request body metadata
7581
+ * requestBody: {
7582
+ * // request body parameters
7583
+ * // {
7584
+ * // "description": "my_description",
7585
+ * // "displayName": "my_displayName",
7586
+ * // "name": "my_name"
7587
+ * // }
7588
+ * },
7589
+ * });
7590
+ * console.log(res.data);
7591
+ *
7592
+ * // Example response
7593
+ * // {
7594
+ * // "description": "my_description",
7595
+ * // "displayName": "my_displayName",
7596
+ * // "name": "my_name"
7597
+ * // }
7598
+ * }
7599
+ *
7600
+ * main().catch(e => {
7601
+ * console.error(e);
7602
+ * throw e;
7603
+ * });
7604
+ *
7605
+ * ```
6759
7606
  *
6760
7607
  * @param params - Parameters for request
6761
7608
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6765,11 +7612,11 @@ export namespace securitycenter_v1beta1 {
6765
7612
  create(
6766
7613
  params: Params$Resource$Organizations$Sources$Create,
6767
7614
  options: StreamMethodOptions
6768
- ): GaxiosPromise<Readable>;
7615
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6769
7616
  create(
6770
7617
  params?: Params$Resource$Organizations$Sources$Create,
6771
7618
  options?: MethodOptions
6772
- ): GaxiosPromise<Schema$Source>;
7619
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Source>>;
6773
7620
  create(
6774
7621
  params: Params$Resource$Organizations$Sources$Create,
6775
7622
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6798,7 +7645,10 @@ export namespace securitycenter_v1beta1 {
6798
7645
  callback?:
6799
7646
  | BodyResponseCallback<Schema$Source>
6800
7647
  | BodyResponseCallback<Readable>
6801
- ): void | GaxiosPromise<Schema$Source> | GaxiosPromise<Readable> {
7648
+ ):
7649
+ | void
7650
+ | Promise<GaxiosResponseWithHTTP2<Schema$Source>>
7651
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6802
7652
  let params = (paramsOrCallback ||
6803
7653
  {}) as Params$Resource$Organizations$Sources$Create;
6804
7654
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6845,6 +7695,54 @@ export namespace securitycenter_v1beta1 {
6845
7695
 
6846
7696
  /**
6847
7697
  * Gets a source.
7698
+ * @example
7699
+ * ```js
7700
+ * // Before running the sample:
7701
+ * // - Enable the API at:
7702
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7703
+ * // - Login into gcloud by running:
7704
+ * // ```sh
7705
+ * // $ gcloud auth application-default login
7706
+ * // ```
7707
+ * // - Install the npm module by running:
7708
+ * // ```sh
7709
+ * // $ npm install googleapis
7710
+ * // ```
7711
+ *
7712
+ * const {google} = require('googleapis');
7713
+ * const securitycenter = google.securitycenter('v1beta1');
7714
+ *
7715
+ * async function main() {
7716
+ * const auth = new google.auth.GoogleAuth({
7717
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7718
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7719
+ * });
7720
+ *
7721
+ * // Acquire an auth client, and bind it to all future calls
7722
+ * const authClient = await auth.getClient();
7723
+ * google.options({auth: authClient});
7724
+ *
7725
+ * // Do the magic
7726
+ * const res = await securitycenter.organizations.sources.get({
7727
+ * // Required. Relative resource name of the source. Its format is "organizations/[organization_id]/source/[source_id]".
7728
+ * name: 'organizations/my-organization/sources/my-source',
7729
+ * });
7730
+ * console.log(res.data);
7731
+ *
7732
+ * // Example response
7733
+ * // {
7734
+ * // "description": "my_description",
7735
+ * // "displayName": "my_displayName",
7736
+ * // "name": "my_name"
7737
+ * // }
7738
+ * }
7739
+ *
7740
+ * main().catch(e => {
7741
+ * console.error(e);
7742
+ * throw e;
7743
+ * });
7744
+ *
7745
+ * ```
6848
7746
  *
6849
7747
  * @param params - Parameters for request
6850
7748
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6854,11 +7752,11 @@ export namespace securitycenter_v1beta1 {
6854
7752
  get(
6855
7753
  params: Params$Resource$Organizations$Sources$Get,
6856
7754
  options: StreamMethodOptions
6857
- ): GaxiosPromise<Readable>;
7755
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6858
7756
  get(
6859
7757
  params?: Params$Resource$Organizations$Sources$Get,
6860
7758
  options?: MethodOptions
6861
- ): GaxiosPromise<Schema$Source>;
7759
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Source>>;
6862
7760
  get(
6863
7761
  params: Params$Resource$Organizations$Sources$Get,
6864
7762
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6887,7 +7785,10 @@ export namespace securitycenter_v1beta1 {
6887
7785
  callback?:
6888
7786
  | BodyResponseCallback<Schema$Source>
6889
7787
  | BodyResponseCallback<Readable>
6890
- ): void | GaxiosPromise<Schema$Source> | GaxiosPromise<Readable> {
7788
+ ):
7789
+ | void
7790
+ | Promise<GaxiosResponseWithHTTP2<Schema$Source>>
7791
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6891
7792
  let params = (paramsOrCallback ||
6892
7793
  {}) as Params$Resource$Organizations$Sources$Get;
6893
7794
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -6931,6 +7832,63 @@ export namespace securitycenter_v1beta1 {
6931
7832
 
6932
7833
  /**
6933
7834
  * Gets the access control policy on the specified Source.
7835
+ * @example
7836
+ * ```js
7837
+ * // Before running the sample:
7838
+ * // - Enable the API at:
7839
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7840
+ * // - Login into gcloud by running:
7841
+ * // ```sh
7842
+ * // $ gcloud auth application-default login
7843
+ * // ```
7844
+ * // - Install the npm module by running:
7845
+ * // ```sh
7846
+ * // $ npm install googleapis
7847
+ * // ```
7848
+ *
7849
+ * const {google} = require('googleapis');
7850
+ * const securitycenter = google.securitycenter('v1beta1');
7851
+ *
7852
+ * async function main() {
7853
+ * const auth = new google.auth.GoogleAuth({
7854
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7855
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
7856
+ * });
7857
+ *
7858
+ * // Acquire an auth client, and bind it to all future calls
7859
+ * const authClient = await auth.getClient();
7860
+ * google.options({auth: authClient});
7861
+ *
7862
+ * // Do the magic
7863
+ * const res = await securitycenter.organizations.sources.getIamPolicy({
7864
+ * // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
7865
+ * resource: 'organizations/my-organization/sources/my-source',
7866
+ *
7867
+ * // Request body metadata
7868
+ * requestBody: {
7869
+ * // request body parameters
7870
+ * // {
7871
+ * // "options": {}
7872
+ * // }
7873
+ * },
7874
+ * });
7875
+ * console.log(res.data);
7876
+ *
7877
+ * // Example response
7878
+ * // {
7879
+ * // "auditConfigs": [],
7880
+ * // "bindings": [],
7881
+ * // "etag": "my_etag",
7882
+ * // "version": 0
7883
+ * // }
7884
+ * }
7885
+ *
7886
+ * main().catch(e => {
7887
+ * console.error(e);
7888
+ * throw e;
7889
+ * });
7890
+ *
7891
+ * ```
6934
7892
  *
6935
7893
  * @param params - Parameters for request
6936
7894
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -6940,11 +7898,11 @@ export namespace securitycenter_v1beta1 {
6940
7898
  getIamPolicy(
6941
7899
  params: Params$Resource$Organizations$Sources$Getiampolicy,
6942
7900
  options: StreamMethodOptions
6943
- ): GaxiosPromise<Readable>;
7901
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
6944
7902
  getIamPolicy(
6945
7903
  params?: Params$Resource$Organizations$Sources$Getiampolicy,
6946
7904
  options?: MethodOptions
6947
- ): GaxiosPromise<Schema$Policy>;
7905
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
6948
7906
  getIamPolicy(
6949
7907
  params: Params$Resource$Organizations$Sources$Getiampolicy,
6950
7908
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -6973,7 +7931,10 @@ export namespace securitycenter_v1beta1 {
6973
7931
  callback?:
6974
7932
  | BodyResponseCallback<Schema$Policy>
6975
7933
  | BodyResponseCallback<Readable>
6976
- ): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
7934
+ ):
7935
+ | void
7936
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
7937
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
6977
7938
  let params = (paramsOrCallback ||
6978
7939
  {}) as Params$Resource$Organizations$Sources$Getiampolicy;
6979
7940
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7020,6 +7981,57 @@ export namespace securitycenter_v1beta1 {
7020
7981
 
7021
7982
  /**
7022
7983
  * Lists all sources belonging to an organization.
7984
+ * @example
7985
+ * ```js
7986
+ * // Before running the sample:
7987
+ * // - Enable the API at:
7988
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
7989
+ * // - Login into gcloud by running:
7990
+ * // ```sh
7991
+ * // $ gcloud auth application-default login
7992
+ * // ```
7993
+ * // - Install the npm module by running:
7994
+ * // ```sh
7995
+ * // $ npm install googleapis
7996
+ * // ```
7997
+ *
7998
+ * const {google} = require('googleapis');
7999
+ * const securitycenter = google.securitycenter('v1beta1');
8000
+ *
8001
+ * async function main() {
8002
+ * const auth = new google.auth.GoogleAuth({
8003
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8004
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8005
+ * });
8006
+ *
8007
+ * // Acquire an auth client, and bind it to all future calls
8008
+ * const authClient = await auth.getClient();
8009
+ * google.options({auth: authClient});
8010
+ *
8011
+ * // Do the magic
8012
+ * const res = await securitycenter.organizations.sources.list({
8013
+ * // The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
8014
+ * pageSize: 'placeholder-value',
8015
+ * // The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.
8016
+ * pageToken: 'placeholder-value',
8017
+ * // Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]".
8018
+ * parent: 'organizations/my-organization',
8019
+ * });
8020
+ * console.log(res.data);
8021
+ *
8022
+ * // Example response
8023
+ * // {
8024
+ * // "nextPageToken": "my_nextPageToken",
8025
+ * // "sources": []
8026
+ * // }
8027
+ * }
8028
+ *
8029
+ * main().catch(e => {
8030
+ * console.error(e);
8031
+ * throw e;
8032
+ * });
8033
+ *
8034
+ * ```
7023
8035
  *
7024
8036
  * @param params - Parameters for request
7025
8037
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7029,11 +8041,11 @@ export namespace securitycenter_v1beta1 {
7029
8041
  list(
7030
8042
  params: Params$Resource$Organizations$Sources$List,
7031
8043
  options: StreamMethodOptions
7032
- ): GaxiosPromise<Readable>;
8044
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7033
8045
  list(
7034
8046
  params?: Params$Resource$Organizations$Sources$List,
7035
8047
  options?: MethodOptions
7036
- ): GaxiosPromise<Schema$ListSourcesResponse>;
8048
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListSourcesResponse>>;
7037
8049
  list(
7038
8050
  params: Params$Resource$Organizations$Sources$List,
7039
8051
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7064,8 +8076,8 @@ export namespace securitycenter_v1beta1 {
7064
8076
  | BodyResponseCallback<Readable>
7065
8077
  ):
7066
8078
  | void
7067
- | GaxiosPromise<Schema$ListSourcesResponse>
7068
- | GaxiosPromise<Readable> {
8079
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListSourcesResponse>>
8080
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7069
8081
  let params = (paramsOrCallback ||
7070
8082
  {}) as Params$Resource$Organizations$Sources$List;
7071
8083
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7112,6 +8124,66 @@ export namespace securitycenter_v1beta1 {
7112
8124
 
7113
8125
  /**
7114
8126
  * Updates a source.
8127
+ * @example
8128
+ * ```js
8129
+ * // Before running the sample:
8130
+ * // - Enable the API at:
8131
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8132
+ * // - Login into gcloud by running:
8133
+ * // ```sh
8134
+ * // $ gcloud auth application-default login
8135
+ * // ```
8136
+ * // - Install the npm module by running:
8137
+ * // ```sh
8138
+ * // $ npm install googleapis
8139
+ * // ```
8140
+ *
8141
+ * const {google} = require('googleapis');
8142
+ * const securitycenter = google.securitycenter('v1beta1');
8143
+ *
8144
+ * async function main() {
8145
+ * const auth = new google.auth.GoogleAuth({
8146
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8147
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8148
+ * });
8149
+ *
8150
+ * // Acquire an auth client, and bind it to all future calls
8151
+ * const authClient = await auth.getClient();
8152
+ * google.options({auth: authClient});
8153
+ *
8154
+ * // Do the magic
8155
+ * const res = await securitycenter.organizations.sources.patch({
8156
+ * // The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/sources/{source_id\}"
8157
+ * name: 'organizations/my-organization/sources/my-source',
8158
+ * // The FieldMask to use when updating the source resource.
8159
+ * updateMask: 'placeholder-value',
8160
+ *
8161
+ * // Request body metadata
8162
+ * requestBody: {
8163
+ * // request body parameters
8164
+ * // {
8165
+ * // "description": "my_description",
8166
+ * // "displayName": "my_displayName",
8167
+ * // "name": "my_name"
8168
+ * // }
8169
+ * },
8170
+ * });
8171
+ * console.log(res.data);
8172
+ *
8173
+ * // Example response
8174
+ * // {
8175
+ * // "description": "my_description",
8176
+ * // "displayName": "my_displayName",
8177
+ * // "name": "my_name"
8178
+ * // }
8179
+ * }
8180
+ *
8181
+ * main().catch(e => {
8182
+ * console.error(e);
8183
+ * throw e;
8184
+ * });
8185
+ *
8186
+ * ```
7115
8187
  *
7116
8188
  * @param params - Parameters for request
7117
8189
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7121,11 +8193,11 @@ export namespace securitycenter_v1beta1 {
7121
8193
  patch(
7122
8194
  params: Params$Resource$Organizations$Sources$Patch,
7123
8195
  options: StreamMethodOptions
7124
- ): GaxiosPromise<Readable>;
8196
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7125
8197
  patch(
7126
8198
  params?: Params$Resource$Organizations$Sources$Patch,
7127
8199
  options?: MethodOptions
7128
- ): GaxiosPromise<Schema$Source>;
8200
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Source>>;
7129
8201
  patch(
7130
8202
  params: Params$Resource$Organizations$Sources$Patch,
7131
8203
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7154,7 +8226,10 @@ export namespace securitycenter_v1beta1 {
7154
8226
  callback?:
7155
8227
  | BodyResponseCallback<Schema$Source>
7156
8228
  | BodyResponseCallback<Readable>
7157
- ): void | GaxiosPromise<Schema$Source> | GaxiosPromise<Readable> {
8229
+ ):
8230
+ | void
8231
+ | Promise<GaxiosResponseWithHTTP2<Schema$Source>>
8232
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7158
8233
  let params = (paramsOrCallback ||
7159
8234
  {}) as Params$Resource$Organizations$Sources$Patch;
7160
8235
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7198,6 +8273,64 @@ export namespace securitycenter_v1beta1 {
7198
8273
 
7199
8274
  /**
7200
8275
  * Sets the access control policy on the specified Source.
8276
+ * @example
8277
+ * ```js
8278
+ * // Before running the sample:
8279
+ * // - Enable the API at:
8280
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8281
+ * // - Login into gcloud by running:
8282
+ * // ```sh
8283
+ * // $ gcloud auth application-default login
8284
+ * // ```
8285
+ * // - Install the npm module by running:
8286
+ * // ```sh
8287
+ * // $ npm install googleapis
8288
+ * // ```
8289
+ *
8290
+ * const {google} = require('googleapis');
8291
+ * const securitycenter = google.securitycenter('v1beta1');
8292
+ *
8293
+ * async function main() {
8294
+ * const auth = new google.auth.GoogleAuth({
8295
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8296
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8297
+ * });
8298
+ *
8299
+ * // Acquire an auth client, and bind it to all future calls
8300
+ * const authClient = await auth.getClient();
8301
+ * google.options({auth: authClient});
8302
+ *
8303
+ * // Do the magic
8304
+ * const res = await securitycenter.organizations.sources.setIamPolicy({
8305
+ * // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
8306
+ * resource: 'organizations/my-organization/sources/my-source',
8307
+ *
8308
+ * // Request body metadata
8309
+ * requestBody: {
8310
+ * // request body parameters
8311
+ * // {
8312
+ * // "policy": {},
8313
+ * // "updateMask": "my_updateMask"
8314
+ * // }
8315
+ * },
8316
+ * });
8317
+ * console.log(res.data);
8318
+ *
8319
+ * // Example response
8320
+ * // {
8321
+ * // "auditConfigs": [],
8322
+ * // "bindings": [],
8323
+ * // "etag": "my_etag",
8324
+ * // "version": 0
8325
+ * // }
8326
+ * }
8327
+ *
8328
+ * main().catch(e => {
8329
+ * console.error(e);
8330
+ * throw e;
8331
+ * });
8332
+ *
8333
+ * ```
7201
8334
  *
7202
8335
  * @param params - Parameters for request
7203
8336
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7207,11 +8340,11 @@ export namespace securitycenter_v1beta1 {
7207
8340
  setIamPolicy(
7208
8341
  params: Params$Resource$Organizations$Sources$Setiampolicy,
7209
8342
  options: StreamMethodOptions
7210
- ): GaxiosPromise<Readable>;
8343
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7211
8344
  setIamPolicy(
7212
8345
  params?: Params$Resource$Organizations$Sources$Setiampolicy,
7213
8346
  options?: MethodOptions
7214
- ): GaxiosPromise<Schema$Policy>;
8347
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
7215
8348
  setIamPolicy(
7216
8349
  params: Params$Resource$Organizations$Sources$Setiampolicy,
7217
8350
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7240,7 +8373,10 @@ export namespace securitycenter_v1beta1 {
7240
8373
  callback?:
7241
8374
  | BodyResponseCallback<Schema$Policy>
7242
8375
  | BodyResponseCallback<Readable>
7243
- ): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
8376
+ ):
8377
+ | void
8378
+ | Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
8379
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7244
8380
  let params = (paramsOrCallback ||
7245
8381
  {}) as Params$Resource$Organizations$Sources$Setiampolicy;
7246
8382
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7287,6 +8423,60 @@ export namespace securitycenter_v1beta1 {
7287
8423
 
7288
8424
  /**
7289
8425
  * Returns the permissions that a caller has on the specified source.
8426
+ * @example
8427
+ * ```js
8428
+ * // Before running the sample:
8429
+ * // - Enable the API at:
8430
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8431
+ * // - Login into gcloud by running:
8432
+ * // ```sh
8433
+ * // $ gcloud auth application-default login
8434
+ * // ```
8435
+ * // - Install the npm module by running:
8436
+ * // ```sh
8437
+ * // $ npm install googleapis
8438
+ * // ```
8439
+ *
8440
+ * const {google} = require('googleapis');
8441
+ * const securitycenter = google.securitycenter('v1beta1');
8442
+ *
8443
+ * async function main() {
8444
+ * const auth = new google.auth.GoogleAuth({
8445
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8446
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8447
+ * });
8448
+ *
8449
+ * // Acquire an auth client, and bind it to all future calls
8450
+ * const authClient = await auth.getClient();
8451
+ * google.options({auth: authClient});
8452
+ *
8453
+ * // Do the magic
8454
+ * const res = await securitycenter.organizations.sources.testIamPermissions({
8455
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
8456
+ * resource: 'organizations/my-organization/sources/my-source',
8457
+ *
8458
+ * // Request body metadata
8459
+ * requestBody: {
8460
+ * // request body parameters
8461
+ * // {
8462
+ * // "permissions": []
8463
+ * // }
8464
+ * },
8465
+ * });
8466
+ * console.log(res.data);
8467
+ *
8468
+ * // Example response
8469
+ * // {
8470
+ * // "permissions": []
8471
+ * // }
8472
+ * }
8473
+ *
8474
+ * main().catch(e => {
8475
+ * console.error(e);
8476
+ * throw e;
8477
+ * });
8478
+ *
8479
+ * ```
7290
8480
  *
7291
8481
  * @param params - Parameters for request
7292
8482
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7296,11 +8486,11 @@ export namespace securitycenter_v1beta1 {
7296
8486
  testIamPermissions(
7297
8487
  params: Params$Resource$Organizations$Sources$Testiampermissions,
7298
8488
  options: StreamMethodOptions
7299
- ): GaxiosPromise<Readable>;
8489
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7300
8490
  testIamPermissions(
7301
8491
  params?: Params$Resource$Organizations$Sources$Testiampermissions,
7302
8492
  options?: MethodOptions
7303
- ): GaxiosPromise<Schema$TestIamPermissionsResponse>;
8493
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
7304
8494
  testIamPermissions(
7305
8495
  params: Params$Resource$Organizations$Sources$Testiampermissions,
7306
8496
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7335,8 +8525,8 @@ export namespace securitycenter_v1beta1 {
7335
8525
  | BodyResponseCallback<Readable>
7336
8526
  ):
7337
8527
  | void
7338
- | GaxiosPromise<Schema$TestIamPermissionsResponse>
7339
- | GaxiosPromise<Readable> {
8528
+ | Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>
8529
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7340
8530
  let params = (paramsOrCallback ||
7341
8531
  {}) as Params$Resource$Organizations$Sources$Testiampermissions;
7342
8532
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7477,6 +8667,80 @@ export namespace securitycenter_v1beta1 {
7477
8667
 
7478
8668
  /**
7479
8669
  * Creates a finding. The corresponding source must exist for finding creation to succeed.
8670
+ * @example
8671
+ * ```js
8672
+ * // Before running the sample:
8673
+ * // - Enable the API at:
8674
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8675
+ * // - Login into gcloud by running:
8676
+ * // ```sh
8677
+ * // $ gcloud auth application-default login
8678
+ * // ```
8679
+ * // - Install the npm module by running:
8680
+ * // ```sh
8681
+ * // $ npm install googleapis
8682
+ * // ```
8683
+ *
8684
+ * const {google} = require('googleapis');
8685
+ * const securitycenter = google.securitycenter('v1beta1');
8686
+ *
8687
+ * async function main() {
8688
+ * const auth = new google.auth.GoogleAuth({
8689
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8690
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8691
+ * });
8692
+ *
8693
+ * // Acquire an auth client, and bind it to all future calls
8694
+ * const authClient = await auth.getClient();
8695
+ * google.options({auth: authClient});
8696
+ *
8697
+ * // Do the magic
8698
+ * const res = await securitycenter.organizations.sources.findings.create({
8699
+ * // Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.
8700
+ * findingId: 'placeholder-value',
8701
+ * // Required. Resource name of the new finding's parent. Its format should be "organizations/[organization_id]/sources/[source_id]".
8702
+ * parent: 'organizations/my-organization/sources/my-source',
8703
+ *
8704
+ * // Request body metadata
8705
+ * requestBody: {
8706
+ * // request body parameters
8707
+ * // {
8708
+ * // "category": "my_category",
8709
+ * // "createTime": "my_createTime",
8710
+ * // "eventTime": "my_eventTime",
8711
+ * // "externalUri": "my_externalUri",
8712
+ * // "name": "my_name",
8713
+ * // "parent": "my_parent",
8714
+ * // "resourceName": "my_resourceName",
8715
+ * // "securityMarks": {},
8716
+ * // "sourceProperties": {},
8717
+ * // "state": "my_state"
8718
+ * // }
8719
+ * },
8720
+ * });
8721
+ * console.log(res.data);
8722
+ *
8723
+ * // Example response
8724
+ * // {
8725
+ * // "category": "my_category",
8726
+ * // "createTime": "my_createTime",
8727
+ * // "eventTime": "my_eventTime",
8728
+ * // "externalUri": "my_externalUri",
8729
+ * // "name": "my_name",
8730
+ * // "parent": "my_parent",
8731
+ * // "resourceName": "my_resourceName",
8732
+ * // "securityMarks": {},
8733
+ * // "sourceProperties": {},
8734
+ * // "state": "my_state"
8735
+ * // }
8736
+ * }
8737
+ *
8738
+ * main().catch(e => {
8739
+ * console.error(e);
8740
+ * throw e;
8741
+ * });
8742
+ *
8743
+ * ```
7480
8744
  *
7481
8745
  * @param params - Parameters for request
7482
8746
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7486,11 +8750,13 @@ export namespace securitycenter_v1beta1 {
7486
8750
  create(
7487
8751
  params: Params$Resource$Organizations$Sources$Findings$Create,
7488
8752
  options: StreamMethodOptions
7489
- ): GaxiosPromise<Readable>;
8753
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7490
8754
  create(
7491
8755
  params?: Params$Resource$Organizations$Sources$Findings$Create,
7492
8756
  options?: MethodOptions
7493
- ): GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1Finding>;
8757
+ ): Promise<
8758
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1Finding>
8759
+ >;
7494
8760
  create(
7495
8761
  params: Params$Resource$Organizations$Sources$Findings$Create,
7496
8762
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7525,8 +8791,10 @@ export namespace securitycenter_v1beta1 {
7525
8791
  | BodyResponseCallback<Readable>
7526
8792
  ):
7527
8793
  | void
7528
- | GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1Finding>
7529
- | GaxiosPromise<Readable> {
8794
+ | Promise<
8795
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1Finding>
8796
+ >
8797
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7530
8798
  let params = (paramsOrCallback ||
7531
8799
  {}) as Params$Resource$Organizations$Sources$Findings$Create;
7532
8800
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7575,6 +8843,66 @@ export namespace securitycenter_v1beta1 {
7575
8843
 
7576
8844
  /**
7577
8845
  * Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1beta1/organizations/{organization_id\}/sources/-/findings
8846
+ * @example
8847
+ * ```js
8848
+ * // Before running the sample:
8849
+ * // - Enable the API at:
8850
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
8851
+ * // - Login into gcloud by running:
8852
+ * // ```sh
8853
+ * // $ gcloud auth application-default login
8854
+ * // ```
8855
+ * // - Install the npm module by running:
8856
+ * // ```sh
8857
+ * // $ npm install googleapis
8858
+ * // ```
8859
+ *
8860
+ * const {google} = require('googleapis');
8861
+ * const securitycenter = google.securitycenter('v1beta1');
8862
+ *
8863
+ * async function main() {
8864
+ * const auth = new google.auth.GoogleAuth({
8865
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
8866
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
8867
+ * });
8868
+ *
8869
+ * // Acquire an auth client, and bind it to all future calls
8870
+ * const authClient = await auth.getClient();
8871
+ * google.options({auth: authClient});
8872
+ *
8873
+ * // Do the magic
8874
+ * const res = await securitycenter.organizations.sources.findings.group({
8875
+ * // Required. Name of the source to groupBy. Its format is "organizations/[organization_id]/sources/[source_id]". To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id\}/sources/-
8876
+ * parent: 'organizations/my-organization/sources/my-source',
8877
+ *
8878
+ * // Request body metadata
8879
+ * requestBody: {
8880
+ * // request body parameters
8881
+ * // {
8882
+ * // "filter": "my_filter",
8883
+ * // "groupBy": "my_groupBy",
8884
+ * // "pageSize": 0,
8885
+ * // "pageToken": "my_pageToken",
8886
+ * // "readTime": "my_readTime"
8887
+ * // }
8888
+ * },
8889
+ * });
8890
+ * console.log(res.data);
8891
+ *
8892
+ * // Example response
8893
+ * // {
8894
+ * // "groupByResults": [],
8895
+ * // "nextPageToken": "my_nextPageToken",
8896
+ * // "readTime": "my_readTime"
8897
+ * // }
8898
+ * }
8899
+ *
8900
+ * main().catch(e => {
8901
+ * console.error(e);
8902
+ * throw e;
8903
+ * });
8904
+ *
8905
+ * ```
7578
8906
  *
7579
8907
  * @param params - Parameters for request
7580
8908
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7584,11 +8912,11 @@ export namespace securitycenter_v1beta1 {
7584
8912
  group(
7585
8913
  params: Params$Resource$Organizations$Sources$Findings$Group,
7586
8914
  options: StreamMethodOptions
7587
- ): GaxiosPromise<Readable>;
8915
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7588
8916
  group(
7589
8917
  params?: Params$Resource$Organizations$Sources$Findings$Group,
7590
8918
  options?: MethodOptions
7591
- ): GaxiosPromise<Schema$GroupFindingsResponse>;
8919
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GroupFindingsResponse>>;
7592
8920
  group(
7593
8921
  params: Params$Resource$Organizations$Sources$Findings$Group,
7594
8922
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7621,8 +8949,8 @@ export namespace securitycenter_v1beta1 {
7621
8949
  | BodyResponseCallback<Readable>
7622
8950
  ):
7623
8951
  | void
7624
- | GaxiosPromise<Schema$GroupFindingsResponse>
7625
- | GaxiosPromise<Readable> {
8952
+ | Promise<GaxiosResponseWithHTTP2<Schema$GroupFindingsResponse>>
8953
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7626
8954
  let params = (paramsOrCallback ||
7627
8955
  {}) as Params$Resource$Organizations$Sources$Findings$Group;
7628
8956
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7669,6 +8997,67 @@ export namespace securitycenter_v1beta1 {
7669
8997
 
7670
8998
  /**
7671
8999
  * Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1beta1/organizations/{organization_id\}/sources/-/findings
9000
+ * @example
9001
+ * ```js
9002
+ * // Before running the sample:
9003
+ * // - Enable the API at:
9004
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9005
+ * // - Login into gcloud by running:
9006
+ * // ```sh
9007
+ * // $ gcloud auth application-default login
9008
+ * // ```
9009
+ * // - Install the npm module by running:
9010
+ * // ```sh
9011
+ * // $ npm install googleapis
9012
+ * // ```
9013
+ *
9014
+ * const {google} = require('googleapis');
9015
+ * const securitycenter = google.securitycenter('v1beta1');
9016
+ *
9017
+ * async function main() {
9018
+ * const auth = new google.auth.GoogleAuth({
9019
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9020
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9021
+ * });
9022
+ *
9023
+ * // Acquire an auth client, and bind it to all future calls
9024
+ * const authClient = await auth.getClient();
9025
+ * google.options({auth: authClient});
9026
+ *
9027
+ * // Do the magic
9028
+ * const res = await securitycenter.organizations.sources.findings.list({
9029
+ * // Optional. A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.
9030
+ * fieldMask: 'placeholder-value',
9031
+ * // Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are not supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `\>`, `<`, `\>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. For example, `source_properties.size = 100` is a valid filter string.
9032
+ * filter: 'placeholder-value',
9033
+ * // Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be appended to the field name. For example: "name desc,source_properties.a_property". Redundant space characters in the syntax are insignificant. "name desc,source_properties.a_property" and " name desc , source_properties.a_property " are equivalent.
9034
+ * orderBy: 'placeholder-value',
9035
+ * // The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
9036
+ * pageSize: 'placeholder-value',
9037
+ * // The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.
9038
+ * pageToken: 'placeholder-value',
9039
+ * // Required. Name of the source the findings belong to. Its format is "organizations/[organization_id]/sources/[source_id]". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id\}/sources/-
9040
+ * parent: 'organizations/my-organization/sources/my-source',
9041
+ * // Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.
9042
+ * readTime: 'placeholder-value',
9043
+ * });
9044
+ * console.log(res.data);
9045
+ *
9046
+ * // Example response
9047
+ * // {
9048
+ * // "findings": [],
9049
+ * // "nextPageToken": "my_nextPageToken",
9050
+ * // "readTime": "my_readTime",
9051
+ * // "totalSize": 0
9052
+ * // }
9053
+ * }
9054
+ *
9055
+ * main().catch(e => {
9056
+ * console.error(e);
9057
+ * throw e;
9058
+ * });
9059
+ *
9060
+ * ```
7672
9061
  *
7673
9062
  * @param params - Parameters for request
7674
9063
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7678,11 +9067,11 @@ export namespace securitycenter_v1beta1 {
7678
9067
  list(
7679
9068
  params: Params$Resource$Organizations$Sources$Findings$List,
7680
9069
  options: StreamMethodOptions
7681
- ): GaxiosPromise<Readable>;
9070
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7682
9071
  list(
7683
9072
  params?: Params$Resource$Organizations$Sources$Findings$List,
7684
9073
  options?: MethodOptions
7685
- ): GaxiosPromise<Schema$ListFindingsResponse>;
9074
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListFindingsResponse>>;
7686
9075
  list(
7687
9076
  params: Params$Resource$Organizations$Sources$Findings$List,
7688
9077
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7715,8 +9104,8 @@ export namespace securitycenter_v1beta1 {
7715
9104
  | BodyResponseCallback<Readable>
7716
9105
  ):
7717
9106
  | void
7718
- | GaxiosPromise<Schema$ListFindingsResponse>
7719
- | GaxiosPromise<Readable> {
9107
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListFindingsResponse>>
9108
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7720
9109
  let params = (paramsOrCallback ||
7721
9110
  {}) as Params$Resource$Organizations$Sources$Findings$List;
7722
9111
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7763,6 +9152,80 @@ export namespace securitycenter_v1beta1 {
7763
9152
 
7764
9153
  /**
7765
9154
  * Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.
9155
+ * @example
9156
+ * ```js
9157
+ * // Before running the sample:
9158
+ * // - Enable the API at:
9159
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9160
+ * // - Login into gcloud by running:
9161
+ * // ```sh
9162
+ * // $ gcloud auth application-default login
9163
+ * // ```
9164
+ * // - Install the npm module by running:
9165
+ * // ```sh
9166
+ * // $ npm install googleapis
9167
+ * // ```
9168
+ *
9169
+ * const {google} = require('googleapis');
9170
+ * const securitycenter = google.securitycenter('v1beta1');
9171
+ *
9172
+ * async function main() {
9173
+ * const auth = new google.auth.GoogleAuth({
9174
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9175
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9176
+ * });
9177
+ *
9178
+ * // Acquire an auth client, and bind it to all future calls
9179
+ * const authClient = await auth.getClient();
9180
+ * google.options({auth: authClient});
9181
+ *
9182
+ * // Do the magic
9183
+ * const res = await securitycenter.organizations.sources.findings.patch({
9184
+ * // The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}"
9185
+ * name: 'organizations/my-organization/sources/my-source/findings/my-finding',
9186
+ * // The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding.
9187
+ * updateMask: 'placeholder-value',
9188
+ *
9189
+ * // Request body metadata
9190
+ * requestBody: {
9191
+ * // request body parameters
9192
+ * // {
9193
+ * // "category": "my_category",
9194
+ * // "createTime": "my_createTime",
9195
+ * // "eventTime": "my_eventTime",
9196
+ * // "externalUri": "my_externalUri",
9197
+ * // "name": "my_name",
9198
+ * // "parent": "my_parent",
9199
+ * // "resourceName": "my_resourceName",
9200
+ * // "securityMarks": {},
9201
+ * // "sourceProperties": {},
9202
+ * // "state": "my_state"
9203
+ * // }
9204
+ * },
9205
+ * });
9206
+ * console.log(res.data);
9207
+ *
9208
+ * // Example response
9209
+ * // {
9210
+ * // "category": "my_category",
9211
+ * // "createTime": "my_createTime",
9212
+ * // "eventTime": "my_eventTime",
9213
+ * // "externalUri": "my_externalUri",
9214
+ * // "name": "my_name",
9215
+ * // "parent": "my_parent",
9216
+ * // "resourceName": "my_resourceName",
9217
+ * // "securityMarks": {},
9218
+ * // "sourceProperties": {},
9219
+ * // "state": "my_state"
9220
+ * // }
9221
+ * }
9222
+ *
9223
+ * main().catch(e => {
9224
+ * console.error(e);
9225
+ * throw e;
9226
+ * });
9227
+ *
9228
+ * ```
7766
9229
  *
7767
9230
  * @param params - Parameters for request
7768
9231
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7772,11 +9235,13 @@ export namespace securitycenter_v1beta1 {
7772
9235
  patch(
7773
9236
  params: Params$Resource$Organizations$Sources$Findings$Patch,
7774
9237
  options: StreamMethodOptions
7775
- ): GaxiosPromise<Readable>;
9238
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7776
9239
  patch(
7777
9240
  params?: Params$Resource$Organizations$Sources$Findings$Patch,
7778
9241
  options?: MethodOptions
7779
- ): GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1Finding>;
9242
+ ): Promise<
9243
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1Finding>
9244
+ >;
7780
9245
  patch(
7781
9246
  params: Params$Resource$Organizations$Sources$Findings$Patch,
7782
9247
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7811,8 +9276,10 @@ export namespace securitycenter_v1beta1 {
7811
9276
  | BodyResponseCallback<Readable>
7812
9277
  ):
7813
9278
  | void
7814
- | GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1Finding>
7815
- | GaxiosPromise<Readable> {
9279
+ | Promise<
9280
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1Finding>
9281
+ >
9282
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7816
9283
  let params = (paramsOrCallback ||
7817
9284
  {}) as Params$Resource$Organizations$Sources$Findings$Patch;
7818
9285
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7858,6 +9325,70 @@ export namespace securitycenter_v1beta1 {
7858
9325
 
7859
9326
  /**
7860
9327
  * Updates the state of a finding.
9328
+ * @example
9329
+ * ```js
9330
+ * // Before running the sample:
9331
+ * // - Enable the API at:
9332
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9333
+ * // - Login into gcloud by running:
9334
+ * // ```sh
9335
+ * // $ gcloud auth application-default login
9336
+ * // ```
9337
+ * // - Install the npm module by running:
9338
+ * // ```sh
9339
+ * // $ npm install googleapis
9340
+ * // ```
9341
+ *
9342
+ * const {google} = require('googleapis');
9343
+ * const securitycenter = google.securitycenter('v1beta1');
9344
+ *
9345
+ * async function main() {
9346
+ * const auth = new google.auth.GoogleAuth({
9347
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9348
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9349
+ * });
9350
+ *
9351
+ * // Acquire an auth client, and bind it to all future calls
9352
+ * const authClient = await auth.getClient();
9353
+ * google.options({auth: authClient});
9354
+ *
9355
+ * // Do the magic
9356
+ * const res = await securitycenter.organizations.sources.findings.setState({
9357
+ * // Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id\}/sources/{source_id\}/finding/{finding_id\}".
9358
+ * name: 'organizations/my-organization/sources/my-source/findings/my-finding',
9359
+ *
9360
+ * // Request body metadata
9361
+ * requestBody: {
9362
+ * // request body parameters
9363
+ * // {
9364
+ * // "startTime": "my_startTime",
9365
+ * // "state": "my_state"
9366
+ * // }
9367
+ * },
9368
+ * });
9369
+ * console.log(res.data);
9370
+ *
9371
+ * // Example response
9372
+ * // {
9373
+ * // "category": "my_category",
9374
+ * // "createTime": "my_createTime",
9375
+ * // "eventTime": "my_eventTime",
9376
+ * // "externalUri": "my_externalUri",
9377
+ * // "name": "my_name",
9378
+ * // "parent": "my_parent",
9379
+ * // "resourceName": "my_resourceName",
9380
+ * // "securityMarks": {},
9381
+ * // "sourceProperties": {},
9382
+ * // "state": "my_state"
9383
+ * // }
9384
+ * }
9385
+ *
9386
+ * main().catch(e => {
9387
+ * console.error(e);
9388
+ * throw e;
9389
+ * });
9390
+ *
9391
+ * ```
7861
9392
  *
7862
9393
  * @param params - Parameters for request
7863
9394
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7867,11 +9398,13 @@ export namespace securitycenter_v1beta1 {
7867
9398
  setState(
7868
9399
  params: Params$Resource$Organizations$Sources$Findings$Setstate,
7869
9400
  options: StreamMethodOptions
7870
- ): GaxiosPromise<Readable>;
9401
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7871
9402
  setState(
7872
9403
  params?: Params$Resource$Organizations$Sources$Findings$Setstate,
7873
9404
  options?: MethodOptions
7874
- ): GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1Finding>;
9405
+ ): Promise<
9406
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1Finding>
9407
+ >;
7875
9408
  setState(
7876
9409
  params: Params$Resource$Organizations$Sources$Findings$Setstate,
7877
9410
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -7906,8 +9439,10 @@ export namespace securitycenter_v1beta1 {
7906
9439
  | BodyResponseCallback<Readable>
7907
9440
  ):
7908
9441
  | void
7909
- | GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1Finding>
7910
- | GaxiosPromise<Readable> {
9442
+ | Promise<
9443
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1Finding>
9444
+ >
9445
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7911
9446
  let params = (paramsOrCallback ||
7912
9447
  {}) as Params$Resource$Organizations$Sources$Findings$Setstate;
7913
9448
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -7956,6 +9491,67 @@ export namespace securitycenter_v1beta1 {
7956
9491
 
7957
9492
  /**
7958
9493
  * Updates security marks.
9494
+ * @example
9495
+ * ```js
9496
+ * // Before running the sample:
9497
+ * // - Enable the API at:
9498
+ * // https://console.developers.google.com/apis/api/securitycenter.googleapis.com
9499
+ * // - Login into gcloud by running:
9500
+ * // ```sh
9501
+ * // $ gcloud auth application-default login
9502
+ * // ```
9503
+ * // - Install the npm module by running:
9504
+ * // ```sh
9505
+ * // $ npm install googleapis
9506
+ * // ```
9507
+ *
9508
+ * const {google} = require('googleapis');
9509
+ * const securitycenter = google.securitycenter('v1beta1');
9510
+ *
9511
+ * async function main() {
9512
+ * const auth = new google.auth.GoogleAuth({
9513
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9514
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9515
+ * });
9516
+ *
9517
+ * // Acquire an auth client, and bind it to all future calls
9518
+ * const authClient = await auth.getClient();
9519
+ * google.options({auth: authClient});
9520
+ *
9521
+ * // Do the magic
9522
+ * const res =
9523
+ * await securitycenter.organizations.sources.findings.updateSecurityMarks({
9524
+ * // The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id\}/assets/{asset_id\}/securityMarks" "organizations/{organization_id\}/sources/{source_id\}/findings/{finding_id\}/securityMarks".
9525
+ * name: 'organizations/my-organization/sources/my-source/findings/my-finding/securityMarks',
9526
+ * // The time at which the updated SecurityMarks take effect.
9527
+ * startTime: 'placeholder-value',
9528
+ * // The FieldMask to use when updating the security marks resource.
9529
+ * updateMask: 'placeholder-value',
9530
+ *
9531
+ * // Request body metadata
9532
+ * requestBody: {
9533
+ * // request body parameters
9534
+ * // {
9535
+ * // "marks": {},
9536
+ * // "name": "my_name"
9537
+ * // }
9538
+ * },
9539
+ * });
9540
+ * console.log(res.data);
9541
+ *
9542
+ * // Example response
9543
+ * // {
9544
+ * // "marks": {},
9545
+ * // "name": "my_name"
9546
+ * // }
9547
+ * }
9548
+ *
9549
+ * main().catch(e => {
9550
+ * console.error(e);
9551
+ * throw e;
9552
+ * });
9553
+ *
9554
+ * ```
7959
9555
  *
7960
9556
  * @param params - Parameters for request
7961
9557
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -7965,11 +9561,13 @@ export namespace securitycenter_v1beta1 {
7965
9561
  updateSecurityMarks(
7966
9562
  params: Params$Resource$Organizations$Sources$Findings$Updatesecuritymarks,
7967
9563
  options: StreamMethodOptions
7968
- ): GaxiosPromise<Readable>;
9564
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7969
9565
  updateSecurityMarks(
7970
9566
  params?: Params$Resource$Organizations$Sources$Findings$Updatesecuritymarks,
7971
9567
  options?: MethodOptions
7972
- ): GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>;
9568
+ ): Promise<
9569
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>
9570
+ >;
7973
9571
  updateSecurityMarks(
7974
9572
  params: Params$Resource$Organizations$Sources$Findings$Updatesecuritymarks,
7975
9573
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -8004,8 +9602,10 @@ export namespace securitycenter_v1beta1 {
8004
9602
  | BodyResponseCallback<Readable>
8005
9603
  ):
8006
9604
  | void
8007
- | GaxiosPromise<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>
8008
- | GaxiosPromise<Readable> {
9605
+ | Promise<
9606
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudSecuritycenterV1beta1SecurityMarks>
9607
+ >
9608
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
8009
9609
  let params = (paramsOrCallback ||
8010
9610
  {}) as Params$Resource$Organizations$Sources$Findings$Updatesecuritymarks;
8011
9611
  let options = (optionsOrCallback || {}) as MethodOptions;