@google-cloud/containeranalysis 5.5.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/build/protos/google/devtools/containeranalysis/v1/containeranalysis.proto +2 -2
- package/build/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto +1 -1
- package/build/protos/grafeas/v1/compliance.proto +2 -0
- package/build/protos/grafeas/v1/discovery.proto +25 -0
- package/build/protos/grafeas/v1/grafeas.proto +30 -0
- package/build/protos/protos.d.ts +132 -1
- package/build/protos/protos.js +354 -2
- package/build/protos/protos.json +86 -9
- package/build/src/index.js +1 -1
- package/build/src/v1/container_analysis_client.d.ts +2 -1
- package/build/src/v1/container_analysis_client.js +94 -31
- package/build/src/v1/container_analysis_proto_list.json +24 -0
- package/build/src/v1/gapic_metadata.json +229 -0
- package/build/src/v1/grafeas_proto_list.json +24 -0
- package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +2 -1
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js +107 -34
- package/build/src/v1beta1/container_analysis_v1_beta1_proto_list.json +15 -0
- package/build/src/v1beta1/gapic_metadata.json +249 -0
- package/build/src/v1beta1/grafeas_v1_beta1_client.d.ts +5 -5
- package/build/src/v1beta1/grafeas_v1_beta1_client.js +262 -79
- package/build/src/v1beta1/grafeas_v1_beta1_proto_list.json +15 -0
- package/package.json +17 -17
package/build/protos/protos.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -15884,6 +15884,7 @@
|
|
|
15884
15884
|
* @interface IComplianceOccurrence
|
|
15885
15885
|
* @property {Array.<grafeas.v1.INonCompliantFile>|null} [nonCompliantFiles] ComplianceOccurrence nonCompliantFiles
|
|
15886
15886
|
* @property {string|null} [nonComplianceReason] ComplianceOccurrence nonComplianceReason
|
|
15887
|
+
* @property {grafeas.v1.IComplianceVersion|null} [version] ComplianceOccurrence version
|
|
15887
15888
|
*/
|
|
15888
15889
|
|
|
15889
15890
|
/**
|
|
@@ -15918,6 +15919,14 @@
|
|
|
15918
15919
|
*/
|
|
15919
15920
|
ComplianceOccurrence.prototype.nonComplianceReason = "";
|
|
15920
15921
|
|
|
15922
|
+
/**
|
|
15923
|
+
* ComplianceOccurrence version.
|
|
15924
|
+
* @member {grafeas.v1.IComplianceVersion|null|undefined} version
|
|
15925
|
+
* @memberof grafeas.v1.ComplianceOccurrence
|
|
15926
|
+
* @instance
|
|
15927
|
+
*/
|
|
15928
|
+
ComplianceOccurrence.prototype.version = null;
|
|
15929
|
+
|
|
15921
15930
|
/**
|
|
15922
15931
|
* Creates a new ComplianceOccurrence instance using the specified properties.
|
|
15923
15932
|
* @function create
|
|
@@ -15947,6 +15956,8 @@
|
|
|
15947
15956
|
$root.grafeas.v1.NonCompliantFile.encode(message.nonCompliantFiles[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
15948
15957
|
if (message.nonComplianceReason != null && Object.hasOwnProperty.call(message, "nonComplianceReason"))
|
|
15949
15958
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.nonComplianceReason);
|
|
15959
|
+
if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
|
15960
|
+
$root.grafeas.v1.ComplianceVersion.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
15950
15961
|
return writer;
|
|
15951
15962
|
};
|
|
15952
15963
|
|
|
@@ -15991,6 +16002,10 @@
|
|
|
15991
16002
|
message.nonComplianceReason = reader.string();
|
|
15992
16003
|
break;
|
|
15993
16004
|
}
|
|
16005
|
+
case 4: {
|
|
16006
|
+
message.version = $root.grafeas.v1.ComplianceVersion.decode(reader, reader.uint32());
|
|
16007
|
+
break;
|
|
16008
|
+
}
|
|
15994
16009
|
default:
|
|
15995
16010
|
reader.skipType(tag & 7);
|
|
15996
16011
|
break;
|
|
@@ -16038,6 +16053,11 @@
|
|
|
16038
16053
|
if (message.nonComplianceReason != null && message.hasOwnProperty("nonComplianceReason"))
|
|
16039
16054
|
if (!$util.isString(message.nonComplianceReason))
|
|
16040
16055
|
return "nonComplianceReason: string expected";
|
|
16056
|
+
if (message.version != null && message.hasOwnProperty("version")) {
|
|
16057
|
+
var error = $root.grafeas.v1.ComplianceVersion.verify(message.version);
|
|
16058
|
+
if (error)
|
|
16059
|
+
return "version." + error;
|
|
16060
|
+
}
|
|
16041
16061
|
return null;
|
|
16042
16062
|
};
|
|
16043
16063
|
|
|
@@ -16065,6 +16085,11 @@
|
|
|
16065
16085
|
}
|
|
16066
16086
|
if (object.nonComplianceReason != null)
|
|
16067
16087
|
message.nonComplianceReason = String(object.nonComplianceReason);
|
|
16088
|
+
if (object.version != null) {
|
|
16089
|
+
if (typeof object.version !== "object")
|
|
16090
|
+
throw TypeError(".grafeas.v1.ComplianceOccurrence.version: object expected");
|
|
16091
|
+
message.version = $root.grafeas.v1.ComplianceVersion.fromObject(object.version);
|
|
16092
|
+
}
|
|
16068
16093
|
return message;
|
|
16069
16094
|
};
|
|
16070
16095
|
|
|
@@ -16083,8 +16108,10 @@
|
|
|
16083
16108
|
var object = {};
|
|
16084
16109
|
if (options.arrays || options.defaults)
|
|
16085
16110
|
object.nonCompliantFiles = [];
|
|
16086
|
-
if (options.defaults)
|
|
16111
|
+
if (options.defaults) {
|
|
16087
16112
|
object.nonComplianceReason = "";
|
|
16113
|
+
object.version = null;
|
|
16114
|
+
}
|
|
16088
16115
|
if (message.nonCompliantFiles && message.nonCompliantFiles.length) {
|
|
16089
16116
|
object.nonCompliantFiles = [];
|
|
16090
16117
|
for (var j = 0; j < message.nonCompliantFiles.length; ++j)
|
|
@@ -16092,6 +16119,8 @@
|
|
|
16092
16119
|
}
|
|
16093
16120
|
if (message.nonComplianceReason != null && message.hasOwnProperty("nonComplianceReason"))
|
|
16094
16121
|
object.nonComplianceReason = message.nonComplianceReason;
|
|
16122
|
+
if (message.version != null && message.hasOwnProperty("version"))
|
|
16123
|
+
object.version = $root.grafeas.v1.ComplianceVersion.toObject(message.version, options);
|
|
16095
16124
|
return object;
|
|
16096
16125
|
};
|
|
16097
16126
|
|
|
@@ -18948,6 +18977,7 @@
|
|
|
18948
18977
|
* @property {google.protobuf.ITimestamp|null} [lastScanTime] DiscoveryOccurrence lastScanTime
|
|
18949
18978
|
* @property {google.protobuf.ITimestamp|null} [archiveTime] DiscoveryOccurrence archiveTime
|
|
18950
18979
|
* @property {grafeas.v1.DiscoveryOccurrence.ISBOMStatus|null} [sbomStatus] DiscoveryOccurrence sbomStatus
|
|
18980
|
+
* @property {grafeas.v1.DiscoveryOccurrence.IVulnerabilityAttestation|null} [vulnerabilityAttestation] DiscoveryOccurrence vulnerabilityAttestation
|
|
18951
18981
|
*/
|
|
18952
18982
|
|
|
18953
18983
|
/**
|
|
@@ -19038,6 +19068,14 @@
|
|
|
19038
19068
|
*/
|
|
19039
19069
|
DiscoveryOccurrence.prototype.sbomStatus = null;
|
|
19040
19070
|
|
|
19071
|
+
/**
|
|
19072
|
+
* DiscoveryOccurrence vulnerabilityAttestation.
|
|
19073
|
+
* @member {grafeas.v1.DiscoveryOccurrence.IVulnerabilityAttestation|null|undefined} vulnerabilityAttestation
|
|
19074
|
+
* @memberof grafeas.v1.DiscoveryOccurrence
|
|
19075
|
+
* @instance
|
|
19076
|
+
*/
|
|
19077
|
+
DiscoveryOccurrence.prototype.vulnerabilityAttestation = null;
|
|
19078
|
+
|
|
19041
19079
|
/**
|
|
19042
19080
|
* Creates a new DiscoveryOccurrence instance using the specified properties.
|
|
19043
19081
|
* @function create
|
|
@@ -19081,6 +19119,8 @@
|
|
|
19081
19119
|
$root.google.rpc.Status.encode(message.analysisError[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
19082
19120
|
if (message.sbomStatus != null && Object.hasOwnProperty.call(message, "sbomStatus"))
|
|
19083
19121
|
$root.grafeas.v1.DiscoveryOccurrence.SBOMStatus.encode(message.sbomStatus, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
|
19122
|
+
if (message.vulnerabilityAttestation != null && Object.hasOwnProperty.call(message, "vulnerabilityAttestation"))
|
|
19123
|
+
$root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.encode(message.vulnerabilityAttestation, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
19084
19124
|
return writer;
|
|
19085
19125
|
};
|
|
19086
19126
|
|
|
@@ -19153,6 +19193,10 @@
|
|
|
19153
19193
|
message.sbomStatus = $root.grafeas.v1.DiscoveryOccurrence.SBOMStatus.decode(reader, reader.uint32());
|
|
19154
19194
|
break;
|
|
19155
19195
|
}
|
|
19196
|
+
case 10: {
|
|
19197
|
+
message.vulnerabilityAttestation = $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.decode(reader, reader.uint32());
|
|
19198
|
+
break;
|
|
19199
|
+
}
|
|
19156
19200
|
default:
|
|
19157
19201
|
reader.skipType(tag & 7);
|
|
19158
19202
|
break;
|
|
@@ -19247,6 +19291,11 @@
|
|
|
19247
19291
|
if (error)
|
|
19248
19292
|
return "sbomStatus." + error;
|
|
19249
19293
|
}
|
|
19294
|
+
if (message.vulnerabilityAttestation != null && message.hasOwnProperty("vulnerabilityAttestation")) {
|
|
19295
|
+
var error = $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.verify(message.vulnerabilityAttestation);
|
|
19296
|
+
if (error)
|
|
19297
|
+
return "vulnerabilityAttestation." + error;
|
|
19298
|
+
}
|
|
19250
19299
|
return null;
|
|
19251
19300
|
};
|
|
19252
19301
|
|
|
@@ -19355,6 +19404,11 @@
|
|
|
19355
19404
|
throw TypeError(".grafeas.v1.DiscoveryOccurrence.sbomStatus: object expected");
|
|
19356
19405
|
message.sbomStatus = $root.grafeas.v1.DiscoveryOccurrence.SBOMStatus.fromObject(object.sbomStatus);
|
|
19357
19406
|
}
|
|
19407
|
+
if (object.vulnerabilityAttestation != null) {
|
|
19408
|
+
if (typeof object.vulnerabilityAttestation !== "object")
|
|
19409
|
+
throw TypeError(".grafeas.v1.DiscoveryOccurrence.vulnerabilityAttestation: object expected");
|
|
19410
|
+
message.vulnerabilityAttestation = $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.fromObject(object.vulnerabilityAttestation);
|
|
19411
|
+
}
|
|
19358
19412
|
return message;
|
|
19359
19413
|
};
|
|
19360
19414
|
|
|
@@ -19382,6 +19436,7 @@
|
|
|
19382
19436
|
object.archiveTime = null;
|
|
19383
19437
|
object.analysisCompleted = null;
|
|
19384
19438
|
object.sbomStatus = null;
|
|
19439
|
+
object.vulnerabilityAttestation = null;
|
|
19385
19440
|
}
|
|
19386
19441
|
if (message.continuousAnalysis != null && message.hasOwnProperty("continuousAnalysis"))
|
|
19387
19442
|
object.continuousAnalysis = options.enums === String ? $root.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis[message.continuousAnalysis] === undefined ? message.continuousAnalysis : $root.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis[message.continuousAnalysis] : message.continuousAnalysis;
|
|
@@ -19404,6 +19459,8 @@
|
|
|
19404
19459
|
}
|
|
19405
19460
|
if (message.sbomStatus != null && message.hasOwnProperty("sbomStatus"))
|
|
19406
19461
|
object.sbomStatus = $root.grafeas.v1.DiscoveryOccurrence.SBOMStatus.toObject(message.sbomStatus, options);
|
|
19462
|
+
if (message.vulnerabilityAttestation != null && message.hasOwnProperty("vulnerabilityAttestation"))
|
|
19463
|
+
object.vulnerabilityAttestation = $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.toObject(message.vulnerabilityAttestation, options);
|
|
19407
19464
|
return object;
|
|
19408
19465
|
};
|
|
19409
19466
|
|
|
@@ -19959,6 +20016,301 @@
|
|
|
19959
20016
|
return SBOMStatus;
|
|
19960
20017
|
})();
|
|
19961
20018
|
|
|
20019
|
+
DiscoveryOccurrence.VulnerabilityAttestation = (function() {
|
|
20020
|
+
|
|
20021
|
+
/**
|
|
20022
|
+
* Properties of a VulnerabilityAttestation.
|
|
20023
|
+
* @memberof grafeas.v1.DiscoveryOccurrence
|
|
20024
|
+
* @interface IVulnerabilityAttestation
|
|
20025
|
+
* @property {google.protobuf.ITimestamp|null} [lastAttemptTime] VulnerabilityAttestation lastAttemptTime
|
|
20026
|
+
* @property {grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState|null} [state] VulnerabilityAttestation state
|
|
20027
|
+
* @property {string|null} [error] VulnerabilityAttestation error
|
|
20028
|
+
*/
|
|
20029
|
+
|
|
20030
|
+
/**
|
|
20031
|
+
* Constructs a new VulnerabilityAttestation.
|
|
20032
|
+
* @memberof grafeas.v1.DiscoveryOccurrence
|
|
20033
|
+
* @classdesc Represents a VulnerabilityAttestation.
|
|
20034
|
+
* @implements IVulnerabilityAttestation
|
|
20035
|
+
* @constructor
|
|
20036
|
+
* @param {grafeas.v1.DiscoveryOccurrence.IVulnerabilityAttestation=} [properties] Properties to set
|
|
20037
|
+
*/
|
|
20038
|
+
function VulnerabilityAttestation(properties) {
|
|
20039
|
+
if (properties)
|
|
20040
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
20041
|
+
if (properties[keys[i]] != null)
|
|
20042
|
+
this[keys[i]] = properties[keys[i]];
|
|
20043
|
+
}
|
|
20044
|
+
|
|
20045
|
+
/**
|
|
20046
|
+
* VulnerabilityAttestation lastAttemptTime.
|
|
20047
|
+
* @member {google.protobuf.ITimestamp|null|undefined} lastAttemptTime
|
|
20048
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20049
|
+
* @instance
|
|
20050
|
+
*/
|
|
20051
|
+
VulnerabilityAttestation.prototype.lastAttemptTime = null;
|
|
20052
|
+
|
|
20053
|
+
/**
|
|
20054
|
+
* VulnerabilityAttestation state.
|
|
20055
|
+
* @member {grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState} state
|
|
20056
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20057
|
+
* @instance
|
|
20058
|
+
*/
|
|
20059
|
+
VulnerabilityAttestation.prototype.state = 0;
|
|
20060
|
+
|
|
20061
|
+
/**
|
|
20062
|
+
* VulnerabilityAttestation error.
|
|
20063
|
+
* @member {string} error
|
|
20064
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20065
|
+
* @instance
|
|
20066
|
+
*/
|
|
20067
|
+
VulnerabilityAttestation.prototype.error = "";
|
|
20068
|
+
|
|
20069
|
+
/**
|
|
20070
|
+
* Creates a new VulnerabilityAttestation instance using the specified properties.
|
|
20071
|
+
* @function create
|
|
20072
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20073
|
+
* @static
|
|
20074
|
+
* @param {grafeas.v1.DiscoveryOccurrence.IVulnerabilityAttestation=} [properties] Properties to set
|
|
20075
|
+
* @returns {grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation} VulnerabilityAttestation instance
|
|
20076
|
+
*/
|
|
20077
|
+
VulnerabilityAttestation.create = function create(properties) {
|
|
20078
|
+
return new VulnerabilityAttestation(properties);
|
|
20079
|
+
};
|
|
20080
|
+
|
|
20081
|
+
/**
|
|
20082
|
+
* Encodes the specified VulnerabilityAttestation message. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.verify|verify} messages.
|
|
20083
|
+
* @function encode
|
|
20084
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20085
|
+
* @static
|
|
20086
|
+
* @param {grafeas.v1.DiscoveryOccurrence.IVulnerabilityAttestation} message VulnerabilityAttestation message or plain object to encode
|
|
20087
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
20088
|
+
* @returns {$protobuf.Writer} Writer
|
|
20089
|
+
*/
|
|
20090
|
+
VulnerabilityAttestation.encode = function encode(message, writer) {
|
|
20091
|
+
if (!writer)
|
|
20092
|
+
writer = $Writer.create();
|
|
20093
|
+
if (message.lastAttemptTime != null && Object.hasOwnProperty.call(message, "lastAttemptTime"))
|
|
20094
|
+
$root.google.protobuf.Timestamp.encode(message.lastAttemptTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
20095
|
+
if (message.state != null && Object.hasOwnProperty.call(message, "state"))
|
|
20096
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state);
|
|
20097
|
+
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
|
20098
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.error);
|
|
20099
|
+
return writer;
|
|
20100
|
+
};
|
|
20101
|
+
|
|
20102
|
+
/**
|
|
20103
|
+
* Encodes the specified VulnerabilityAttestation message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.verify|verify} messages.
|
|
20104
|
+
* @function encodeDelimited
|
|
20105
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20106
|
+
* @static
|
|
20107
|
+
* @param {grafeas.v1.DiscoveryOccurrence.IVulnerabilityAttestation} message VulnerabilityAttestation message or plain object to encode
|
|
20108
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
20109
|
+
* @returns {$protobuf.Writer} Writer
|
|
20110
|
+
*/
|
|
20111
|
+
VulnerabilityAttestation.encodeDelimited = function encodeDelimited(message, writer) {
|
|
20112
|
+
return this.encode(message, writer).ldelim();
|
|
20113
|
+
};
|
|
20114
|
+
|
|
20115
|
+
/**
|
|
20116
|
+
* Decodes a VulnerabilityAttestation message from the specified reader or buffer.
|
|
20117
|
+
* @function decode
|
|
20118
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20119
|
+
* @static
|
|
20120
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
20121
|
+
* @param {number} [length] Message length if known beforehand
|
|
20122
|
+
* @returns {grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation} VulnerabilityAttestation
|
|
20123
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
20124
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
20125
|
+
*/
|
|
20126
|
+
VulnerabilityAttestation.decode = function decode(reader, length) {
|
|
20127
|
+
if (!(reader instanceof $Reader))
|
|
20128
|
+
reader = $Reader.create(reader);
|
|
20129
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation();
|
|
20130
|
+
while (reader.pos < end) {
|
|
20131
|
+
var tag = reader.uint32();
|
|
20132
|
+
switch (tag >>> 3) {
|
|
20133
|
+
case 1: {
|
|
20134
|
+
message.lastAttemptTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
20135
|
+
break;
|
|
20136
|
+
}
|
|
20137
|
+
case 2: {
|
|
20138
|
+
message.state = reader.int32();
|
|
20139
|
+
break;
|
|
20140
|
+
}
|
|
20141
|
+
case 3: {
|
|
20142
|
+
message.error = reader.string();
|
|
20143
|
+
break;
|
|
20144
|
+
}
|
|
20145
|
+
default:
|
|
20146
|
+
reader.skipType(tag & 7);
|
|
20147
|
+
break;
|
|
20148
|
+
}
|
|
20149
|
+
}
|
|
20150
|
+
return message;
|
|
20151
|
+
};
|
|
20152
|
+
|
|
20153
|
+
/**
|
|
20154
|
+
* Decodes a VulnerabilityAttestation message from the specified reader or buffer, length delimited.
|
|
20155
|
+
* @function decodeDelimited
|
|
20156
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20157
|
+
* @static
|
|
20158
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
20159
|
+
* @returns {grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation} VulnerabilityAttestation
|
|
20160
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
20161
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
20162
|
+
*/
|
|
20163
|
+
VulnerabilityAttestation.decodeDelimited = function decodeDelimited(reader) {
|
|
20164
|
+
if (!(reader instanceof $Reader))
|
|
20165
|
+
reader = new $Reader(reader);
|
|
20166
|
+
return this.decode(reader, reader.uint32());
|
|
20167
|
+
};
|
|
20168
|
+
|
|
20169
|
+
/**
|
|
20170
|
+
* Verifies a VulnerabilityAttestation message.
|
|
20171
|
+
* @function verify
|
|
20172
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20173
|
+
* @static
|
|
20174
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
20175
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
20176
|
+
*/
|
|
20177
|
+
VulnerabilityAttestation.verify = function verify(message) {
|
|
20178
|
+
if (typeof message !== "object" || message === null)
|
|
20179
|
+
return "object expected";
|
|
20180
|
+
if (message.lastAttemptTime != null && message.hasOwnProperty("lastAttemptTime")) {
|
|
20181
|
+
var error = $root.google.protobuf.Timestamp.verify(message.lastAttemptTime);
|
|
20182
|
+
if (error)
|
|
20183
|
+
return "lastAttemptTime." + error;
|
|
20184
|
+
}
|
|
20185
|
+
if (message.state != null && message.hasOwnProperty("state"))
|
|
20186
|
+
switch (message.state) {
|
|
20187
|
+
default:
|
|
20188
|
+
return "state: enum value expected";
|
|
20189
|
+
case 0:
|
|
20190
|
+
case 1:
|
|
20191
|
+
case 2:
|
|
20192
|
+
break;
|
|
20193
|
+
}
|
|
20194
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
|
20195
|
+
if (!$util.isString(message.error))
|
|
20196
|
+
return "error: string expected";
|
|
20197
|
+
return null;
|
|
20198
|
+
};
|
|
20199
|
+
|
|
20200
|
+
/**
|
|
20201
|
+
* Creates a VulnerabilityAttestation message from a plain object. Also converts values to their respective internal types.
|
|
20202
|
+
* @function fromObject
|
|
20203
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20204
|
+
* @static
|
|
20205
|
+
* @param {Object.<string,*>} object Plain object
|
|
20206
|
+
* @returns {grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation} VulnerabilityAttestation
|
|
20207
|
+
*/
|
|
20208
|
+
VulnerabilityAttestation.fromObject = function fromObject(object) {
|
|
20209
|
+
if (object instanceof $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation)
|
|
20210
|
+
return object;
|
|
20211
|
+
var message = new $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation();
|
|
20212
|
+
if (object.lastAttemptTime != null) {
|
|
20213
|
+
if (typeof object.lastAttemptTime !== "object")
|
|
20214
|
+
throw TypeError(".grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.lastAttemptTime: object expected");
|
|
20215
|
+
message.lastAttemptTime = $root.google.protobuf.Timestamp.fromObject(object.lastAttemptTime);
|
|
20216
|
+
}
|
|
20217
|
+
switch (object.state) {
|
|
20218
|
+
default:
|
|
20219
|
+
if (typeof object.state === "number") {
|
|
20220
|
+
message.state = object.state;
|
|
20221
|
+
break;
|
|
20222
|
+
}
|
|
20223
|
+
break;
|
|
20224
|
+
case "VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED":
|
|
20225
|
+
case 0:
|
|
20226
|
+
message.state = 0;
|
|
20227
|
+
break;
|
|
20228
|
+
case "SUCCESS":
|
|
20229
|
+
case 1:
|
|
20230
|
+
message.state = 1;
|
|
20231
|
+
break;
|
|
20232
|
+
case "FAILURE":
|
|
20233
|
+
case 2:
|
|
20234
|
+
message.state = 2;
|
|
20235
|
+
break;
|
|
20236
|
+
}
|
|
20237
|
+
if (object.error != null)
|
|
20238
|
+
message.error = String(object.error);
|
|
20239
|
+
return message;
|
|
20240
|
+
};
|
|
20241
|
+
|
|
20242
|
+
/**
|
|
20243
|
+
* Creates a plain object from a VulnerabilityAttestation message. Also converts values to other types if specified.
|
|
20244
|
+
* @function toObject
|
|
20245
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20246
|
+
* @static
|
|
20247
|
+
* @param {grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation} message VulnerabilityAttestation
|
|
20248
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
20249
|
+
* @returns {Object.<string,*>} Plain object
|
|
20250
|
+
*/
|
|
20251
|
+
VulnerabilityAttestation.toObject = function toObject(message, options) {
|
|
20252
|
+
if (!options)
|
|
20253
|
+
options = {};
|
|
20254
|
+
var object = {};
|
|
20255
|
+
if (options.defaults) {
|
|
20256
|
+
object.lastAttemptTime = null;
|
|
20257
|
+
object.state = options.enums === String ? "VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED" : 0;
|
|
20258
|
+
object.error = "";
|
|
20259
|
+
}
|
|
20260
|
+
if (message.lastAttemptTime != null && message.hasOwnProperty("lastAttemptTime"))
|
|
20261
|
+
object.lastAttemptTime = $root.google.protobuf.Timestamp.toObject(message.lastAttemptTime, options);
|
|
20262
|
+
if (message.state != null && message.hasOwnProperty("state"))
|
|
20263
|
+
object.state = options.enums === String ? $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState[message.state] === undefined ? message.state : $root.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState[message.state] : message.state;
|
|
20264
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
|
20265
|
+
object.error = message.error;
|
|
20266
|
+
return object;
|
|
20267
|
+
};
|
|
20268
|
+
|
|
20269
|
+
/**
|
|
20270
|
+
* Converts this VulnerabilityAttestation to JSON.
|
|
20271
|
+
* @function toJSON
|
|
20272
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20273
|
+
* @instance
|
|
20274
|
+
* @returns {Object.<string,*>} JSON object
|
|
20275
|
+
*/
|
|
20276
|
+
VulnerabilityAttestation.prototype.toJSON = function toJSON() {
|
|
20277
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
20278
|
+
};
|
|
20279
|
+
|
|
20280
|
+
/**
|
|
20281
|
+
* Gets the default type url for VulnerabilityAttestation
|
|
20282
|
+
* @function getTypeUrl
|
|
20283
|
+
* @memberof grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation
|
|
20284
|
+
* @static
|
|
20285
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
20286
|
+
* @returns {string} The default type url
|
|
20287
|
+
*/
|
|
20288
|
+
VulnerabilityAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
20289
|
+
if (typeUrlPrefix === undefined) {
|
|
20290
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
20291
|
+
}
|
|
20292
|
+
return typeUrlPrefix + "/grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation";
|
|
20293
|
+
};
|
|
20294
|
+
|
|
20295
|
+
/**
|
|
20296
|
+
* VulnerabilityAttestationState enum.
|
|
20297
|
+
* @name grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState
|
|
20298
|
+
* @enum {number}
|
|
20299
|
+
* @property {number} VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED=0 VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED value
|
|
20300
|
+
* @property {number} SUCCESS=1 SUCCESS value
|
|
20301
|
+
* @property {number} FAILURE=2 FAILURE value
|
|
20302
|
+
*/
|
|
20303
|
+
VulnerabilityAttestation.VulnerabilityAttestationState = (function() {
|
|
20304
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
20305
|
+
values[valuesById[0] = "VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED"] = 0;
|
|
20306
|
+
values[valuesById[1] = "SUCCESS"] = 1;
|
|
20307
|
+
values[valuesById[2] = "FAILURE"] = 2;
|
|
20308
|
+
return values;
|
|
20309
|
+
})();
|
|
20310
|
+
|
|
20311
|
+
return VulnerabilityAttestation;
|
|
20312
|
+
})();
|
|
20313
|
+
|
|
19962
20314
|
return DiscoveryOccurrence;
|
|
19963
20315
|
})();
|
|
19964
20316
|
|