update apis (#174)
* download latest
* regenerate and update changelog
diff --git a/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart b/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart
index 77886b7..50949b3 100644
--- a/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart
+++ b/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart
@@ -7140,6 +7140,9 @@
/// for more information.
/// - "VENDOR_DOMAIN" : Indicates that the detail string refers the domain of
/// an unknown vendor.
+ /// - "GVL_ID" : Indicates that the detail ID refers an IAB GVL ID which
+ /// Google did not detect in the latest TCF Vendor List. See
+ /// [Global Vendor List](https://vendor-list.consensu.org/v2/vendor-list.json)
core.String detailType;
/// List of rows, with counts of bids with a given creative status aggregated
diff --git a/generated/googleapis_beta/lib/analyticsadmin/v1alpha.dart b/generated/googleapis_beta/lib/analyticsadmin/v1alpha.dart
index 5b8a8bd..a34e455 100644
--- a/generated/googleapis_beta/lib/analyticsadmin/v1alpha.dart
+++ b/generated/googleapis_beta/lib/analyticsadmin/v1alpha.dart
@@ -334,9 +334,10 @@
/// accounts/{account} Example: "accounts/100"
/// Value must have pattern `^accounts/\[^/\]+$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -1137,9 +1138,10 @@
/// properties/{property_id} Example: "properties/1000"
/// Value must have pattern `^properties/\[^/\]+$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -1397,9 +1399,10 @@
/// Value must have pattern
/// `^properties/\[^/\]+/androidAppDataStreams/\[^/\]+$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -1604,9 +1607,10 @@
/// [name] - Output only. Example format: properties/1234/firebaseLinks/5678
/// Value must have pattern `^properties/\[^/\]+/firebaseLinks/\[^/\]+$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -1804,9 +1808,10 @@
/// googleAdsLinkId is not the Google Ads customer ID.
/// Value must have pattern `^properties/\[^/\]+/googleAdsLinks/\[^/\]+$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -2059,9 +2064,10 @@
/// "properties/1000/iosAppDataStreams/2000"
/// Value must have pattern `^properties/\[^/\]+/iosAppDataStreams/\[^/\]+$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -2898,9 +2904,10 @@
/// "properties/1000/webDataStreams/2000"
/// Value must have pattern `^properties/\[^/\]+/webDataStreams/\[^/\]+$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -2955,9 +2962,10 @@
/// Value must have pattern
/// `^properties/\[^/\]+/webDataStreams/\[^/\]+/enhancedMeasurementSettings$`.
///
- /// [updateMask] - Required. The list of fields to be updated. Omitted fields
- /// will not be updated. To replace the entire entity, use one path with the
- /// string "*" to match all fields.
+ /// [updateMask] - Required. The list of fields to be updated. Field names
+ /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
+ /// be updated. To replace the entire entity, use one path with the string "*"
+ /// to match all fields.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
diff --git a/generated/googleapis_beta/lib/documentai/v1beta3.dart b/generated/googleapis_beta/lib/documentai/v1beta3.dart
index d570753..5508951 100644
--- a/generated/googleapis_beta/lib/documentai/v1beta3.dart
+++ b/generated/googleapis_beta/lib/documentai/v1beta3.dart
@@ -1152,15 +1152,15 @@
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : Human review state is unspecified. Most likely due
/// to an internal error.
- /// - "HUMAN_REVIEW_SKIPPED" : Human review is skipped for the document. This
- /// can happen because human review is not enabled on the processor or the
- /// processing request has been set to skip this document.
- /// - "HUMAN_REVIEW_VALIDATION_PASSED" : Human review validation is triggered
- /// and passed, so no review is needed.
- /// - "HUMAN_REVIEW_IN_PROGRESS" : Human review validation is triggered and
- /// the document is under review.
- /// - "HUMAN_REVIEW_ERROR" : Some error happened during triggering human
- /// review, see the \[state_message\] for details.
+ /// - "SKIPPED" : Human review is skipped for the document. This can happen
+ /// because human review is not enabled on the processor or the processing
+ /// request has been set to skip this document.
+ /// - "VALIDATION_PASSED" : Human review validation is triggered and passed,
+ /// so no review is needed.
+ /// - "IN_PROGRESS" : Human review validation is triggered and the document is
+ /// under review.
+ /// - "ERROR" : Some error happened during triggering human review, see the
+ /// \[state_message\] for details.
core.String state;
/// A message providing more details about the human review state.
@@ -1597,6 +1597,11 @@
/// https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
GoogleTypePostalAddress addressValue;
+ /// Boolean value.
+ ///
+ /// Can be used for entities with binary values, or for checkboxes.
+ core.bool booleanValue;
+
/// Date value.
///
/// Includes year, month, day. See also:
@@ -1634,6 +1639,9 @@
addressValue = GoogleTypePostalAddress.fromJson(
_json['addressValue'] as core.Map<core.String, core.dynamic>);
}
+ if (_json.containsKey('booleanValue')) {
+ booleanValue = _json['booleanValue'] as core.bool;
+ }
if (_json.containsKey('dateValue')) {
dateValue = GoogleTypeDate.fromJson(
_json['dateValue'] as core.Map<core.String, core.dynamic>);
@@ -1653,6 +1661,7 @@
core.Map<core.String, core.Object> toJson() => {
if (addressValue != null) 'addressValue': addressValue.toJson(),
+ if (booleanValue != null) 'booleanValue': booleanValue,
if (dateValue != null) 'dateValue': dateValue.toJson(),
if (datetimeValue != null) 'datetimeValue': datetimeValue.toJson(),
if (moneyValue != null) 'moneyValue': moneyValue.toJson(),
@@ -3707,6 +3716,11 @@
/// https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
GoogleTypePostalAddress addressValue;
+ /// Boolean value.
+ ///
+ /// Can be used for entities with binary values, or for checkboxes.
+ core.bool booleanValue;
+
/// Date value.
///
/// Includes year, month, day. See also:
@@ -3744,6 +3758,9 @@
addressValue = GoogleTypePostalAddress.fromJson(
_json['addressValue'] as core.Map<core.String, core.dynamic>);
}
+ if (_json.containsKey('booleanValue')) {
+ booleanValue = _json['booleanValue'] as core.bool;
+ }
if (_json.containsKey('dateValue')) {
dateValue = GoogleTypeDate.fromJson(
_json['dateValue'] as core.Map<core.String, core.dynamic>);
@@ -3763,6 +3780,7 @@
core.Map<core.String, core.Object> toJson() => {
if (addressValue != null) 'addressValue': addressValue.toJson(),
+ if (booleanValue != null) 'booleanValue': booleanValue,
if (dateValue != null) 'dateValue': dateValue.toJson(),
if (datetimeValue != null) 'datetimeValue': datetimeValue.toJson(),
if (moneyValue != null) 'moneyValue': moneyValue.toJson(),
@@ -5494,6 +5512,35 @@
};
}
+/// The common config to specify a set of documents used as input.
+class GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig {
+ /// The set of documents individually specified on Cloud Storage.
+ GoogleCloudDocumentaiV1beta3GcsDocuments gcsDocuments;
+
+ /// The set of documents that match the specified Cloud Storage
+ /// \[gcs_prefix\].
+ GoogleCloudDocumentaiV1beta3GcsPrefix gcsPrefix;
+
+ GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig();
+
+ GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig.fromJson(
+ core.Map _json) {
+ if (_json.containsKey('gcsDocuments')) {
+ gcsDocuments = GoogleCloudDocumentaiV1beta3GcsDocuments.fromJson(
+ _json['gcsDocuments'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('gcsPrefix')) {
+ gcsPrefix = GoogleCloudDocumentaiV1beta3GcsPrefix.fromJson(
+ _json['gcsPrefix'] as core.Map<core.String, core.dynamic>);
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (gcsDocuments != null) 'gcsDocuments': gcsDocuments.toJson(),
+ if (gcsPrefix != null) 'gcsPrefix': gcsPrefix.toJson(),
+ };
+}
+
/// The long running operation metadata for batch process method.
class GoogleCloudDocumentaiV1beta3BatchProcessMetadata {
/// The creation time of the operation.
@@ -5634,8 +5681,7 @@
inputConfigs;
/// The input documents for batch process.
- GoogleCloudDocumentaiV1beta3BatchProcessRequestBatchInputConfig
- inputDocuments;
+ GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig inputDocuments;
/// The overall output config for batch process.
GoogleCloudDocumentaiV1beta3BatchProcessRequestBatchOutputConfig outputConfig;
@@ -5664,9 +5710,8 @@
}
if (_json.containsKey('inputDocuments')) {
inputDocuments =
- GoogleCloudDocumentaiV1beta3BatchProcessRequestBatchInputConfig
- .fromJson(_json['inputDocuments']
- as core.Map<core.String, core.dynamic>);
+ GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig.fromJson(
+ _json['inputDocuments'] as core.Map<core.String, core.dynamic>);
}
if (_json.containsKey('outputConfig')) {
outputConfig =
@@ -6141,6 +6186,11 @@
/// https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
GoogleTypePostalAddress addressValue;
+ /// Boolean value.
+ ///
+ /// Can be used for entities with binary values, or for checkboxes.
+ core.bool booleanValue;
+
/// Date value.
///
/// Includes year, month, day. See also:
@@ -6178,6 +6228,9 @@
addressValue = GoogleTypePostalAddress.fromJson(
_json['addressValue'] as core.Map<core.String, core.dynamic>);
}
+ if (_json.containsKey('booleanValue')) {
+ booleanValue = _json['booleanValue'] as core.bool;
+ }
if (_json.containsKey('dateValue')) {
dateValue = GoogleTypeDate.fromJson(
_json['dateValue'] as core.Map<core.String, core.dynamic>);
@@ -6197,6 +6250,7 @@
core.Map<core.String, core.Object> toJson() => {
if (addressValue != null) 'addressValue': addressValue.toJson(),
+ if (booleanValue != null) 'booleanValue': booleanValue,
if (dateValue != null) 'dateValue': dateValue.toJson(),
if (datetimeValue != null) 'datetimeValue': datetimeValue.toJson(),
if (moneyValue != null) 'moneyValue': moneyValue.toJson(),
@@ -7672,6 +7726,72 @@
};
}
+/// Specifies a document stored on Cloud Storage.
+class GoogleCloudDocumentaiV1beta3GcsDocument {
+ /// The Cloud Storage object uri.
+ core.String gcsUri;
+
+ /// An IANA MIME type (RFC6838) of the content.
+ core.String mimeType;
+
+ GoogleCloudDocumentaiV1beta3GcsDocument();
+
+ GoogleCloudDocumentaiV1beta3GcsDocument.fromJson(core.Map _json) {
+ if (_json.containsKey('gcsUri')) {
+ gcsUri = _json['gcsUri'] as core.String;
+ }
+ if (_json.containsKey('mimeType')) {
+ mimeType = _json['mimeType'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (gcsUri != null) 'gcsUri': gcsUri,
+ if (mimeType != null) 'mimeType': mimeType,
+ };
+}
+
+/// Specifies a set of documents on Cloud Storage.
+class GoogleCloudDocumentaiV1beta3GcsDocuments {
+ /// The list of documents.
+ core.List<GoogleCloudDocumentaiV1beta3GcsDocument> documents;
+
+ GoogleCloudDocumentaiV1beta3GcsDocuments();
+
+ GoogleCloudDocumentaiV1beta3GcsDocuments.fromJson(core.Map _json) {
+ if (_json.containsKey('documents')) {
+ documents = (_json['documents'] as core.List)
+ .map<GoogleCloudDocumentaiV1beta3GcsDocument>((value) =>
+ GoogleCloudDocumentaiV1beta3GcsDocument.fromJson(
+ value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (documents != null)
+ 'documents': documents.map((value) => value.toJson()).toList(),
+ };
+}
+
+/// Specifies all documents on Cloud Storage with a common prefix.
+class GoogleCloudDocumentaiV1beta3GcsPrefix {
+ /// The URI prefix.
+ core.String gcsUriPrefix;
+
+ GoogleCloudDocumentaiV1beta3GcsPrefix();
+
+ GoogleCloudDocumentaiV1beta3GcsPrefix.fromJson(core.Map _json) {
+ if (_json.containsKey('gcsUriPrefix')) {
+ gcsUriPrefix = _json['gcsUriPrefix'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (gcsUriPrefix != null) 'gcsUriPrefix': gcsUriPrefix,
+ };
+}
+
/// The status of human review on a processed document.
class GoogleCloudDocumentaiV1beta3HumanReviewStatus {
/// The name of the operation triggered by the processed document.
@@ -7685,15 +7805,15 @@
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : Human review state is unspecified. Most likely due
/// to an internal error.
- /// - "HUMAN_REVIEW_SKIPPED" : Human review is skipped for the document. This
- /// can happen because human review is not enabled on the processor or the
- /// processing request has been set to skip this document.
- /// - "HUMAN_REVIEW_VALIDATION_PASSED" : Human review validation is triggered
- /// and passed, so no review is needed.
- /// - "HUMAN_REVIEW_IN_PROGRESS" : Human review validation is triggered and
- /// the document is under review.
- /// - "HUMAN_REVIEW_ERROR" : Some error happened during triggering human
- /// review, see the \[state_message\] for details.
+ /// - "SKIPPED" : Human review is skipped for the document. This can happen
+ /// because human review is not enabled on the processor or the processing
+ /// request has been set to skip this document.
+ /// - "VALIDATION_PASSED" : Human review validation is triggered and passed,
+ /// so no review is needed.
+ /// - "IN_PROGRESS" : Human review validation is triggered and the document is
+ /// under review.
+ /// - "ERROR" : Some error happened during triggering human review, see the
+ /// \[state_message\] for details.
core.String state;
/// A message providing more details about the human review state.
diff --git a/generated/googleapis_beta/lib/ondemandscanning/v1beta1.dart b/generated/googleapis_beta/lib/ondemandscanning/v1beta1.dart
new file mode 100644
index 0000000..037cd1e
--- /dev/null
+++ b/generated/googleapis_beta/lib/ondemandscanning/v1beta1.dart
@@ -0,0 +1,2614 @@
+// This is a generated file (see the discoveryapis_generator project).
+
+// ignore_for_file: camel_case_types
+// ignore_for_file: comment_references
+// ignore_for_file: file_names
+// ignore_for_file: library_names
+// ignore_for_file: lines_longer_than_80_chars
+// ignore_for_file: non_constant_identifier_names
+// ignore_for_file: prefer_expression_function_bodies
+// ignore_for_file: prefer_interpolation_to_compose_strings
+// ignore_for_file: unnecessary_brace_in_string_interps
+// ignore_for_file: unnecessary_cast
+// ignore_for_file: unnecessary_lambdas
+// ignore_for_file: unnecessary_parenthesis
+// ignore_for_file: unnecessary_string_interpolations
+
+/// On-Demand Scanning API - v1beta1
+///
+/// A service to scan container images for vulnerabilities.
+///
+/// For more information, see
+/// <https://cloud.google.com/container-analysis/docs/on-demand-scanning/>
+///
+/// Create an instance of [OnDemandScanningApi] to access these resources:
+///
+/// - [ProjectsResource]
+/// - [ProjectsLocationsResource]
+/// - [ProjectsLocationsOperationsResource]
+/// - [ProjectsLocationsScansResource]
+/// - [ProjectsLocationsScansVulnerabilitiesResource]
+library ondemandscanning.v1beta1;
+
+import 'dart:async' as async;
+import 'dart:convert' as convert;
+import 'dart:core' as core;
+
+import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
+import 'package:http/http.dart' as http;
+
+import '../src/user_agent.dart';
+
+export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
+ show ApiRequestError, DetailedApiRequestError;
+
+/// A service to scan container images for vulnerabilities.
+class OnDemandScanningApi {
+ /// View and manage your data across Google Cloud Platform services
+ static const cloudPlatformScope =
+ 'https://www.googleapis.com/auth/cloud-platform';
+
+ final commons.ApiRequester _requester;
+
+ ProjectsResource get projects => ProjectsResource(_requester);
+
+ OnDemandScanningApi(http.Client client,
+ {core.String rootUrl = 'https://ondemandscanning.googleapis.com/',
+ core.String servicePath = ''})
+ : _requester =
+ commons.ApiRequester(client, rootUrl, servicePath, userAgent);
+}
+
+class ProjectsResource {
+ final commons.ApiRequester _requester;
+
+ ProjectsLocationsResource get locations =>
+ ProjectsLocationsResource(_requester);
+
+ ProjectsResource(commons.ApiRequester client) : _requester = client;
+}
+
+class ProjectsLocationsResource {
+ final commons.ApiRequester _requester;
+
+ ProjectsLocationsOperationsResource get operations =>
+ ProjectsLocationsOperationsResource(_requester);
+ ProjectsLocationsScansResource get scans =>
+ ProjectsLocationsScansResource(_requester);
+
+ ProjectsLocationsResource(commons.ApiRequester client) : _requester = client;
+}
+
+class ProjectsLocationsOperationsResource {
+ final commons.ApiRequester _requester;
+
+ ProjectsLocationsOperationsResource(commons.ApiRequester client)
+ : _requester = client;
+
+ /// 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`.
+ ///
+ /// Request parameters:
+ ///
+ /// [name] - The name of the operation resource to be cancelled.
+ /// Value must have pattern
+ /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
+ ///
+ /// [$fields] - Selector specifying which fields to include in a partial
+ /// response.
+ ///
+ /// Completes with a [Empty].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
+ /// error.
+ ///
+ /// If the used [http.Client] completes with an error when making a REST call,
+ /// this method will complete with the same error.
+ async.Future<Empty> cancel(
+ core.String name, {
+ core.String $fields,
+ }) async {
+ if (name == null) {
+ throw core.ArgumentError('Parameter name is required.');
+ }
+ final _queryParams = <core.String, core.List<core.String>>{
+ if ($fields != null) 'fields': [$fields],
+ };
+
+ final _url =
+ 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel';
+
+ final _response = await _requester.request(
+ _url,
+ 'POST',
+ queryParams: _queryParams,
+ );
+ return Empty.fromJson(_response as core.Map<core.String, core.dynamic>);
+ }
+
+ /// 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`.
+ ///
+ /// Request parameters:
+ ///
+ /// [name] - The name of the operation resource to be deleted.
+ /// Value must have pattern
+ /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
+ ///
+ /// [$fields] - Selector specifying which fields to include in a partial
+ /// response.
+ ///
+ /// Completes with a [Empty].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
+ /// error.
+ ///
+ /// If the used [http.Client] completes with an error when making a REST call,
+ /// this method will complete with the same error.
+ async.Future<Empty> delete(
+ core.String name, {
+ core.String $fields,
+ }) async {
+ if (name == null) {
+ throw core.ArgumentError('Parameter name is required.');
+ }
+ final _queryParams = <core.String, core.List<core.String>>{
+ if ($fields != null) 'fields': [$fields],
+ };
+
+ final _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
+
+ final _response = await _requester.request(
+ _url,
+ 'DELETE',
+ queryParams: _queryParams,
+ );
+ return Empty.fromJson(_response as core.Map<core.String, core.dynamic>);
+ }
+
+ /// 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.
+ ///
+ /// Request parameters:
+ ///
+ /// [name] - The name of the operation resource.
+ /// Value must have pattern
+ /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
+ ///
+ /// [$fields] - Selector specifying which fields to include in a partial
+ /// response.
+ ///
+ /// Completes with a [Operation].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
+ /// error.
+ ///
+ /// If the used [http.Client] completes with an error when making a REST call,
+ /// this method will complete with the same error.
+ async.Future<Operation> get(
+ core.String name, {
+ core.String $fields,
+ }) async {
+ if (name == null) {
+ throw core.ArgumentError('Parameter name is required.');
+ }
+ final _queryParams = <core.String, core.List<core.String>>{
+ if ($fields != null) 'fields': [$fields],
+ };
+
+ final _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name');
+
+ final _response = await _requester.request(
+ _url,
+ 'GET',
+ queryParams: _queryParams,
+ );
+ return Operation.fromJson(_response as core.Map<core.String, core.dynamic>);
+ }
+
+ /// Lists operations that match the specified filter in the request.
+ ///
+ /// If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ /// NOTE: the `name` binding allows API services to override the binding to
+ /// use different resource name schemes, such as `users / * /operations`. To
+ /// override the binding, API services can add a binding such as
+ /// `"/v1/{name=users / * }/operations"` to their service configuration. For
+ /// backwards compatibility, the default name includes the operations
+ /// collection id, however overriding users must ensure the name binding is
+ /// the parent resource, without the operations collection id.
+ ///
+ /// Request parameters:
+ ///
+ /// [name] - The name of the operation's parent resource.
+ /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
+ ///
+ /// [filter] - The standard list filter.
+ ///
+ /// [pageSize] - The standard list page size.
+ ///
+ /// [pageToken] - The standard list page token.
+ ///
+ /// [$fields] - Selector specifying which fields to include in a partial
+ /// response.
+ ///
+ /// Completes with a [ListOperationsResponse].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
+ /// error.
+ ///
+ /// If the used [http.Client] completes with an error when making a REST call,
+ /// this method will complete with the same error.
+ async.Future<ListOperationsResponse> list(
+ core.String name, {
+ core.String filter,
+ core.int pageSize,
+ core.String pageToken,
+ core.String $fields,
+ }) async {
+ if (name == null) {
+ throw core.ArgumentError('Parameter name is required.');
+ }
+ final _queryParams = <core.String, core.List<core.String>>{
+ if (filter != null) 'filter': [filter],
+ if (pageSize != null) 'pageSize': ['${pageSize}'],
+ if (pageToken != null) 'pageToken': [pageToken],
+ if ($fields != null) 'fields': [$fields],
+ };
+
+ final _url = 'v1beta1/' +
+ commons.Escaper.ecapeVariableReserved('$name') +
+ '/operations';
+
+ final _response = await _requester.request(
+ _url,
+ 'GET',
+ queryParams: _queryParams,
+ );
+ return ListOperationsResponse.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
+ }
+
+ /// Waits until the specified long-running operation is done or reaches at
+ /// most a specified timeout, returning the latest state.
+ ///
+ /// If the operation is already done, the latest state is immediately
+ /// returned. If the timeout specified is greater than the default HTTP/RPC
+ /// timeout, the HTTP/RPC timeout is used. If the server does not support this
+ /// method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method
+ /// is on a best-effort basis. It may return the latest state before the
+ /// specified timeout (including immediately), meaning even an immediate
+ /// response is no guarantee that the operation is done.
+ ///
+ /// Request parameters:
+ ///
+ /// [name] - The name of the operation resource to wait on.
+ /// Value must have pattern
+ /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
+ ///
+ /// [timeout] - The maximum duration to wait before timing out. If left blank,
+ /// the wait will be at most the time permitted by the underlying HTTP/RPC
+ /// protocol. If RPC context deadline is also specified, the shorter one will
+ /// be used.
+ ///
+ /// [$fields] - Selector specifying which fields to include in a partial
+ /// response.
+ ///
+ /// Completes with a [Operation].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
+ /// error.
+ ///
+ /// If the used [http.Client] completes with an error when making a REST call,
+ /// this method will complete with the same error.
+ async.Future<Operation> wait(
+ core.String name, {
+ core.String timeout,
+ core.String $fields,
+ }) async {
+ if (name == null) {
+ throw core.ArgumentError('Parameter name is required.');
+ }
+ final _queryParams = <core.String, core.List<core.String>>{
+ if (timeout != null) 'timeout': [timeout],
+ if ($fields != null) 'fields': [$fields],
+ };
+
+ final _url =
+ 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':wait';
+
+ final _response = await _requester.request(
+ _url,
+ 'POST',
+ queryParams: _queryParams,
+ );
+ return Operation.fromJson(_response as core.Map<core.String, core.dynamic>);
+ }
+}
+
+class ProjectsLocationsScansResource {
+ final commons.ApiRequester _requester;
+
+ ProjectsLocationsScansVulnerabilitiesResource get vulnerabilities =>
+ ProjectsLocationsScansVulnerabilitiesResource(_requester);
+
+ ProjectsLocationsScansResource(commons.ApiRequester client)
+ : _requester = client;
+
+ /// Initiates an analysis of the provided packages.
+ ///
+ /// [request] - The metadata request object.
+ ///
+ /// Request parameters:
+ ///
+ /// [parent] - Required. The parent of the resource for which analysis is
+ /// requested. Format: projects/\[project_name\]/locations/\[location\]
+ /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
+ ///
+ /// [$fields] - Selector specifying which fields to include in a partial
+ /// response.
+ ///
+ /// Completes with a [Operation].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
+ /// error.
+ ///
+ /// If the used [http.Client] completes with an error when making a REST call,
+ /// this method will complete with the same error.
+ async.Future<Operation> analyzePackages(
+ AnalyzePackagesRequest request,
+ core.String parent, {
+ core.String $fields,
+ }) async {
+ final _body =
+ request == null ? null : convert.json.encode(request.toJson());
+ if (parent == null) {
+ throw core.ArgumentError('Parameter parent is required.');
+ }
+ final _queryParams = <core.String, core.List<core.String>>{
+ if ($fields != null) 'fields': [$fields],
+ };
+
+ final _url = 'v1beta1/' +
+ commons.Escaper.ecapeVariableReserved('$parent') +
+ '/scans:analyzePackages';
+
+ final _response = await _requester.request(
+ _url,
+ 'POST',
+ body: _body,
+ queryParams: _queryParams,
+ );
+ return Operation.fromJson(_response as core.Map<core.String, core.dynamic>);
+ }
+}
+
+class ProjectsLocationsScansVulnerabilitiesResource {
+ final commons.ApiRequester _requester;
+
+ ProjectsLocationsScansVulnerabilitiesResource(commons.ApiRequester client)
+ : _requester = client;
+
+ /// Lists vulnerabilities resulting from a successfully completed scan.
+ ///
+ /// Request parameters:
+ ///
+ /// [parent] - Required. The parent of the collection of Vulnerabilities being
+ /// requested. Format:
+ /// projects/\[project_name\]/locations/\[location\]/scans/\[scan_id\]
+ /// Value must have pattern
+ /// `^projects/\[^/\]+/locations/\[^/\]+/scans/\[^/\]+$`.
+ ///
+ /// [pageSize] - The number of vulnerabilities to retrieve.
+ ///
+ /// [pageToken] - The page token, resulting from a previous call to
+ /// ListVulnerabilities.
+ ///
+ /// [$fields] - Selector specifying which fields to include in a partial
+ /// response.
+ ///
+ /// Completes with a [ListVulnerabilitiesResponse].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
+ /// error.
+ ///
+ /// If the used [http.Client] completes with an error when making a REST call,
+ /// this method will complete with the same error.
+ async.Future<ListVulnerabilitiesResponse> list(
+ core.String parent, {
+ core.int pageSize,
+ core.String pageToken,
+ core.String $fields,
+ }) async {
+ if (parent == null) {
+ throw core.ArgumentError('Parameter parent is required.');
+ }
+ final _queryParams = <core.String, core.List<core.String>>{
+ if (pageSize != null) 'pageSize': ['${pageSize}'],
+ if (pageToken != null) 'pageToken': [pageToken],
+ if ($fields != null) 'fields': [$fields],
+ };
+
+ final _url = 'v1beta1/' +
+ commons.Escaper.ecapeVariableReserved('$parent') +
+ '/vulnerabilities';
+
+ final _response = await _requester.request(
+ _url,
+ 'GET',
+ queryParams: _queryParams,
+ );
+ return ListVulnerabilitiesResponse.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
+ }
+}
+
+/// An alias to a repo revision.
+class AliasContext {
+ /// The alias kind.
+ /// Possible string values are:
+ /// - "KIND_UNSPECIFIED" : Unknown.
+ /// - "FIXED" : Git tag.
+ /// - "MOVABLE" : Git branch.
+ /// - "OTHER" : Used to specify non-standard aliases. For example, if a Git
+ /// repo has a ref named "refs/foo/bar".
+ core.String kind;
+
+ /// The alias name.
+ core.String name;
+
+ AliasContext();
+
+ AliasContext.fromJson(core.Map _json) {
+ if (_json.containsKey('kind')) {
+ kind = _json['kind'] as core.String;
+ }
+ if (_json.containsKey('name')) {
+ name = _json['name'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (kind != null) 'kind': kind,
+ if (name != null) 'name': name,
+ };
+}
+
+/// AnalyzePackagesMetadata contains metadata for an active scan of a container
+/// image.
+class AnalyzePackagesMetadata {
+ /// When the scan was created.
+ core.String createTime;
+
+ /// The resource URI of the container image being scanned.
+ core.String resourceUri;
+
+ AnalyzePackagesMetadata();
+
+ AnalyzePackagesMetadata.fromJson(core.Map _json) {
+ if (_json.containsKey('createTime')) {
+ createTime = _json['createTime'] as core.String;
+ }
+ if (_json.containsKey('resourceUri')) {
+ resourceUri = _json['resourceUri'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (createTime != null) 'createTime': createTime,
+ if (resourceUri != null) 'resourceUri': resourceUri,
+ };
+}
+
+/// AnalyzePackagesRequest is the request to analyze a list of packages and
+/// create Vulnerability Occurrences for it.
+class AnalyzePackagesRequest {
+ /// The packages to analyze.
+ core.List<PackageData> packages;
+
+ /// The resource URI of the container image being scanned.
+ ///
+ /// Required.
+ core.String resourceUri;
+
+ AnalyzePackagesRequest();
+
+ AnalyzePackagesRequest.fromJson(core.Map _json) {
+ if (_json.containsKey('packages')) {
+ packages = (_json['packages'] as core.List)
+ .map<PackageData>((value) => PackageData.fromJson(
+ value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('resourceUri')) {
+ resourceUri = _json['resourceUri'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (packages != null)
+ 'packages': packages.map((value) => value.toJson()).toList(),
+ if (resourceUri != null) 'resourceUri': resourceUri,
+ };
+}
+
+/// AnalyzePackagesResponse contains the information necessary to find results
+/// for the given scan.
+class AnalyzePackagesResponse {
+ /// The name of the scan resource created by this successful scan.
+ core.String scan;
+
+ AnalyzePackagesResponse();
+
+ AnalyzePackagesResponse.fromJson(core.Map _json) {
+ if (_json.containsKey('scan')) {
+ scan = _json['scan'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (scan != null) 'scan': scan,
+ };
+}
+
+/// Artifact describes a build product.
+class Artifact {
+ /// Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
+ /// container.
+ core.String checksum;
+
+ /// Artifact ID, if any; for container images, this will be a URL by digest
+ /// like `gcr.io/projectID/imagename@sha256:123456`.
+ core.String id;
+
+ /// Related artifact names.
+ ///
+ /// This may be the path to a binary or jar file, or in the case of a
+ /// container build, the name used to push the container image to Google
+ /// Container Registry, as presented to `docker push`. Note that a single
+ /// Artifact ID can have multiple names, for example if two tags are applied
+ /// to one image.
+ core.List<core.String> names;
+
+ Artifact();
+
+ Artifact.fromJson(core.Map _json) {
+ if (_json.containsKey('checksum')) {
+ checksum = _json['checksum'] as core.String;
+ }
+ if (_json.containsKey('id')) {
+ id = _json['id'] as core.String;
+ }
+ if (_json.containsKey('names')) {
+ names = (_json['names'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (checksum != null) 'checksum': checksum,
+ if (id != null) 'id': id,
+ if (names != null) 'names': names,
+ };
+}
+
+/// Occurrence that represents a single "attestation".
+///
+/// The authenticity of an attestation can be verified using the attached
+/// signature. If the verifier trusts the public key of the signer, then
+/// verifying the signature is sufficient to establish trust. In this
+/// circumstance, the authority to which this attestation is attached is
+/// primarily useful for lookup (how to find this attestation if you already
+/// know the authority and artifact to be verified) and intent (for which
+/// authority this attestation was intended to sign.
+class AttestationOccurrence {
+ /// One or more JWTs encoding a self-contained attestation.
+ ///
+ /// Each JWT encodes the payload that it verifies within the JWT itself.
+ /// Verifier implementation SHOULD ignore the `serialized_payload` field when
+ /// verifying these JWTs. If only JWTs are present on this
+ /// AttestationOccurrence, then the `serialized_payload` SHOULD be left empty.
+ /// Each JWT SHOULD encode a claim specific to the `resource_uri` of this
+ /// Occurrence, but this is not validated by Grafeas metadata API
+ /// implementations. The JWT itself is opaque to Grafeas.
+ core.List<Jwt> jwts;
+
+ /// The serialized payload that is verified by one or more `signatures`.
+ ///
+ /// Required.
+ core.String serializedPayload;
+ core.List<core.int> get serializedPayloadAsBytes =>
+ convert.base64.decode(serializedPayload);
+
+ set serializedPayloadAsBytes(core.List<core.int> _bytes) {
+ serializedPayload =
+ convert.base64.encode(_bytes).replaceAll('/', '_').replaceAll('+', '-');
+ }
+
+ /// One or more signatures over `serialized_payload`.
+ ///
+ /// Verifier implementations should consider this attestation message verified
+ /// if at least one `signature` verifies `serialized_payload`. See `Signature`
+ /// in common.proto for more details on signature structure and verification.
+ core.List<Signature> signatures;
+
+ AttestationOccurrence();
+
+ AttestationOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('jwts')) {
+ jwts = (_json['jwts'] as core.List)
+ .map<Jwt>((value) =>
+ Jwt.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('serializedPayload')) {
+ serializedPayload = _json['serializedPayload'] as core.String;
+ }
+ if (_json.containsKey('signatures')) {
+ signatures = (_json['signatures'] as core.List)
+ .map<Signature>((value) =>
+ Signature.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (jwts != null) 'jwts': jwts.map((value) => value.toJson()).toList(),
+ if (serializedPayload != null) 'serializedPayload': serializedPayload,
+ if (signatures != null)
+ 'signatures': signatures.map((value) => value.toJson()).toList(),
+ };
+}
+
+/// Details of a build occurrence.
+class BuildOccurrence {
+ /// The actual provenance for the build.
+ ///
+ /// Required.
+ BuildProvenance provenance;
+
+ /// Serialized JSON representation of the provenance, used in generating the
+ /// build signature in the corresponding build note.
+ ///
+ /// After verifying the signature, `provenance_bytes` can be unmarshalled and
+ /// compared to the provenance to confirm that it is unchanged. A
+ /// base64-encoded string representation of the provenance bytes is used for
+ /// the signature in order to interoperate with openssl which expects this
+ /// format for signature verification. The serialized form is captured both to
+ /// avoid ambiguity in how the provenance is marshalled to json as well to
+ /// prevent incompatibilities with future changes.
+ core.String provenanceBytes;
+
+ BuildOccurrence();
+
+ BuildOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('provenance')) {
+ provenance = BuildProvenance.fromJson(
+ _json['provenance'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('provenanceBytes')) {
+ provenanceBytes = _json['provenanceBytes'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (provenance != null) 'provenance': provenance.toJson(),
+ if (provenanceBytes != null) 'provenanceBytes': provenanceBytes,
+ };
+}
+
+/// Provenance of a build.
+///
+/// Contains all information needed to verify the full details about the build
+/// from source to completion.
+class BuildProvenance {
+ /// Special options applied to this build.
+ ///
+ /// This is a catch-all field where build providers can enter any desired
+ /// additional details.
+ core.Map<core.String, core.String> buildOptions;
+
+ /// Version string of the builder at the time this build was executed.
+ core.String builderVersion;
+
+ /// Output of the build.
+ core.List<Artifact> builtArtifacts;
+
+ /// Commands requested by the build.
+ core.List<Command> commands;
+
+ /// Time at which the build was created.
+ core.String createTime;
+
+ /// E-mail address of the user who initiated this build.
+ ///
+ /// Note that this was the user's e-mail address at the time the build was
+ /// initiated; this address may not represent the same end-user for all time.
+ core.String creator;
+
+ /// Time at which execution of the build was finished.
+ core.String endTime;
+
+ /// Unique identifier of the build.
+ ///
+ /// Required.
+ core.String id;
+
+ /// URI where any logs for this provenance were written.
+ core.String logsUri;
+
+ /// ID of the project.
+ core.String projectId;
+
+ /// Details of the Source input to the build.
+ Source sourceProvenance;
+
+ /// Time at which execution of the build was started.
+ core.String startTime;
+
+ /// Trigger identifier if the build was triggered automatically; empty if not.
+ core.String triggerId;
+
+ BuildProvenance();
+
+ BuildProvenance.fromJson(core.Map _json) {
+ if (_json.containsKey('buildOptions')) {
+ buildOptions = (_json['buildOptions'] as core.Map)
+ .cast<core.String, core.String>()
+ .map(
+ (key, item) => core.MapEntry(
+ key,
+ item as core.String,
+ ),
+ );
+ }
+ if (_json.containsKey('builderVersion')) {
+ builderVersion = _json['builderVersion'] as core.String;
+ }
+ if (_json.containsKey('builtArtifacts')) {
+ builtArtifacts = (_json['builtArtifacts'] as core.List)
+ .map<Artifact>((value) =>
+ Artifact.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('commands')) {
+ commands = (_json['commands'] as core.List)
+ .map<Command>((value) =>
+ Command.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('createTime')) {
+ createTime = _json['createTime'] as core.String;
+ }
+ if (_json.containsKey('creator')) {
+ creator = _json['creator'] as core.String;
+ }
+ if (_json.containsKey('endTime')) {
+ endTime = _json['endTime'] as core.String;
+ }
+ if (_json.containsKey('id')) {
+ id = _json['id'] as core.String;
+ }
+ if (_json.containsKey('logsUri')) {
+ logsUri = _json['logsUri'] as core.String;
+ }
+ if (_json.containsKey('projectId')) {
+ projectId = _json['projectId'] as core.String;
+ }
+ if (_json.containsKey('sourceProvenance')) {
+ sourceProvenance = Source.fromJson(
+ _json['sourceProvenance'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('startTime')) {
+ startTime = _json['startTime'] as core.String;
+ }
+ if (_json.containsKey('triggerId')) {
+ triggerId = _json['triggerId'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (buildOptions != null) 'buildOptions': buildOptions,
+ if (builderVersion != null) 'builderVersion': builderVersion,
+ if (builtArtifacts != null)
+ 'builtArtifacts':
+ builtArtifacts.map((value) => value.toJson()).toList(),
+ if (commands != null)
+ 'commands': commands.map((value) => value.toJson()).toList(),
+ if (createTime != null) 'createTime': createTime,
+ if (creator != null) 'creator': creator,
+ if (endTime != null) 'endTime': endTime,
+ if (id != null) 'id': id,
+ if (logsUri != null) 'logsUri': logsUri,
+ if (projectId != null) 'projectId': projectId,
+ if (sourceProvenance != null)
+ 'sourceProvenance': sourceProvenance.toJson(),
+ if (startTime != null) 'startTime': startTime,
+ if (triggerId != null) 'triggerId': triggerId,
+ };
+}
+
+/// The category to which the update belongs.
+class Category {
+ /// The identifier of the category.
+ core.String categoryId;
+
+ /// The localized name of the category.
+ core.String name;
+
+ Category();
+
+ Category.fromJson(core.Map _json) {
+ if (_json.containsKey('categoryId')) {
+ categoryId = _json['categoryId'] as core.String;
+ }
+ if (_json.containsKey('name')) {
+ name = _json['name'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (categoryId != null) 'categoryId': categoryId,
+ if (name != null) 'name': name,
+ };
+}
+
+/// A CloudRepoSourceContext denotes a particular revision in a Google Cloud
+/// Source Repo.
+class CloudRepoSourceContext {
+ /// An alias, which may be a branch or tag.
+ AliasContext aliasContext;
+
+ /// The ID of the repo.
+ RepoId repoId;
+
+ /// A revision ID.
+ core.String revisionId;
+
+ CloudRepoSourceContext();
+
+ CloudRepoSourceContext.fromJson(core.Map _json) {
+ if (_json.containsKey('aliasContext')) {
+ aliasContext = AliasContext.fromJson(
+ _json['aliasContext'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('repoId')) {
+ repoId = RepoId.fromJson(
+ _json['repoId'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('revisionId')) {
+ revisionId = _json['revisionId'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (aliasContext != null) 'aliasContext': aliasContext.toJson(),
+ if (repoId != null) 'repoId': repoId.toJson(),
+ if (revisionId != null) 'revisionId': revisionId,
+ };
+}
+
+/// Command describes a step performed as part of the build pipeline.
+class Command {
+ /// Command-line arguments used when executing this command.
+ core.List<core.String> args;
+
+ /// Working directory (relative to project source root) used when running this
+ /// command.
+ core.String dir;
+
+ /// Environment variables set before running this command.
+ core.List<core.String> env;
+
+ /// Optional unique identifier for this command, used in wait_for to reference
+ /// this command as a dependency.
+ core.String id;
+
+ /// Name of the command, as presented on the command line, or if the command
+ /// is packaged as a Docker container, as presented to `docker pull`.
+ ///
+ /// Required.
+ core.String name;
+
+ /// The ID(s) of the command(s) that this command depends on.
+ core.List<core.String> waitFor;
+
+ Command();
+
+ Command.fromJson(core.Map _json) {
+ if (_json.containsKey('args')) {
+ args = (_json['args'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ if (_json.containsKey('dir')) {
+ dir = _json['dir'] as core.String;
+ }
+ if (_json.containsKey('env')) {
+ env = (_json['env'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ if (_json.containsKey('id')) {
+ id = _json['id'] as core.String;
+ }
+ if (_json.containsKey('name')) {
+ name = _json['name'] as core.String;
+ }
+ if (_json.containsKey('waitFor')) {
+ waitFor = (_json['waitFor'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (args != null) 'args': args,
+ if (dir != null) 'dir': dir,
+ if (env != null) 'env': env,
+ if (id != null) 'id': id,
+ if (name != null) 'name': name,
+ if (waitFor != null) 'waitFor': waitFor,
+ };
+}
+
+/// The period during which some deployable was active in a runtime.
+class DeploymentOccurrence {
+ /// Address of the runtime element hosting this deployment.
+ core.String address;
+
+ /// Configuration used to create this deployment.
+ core.String config;
+
+ /// Beginning of the lifetime of this deployment.
+ ///
+ /// Required.
+ core.String deployTime;
+
+ /// Platform hosting this deployment.
+ /// Possible string values are:
+ /// - "PLATFORM_UNSPECIFIED" : Unknown.
+ /// - "GKE" : Google Container Engine.
+ /// - "FLEX" : Google App Engine: Flexible Environment.
+ /// - "CUSTOM" : Custom user-defined platform.
+ core.String platform;
+
+ /// Resource URI for the artifact being deployed taken from the deployable
+ /// field with the same name.
+ ///
+ /// Output only.
+ core.List<core.String> resourceUri;
+
+ /// End of the lifetime of this deployment.
+ core.String undeployTime;
+
+ /// Identity of the user that triggered this deployment.
+ core.String userEmail;
+
+ DeploymentOccurrence();
+
+ DeploymentOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('address')) {
+ address = _json['address'] as core.String;
+ }
+ if (_json.containsKey('config')) {
+ config = _json['config'] as core.String;
+ }
+ if (_json.containsKey('deployTime')) {
+ deployTime = _json['deployTime'] as core.String;
+ }
+ if (_json.containsKey('platform')) {
+ platform = _json['platform'] as core.String;
+ }
+ if (_json.containsKey('resourceUri')) {
+ resourceUri = (_json['resourceUri'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ if (_json.containsKey('undeployTime')) {
+ undeployTime = _json['undeployTime'] as core.String;
+ }
+ if (_json.containsKey('userEmail')) {
+ userEmail = _json['userEmail'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (address != null) 'address': address,
+ if (config != null) 'config': config,
+ if (deployTime != null) 'deployTime': deployTime,
+ if (platform != null) 'platform': platform,
+ if (resourceUri != null) 'resourceUri': resourceUri,
+ if (undeployTime != null) 'undeployTime': undeployTime,
+ if (userEmail != null) 'userEmail': userEmail,
+ };
+}
+
+/// Provides information about the analysis status of a discovered resource.
+class DiscoveryOccurrence {
+ /// The status of discovery for the resource.
+ /// Possible string values are:
+ /// - "ANALYSIS_STATUS_UNSPECIFIED" : Unknown.
+ /// - "PENDING" : Resource is known but no action has been taken yet.
+ /// - "SCANNING" : Resource is being analyzed.
+ /// - "FINISHED_SUCCESS" : Analysis has finished successfully.
+ /// - "FINISHED_FAILED" : Analysis has finished unsuccessfully, the analysis
+ /// itself is in a bad state.
+ /// - "FINISHED_UNSUPPORTED" : The resource is known not to be supported
+ core.String analysisStatus;
+
+ /// When an error is encountered this will contain a LocalizedMessage under
+ /// details to show to the user.
+ ///
+ /// The LocalizedMessage is output only and populated by the API.
+ Status analysisStatusError;
+
+ /// Whether the resource is continuously analyzed.
+ /// Possible string values are:
+ /// - "CONTINUOUS_ANALYSIS_UNSPECIFIED" : Unknown.
+ /// - "ACTIVE" : The resource is continuously analyzed.
+ /// - "INACTIVE" : The resource is ignored for continuous analysis.
+ core.String continuousAnalysis;
+
+ /// The CPE of the resource being scanned.
+ core.String cpe;
+
+ /// The last time this resource was scanned.
+ core.String lastScanTime;
+
+ DiscoveryOccurrence();
+
+ DiscoveryOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('analysisStatus')) {
+ analysisStatus = _json['analysisStatus'] as core.String;
+ }
+ if (_json.containsKey('analysisStatusError')) {
+ analysisStatusError = Status.fromJson(
+ _json['analysisStatusError'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('continuousAnalysis')) {
+ continuousAnalysis = _json['continuousAnalysis'] as core.String;
+ }
+ if (_json.containsKey('cpe')) {
+ cpe = _json['cpe'] as core.String;
+ }
+ if (_json.containsKey('lastScanTime')) {
+ lastScanTime = _json['lastScanTime'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (analysisStatus != null) 'analysisStatus': analysisStatus,
+ if (analysisStatusError != null)
+ 'analysisStatusError': analysisStatusError.toJson(),
+ if (continuousAnalysis != null)
+ 'continuousAnalysis': continuousAnalysis,
+ if (cpe != null) 'cpe': cpe,
+ if (lastScanTime != null) 'lastScanTime': lastScanTime,
+ };
+}
+
+/// A generic empty message that you can re-use to avoid defining duplicated
+/// empty messages in your APIs.
+///
+/// A typical example is to use it as the request or the response type of an API
+/// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns
+/// (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON
+/// object `{}`.
+class Empty {
+ Empty();
+
+ Empty.fromJson(
+ // ignore: avoid_unused_constructor_parameters
+ core.Map _json);
+
+ core.Map<core.String, core.Object> toJson() => {};
+}
+
+/// Container message for hashes of byte content of files, used in source
+/// messages to verify integrity of source input to the build.
+class FileHashes {
+ /// Collection of file hashes.
+ ///
+ /// Required.
+ core.List<Hash> fileHash;
+
+ FileHashes();
+
+ FileHashes.fromJson(core.Map _json) {
+ if (_json.containsKey('fileHash')) {
+ fileHash = (_json['fileHash'] as core.List)
+ .map<Hash>((value) =>
+ Hash.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (fileHash != null)
+ 'fileHash': fileHash.map((value) => value.toJson()).toList(),
+ };
+}
+
+/// A set of properties that uniquely identify a given Docker image.
+class Fingerprint {
+ /// The layer ID of the final layer in the Docker image's v1 representation.
+ ///
+ /// Required.
+ core.String v1Name;
+
+ /// The ordered list of v2 blobs that represent a given image.
+ ///
+ /// Required.
+ core.List<core.String> v2Blob;
+
+ /// The name of the image's v2 blobs computed via: \[bottom\] := v2_blobbottom
+ /// := sha256(v2_blob\[N\] + " " + v2_name\[N+1\]) Only the name of the final
+ /// blob is kept.
+ ///
+ /// Output only.
+ core.String v2Name;
+
+ Fingerprint();
+
+ Fingerprint.fromJson(core.Map _json) {
+ if (_json.containsKey('v1Name')) {
+ v1Name = _json['v1Name'] as core.String;
+ }
+ if (_json.containsKey('v2Blob')) {
+ v2Blob = (_json['v2Blob'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ if (_json.containsKey('v2Name')) {
+ v2Name = _json['v2Name'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (v1Name != null) 'v1Name': v1Name,
+ if (v2Blob != null) 'v2Blob': v2Blob,
+ if (v2Name != null) 'v2Name': v2Name,
+ };
+}
+
+/// A SourceContext referring to a Gerrit project.
+class GerritSourceContext {
+ /// An alias, which may be a branch or tag.
+ AliasContext aliasContext;
+
+ /// The full project name within the host.
+ ///
+ /// Projects may be nested, so "project/subproject" is a valid project name.
+ /// The "repo name" is the hostURI/project.
+ core.String gerritProject;
+
+ /// The URI of a running Gerrit instance.
+ core.String hostUri;
+
+ /// A revision (commit) ID.
+ core.String revisionId;
+
+ GerritSourceContext();
+
+ GerritSourceContext.fromJson(core.Map _json) {
+ if (_json.containsKey('aliasContext')) {
+ aliasContext = AliasContext.fromJson(
+ _json['aliasContext'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('gerritProject')) {
+ gerritProject = _json['gerritProject'] as core.String;
+ }
+ if (_json.containsKey('hostUri')) {
+ hostUri = _json['hostUri'] as core.String;
+ }
+ if (_json.containsKey('revisionId')) {
+ revisionId = _json['revisionId'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (aliasContext != null) 'aliasContext': aliasContext.toJson(),
+ if (gerritProject != null) 'gerritProject': gerritProject,
+ if (hostUri != null) 'hostUri': hostUri,
+ if (revisionId != null) 'revisionId': revisionId,
+ };
+}
+
+/// A GitSourceContext denotes a particular revision in a third party Git
+/// repository (e.g., GitHub).
+class GitSourceContext {
+ /// Git commit hash.
+ core.String revisionId;
+
+ /// Git repository URL.
+ core.String url;
+
+ GitSourceContext();
+
+ GitSourceContext.fromJson(core.Map _json) {
+ if (_json.containsKey('revisionId')) {
+ revisionId = _json['revisionId'] as core.String;
+ }
+ if (_json.containsKey('url')) {
+ url = _json['url'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (revisionId != null) 'revisionId': revisionId,
+ if (url != null) 'url': url,
+ };
+}
+
+/// Container message for hash values.
+class Hash {
+ /// The type of hash that was performed, e.g. "SHA-256".
+ ///
+ /// Required.
+ core.String type;
+
+ /// The hash value.
+ ///
+ /// Required.
+ core.String value;
+ core.List<core.int> get valueAsBytes => convert.base64.decode(value);
+
+ set valueAsBytes(core.List<core.int> _bytes) {
+ value =
+ convert.base64.encode(_bytes).replaceAll('/', '_').replaceAll('+', '-');
+ }
+
+ Hash();
+
+ Hash.fromJson(core.Map _json) {
+ if (_json.containsKey('type')) {
+ type = _json['type'] as core.String;
+ }
+ if (_json.containsKey('value')) {
+ value = _json['value'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (type != null) 'type': type,
+ if (value != null) 'value': value,
+ };
+}
+
+/// The unique identifier of the update.
+class Identity {
+ /// The revision number of the update.
+ core.int revision;
+
+ /// The revision independent identifier of the update.
+ core.String updateId;
+
+ Identity();
+
+ Identity.fromJson(core.Map _json) {
+ if (_json.containsKey('revision')) {
+ revision = _json['revision'] as core.int;
+ }
+ if (_json.containsKey('updateId')) {
+ updateId = _json['updateId'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (revision != null) 'revision': revision,
+ if (updateId != null) 'updateId': updateId,
+ };
+}
+
+/// Details of the derived image portion of the DockerImage relationship.
+///
+/// This image would be produced from a Dockerfile with FROM .
+class ImageOccurrence {
+ /// This contains the base image URL for the derived image occurrence.
+ ///
+ /// Output only.
+ core.String baseResourceUrl;
+
+ /// The number of layers by which this image differs from the associated image
+ /// basis.
+ ///
+ /// Output only.
+ core.int distance;
+
+ /// The fingerprint of the derived image.
+ ///
+ /// Required.
+ Fingerprint fingerprint;
+
+ /// This contains layer-specific metadata, if populated it has length
+ /// "distance" and is ordered with \[distance\] being the layer immediately
+ /// following the base image and \[1\] being the final layer.
+ core.List<Layer> layerInfo;
+
+ ImageOccurrence();
+
+ ImageOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('baseResourceUrl')) {
+ baseResourceUrl = _json['baseResourceUrl'] as core.String;
+ }
+ if (_json.containsKey('distance')) {
+ distance = _json['distance'] as core.int;
+ }
+ if (_json.containsKey('fingerprint')) {
+ fingerprint = Fingerprint.fromJson(
+ _json['fingerprint'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('layerInfo')) {
+ layerInfo = (_json['layerInfo'] as core.List)
+ .map<Layer>((value) =>
+ Layer.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (baseResourceUrl != null) 'baseResourceUrl': baseResourceUrl,
+ if (distance != null) 'distance': distance,
+ if (fingerprint != null) 'fingerprint': fingerprint.toJson(),
+ if (layerInfo != null)
+ 'layerInfo': layerInfo.map((value) => value.toJson()).toList(),
+ };
+}
+
+class Jwt {
+ /// The compact encoding of a JWS, which is always three base64 encoded
+ /// strings joined by periods.
+ ///
+ /// For details, see: https://tools.ietf.org/html/rfc7515.html#section-3.1
+ core.String compactJwt;
+
+ Jwt();
+
+ Jwt.fromJson(core.Map _json) {
+ if (_json.containsKey('compactJwt')) {
+ compactJwt = _json['compactJwt'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (compactJwt != null) 'compactJwt': compactJwt,
+ };
+}
+
+/// Layer holds metadata specific to a layer of a Docker image.
+class Layer {
+ /// The recovered arguments to the Dockerfile directive.
+ core.String arguments;
+
+ /// The recovered Dockerfile directive used to construct this layer.
+ ///
+ /// See https://docs.docker.com/engine/reference/builder/ for more
+ /// information.
+ ///
+ /// Required.
+ core.String directive;
+
+ Layer();
+
+ Layer.fromJson(core.Map _json) {
+ if (_json.containsKey('arguments')) {
+ arguments = _json['arguments'] as core.String;
+ }
+ if (_json.containsKey('directive')) {
+ directive = _json['directive'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (arguments != null) 'arguments': arguments,
+ if (directive != null) 'directive': directive,
+ };
+}
+
+/// The response message for Operations.ListOperations.
+class ListOperationsResponse {
+ /// The standard List next-page token.
+ core.String nextPageToken;
+
+ /// A list of operations that matches the specified filter in the request.
+ core.List<Operation> operations;
+
+ ListOperationsResponse();
+
+ ListOperationsResponse.fromJson(core.Map _json) {
+ if (_json.containsKey('nextPageToken')) {
+ nextPageToken = _json['nextPageToken'] as core.String;
+ }
+ if (_json.containsKey('operations')) {
+ operations = (_json['operations'] as core.List)
+ .map<Operation>((value) =>
+ Operation.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (nextPageToken != null) 'nextPageToken': nextPageToken,
+ if (operations != null)
+ 'operations': operations.map((value) => value.toJson()).toList(),
+ };
+}
+
+/// ListVulnerabilitiesResponse contains a single page of vulnerabilities
+/// resulting from a scan.
+class ListVulnerabilitiesResponse {
+ /// A page token that can be used in a subsequent call to ListVulnerabilities
+ /// to continue retrieving results.
+ core.String nextPageToken;
+
+ /// The list of Vulnerability Occurrences resulting from a scan.
+ core.List<Occurrence> occurrences;
+
+ ListVulnerabilitiesResponse();
+
+ ListVulnerabilitiesResponse.fromJson(core.Map _json) {
+ if (_json.containsKey('nextPageToken')) {
+ nextPageToken = _json['nextPageToken'] as core.String;
+ }
+ if (_json.containsKey('occurrences')) {
+ occurrences = (_json['occurrences'] as core.List)
+ .map<Occurrence>((value) =>
+ Occurrence.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (nextPageToken != null) 'nextPageToken': nextPageToken,
+ if (occurrences != null)
+ 'occurrences': occurrences.map((value) => value.toJson()).toList(),
+ };
+}
+
+/// An occurrence of a particular package installation found within a system's
+/// filesystem.
+///
+/// E.g., glibc was found in `/var/lib/dpkg/status`.
+class Location {
+ /// The CPE URI in [CPE format](https://cpe.mitre.org/specification/) denoting
+ /// the package manager version distributing a package.
+ ///
+ /// Required.
+ core.String cpeUri;
+
+ /// The path from which we gathered that this package/version is installed.
+ core.String path;
+
+ /// The version installed at this location.
+ Version version;
+
+ Location();
+
+ Location.fromJson(core.Map _json) {
+ if (_json.containsKey('cpeUri')) {
+ cpeUri = _json['cpeUri'] as core.String;
+ }
+ if (_json.containsKey('path')) {
+ path = _json['path'] as core.String;
+ }
+ if (_json.containsKey('version')) {
+ version = Version.fromJson(
+ _json['version'] as core.Map<core.String, core.dynamic>);
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (cpeUri != null) 'cpeUri': cpeUri,
+ if (path != null) 'path': path,
+ if (version != null) 'version': version.toJson(),
+ };
+}
+
+/// An instance of an analysis type that has been found on a resource.
+class Occurrence {
+ /// Describes an attestation of an artifact.
+ AttestationOccurrence attestation;
+
+ /// Describes a verifiable build.
+ BuildOccurrence build;
+
+ /// The time this occurrence was created.
+ ///
+ /// Output only.
+ core.String createTime;
+
+ /// Describes the deployment of an artifact on a runtime.
+ DeploymentOccurrence deployment;
+
+ /// Describes when a resource was discovered.
+ DiscoveryOccurrence discovery;
+
+ /// Describes how this resource derives from the basis in the associated note.
+ ImageOccurrence image;
+
+ /// This explicitly denotes which of the occurrence details are specified.
+ ///
+ /// This field can be used as a filter in list requests.
+ ///
+ /// Output only.
+ /// Possible string values are:
+ /// - "NOTE_KIND_UNSPECIFIED" : Default value. This value is unused.
+ /// - "VULNERABILITY" : The note and occurrence represent a package
+ /// vulnerability.
+ /// - "BUILD" : The note and occurrence assert build provenance.
+ /// - "IMAGE" : This represents an image basis relationship.
+ /// - "PACKAGE" : This represents a package installed via a package manager.
+ /// - "DEPLOYMENT" : The note and occurrence track deployment events.
+ /// - "DISCOVERY" : The note and occurrence track the initial discovery status
+ /// of a resource.
+ /// - "ATTESTATION" : This represents a logical "role" that can attest to
+ /// artifacts.
+ /// - "UPGRADE" : This represents an available package upgrade.
+ core.String kind;
+
+ /// The name of the occurrence in the form of
+ /// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
+ ///
+ /// Output only.
+ core.String name;
+
+ /// The analysis note associated with this occurrence, in the form of
+ /// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
+ ///
+ /// This field can be used as a filter in list requests.
+ ///
+ /// Required. Immutable.
+ core.String noteName;
+
+ /// Describes the installation of a package on the linked resource.
+ PackageOccurrence package;
+
+ /// A description of actions that can be taken to remedy the note.
+ core.String remediation;
+
+ /// A URI that represents the resource for which the occurrence applies.
+ ///
+ /// For example, `https://gcr.io/project/image@sha256:123abc` for a Docker
+ /// image.
+ ///
+ /// Required. Immutable.
+ core.String resourceUri;
+
+ /// The time this occurrence was last updated.
+ ///
+ /// Output only.
+ core.String updateTime;
+
+ /// Describes an available package upgrade on the linked resource.
+ UpgradeOccurrence upgrade;
+
+ /// Describes a security vulnerability.
+ VulnerabilityOccurrence vulnerability;
+
+ Occurrence();
+
+ Occurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('attestation')) {
+ attestation = AttestationOccurrence.fromJson(
+ _json['attestation'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('build')) {
+ build = BuildOccurrence.fromJson(
+ _json['build'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('createTime')) {
+ createTime = _json['createTime'] as core.String;
+ }
+ if (_json.containsKey('deployment')) {
+ deployment = DeploymentOccurrence.fromJson(
+ _json['deployment'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('discovery')) {
+ discovery = DiscoveryOccurrence.fromJson(
+ _json['discovery'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('image')) {
+ image = ImageOccurrence.fromJson(
+ _json['image'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('kind')) {
+ kind = _json['kind'] as core.String;
+ }
+ if (_json.containsKey('name')) {
+ name = _json['name'] as core.String;
+ }
+ if (_json.containsKey('noteName')) {
+ noteName = _json['noteName'] as core.String;
+ }
+ if (_json.containsKey('package')) {
+ package = PackageOccurrence.fromJson(
+ _json['package'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('remediation')) {
+ remediation = _json['remediation'] as core.String;
+ }
+ if (_json.containsKey('resourceUri')) {
+ resourceUri = _json['resourceUri'] as core.String;
+ }
+ if (_json.containsKey('updateTime')) {
+ updateTime = _json['updateTime'] as core.String;
+ }
+ if (_json.containsKey('upgrade')) {
+ upgrade = UpgradeOccurrence.fromJson(
+ _json['upgrade'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('vulnerability')) {
+ vulnerability = VulnerabilityOccurrence.fromJson(
+ _json['vulnerability'] as core.Map<core.String, core.dynamic>);
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (attestation != null) 'attestation': attestation.toJson(),
+ if (build != null) 'build': build.toJson(),
+ if (createTime != null) 'createTime': createTime,
+ if (deployment != null) 'deployment': deployment.toJson(),
+ if (discovery != null) 'discovery': discovery.toJson(),
+ if (image != null) 'image': image.toJson(),
+ if (kind != null) 'kind': kind,
+ if (name != null) 'name': name,
+ if (noteName != null) 'noteName': noteName,
+ if (package != null) 'package': package.toJson(),
+ if (remediation != null) 'remediation': remediation,
+ if (resourceUri != null) 'resourceUri': resourceUri,
+ if (updateTime != null) 'updateTime': updateTime,
+ if (upgrade != null) 'upgrade': upgrade.toJson(),
+ if (vulnerability != null) 'vulnerability': vulnerability.toJson(),
+ };
+}
+
+/// This resource represents a long-running operation that is the result of a
+/// network API call.
+class Operation {
+ /// If the value is `false`, it means the operation is still in progress.
+ ///
+ /// If `true`, the operation is completed, and either `error` or `response` is
+ /// available.
+ core.bool done;
+
+ /// The error result of the operation in case of failure or cancellation.
+ Status error;
+
+ /// Service-specific metadata associated with the operation.
+ ///
+ /// It typically contains progress information and common metadata such as
+ /// create time. Some services might not provide such metadata. Any method
+ /// that returns a long-running operation should document the metadata type,
+ /// if any.
+ ///
+ /// The values for Object must be JSON objects. It can consist of `num`,
+ /// `String`, `bool` and `null` as well as `Map` and `List` values.
+ core.Map<core.String, core.Object> metadata;
+
+ /// The server-assigned name, which is only unique within the same service
+ /// that originally returns it.
+ ///
+ /// If you use the default HTTP mapping, the `name` should be a resource name
+ /// ending with `operations/{unique_id}`.
+ core.String name;
+
+ /// The normal response of the operation in case of success.
+ ///
+ /// If the original method returns no data on success, such as `Delete`, the
+ /// response is `google.protobuf.Empty`. If the original method is standard
+ /// `Get`/`Create`/`Update`, the response should be the resource. For other
+ /// methods, the response should have the type `XxxResponse`, where `Xxx` is
+ /// the original method name. For example, if the original method name is
+ /// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
+ ///
+ /// The values for Object must be JSON objects. It can consist of `num`,
+ /// `String`, `bool` and `null` as well as `Map` and `List` values.
+ core.Map<core.String, core.Object> response;
+
+ Operation();
+
+ Operation.fromJson(core.Map _json) {
+ if (_json.containsKey('done')) {
+ done = _json['done'] as core.bool;
+ }
+ if (_json.containsKey('error')) {
+ error = Status.fromJson(
+ _json['error'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('metadata')) {
+ metadata =
+ (_json['metadata'] as core.Map).cast<core.String, core.Object>().map(
+ (key, item) => core.MapEntry(
+ key,
+ item as core.Object,
+ ),
+ );
+ }
+ if (_json.containsKey('name')) {
+ name = _json['name'] as core.String;
+ }
+ if (_json.containsKey('response')) {
+ response =
+ (_json['response'] as core.Map).cast<core.String, core.Object>().map(
+ (key, item) => core.MapEntry(
+ key,
+ item as core.Object,
+ ),
+ );
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (done != null) 'done': done,
+ if (error != null) 'error': error.toJson(),
+ if (metadata != null) 'metadata': metadata,
+ if (name != null) 'name': name,
+ if (response != null) 'response': response,
+ };
+}
+
+class PackageData {
+ /// The cpe_uri in [cpe format](https://cpe.mitre.org/specification/) in which
+ /// the vulnerability may manifest.
+ ///
+ /// Examples include distro or storage location for vulnerable jar.
+ core.String cpeUri;
+
+ /// The OS affected by a vulnerability This field is deprecated and the
+ /// information is in cpe_uri
+ core.String os;
+
+ /// The version of the OS This field is deprecated and the information is in
+ /// cpe_uri
+ core.String osVersion;
+
+ /// The package being analysed for vulnerabilities
+ core.String package;
+
+ /// The version of the package being analysed
+ core.String version;
+
+ PackageData();
+
+ PackageData.fromJson(core.Map _json) {
+ if (_json.containsKey('cpeUri')) {
+ cpeUri = _json['cpeUri'] as core.String;
+ }
+ if (_json.containsKey('os')) {
+ os = _json['os'] as core.String;
+ }
+ if (_json.containsKey('osVersion')) {
+ osVersion = _json['osVersion'] as core.String;
+ }
+ if (_json.containsKey('package')) {
+ package = _json['package'] as core.String;
+ }
+ if (_json.containsKey('version')) {
+ version = _json['version'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (cpeUri != null) 'cpeUri': cpeUri,
+ if (os != null) 'os': os,
+ if (osVersion != null) 'osVersion': osVersion,
+ if (package != null) 'package': package,
+ if (version != null) 'version': version,
+ };
+}
+
+/// A detail for a distro and package this vulnerability occurrence was found in
+/// and its associated fix (if one is available).
+class PackageIssue {
+ /// The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was
+ /// found in.
+ ///
+ /// Required.
+ core.String affectedCpeUri;
+
+ /// The package this vulnerability was found in.
+ ///
+ /// Required.
+ core.String affectedPackage;
+
+ /// The version of the package that is installed on the resource affected by
+ /// this vulnerability.
+ ///
+ /// Required.
+ Version affectedVersion;
+
+ /// Whether a fix is available for this package.
+ ///
+ /// Output only.
+ core.bool fixAvailable;
+
+ /// The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was
+ /// fixed in.
+ ///
+ /// It is possible for this to be different from the affected_cpe_uri.
+ core.String fixedCpeUri;
+
+ /// The package this vulnerability was fixed in.
+ ///
+ /// It is possible for this to be different from the affected_package.
+ core.String fixedPackage;
+
+ /// The version of the package this vulnerability was fixed in.
+ ///
+ /// Setting this to VersionKind.MAXIMUM means no fix is yet available.
+ ///
+ /// Required.
+ Version fixedVersion;
+
+ PackageIssue();
+
+ PackageIssue.fromJson(core.Map _json) {
+ if (_json.containsKey('affectedCpeUri')) {
+ affectedCpeUri = _json['affectedCpeUri'] as core.String;
+ }
+ if (_json.containsKey('affectedPackage')) {
+ affectedPackage = _json['affectedPackage'] as core.String;
+ }
+ if (_json.containsKey('affectedVersion')) {
+ affectedVersion = Version.fromJson(
+ _json['affectedVersion'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('fixAvailable')) {
+ fixAvailable = _json['fixAvailable'] as core.bool;
+ }
+ if (_json.containsKey('fixedCpeUri')) {
+ fixedCpeUri = _json['fixedCpeUri'] as core.String;
+ }
+ if (_json.containsKey('fixedPackage')) {
+ fixedPackage = _json['fixedPackage'] as core.String;
+ }
+ if (_json.containsKey('fixedVersion')) {
+ fixedVersion = Version.fromJson(
+ _json['fixedVersion'] as core.Map<core.String, core.dynamic>);
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (affectedCpeUri != null) 'affectedCpeUri': affectedCpeUri,
+ if (affectedPackage != null) 'affectedPackage': affectedPackage,
+ if (affectedVersion != null)
+ 'affectedVersion': affectedVersion.toJson(),
+ if (fixAvailable != null) 'fixAvailable': fixAvailable,
+ if (fixedCpeUri != null) 'fixedCpeUri': fixedCpeUri,
+ if (fixedPackage != null) 'fixedPackage': fixedPackage,
+ if (fixedVersion != null) 'fixedVersion': fixedVersion.toJson(),
+ };
+}
+
+/// Details on how a particular software package was installed on a system.
+class PackageOccurrence {
+ /// All of the places within the filesystem versions of this package have been
+ /// found.
+ ///
+ /// Required.
+ core.List<Location> location;
+
+ /// The name of the installed package.
+ ///
+ /// Output only.
+ core.String name;
+
+ PackageOccurrence();
+
+ PackageOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('location')) {
+ location = (_json['location'] as core.List)
+ .map<Location>((value) =>
+ Location.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('name')) {
+ name = _json['name'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (location != null)
+ 'location': location.map((value) => value.toJson()).toList(),
+ if (name != null) 'name': name,
+ };
+}
+
+/// Selects a repo using a Google Cloud Platform project ID (e.g.,
+/// winged-cargo-31) and a repo name within that project.
+class ProjectRepoId {
+ /// The ID of the project.
+ core.String projectId;
+
+ /// The name of the repo.
+ ///
+ /// Leave empty for the default repo.
+ core.String repoName;
+
+ ProjectRepoId();
+
+ ProjectRepoId.fromJson(core.Map _json) {
+ if (_json.containsKey('projectId')) {
+ projectId = _json['projectId'] as core.String;
+ }
+ if (_json.containsKey('repoName')) {
+ repoName = _json['repoName'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (projectId != null) 'projectId': projectId,
+ if (repoName != null) 'repoName': repoName,
+ };
+}
+
+/// Metadata for any related URL information.
+class RelatedUrl {
+ /// Label to describe usage of the URL.
+ core.String label;
+
+ /// Specific URL associated with the resource.
+ core.String url;
+
+ RelatedUrl();
+
+ RelatedUrl.fromJson(core.Map _json) {
+ if (_json.containsKey('label')) {
+ label = _json['label'] as core.String;
+ }
+ if (_json.containsKey('url')) {
+ url = _json['url'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (label != null) 'label': label,
+ if (url != null) 'url': url,
+ };
+}
+
+/// A unique identifier for a Cloud Repo.
+class RepoId {
+ /// A combination of a project ID and a repo name.
+ ProjectRepoId projectRepoId;
+
+ /// A server-assigned, globally unique identifier.
+ core.String uid;
+
+ RepoId();
+
+ RepoId.fromJson(core.Map _json) {
+ if (_json.containsKey('projectRepoId')) {
+ projectRepoId = ProjectRepoId.fromJson(
+ _json['projectRepoId'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('uid')) {
+ uid = _json['uid'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (projectRepoId != null) 'projectRepoId': projectRepoId.toJson(),
+ if (uid != null) 'uid': uid,
+ };
+}
+
+/// Verifiers (e.g. Kritis implementations) MUST verify signatures with respect
+/// to the trust anchors defined in policy (e.g. a Kritis policy).
+///
+/// Typically this means that the verifier has been configured with a map from
+/// `public_key_id` to public key material (and any required parameters, e.g.
+/// signing algorithm). In particular, verification implementations MUST NOT
+/// treat the signature `public_key_id` as anything more than a key lookup hint.
+/// The `public_key_id` DOES NOT validate or authenticate a public key; it only
+/// provides a mechanism for quickly selecting a public key ALREADY CONFIGURED
+/// on the verifier through a trusted channel. Verification implementations MUST
+/// reject signatures in any of the following circumstances: * The
+/// `public_key_id` is not recognized by the verifier. * The public key that
+/// `public_key_id` refers to does not verify the signature with respect to the
+/// payload. The `signature` contents SHOULD NOT be "attached" (where the
+/// payload is included with the serialized `signature` bytes). Verifiers MUST
+/// ignore any "attached" payload and only verify signatures with respect to
+/// explicitly provided payload (e.g. a `payload` field on the proto message
+/// that holds this Signature, or the canonical serialization of the proto
+/// message that holds this signature).
+class Signature {
+ /// The identifier for the public key that verifies this signature.
+ ///
+ /// * The `public_key_id` is required. * The `public_key_id` SHOULD be an
+ /// RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an
+ /// immutable reference, such as a cryptographic digest. Examples of valid
+ /// `public_key_id`s: OpenPGP V4 public key fingerprint: *
+ /// "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" See
+ /// https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
+ /// details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest
+ /// of the DER serialization): *
+ /// "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" *
+ /// "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
+ core.String publicKeyId;
+
+ /// The content of the signature, an opaque bytestring.
+ ///
+ /// The payload that this signature verifies MUST be unambiguously provided
+ /// with the Signature during verification. A wrapper message might provide
+ /// the payload explicitly. Alternatively, a message might have a canonical
+ /// serialization that can always be unambiguously computed to derive the
+ /// payload.
+ core.String signature;
+ core.List<core.int> get signatureAsBytes => convert.base64.decode(signature);
+
+ set signatureAsBytes(core.List<core.int> _bytes) {
+ signature =
+ convert.base64.encode(_bytes).replaceAll('/', '_').replaceAll('+', '-');
+ }
+
+ Signature();
+
+ Signature.fromJson(core.Map _json) {
+ if (_json.containsKey('publicKeyId')) {
+ publicKeyId = _json['publicKeyId'] as core.String;
+ }
+ if (_json.containsKey('signature')) {
+ signature = _json['signature'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (publicKeyId != null) 'publicKeyId': publicKeyId,
+ if (signature != null) 'signature': signature,
+ };
+}
+
+/// Source describes the location of the source used for the build.
+class Source {
+ /// If provided, some of the source code used for the build may be found in
+ /// these locations, in the case where the source repository had multiple
+ /// remotes or submodules.
+ ///
+ /// This list will not include the context specified in the context field.
+ core.List<SourceContext> additionalContexts;
+
+ /// If provided, the input binary artifacts for the build came from this
+ /// location.
+ core.String artifactStorageSourceUri;
+
+ /// If provided, the source code used for the build came from this location.
+ SourceContext context;
+
+ /// Hash(es) of the build source, which can be used to verify that the
+ /// original source integrity was maintained in the build.
+ ///
+ /// The keys to this map are file paths used as build source and the values
+ /// contain the hash values for those files. If the build source came in a
+ /// single package such as a gzipped tarfile (.tar.gz), the FileHash will be
+ /// for the single path to that file.
+ core.Map<core.String, FileHashes> fileHashes;
+
+ Source();
+
+ Source.fromJson(core.Map _json) {
+ if (_json.containsKey('additionalContexts')) {
+ additionalContexts = (_json['additionalContexts'] as core.List)
+ .map<SourceContext>((value) => SourceContext.fromJson(
+ value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('artifactStorageSourceUri')) {
+ artifactStorageSourceUri =
+ _json['artifactStorageSourceUri'] as core.String;
+ }
+ if (_json.containsKey('context')) {
+ context = SourceContext.fromJson(
+ _json['context'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('fileHashes')) {
+ fileHashes = (_json['fileHashes'] as core.Map)
+ .cast<core.String, core.Map>()
+ .map(
+ (key, item) => core.MapEntry(
+ key,
+ FileHashes.fromJson(item as core.Map<core.String, core.dynamic>),
+ ),
+ );
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (additionalContexts != null)
+ 'additionalContexts':
+ additionalContexts.map((value) => value.toJson()).toList(),
+ if (artifactStorageSourceUri != null)
+ 'artifactStorageSourceUri': artifactStorageSourceUri,
+ if (context != null) 'context': context.toJson(),
+ if (fileHashes != null)
+ 'fileHashes':
+ fileHashes.map((key, item) => core.MapEntry(key, item.toJson())),
+ };
+}
+
+/// A SourceContext is a reference to a tree of files.
+///
+/// A SourceContext together with a path point to a unique revision of a single
+/// file or directory.
+class SourceContext {
+ /// A SourceContext referring to a revision in a Google Cloud Source Repo.
+ CloudRepoSourceContext cloudRepo;
+
+ /// A SourceContext referring to a Gerrit project.
+ GerritSourceContext gerrit;
+
+ /// A SourceContext referring to any third party Git repo (e.g., GitHub).
+ GitSourceContext git;
+
+ /// Labels with user defined metadata.
+ core.Map<core.String, core.String> labels;
+
+ SourceContext();
+
+ SourceContext.fromJson(core.Map _json) {
+ if (_json.containsKey('cloudRepo')) {
+ cloudRepo = CloudRepoSourceContext.fromJson(
+ _json['cloudRepo'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('gerrit')) {
+ gerrit = GerritSourceContext.fromJson(
+ _json['gerrit'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('git')) {
+ git = GitSourceContext.fromJson(
+ _json['git'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('labels')) {
+ labels =
+ (_json['labels'] as core.Map).cast<core.String, core.String>().map(
+ (key, item) => core.MapEntry(
+ key,
+ item as core.String,
+ ),
+ );
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (cloudRepo != null) 'cloudRepo': cloudRepo.toJson(),
+ if (gerrit != null) 'gerrit': gerrit.toJson(),
+ if (git != null) 'git': git.toJson(),
+ if (labels != null) 'labels': labels,
+ };
+}
+
+/// The `Status` type defines a logical error model that is suitable for
+/// different programming environments, including REST APIs and RPC APIs.
+///
+/// It is used by [gRPC](https://github.com/grpc). Each `Status` message
+/// contains three pieces of data: error code, error message, and error details.
+/// You can find out more about this error model and how to work with it in the
+/// [API Design Guide](https://cloud.google.com/apis/design/errors).
+class Status {
+ /// The status code, which should be an enum value of google.rpc.Code.
+ core.int code;
+
+ /// A list of messages that carry the error details.
+ ///
+ /// There is a common set of message types for APIs to use.
+ ///
+ /// The values for Object must be JSON objects. It can consist of `num`,
+ /// `String`, `bool` and `null` as well as `Map` and `List` values.
+ core.List<core.Map<core.String, core.Object>> details;
+
+ /// A developer-facing error message, which should be in English.
+ ///
+ /// Any user-facing error message should be localized and sent in the
+ /// google.rpc.Status.details field, or localized by the client.
+ core.String message;
+
+ Status();
+
+ Status.fromJson(core.Map _json) {
+ if (_json.containsKey('code')) {
+ code = _json['code'] as core.int;
+ }
+ if (_json.containsKey('details')) {
+ details = (_json['details'] as core.List)
+ .map<core.Map<core.String, core.Object>>((value) =>
+ (value as core.Map).cast<core.String, core.Object>().map(
+ (key, item) => core.MapEntry(
+ key,
+ item as core.Object,
+ ),
+ ))
+ .toList();
+ }
+ if (_json.containsKey('message')) {
+ message = _json['message'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (code != null) 'code': code,
+ if (details != null) 'details': details,
+ if (message != null) 'message': message,
+ };
+}
+
+/// The Upgrade Distribution represents metadata about the Upgrade for each
+/// operating system (CPE).
+///
+/// Some distributions have additional metadata around updates, classifying them
+/// into various categories and severities.
+class UpgradeDistribution {
+ /// The operating system classification of this Upgrade, as specified by the
+ /// upstream operating system upgrade feed.
+ ///
+ /// For Windows the classification is one of the category_ids listed at
+ /// https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+ core.String classification;
+
+ /// Required - The specific operating system this metadata applies to.
+ ///
+ /// See https://cpe.mitre.org/specification/.
+ core.String cpeUri;
+
+ /// The cve tied to this Upgrade.
+ core.List<core.String> cve;
+
+ /// The severity as specified by the upstream operating system.
+ core.String severity;
+
+ UpgradeDistribution();
+
+ UpgradeDistribution.fromJson(core.Map _json) {
+ if (_json.containsKey('classification')) {
+ classification = _json['classification'] as core.String;
+ }
+ if (_json.containsKey('cpeUri')) {
+ cpeUri = _json['cpeUri'] as core.String;
+ }
+ if (_json.containsKey('cve')) {
+ cve = (_json['cve'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ if (_json.containsKey('severity')) {
+ severity = _json['severity'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (classification != null) 'classification': classification,
+ if (cpeUri != null) 'cpeUri': cpeUri,
+ if (cve != null) 'cve': cve,
+ if (severity != null) 'severity': severity,
+ };
+}
+
+/// An Upgrade Occurrence represents that a specific resource_url could install
+/// a specific upgrade.
+///
+/// This presence is supplied via local sources (i.e. it is present in the
+/// mirror and the running system has noticed its availability). For Windows,
+/// both distribution and windows_update contain information for the Windows
+/// update.
+class UpgradeOccurrence {
+ /// Metadata about the upgrade for available for the specific operating system
+ /// for the resource_url.
+ ///
+ /// This allows efficient filtering, as well as making it easier to use the
+ /// occurrence.
+ UpgradeDistribution distribution;
+
+ /// Required for non-Windows OS.
+ ///
+ /// The package this Upgrade is for.
+ core.String package;
+
+ /// Required for non-Windows OS.
+ ///
+ /// The version of the package in a machine + human readable form.
+ Version parsedVersion;
+
+ /// Required for Windows OS.
+ ///
+ /// Represents the metadata about the Windows update.
+ WindowsUpdate windowsUpdate;
+
+ UpgradeOccurrence();
+
+ UpgradeOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('distribution')) {
+ distribution = UpgradeDistribution.fromJson(
+ _json['distribution'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('package')) {
+ package = _json['package'] as core.String;
+ }
+ if (_json.containsKey('parsedVersion')) {
+ parsedVersion = Version.fromJson(
+ _json['parsedVersion'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('windowsUpdate')) {
+ windowsUpdate = WindowsUpdate.fromJson(
+ _json['windowsUpdate'] as core.Map<core.String, core.dynamic>);
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (distribution != null) 'distribution': distribution.toJson(),
+ if (package != null) 'package': package,
+ if (parsedVersion != null) 'parsedVersion': parsedVersion.toJson(),
+ if (windowsUpdate != null) 'windowsUpdate': windowsUpdate.toJson(),
+ };
+}
+
+/// Version contains structured information about the version of a package.
+class Version {
+ /// Used to correct mistakes in the version numbering scheme.
+ core.int epoch;
+
+ /// Human readable version string.
+ ///
+ /// This string is of the form :- and is only set when kind is NORMAL.
+ core.String fullName;
+
+ /// Whether this version is specifying part of an inclusive range.
+ ///
+ /// Grafeas does not have the capability to specify version ranges; instead we
+ /// have fields that specify start version and end versions. At times this is
+ /// insufficient - we also need to specify whether the version is included in
+ /// the range or is excluded from the range. This boolean is expected to be
+ /// set to true when the version is included in a range.
+ core.bool inclusive;
+
+ /// Distinguishes between sentinel MIN/MAX versions and normal versions.
+ ///
+ /// Required.
+ /// Possible string values are:
+ /// - "VERSION_KIND_UNSPECIFIED" : Unknown.
+ /// - "NORMAL" : A standard package version.
+ /// - "MINIMUM" : A special version representing negative infinity.
+ /// - "MAXIMUM" : A special version representing positive infinity.
+ core.String kind;
+
+ /// Required only when version kind is NORMAL.
+ ///
+ /// The main part of the version name.
+ core.String name;
+
+ /// The iteration of the package build from the above version.
+ core.String revision;
+
+ Version();
+
+ Version.fromJson(core.Map _json) {
+ if (_json.containsKey('epoch')) {
+ epoch = _json['epoch'] as core.int;
+ }
+ if (_json.containsKey('fullName')) {
+ fullName = _json['fullName'] as core.String;
+ }
+ if (_json.containsKey('inclusive')) {
+ inclusive = _json['inclusive'] as core.bool;
+ }
+ if (_json.containsKey('kind')) {
+ kind = _json['kind'] as core.String;
+ }
+ if (_json.containsKey('name')) {
+ name = _json['name'] as core.String;
+ }
+ if (_json.containsKey('revision')) {
+ revision = _json['revision'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (epoch != null) 'epoch': epoch,
+ if (fullName != null) 'fullName': fullName,
+ if (inclusive != null) 'inclusive': inclusive,
+ if (kind != null) 'kind': kind,
+ if (name != null) 'name': name,
+ if (revision != null) 'revision': revision,
+ };
+}
+
+/// An occurrence of a severity vulnerability on a resource.
+class VulnerabilityOccurrence {
+ /// The CVSS score of this vulnerability.
+ ///
+ /// CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10
+ /// indicates high severity.
+ ///
+ /// Output only.
+ core.double cvssScore;
+
+ /// The distro assigned severity for this vulnerability when it is available,
+ /// otherwise this is the note provider assigned severity.
+ /// Possible string values are:
+ /// - "SEVERITY_UNSPECIFIED" : Unknown.
+ /// - "MINIMAL" : Minimal severity.
+ /// - "LOW" : Low severity.
+ /// - "MEDIUM" : Medium severity.
+ /// - "HIGH" : High severity.
+ /// - "CRITICAL" : Critical severity.
+ core.String effectiveSeverity;
+
+ /// Whether at least one of the affected packages has a fix available.
+ ///
+ /// Output only.
+ core.bool fixAvailable;
+
+ /// A detailed description of this vulnerability.
+ ///
+ /// Output only.
+ core.String longDescription;
+
+ /// The set of affected locations and their fixes (if available) within the
+ /// associated resource.
+ ///
+ /// Required.
+ core.List<PackageIssue> packageIssue;
+
+ /// URLs related to this vulnerability.
+ ///
+ /// Output only.
+ core.List<RelatedUrl> relatedUrls;
+
+ /// The note provider assigned severity of this vulnerability.
+ ///
+ /// Output only.
+ /// Possible string values are:
+ /// - "SEVERITY_UNSPECIFIED" : Unknown.
+ /// - "MINIMAL" : Minimal severity.
+ /// - "LOW" : Low severity.
+ /// - "MEDIUM" : Medium severity.
+ /// - "HIGH" : High severity.
+ /// - "CRITICAL" : Critical severity.
+ core.String severity;
+
+ /// A one sentence description of this vulnerability.
+ ///
+ /// Output only.
+ core.String shortDescription;
+
+ /// The type of package; whether native or non native (e.g., ruby gems,
+ /// node.js packages, etc.).
+ core.String type;
+
+ VulnerabilityOccurrence();
+
+ VulnerabilityOccurrence.fromJson(core.Map _json) {
+ if (_json.containsKey('cvssScore')) {
+ cvssScore = (_json['cvssScore'] as core.num).toDouble();
+ }
+ if (_json.containsKey('effectiveSeverity')) {
+ effectiveSeverity = _json['effectiveSeverity'] as core.String;
+ }
+ if (_json.containsKey('fixAvailable')) {
+ fixAvailable = _json['fixAvailable'] as core.bool;
+ }
+ if (_json.containsKey('longDescription')) {
+ longDescription = _json['longDescription'] as core.String;
+ }
+ if (_json.containsKey('packageIssue')) {
+ packageIssue = (_json['packageIssue'] as core.List)
+ .map<PackageIssue>((value) => PackageIssue.fromJson(
+ value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('relatedUrls')) {
+ relatedUrls = (_json['relatedUrls'] as core.List)
+ .map<RelatedUrl>((value) =>
+ RelatedUrl.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('severity')) {
+ severity = _json['severity'] as core.String;
+ }
+ if (_json.containsKey('shortDescription')) {
+ shortDescription = _json['shortDescription'] as core.String;
+ }
+ if (_json.containsKey('type')) {
+ type = _json['type'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (cvssScore != null) 'cvssScore': cvssScore,
+ if (effectiveSeverity != null) 'effectiveSeverity': effectiveSeverity,
+ if (fixAvailable != null) 'fixAvailable': fixAvailable,
+ if (longDescription != null) 'longDescription': longDescription,
+ if (packageIssue != null)
+ 'packageIssue': packageIssue.map((value) => value.toJson()).toList(),
+ if (relatedUrls != null)
+ 'relatedUrls': relatedUrls.map((value) => value.toJson()).toList(),
+ if (severity != null) 'severity': severity,
+ if (shortDescription != null) 'shortDescription': shortDescription,
+ if (type != null) 'type': type,
+ };
+}
+
+/// Windows Update represents the metadata about the update for the Windows
+/// operating system.
+///
+/// The fields in this message come from the Windows Update API documented at
+/// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
+class WindowsUpdate {
+ /// The list of categories to which the update belongs.
+ core.List<Category> categories;
+
+ /// The localized description of the update.
+ core.String description;
+
+ /// Required - The unique identifier for the update.
+ Identity identity;
+
+ /// The Microsoft Knowledge Base article IDs that are associated with the
+ /// update.
+ core.List<core.String> kbArticleIds;
+
+ /// The last published timestamp of the update.
+ core.String lastPublishedTimestamp;
+
+ /// The hyperlink to the support information for the update.
+ core.String supportUrl;
+
+ /// The localized title of the update.
+ core.String title;
+
+ WindowsUpdate();
+
+ WindowsUpdate.fromJson(core.Map _json) {
+ if (_json.containsKey('categories')) {
+ categories = (_json['categories'] as core.List)
+ .map<Category>((value) =>
+ Category.fromJson(value as core.Map<core.String, core.dynamic>))
+ .toList();
+ }
+ if (_json.containsKey('description')) {
+ description = _json['description'] as core.String;
+ }
+ if (_json.containsKey('identity')) {
+ identity = Identity.fromJson(
+ _json['identity'] as core.Map<core.String, core.dynamic>);
+ }
+ if (_json.containsKey('kbArticleIds')) {
+ kbArticleIds = (_json['kbArticleIds'] as core.List)
+ .map<core.String>((value) => value as core.String)
+ .toList();
+ }
+ if (_json.containsKey('lastPublishedTimestamp')) {
+ lastPublishedTimestamp = _json['lastPublishedTimestamp'] as core.String;
+ }
+ if (_json.containsKey('supportUrl')) {
+ supportUrl = _json['supportUrl'] as core.String;
+ }
+ if (_json.containsKey('title')) {
+ title = _json['title'] as core.String;
+ }
+ }
+
+ core.Map<core.String, core.Object> toJson() => {
+ if (categories != null)
+ 'categories': categories.map((value) => value.toJson()).toList(),
+ if (description != null) 'description': description,
+ if (identity != null) 'identity': identity.toJson(),
+ if (kbArticleIds != null) 'kbArticleIds': kbArticleIds,
+ if (lastPublishedTimestamp != null)
+ 'lastPublishedTimestamp': lastPublishedTimestamp,
+ if (supportUrl != null) 'supportUrl': supportUrl,
+ if (title != null) 'title': title,
+ };
+}
diff --git a/generated/googleapis_beta/lib/policysimulator/v1beta1.dart b/generated/googleapis_beta/lib/policysimulator/v1beta1.dart
index d8e7d83..c07bc21 100644
--- a/generated/googleapis_beta/lib/policysimulator/v1beta1.dart
+++ b/generated/googleapis_beta/lib/policysimulator/v1beta1.dart
@@ -16,6 +16,14 @@
/// Policy Simulator API - v1beta1
///
+/// Policy Simulator is a collection of endpoints for creating, running, and
+/// viewing a Replay. A `Replay` is a type of simulation that lets you see how
+/// your members' access to resources might change if you changed your IAM
+/// policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past
+/// access attempts under both the current policy and your proposed policy, and
+/// compares those results to determine how your members' access might change
+/// under the proposed policy.
+///
/// For more information, see
/// <https://cloud.google.com/iam/docs/simulating-access>
///
@@ -48,6 +56,15 @@
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
+/// Policy Simulator is a collection of endpoints for creating, running, and
+/// viewing a Replay.
+///
+/// A `Replay` is a type of simulation that lets you see how your members'
+/// access to resources might change if you changed your IAM policy. During a
+/// `Replay`, Policy Simulator re-evaluates, or replays, past access attempts
+/// under both the current policy and your proposed policy, and compares those
+/// results to determine how your members' access might change under the
+/// proposed policy.
class PolicySimulatorApi {
/// View and manage your data across Google Cloud Platform services
static const cloudPlatformScope =
@@ -94,21 +111,14 @@
FoldersLocationsReplaysResource(commons.ApiRequester client)
: _requester = client;
- /// Create a replay using the given ReplayConfig.
- ///
- /// The parent of the replay must contain all resources in the overlay. For
- /// example, if the overlay contains: ``` ReplayConfig { policy_overlay = map
- /// = { "//cloudresourcemanager.googleapis.com/projects/project-1": ...,
- /// "//cloudresourcemanager.googleapis.com/projects/project-2": ..., } ```
- /// Then, the parent used for CreateReplay must be the organization or a
- /// folder that contains both projects as children.
+ /// Creates and starts a Replay using the given ReplayConfig.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource where this Replay will be
- /// created. This must be a project, folder, or organization with included
+ /// created. This resource must be a project, folder, or organization with a
/// location. Example: `projects/my-example-project/locations/global`
/// Value must have pattern `^folders/\[^/\]+/locations/\[^/\]+$`.
///
@@ -150,14 +160,18 @@
_response as core.Map<core.String, core.dynamic>);
}
- /// Get the specified Replay.
+ /// Gets the specified Replay.
+ ///
+ /// Each `Replay` is available for at least 7 days.
///
/// Request parameters:
///
- /// [name] - Required. The name of the replay to retrieve. Format is
- /// `PARENT/locations/{location}/replays/{replay}` where PARENT is a project,
- /// folder, or organization. Example:
- /// `projects/my-example-project/locations/{location}/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
+ /// [name] - Required. The name of the Replay to retrieve, in the following
+ /// format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`,
+ /// where `{resource-id}` is the ID of the project, folder, or organization
+ /// that owns the `Replay`. Example:
+ /// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
/// Value must have pattern
/// `^folders/\[^/\]+/locations/\[^/\]+/replays/\[^/\]+$`.
///
@@ -200,22 +214,27 @@
FoldersLocationsReplaysResultsResource(commons.ApiRequester client)
: _requester = client;
- /// List the results of running a replay
+ /// Lists the results of running a Replay.
///
/// Request parameters:
///
- /// [parent] - Required. The replay we are listing results for.
+ /// [parent] - Required. The Replay whose results are listed, in the following
+ /// format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`
+ /// Example:
+ /// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
/// Value must have pattern
/// `^folders/\[^/\]+/locations/\[^/\]+/replays/\[^/\]+$`.
///
- /// [pageSize] - The maximum number of `ReplayResults` to return. If
- /// unspecified, at most 5000 `Replays` will be returned. The maximum value is
- /// 5000; values above 5000 will be coerced to 5000.
+ /// [pageSize] - The maximum number of ReplayResult objects to return.
+ /// Defaults to 5000. The maximum value is 5000; values above 5000 are rounded
+ /// down to 5000.
///
- /// [pageToken] - A page token, received from a previous `ListReplayResults`
- /// call. Provide this to retrieve the subsequent page. When paginating, all
- /// other parameters provided to `ListReplayResults` must match the call that
- /// provided the page token.
+ /// [pageToken] - A page token, received from a previous
+ /// Simulator.ListReplayResults call. Provide this token to retrieve the next
+ /// page of results. When paginating, all other parameters provided to
+ /// \[Simulator.ListReplayResults\[\] must match the call that provided the
+ /// page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -390,21 +409,14 @@
OrganizationsLocationsReplaysResource(commons.ApiRequester client)
: _requester = client;
- /// Create a replay using the given ReplayConfig.
- ///
- /// The parent of the replay must contain all resources in the overlay. For
- /// example, if the overlay contains: ``` ReplayConfig { policy_overlay = map
- /// = { "//cloudresourcemanager.googleapis.com/projects/project-1": ...,
- /// "//cloudresourcemanager.googleapis.com/projects/project-2": ..., } ```
- /// Then, the parent used for CreateReplay must be the organization or a
- /// folder that contains both projects as children.
+ /// Creates and starts a Replay using the given ReplayConfig.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource where this Replay will be
- /// created. This must be a project, folder, or organization with included
+ /// created. This resource must be a project, folder, or organization with a
/// location. Example: `projects/my-example-project/locations/global`
/// Value must have pattern `^organizations/\[^/\]+/locations/\[^/\]+$`.
///
@@ -446,14 +458,18 @@
_response as core.Map<core.String, core.dynamic>);
}
- /// Get the specified Replay.
+ /// Gets the specified Replay.
+ ///
+ /// Each `Replay` is available for at least 7 days.
///
/// Request parameters:
///
- /// [name] - Required. The name of the replay to retrieve. Format is
- /// `PARENT/locations/{location}/replays/{replay}` where PARENT is a project,
- /// folder, or organization. Example:
- /// `projects/my-example-project/locations/{location}/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
+ /// [name] - Required. The name of the Replay to retrieve, in the following
+ /// format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`,
+ /// where `{resource-id}` is the ID of the project, folder, or organization
+ /// that owns the `Replay`. Example:
+ /// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
/// Value must have pattern
/// `^organizations/\[^/\]+/locations/\[^/\]+/replays/\[^/\]+$`.
///
@@ -496,22 +512,27 @@
OrganizationsLocationsReplaysResultsResource(commons.ApiRequester client)
: _requester = client;
- /// List the results of running a replay
+ /// Lists the results of running a Replay.
///
/// Request parameters:
///
- /// [parent] - Required. The replay we are listing results for.
+ /// [parent] - Required. The Replay whose results are listed, in the following
+ /// format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`
+ /// Example:
+ /// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
/// Value must have pattern
/// `^organizations/\[^/\]+/locations/\[^/\]+/replays/\[^/\]+$`.
///
- /// [pageSize] - The maximum number of `ReplayResults` to return. If
- /// unspecified, at most 5000 `Replays` will be returned. The maximum value is
- /// 5000; values above 5000 will be coerced to 5000.
+ /// [pageSize] - The maximum number of ReplayResult objects to return.
+ /// Defaults to 5000. The maximum value is 5000; values above 5000 are rounded
+ /// down to 5000.
///
- /// [pageToken] - A page token, received from a previous `ListReplayResults`
- /// call. Provide this to retrieve the subsequent page. When paginating, all
- /// other parameters provided to `ListReplayResults` must match the call that
- /// provided the page token.
+ /// [pageToken] - A page token, received from a previous
+ /// Simulator.ListReplayResults call. Provide this token to retrieve the next
+ /// page of results. When paginating, all other parameters provided to
+ /// \[Simulator.ListReplayResults\[\] must match the call that provided the
+ /// page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -580,21 +601,14 @@
ProjectsLocationsReplaysResource(commons.ApiRequester client)
: _requester = client;
- /// Create a replay using the given ReplayConfig.
- ///
- /// The parent of the replay must contain all resources in the overlay. For
- /// example, if the overlay contains: ``` ReplayConfig { policy_overlay = map
- /// = { "//cloudresourcemanager.googleapis.com/projects/project-1": ...,
- /// "//cloudresourcemanager.googleapis.com/projects/project-2": ..., } ```
- /// Then, the parent used for CreateReplay must be the organization or a
- /// folder that contains both projects as children.
+ /// Creates and starts a Replay using the given ReplayConfig.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent resource where this Replay will be
- /// created. This must be a project, folder, or organization with included
+ /// created. This resource must be a project, folder, or organization with a
/// location. Example: `projects/my-example-project/locations/global`
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
@@ -636,14 +650,18 @@
_response as core.Map<core.String, core.dynamic>);
}
- /// Get the specified Replay.
+ /// Gets the specified Replay.
+ ///
+ /// Each `Replay` is available for at least 7 days.
///
/// Request parameters:
///
- /// [name] - Required. The name of the replay to retrieve. Format is
- /// `PARENT/locations/{location}/replays/{replay}` where PARENT is a project,
- /// folder, or organization. Example:
- /// `projects/my-example-project/locations/{location}/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
+ /// [name] - Required. The name of the Replay to retrieve, in the following
+ /// format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`,
+ /// where `{resource-id}` is the ID of the project, folder, or organization
+ /// that owns the `Replay`. Example:
+ /// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/replays/\[^/\]+$`.
///
@@ -686,22 +704,27 @@
ProjectsLocationsReplaysResultsResource(commons.ApiRequester client)
: _requester = client;
- /// List the results of running a replay
+ /// Lists the results of running a Replay.
///
/// Request parameters:
///
- /// [parent] - Required. The replay we are listing results for.
+ /// [parent] - Required. The Replay whose results are listed, in the following
+ /// format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`
+ /// Example:
+ /// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/replays/\[^/\]+$`.
///
- /// [pageSize] - The maximum number of `ReplayResults` to return. If
- /// unspecified, at most 5000 `Replays` will be returned. The maximum value is
- /// 5000; values above 5000 will be coerced to 5000.
+ /// [pageSize] - The maximum number of ReplayResult objects to return.
+ /// Defaults to 5000. The maximum value is 5000; values above 5000 are rounded
+ /// down to 5000.
///
- /// [pageToken] - A page token, received from a previous `ListReplayResults`
- /// call. Provide this to retrieve the subsequent page. When paginating, all
- /// other parameters provided to `ListReplayResults` must match the call that
- /// provided the page token.
+ /// [pageToken] - A page token, received from a previous
+ /// Simulator.ListReplayResults call. Provide this token to retrieve the next
+ /// page of results. When paginating, all other parameters provided to
+ /// \[Simulator.ListReplayResults\[\] must match the call that provided the
+ /// page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
@@ -743,35 +766,47 @@
}
}
-/// The difference in AccessState between baseline and simulated policies.
-///
-/// If either AccessState cannot be fully evaluated, i.e. the AccessState is one
-/// of the UNKNOWN_* values, the explanation why full evaluation was not
-/// possible is in the ExplainedAccess message.
+/// A summary and comparison of the member's access under the current (baseline)
+/// policies and the proposed (simulated) policies for a single access tuple.
class GoogleCloudPolicysimulatorV1beta1AccessStateDiff {
- /// A single value interpretation of the difference between baseline and
- /// simulated.
+ /// How the member's access, specified in the AccessState field, changed
+ /// between the current (baseline) policies and proposed (simulated) policies.
/// Possible string values are:
- /// - "ACCESS_CHANGE_TYPE_UNSPECIFIED" : Reserved
- /// - "NO_CHANGE" : The two ExplainedAccesses are equal. This includes the
- /// case where both baseline and simulated are UNKNOWN, but the unknown
- /// information is equivalent.
- /// - "UNKNOWN_CHANGE" : The baseline and simulated accesses are both UNKNOWN,
- /// but the unknown information differs between them.
- /// - "ACCESS_REVOKED" : The baseline access state is GRANTED and the
- /// simulated access state is NOT_GRANTED
- /// - "ACCESS_GAINED" : The baseline access state is NOT_GRANTED and the
- /// simulated access state is GRANTED.
- /// - "ACCESS_MAYBE_REVOKED" : The baseline access state is GRANTED and the
- /// simulated access state is UNKNOWN.
- /// - "ACCESS_MAYBE_GAINED" : The baseline state is NOT_GRANTED and the
- /// simulated state is UNKNOWN.
+ /// - "ACCESS_CHANGE_TYPE_UNSPECIFIED" : The access change is unspecified.
+ /// - "NO_CHANGE" : The member's access did not change. This includes the case
+ /// where both baseline and simulated are UNKNOWN, but the unknown information
+ /// is equivalent.
+ /// - "UNKNOWN_CHANGE" : The member's access under both the current policies
+ /// and the proposed policies is `UNKNOWN`, but the unknown information
+ /// differs between them.
+ /// - "ACCESS_REVOKED" : The member had access under the current policies
+ /// (`GRANTED`), but will no longer have access after the proposed changes
+ /// (`NOT_GRANTED`).
+ /// - "ACCESS_GAINED" : The member did not have access under the current
+ /// policies (`NOT_GRANTED`), but will have access after the proposed changes
+ /// (`GRANTED`).
+ /// - "ACCESS_MAYBE_REVOKED" : This result can occur for the following
+ /// reasons: * The member had access under the current policies (`GRANTED`),
+ /// but their access after the proposed changes is `UNKNOWN`. * The member's
+ /// access under the current policies is `UNKNOWN`, but they will not have
+ /// access after the proposed changes (`NOT_GRANTED`).
+ /// - "ACCESS_MAYBE_GAINED" : This result can occur for the following reasons:
+ /// * The member did not have access under the current policies
+ /// (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`.
+ /// * The member's access under the current policies is `UNKNOWN`, but they
+ /// will have access after the proposed changes (`GRANTED`).
core.String accessChange;
- /// The explained access when replayed against the baseline policies.
+ /// The results of evaluating the access tuple under the current (baseline)
+ /// policies.
+ ///
+ /// If the AccessState couldn't be fully evaluated, this field explains why.
GoogleCloudPolicysimulatorV1beta1ExplainedAccess baseline;
- /// The explained access when replayed against the simulated policies.
+ /// The results of evaluating the access tuple under the proposed (simulated)
+ /// policies.
+ ///
+ /// If the AccessState couldn't be fully evaluated, this field explains why.
GoogleCloudPolicysimulatorV1beta1ExplainedAccess simulated;
GoogleCloudPolicysimulatorV1beta1AccessStateDiff();
@@ -864,20 +899,20 @@
///
/// Required.
/// Possible string values are:
- /// - "ACCESS_STATE_UNSPECIFIED" : Reserved for future use.
+ /// - "ACCESS_STATE_UNSPECIFIED" : The access state is not specified.
/// - "GRANTED" : The member has the permission.
/// - "NOT_GRANTED" : The member does not have the permission.
/// - "UNKNOWN_CONDITIONAL" : The member has the permission only if a
/// condition expression evaluates to `true`.
- /// - "UNKNOWN_INFO_DENIED" : The Simulator user does not have access to all
- /// of the policies that Policy Troubleshooter needs to evaluate.
+ /// - "UNKNOWN_INFO_DENIED" : The user who created the Replay does not have
+ /// access to all of the policies that Policy Simulator needs to evaluate.
core.String access;
/// A condition expression that prevents this binding from granting access
/// unless the expression evaluates to `true`.
///
/// To learn about IAM Conditions, see
- /// http://cloud.google.com/iam/help/conditions/overview.
+ /// https://cloud.google.com/iam/docs/conditions-overview.
GoogleTypeExpr condition;
/// Indicates whether each member in the binding includes the member specified
@@ -886,9 +921,9 @@
/// Each key identifies a member in the binding, and each value indicates
/// whether the member in the binding includes the member in the request. For
/// example, suppose that a binding includes the following members: *
- /// `user:alice@example.com` * `group:product-eng@example.com` You want to
- /// troubleshoot access for `user:bob@example.com`. This user is a member of
- /// the group `group:product-eng@example.com`. For the first member in the
+ /// `user:alice@example.com` * `group:product-eng@example.com` The member in
+ /// the replayed access tuple is `user:bob@example.com`. This user is a member
+ /// of the group `group:product-eng@example.com`. For the first member in the
/// binding, the key is `user:alice@example.com`, and the `membership` field
/// in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second member in
/// the binding, the key is `group:product-eng@example.com`, and the
@@ -917,12 +952,13 @@
/// Indicates whether the role granted by this binding contains the specified
/// permission.
/// Possible string values are:
- /// - "ROLE_PERMISSION_UNSPECIFIED" : Reserved for future use.
+ /// - "ROLE_PERMISSION_UNSPECIFIED" : The inclusion of the permission is not
+ /// specified.
/// - "ROLE_PERMISSION_INCLUDED" : The permission is included in the role.
/// - "ROLE_PERMISSION_NOT_INCLUDED" : The permission is not included in the
/// role.
- /// - "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" : The Simulator user is not
- /// allowed to access the binding.
+ /// - "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" : The user who created the Replay
+ /// is not allowed to access the binding.
core.String rolePermission;
/// The relevance of the permission's existence, or nonexistence, in the role
@@ -987,15 +1023,15 @@
class GoogleCloudPolicysimulatorV1beta1BindingExplanationAnnotatedMembership {
/// Indicates whether the binding includes the member.
/// Possible string values are:
- /// - "MEMBERSHIP_UNSPECIFIED" : Reserved for future use.
+ /// - "MEMBERSHIP_UNSPECIFIED" : The membership is not specified.
/// - "MEMBERSHIP_INCLUDED" : The binding includes the member. The member can
/// be included directly or indirectly. For example: * A member is included
/// directly if that member is listed in the binding. * A member is included
- /// indirectly if that member is in a Google group or G Suite domain that is
- /// listed in the binding.
+ /// indirectly if that member is in a Google group or Google Workspace domain
+ /// that is listed in the binding.
/// - "MEMBERSHIP_NOT_INCLUDED" : The binding does not include the member.
- /// - "MEMBERSHIP_UNKNOWN_INFO_DENIED" : The Simulator user is not allowed to
- /// access the binding.
+ /// - "MEMBERSHIP_UNKNOWN_INFO_DENIED" : The user who created the Replay is
+ /// not allowed to access the binding.
/// - "MEMBERSHIP_UNKNOWN_UNSUPPORTED" : The member is an unsupported type.
/// Only Google Accounts and service accounts are supported.
core.String membership;
@@ -1028,29 +1064,31 @@
};
}
-/// Details about how the set of Explained Policies resulted in the Access
-/// State.
+/// Details about how a set of policies, listed in ExplainedPolicy, resulted in
+/// a certain AccessState when replaying an access tuple.
class GoogleCloudPolicysimulatorV1beta1ExplainedAccess {
- /// The overall access state for the included set of policies.
+ /// Whether the member in the access tuple has permission to access the
+ /// resource in the access tuple under the given policies.
/// Possible string values are:
- /// - "ACCESS_STATE_UNSPECIFIED" : Reserved for future use.
+ /// - "ACCESS_STATE_UNSPECIFIED" : The access state is not specified.
/// - "GRANTED" : The member has the permission.
/// - "NOT_GRANTED" : The member does not have the permission.
/// - "UNKNOWN_CONDITIONAL" : The member has the permission only if a
/// condition expression evaluates to `true`.
- /// - "UNKNOWN_INFO_DENIED" : The Simulator user does not have access to all
- /// of the policies that Policy Troubleshooter needs to evaluate.
+ /// - "UNKNOWN_INFO_DENIED" : The user who created the Replay does not have
+ /// access to all of the policies that Policy Simulator needs to evaluate.
core.String accessState;
- /// The list of problems encountered when explaining this access.
+ /// If the AccessState is `UNKNOWN`, this field contains a list of errors
+ /// explaining why the result is `UNKNOWN`.
///
- /// This list provides the reason why UNKNOWN information in `policies` was
- /// unknown.
+ /// If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.
core.List<GoogleRpcStatus> errors;
- /// The set of policies causing an UNKNOWN AccessState, if any.
+ /// If the AccessState is `UNKNOWN`, this field contains the policies that led
+ /// to that result.
///
- /// If the Access is GRANTED or NOT_GRANTED, this list will be empty.
+ /// If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.
core.List<GoogleCloudPolicysimulatorV1beta1ExplainedPolicy> policies;
GoogleCloudPolicysimulatorV1beta1ExplainedAccess();
@@ -1093,20 +1131,20 @@
/// this policy. To determine whether the member actually has the permission,
/// use the `access` field in the TroubleshootIamPolicyResponse.
/// Possible string values are:
- /// - "ACCESS_STATE_UNSPECIFIED" : Reserved for future use.
+ /// - "ACCESS_STATE_UNSPECIFIED" : The access state is not specified.
/// - "GRANTED" : The member has the permission.
/// - "NOT_GRANTED" : The member does not have the permission.
/// - "UNKNOWN_CONDITIONAL" : The member has the permission only if a
/// condition expression evaluates to `true`.
- /// - "UNKNOWN_INFO_DENIED" : The Simulator user does not have access to all
- /// of the policies that Policy Troubleshooter needs to evaluate.
+ /// - "UNKNOWN_INFO_DENIED" : The user who created the Replay does not have
+ /// access to all of the policies that Policy Simulator needs to evaluate.
core.String access;
/// Details about how each binding in the policy affects the member's ability,
/// or inability, to use the permission for the resource.
///
- /// If the Simulator user does not have access to the policy, this field is
- /// omitted.
+ /// If the user who created the Replay does not have access to the policy,
+ /// this field is omitted.
core.List<GoogleCloudPolicysimulatorV1beta1BindingExplanation>
bindingExplanations;
@@ -1114,22 +1152,23 @@
///
/// For example,
/// `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
- /// If the Simulator user does not have access to the policy, this field is
- /// omitted. For examples of full resource names for Google Cloud services,
- /// see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
+ /// If the user who created the Replay does not have access to the policy,
+ /// this field is omitted. For examples of full resource names for Google
+ /// Cloud services, see
+ /// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
core.String fullResourceName;
/// The IAM policy attached to the resource.
///
- /// If the Simulator user does not have access to the policy, this field is
- /// empty.
+ /// If the user who created the Replay does not have access to the policy,
+ /// this field is empty.
GoogleIamV1Policy policy;
/// The relevance of this policy to the overall determination in the
/// TroubleshootIamPolicyResponse.
///
- /// If the Simulator user does not have access to the policy, this field is
- /// omitted.
+ /// If the user who created the Replay does not have access to the policy,
+ /// this field is omitted.
/// Possible string values are:
/// - "HEURISTIC_RELEVANCE_UNSPECIFIED" : Reserved for future use.
/// - "NORMAL" : The data point has a limited effect on the result. Changing
@@ -1174,14 +1213,15 @@
};
}
-/// The results of a replay.
+/// Response message for Simulator.ListReplayResults.
class GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse {
- /// A token, which can be sent as `page_token` to retrieve the next page.
+ /// A token that you can use to retrieve the next page of ReplayResult
+ /// objects.
///
/// If this field is omitted, there are no subsequent pages.
core.String nextPageToken;
- /// The results of running a replay.
+ /// The results of running a Replay.
core.List<GoogleCloudPolicysimulatorV1beta1ReplayResult> replayResults;
GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse();
@@ -1208,19 +1248,22 @@
};
}
-/// A Replay of Accesses against a simulated state.
+/// A resource describing a `Replay`, or simulation.
class GoogleCloudPolicysimulatorV1beta1Replay {
- /// The configuration used for the replay.
+ /// The configuration used for the `Replay`.
///
/// Required.
GoogleCloudPolicysimulatorV1beta1ReplayConfig config;
- /// The resource name of the replay.
+ /// The resource name of the `Replay`, which has the following format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`,
+ /// where `{resource-id}` is the ID of the project, folder, or organization
+ /// that owns the Replay.
///
- /// The replay id is randomly generated on creation. Format is
- /// `PARENT/locations/{location}/replays/{replay}` where PARENT is a project,
- /// folder, or organization. Example:
+ /// Example:
/// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
+ ///
+ /// Output only.
core.String name;
/// Summary statistics about the replayed log entries.
@@ -1228,17 +1271,15 @@
/// Output only.
GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary resultsSummary;
- /// The current state of the replay.
- ///
- /// https://aip.dev/216
+ /// The current state of the `Replay`.
///
/// Output only.
/// Possible string values are:
- /// - "STATE_UNSPECIFIED" : Reserved.
- /// - "PENDING" : Replay has not started yet.
- /// - "RUNNING" : Replay is currently running.
- /// - "SUCCEEDED" : Replay has successfully completed.
- /// - "FAILED" : Replay has finished with an error.
+ /// - "STATE_UNSPECIFIED" : The state is unspecified.
+ /// - "PENDING" : The `Replay` has not started yet.
+ /// - "RUNNING" : The `Replay` is currently running.
+ /// - "SUCCEEDED" : The `Replay` has successfully completed.
+ /// - "FAILED" : The `Replay` has finished with an error.
core.String state;
GoogleCloudPolicysimulatorV1beta1Replay();
@@ -1269,23 +1310,28 @@
};
}
-/// The configuration used for the replay.
+/// The configuration used for a Replay.
class GoogleCloudPolicysimulatorV1beta1ReplayConfig {
- /// The logs to use as input for the replay.
+ /// The logs to use as input for the Replay.
/// Possible string values are:
- /// - "LOG_SOURCE_UNSPECIFIED" : An unspecified log source. Replay will
- /// default to using RECENT_ACCESSES.
- /// - "RECENT_ACCESSES" : Retrieves the 5000 most recent accesses from the
- /// last 90 days from an internal log source. Note that the log freshness
- /// (i.e. the date of the newest log entry) may be up to 7 days stale. In
- /// other words, an access attempt that only occurred within the past 7 days
- /// may not be captured by the replay.
+ /// - "LOG_SOURCE_UNSPECIFIED" : An unspecified log source. If the log source
+ /// is unspecified, the Replay defaults to using `RECENT_ACCESSES`.
+ /// - "RECENT_ACCESSES" : All access logs from the last 90 days. These logs
+ /// may not include logs from the most recent 7 days.
core.String logSource;
- /// The policy overlay used during the replay.
+ /// A mapping of the resources that you want to simulate policies for and the
+ /// policies that you want to simulate.
///
- /// Keys are full resource names and the values are the policies to apply on
- /// these resources in the simulated state.
+ /// Keys are the full resource names for the resources. For example,
+ /// `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples
+ /// of full resource names for Google Cloud services, see
+ /// https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
+ /// Values are Policy objects representing the policies that you want to
+ /// simulate. Replays automatically take into account any IAM policies
+ /// inherited through the resource hierarchy, and any policies set on
+ /// descendant resources. You do not need to include these policies in the
+ /// policy overlay.
core.Map<core.String, GoogleIamV1Policy> policyOverlay;
GoogleCloudPolicysimulatorV1beta1ReplayConfig();
@@ -1315,10 +1361,18 @@
};
}
-/// A successful replay of an AccessTuple that resulted in a difference between
-/// baseline and simulated.
+/// The difference between the results of evaluating an access tuple under the
+/// current (baseline) policies and under the proposed (simulated) policies.
+///
+/// This difference explains how a member's access could change if the proposed
+/// policies were applied.
class GoogleCloudPolicysimulatorV1beta1ReplayDiff {
- /// The difference in AccessState between replays.
+ /// A summary and comparison of the member's access under the current
+ /// (baseline) policies and the proposed (simulated) policies for a single
+ /// access tuple.
+ ///
+ /// The evaluation of the member's access is reported in the AccessState
+ /// field.
GoogleCloudPolicysimulatorV1beta1AccessStateDiff accessDiff;
GoogleCloudPolicysimulatorV1beta1ReplayDiff();
@@ -1335,7 +1389,7 @@
};
}
-/// Metadata about a ReplayAccessLogs operation.
+/// Metadata about a Replay operation.
class GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata {
/// Time when the request was received.
core.String startTime;
@@ -1356,27 +1410,39 @@
/// The result of replaying a single access tuple against a simulated state.
class GoogleCloudPolicysimulatorV1beta1ReplayResult {
- /// The access replayed.
+ /// The access tuple that was replayed.
+ ///
+ /// This field includes information about the member, resource, and permission
+ /// that were involved in the access attempt.
GoogleCloudPolicysimulatorV1beta1AccessTuple accessTuple;
- /// The tuple was successfully replayed and had a difference.
+ /// The difference between the member's access under the current (baseline)
+ /// policies and the member's access under the proposed (simulated) policies.
+ ///
+ /// This field is only included for access tuples that were successfully
+ /// replayed and had different results under the current policies and the
+ /// proposed policies.
GoogleCloudPolicysimulatorV1beta1ReplayDiff diff;
- /// The tuple was not successfully replayed.
+ /// The error that caused the access tuple replay to fail.
+ ///
+ /// This field is only included for access tuples that were not replayed
+ /// successfully.
GoogleRpcStatus error;
- /// The late date this access was seen in the logs.
+ /// The latest date this access tuple was seen in the logs.
GoogleTypeDate lastSeenDate;
- /// The resource name of the replay result.
+ /// The resource name of the `ReplayResult`, in the following format:
+ /// `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`,
+ /// where `{resource-id}` is the ID of the project, folder, or organization
+ /// that owns the Replay.
///
- /// Format is
- /// `PARENT/locations/{location}/replays/{replay}/results/{replay_result}`
- /// where PARENT is a project, folder, or organization. Example:
+ /// Example:
/// `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`
core.String name;
- /// The replay the access tuple was included in.
+ /// The Replay that the access tuple was included in.
core.String parent;
GoogleCloudPolicysimulatorV1beta1ReplayResult();
@@ -1418,26 +1484,24 @@
/// Summary statistics about the replayed log entries.
class GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary {
- /// Number of replayed log entries with a difference between baseline and
+ /// The number of replayed log entries with a difference between baseline and
/// simulated policies.
core.int differenceCount;
- /// Number of log entries with an error during replay.
+ /// The number of log entries that could not be replayed.
core.int errorCount;
- /// Number of log entries replayed.
- ///
- /// log_count == unchanged_count + difference_count + error_count
+ /// The total number of log entries replayed.
core.int logCount;
- /// Date of newest log entry replayed.
+ /// The date of the newest log entry replayed.
GoogleTypeDate newestDate;
- /// Date of oldest log entry replayed.
+ /// The date of the oldest log entry replayed.
GoogleTypeDate oldestDate;
- /// Number of replayed log entries with no difference between baseline and
- /// simulated
+ /// The number of replayed log entries with no difference between baseline and
+ /// simulated policies.
core.int unchangedCount;
GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary();
diff --git a/generated/googleapis_beta/lib/privateca/v1beta1.dart b/generated/googleapis_beta/lib/privateca/v1beta1.dart
index bcdf8f7..456540d 100644
--- a/generated/googleapis_beta/lib/privateca/v1beta1.dart
+++ b/generated/googleapis_beta/lib/privateca/v1beta1.dart
@@ -4502,8 +4502,7 @@
/// Private Preview.
///
/// This feature is only available for approved services. User defined labels
- /// for the resource that this operation is associated with. Only a
- /// combination of 1000 user labels per consumer project are allowed.
+ /// for the resource that this operation is associated with.
core.Map<core.String, core.String> userLabels;
GoogleApiServicecontrolV1Operation();