@google-cloud/containeranalysis 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +436 -0
  2. package/README.md +1 -0
  3. package/build/protos/google/devtools/containeranalysis/v1beta1/attestation/attestation.proto +1 -1
  4. package/build/protos/google/devtools/containeranalysis/v1beta1/build/build.proto +1 -1
  5. package/build/protos/google/devtools/containeranalysis/v1beta1/common/common.proto +1 -1
  6. package/build/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto +35 -1
  7. package/build/protos/google/devtools/containeranalysis/v1beta1/cvss/cvss.proto +1 -1
  8. package/build/protos/google/devtools/containeranalysis/v1beta1/deployment/deployment.proto +1 -1
  9. package/build/protos/google/devtools/containeranalysis/v1beta1/discovery/discovery.proto +1 -1
  10. package/build/protos/google/devtools/containeranalysis/v1beta1/image/image.proto +1 -1
  11. package/build/protos/google/devtools/containeranalysis/v1beta1/package/package.proto +1 -1
  12. package/build/protos/google/devtools/containeranalysis/v1beta1/provenance/provenance.proto +1 -1
  13. package/build/protos/google/devtools/containeranalysis/v1beta1/source/source.proto +1 -1
  14. package/build/protos/google/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.proto +1 -1
  15. package/build/protos/grafeas/v1/cvss.proto +3 -0
  16. package/build/protos/protos.d.ts +332 -2
  17. package/build/protos/protos.js +766 -0
  18. package/build/protos/protos.json +1 -1
  19. package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +25 -0
  20. package/build/src/v1beta1/container_analysis_v1_beta1_client.js +17 -0
  21. package/build/src/v1beta1/container_analysis_v1_beta1_client_config.json +4 -0
  22. package/package.json +4 -2
  23. package/build/src/index.js.map +0 -1
  24. package/build/src/v1/container_analysis_client.js.map +0 -1
  25. package/build/src/v1/grafeas_client.js.map +0 -1
  26. package/build/src/v1/index.js.map +0 -1
  27. package/build/src/v1beta1/container_analysis_v1_beta1_client.js.map +0 -1
  28. package/build/src/v1beta1/grafeas_v1_beta1_client.js.map +0 -1
  29. package/build/src/v1beta1/index.js.map +0 -1
@@ -15269,6 +15269,7 @@
15269
15269
  case 0:
15270
15270
  case 1:
15271
15271
  case 2:
15272
+ case 3:
15272
15273
  break;
15273
15274
  }
15274
15275
  if (message.authentication != null && message.hasOwnProperty("authentication"))
@@ -15317,6 +15318,8 @@
15317
15318
  case 1:
15318
15319
  case 2:
15319
15320
  case 3:
15321
+ case 4:
15322
+ case 5:
15320
15323
  break;
15321
15324
  }
15322
15325
  if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact"))
@@ -15327,6 +15330,8 @@
15327
15330
  case 1:
15328
15331
  case 2:
15329
15332
  case 3:
15333
+ case 4:
15334
+ case 5:
15330
15335
  break;
15331
15336
  }
15332
15337
  if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact"))
@@ -15337,6 +15342,8 @@
15337
15342
  case 1:
15338
15343
  case 2:
15339
15344
  case 3:
15345
+ case 4:
15346
+ case 5:
15340
15347
  break;
15341
15348
  }
15342
15349
  return null;
@@ -15407,6 +15414,10 @@
15407
15414
  case 2:
15408
15415
  message.attackComplexity = 2;
15409
15416
  break;
15417
+ case "ATTACK_COMPLEXITY_MEDIUM":
15418
+ case 3:
15419
+ message.attackComplexity = 3;
15420
+ break;
15410
15421
  }
15411
15422
  switch (object.authentication) {
15412
15423
  default:
@@ -15519,6 +15530,14 @@
15519
15530
  case 3:
15520
15531
  message.confidentialityImpact = 3;
15521
15532
  break;
15533
+ case "IMPACT_PARTIAL":
15534
+ case 4:
15535
+ message.confidentialityImpact = 4;
15536
+ break;
15537
+ case "IMPACT_COMPLETE":
15538
+ case 5:
15539
+ message.confidentialityImpact = 5;
15540
+ break;
15522
15541
  }
15523
15542
  switch (object.integrityImpact) {
15524
15543
  default:
@@ -15543,6 +15562,14 @@
15543
15562
  case 3:
15544
15563
  message.integrityImpact = 3;
15545
15564
  break;
15565
+ case "IMPACT_PARTIAL":
15566
+ case 4:
15567
+ message.integrityImpact = 4;
15568
+ break;
15569
+ case "IMPACT_COMPLETE":
15570
+ case 5:
15571
+ message.integrityImpact = 5;
15572
+ break;
15546
15573
  }
15547
15574
  switch (object.availabilityImpact) {
15548
15575
  default:
@@ -15567,6 +15594,14 @@
15567
15594
  case 3:
15568
15595
  message.availabilityImpact = 3;
15569
15596
  break;
15597
+ case "IMPACT_PARTIAL":
15598
+ case 4:
15599
+ message.availabilityImpact = 4;
15600
+ break;
15601
+ case "IMPACT_COMPLETE":
15602
+ case 5:
15603
+ message.availabilityImpact = 5;
15604
+ break;
15570
15605
  }
15571
15606
  return message;
15572
15607
  };
@@ -15678,12 +15713,14 @@
15678
15713
  * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value
15679
15714
  * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value
15680
15715
  * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value
15716
+ * @property {number} ATTACK_COMPLEXITY_MEDIUM=3 ATTACK_COMPLEXITY_MEDIUM value
15681
15717
  */
15682
15718
  CVSS.AttackComplexity = (function() {
15683
15719
  var valuesById = {}, values = Object.create(valuesById);
15684
15720
  values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0;
15685
15721
  values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1;
15686
15722
  values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2;
15723
+ values[valuesById[3] = "ATTACK_COMPLEXITY_MEDIUM"] = 3;
15687
15724
  return values;
15688
15725
  })();
15689
15726
 
@@ -15763,6 +15800,8 @@
15763
15800
  * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value
15764
15801
  * @property {number} IMPACT_LOW=2 IMPACT_LOW value
15765
15802
  * @property {number} IMPACT_NONE=3 IMPACT_NONE value
15803
+ * @property {number} IMPACT_PARTIAL=4 IMPACT_PARTIAL value
15804
+ * @property {number} IMPACT_COMPLETE=5 IMPACT_COMPLETE value
15766
15805
  */
15767
15806
  CVSS.Impact = (function() {
15768
15807
  var valuesById = {}, values = Object.create(valuesById);
@@ -15770,6 +15809,8 @@
15770
15809
  values[valuesById[1] = "IMPACT_HIGH"] = 1;
15771
15810
  values[valuesById[2] = "IMPACT_LOW"] = 2;
15772
15811
  values[valuesById[3] = "IMPACT_NONE"] = 3;
15812
+ values[valuesById[4] = "IMPACT_PARTIAL"] = 4;
15813
+ values[valuesById[5] = "IMPACT_COMPLETE"] = 5;
15773
15814
  return values;
15774
15815
  })();
15775
15816
 
@@ -57995,9 +58036,734 @@
57995
58036
  * @variation 2
57996
58037
  */
57997
58038
 
58039
+ /**
58040
+ * Callback as used by {@link google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1|generatePackagesSummary}.
58041
+ * @memberof google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1
58042
+ * @typedef GeneratePackagesSummaryCallback
58043
+ * @type {function}
58044
+ * @param {Error|null} error Error, if any
58045
+ * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} [response] PackagesSummaryResponse
58046
+ */
58047
+
58048
+ /**
58049
+ * Calls GeneratePackagesSummary.
58050
+ * @function generatePackagesSummary
58051
+ * @memberof google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1
58052
+ * @instance
58053
+ * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} request GeneratePackagesSummaryRequest message or plain object
58054
+ * @param {google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GeneratePackagesSummaryCallback} callback Node-style callback called with the error, if any, and PackagesSummaryResponse
58055
+ * @returns {undefined}
58056
+ * @variation 1
58057
+ */
58058
+ Object.defineProperty(ContainerAnalysisV1Beta1.prototype.generatePackagesSummary = function generatePackagesSummary(request, callback) {
58059
+ return this.rpcCall(generatePackagesSummary, $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest, $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse, request, callback);
58060
+ }, "name", { value: "GeneratePackagesSummary" });
58061
+
58062
+ /**
58063
+ * Calls GeneratePackagesSummary.
58064
+ * @function generatePackagesSummary
58065
+ * @memberof google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1
58066
+ * @instance
58067
+ * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} request GeneratePackagesSummaryRequest message or plain object
58068
+ * @returns {Promise<google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse>} Promise
58069
+ * @variation 2
58070
+ */
58071
+
57998
58072
  return ContainerAnalysisV1Beta1;
57999
58073
  })();
58000
58074
 
58075
+ v1beta1.GeneratePackagesSummaryRequest = (function() {
58076
+
58077
+ /**
58078
+ * Properties of a GeneratePackagesSummaryRequest.
58079
+ * @memberof google.devtools.containeranalysis.v1beta1
58080
+ * @interface IGeneratePackagesSummaryRequest
58081
+ * @property {string|null} [name] GeneratePackagesSummaryRequest name
58082
+ */
58083
+
58084
+ /**
58085
+ * Constructs a new GeneratePackagesSummaryRequest.
58086
+ * @memberof google.devtools.containeranalysis.v1beta1
58087
+ * @classdesc Represents a GeneratePackagesSummaryRequest.
58088
+ * @implements IGeneratePackagesSummaryRequest
58089
+ * @constructor
58090
+ * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest=} [properties] Properties to set
58091
+ */
58092
+ function GeneratePackagesSummaryRequest(properties) {
58093
+ if (properties)
58094
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
58095
+ if (properties[keys[i]] != null)
58096
+ this[keys[i]] = properties[keys[i]];
58097
+ }
58098
+
58099
+ /**
58100
+ * GeneratePackagesSummaryRequest name.
58101
+ * @member {string} name
58102
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58103
+ * @instance
58104
+ */
58105
+ GeneratePackagesSummaryRequest.prototype.name = "";
58106
+
58107
+ /**
58108
+ * Creates a new GeneratePackagesSummaryRequest instance using the specified properties.
58109
+ * @function create
58110
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58111
+ * @static
58112
+ * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest=} [properties] Properties to set
58113
+ * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest instance
58114
+ */
58115
+ GeneratePackagesSummaryRequest.create = function create(properties) {
58116
+ return new GeneratePackagesSummaryRequest(properties);
58117
+ };
58118
+
58119
+ /**
58120
+ * Encodes the specified GeneratePackagesSummaryRequest message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest.verify|verify} messages.
58121
+ * @function encode
58122
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58123
+ * @static
58124
+ * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} message GeneratePackagesSummaryRequest message or plain object to encode
58125
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58126
+ * @returns {$protobuf.Writer} Writer
58127
+ */
58128
+ GeneratePackagesSummaryRequest.encode = function encode(message, writer) {
58129
+ if (!writer)
58130
+ writer = $Writer.create();
58131
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
58132
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
58133
+ return writer;
58134
+ };
58135
+
58136
+ /**
58137
+ * Encodes the specified GeneratePackagesSummaryRequest message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest.verify|verify} messages.
58138
+ * @function encodeDelimited
58139
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58140
+ * @static
58141
+ * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} message GeneratePackagesSummaryRequest message or plain object to encode
58142
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58143
+ * @returns {$protobuf.Writer} Writer
58144
+ */
58145
+ GeneratePackagesSummaryRequest.encodeDelimited = function encodeDelimited(message, writer) {
58146
+ return this.encode(message, writer).ldelim();
58147
+ };
58148
+
58149
+ /**
58150
+ * Decodes a GeneratePackagesSummaryRequest message from the specified reader or buffer.
58151
+ * @function decode
58152
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58153
+ * @static
58154
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58155
+ * @param {number} [length] Message length if known beforehand
58156
+ * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest
58157
+ * @throws {Error} If the payload is not a reader or valid buffer
58158
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58159
+ */
58160
+ GeneratePackagesSummaryRequest.decode = function decode(reader, length) {
58161
+ if (!(reader instanceof $Reader))
58162
+ reader = $Reader.create(reader);
58163
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest();
58164
+ while (reader.pos < end) {
58165
+ var tag = reader.uint32();
58166
+ switch (tag >>> 3) {
58167
+ case 1: {
58168
+ message.name = reader.string();
58169
+ break;
58170
+ }
58171
+ default:
58172
+ reader.skipType(tag & 7);
58173
+ break;
58174
+ }
58175
+ }
58176
+ return message;
58177
+ };
58178
+
58179
+ /**
58180
+ * Decodes a GeneratePackagesSummaryRequest message from the specified reader or buffer, length delimited.
58181
+ * @function decodeDelimited
58182
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58183
+ * @static
58184
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58185
+ * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest
58186
+ * @throws {Error} If the payload is not a reader or valid buffer
58187
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58188
+ */
58189
+ GeneratePackagesSummaryRequest.decodeDelimited = function decodeDelimited(reader) {
58190
+ if (!(reader instanceof $Reader))
58191
+ reader = new $Reader(reader);
58192
+ return this.decode(reader, reader.uint32());
58193
+ };
58194
+
58195
+ /**
58196
+ * Verifies a GeneratePackagesSummaryRequest message.
58197
+ * @function verify
58198
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58199
+ * @static
58200
+ * @param {Object.<string,*>} message Plain object to verify
58201
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
58202
+ */
58203
+ GeneratePackagesSummaryRequest.verify = function verify(message) {
58204
+ if (typeof message !== "object" || message === null)
58205
+ return "object expected";
58206
+ if (message.name != null && message.hasOwnProperty("name"))
58207
+ if (!$util.isString(message.name))
58208
+ return "name: string expected";
58209
+ return null;
58210
+ };
58211
+
58212
+ /**
58213
+ * Creates a GeneratePackagesSummaryRequest message from a plain object. Also converts values to their respective internal types.
58214
+ * @function fromObject
58215
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58216
+ * @static
58217
+ * @param {Object.<string,*>} object Plain object
58218
+ * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest
58219
+ */
58220
+ GeneratePackagesSummaryRequest.fromObject = function fromObject(object) {
58221
+ if (object instanceof $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest)
58222
+ return object;
58223
+ var message = new $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest();
58224
+ if (object.name != null)
58225
+ message.name = String(object.name);
58226
+ return message;
58227
+ };
58228
+
58229
+ /**
58230
+ * Creates a plain object from a GeneratePackagesSummaryRequest message. Also converts values to other types if specified.
58231
+ * @function toObject
58232
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58233
+ * @static
58234
+ * @param {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} message GeneratePackagesSummaryRequest
58235
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
58236
+ * @returns {Object.<string,*>} Plain object
58237
+ */
58238
+ GeneratePackagesSummaryRequest.toObject = function toObject(message, options) {
58239
+ if (!options)
58240
+ options = {};
58241
+ var object = {};
58242
+ if (options.defaults)
58243
+ object.name = "";
58244
+ if (message.name != null && message.hasOwnProperty("name"))
58245
+ object.name = message.name;
58246
+ return object;
58247
+ };
58248
+
58249
+ /**
58250
+ * Converts this GeneratePackagesSummaryRequest to JSON.
58251
+ * @function toJSON
58252
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58253
+ * @instance
58254
+ * @returns {Object.<string,*>} JSON object
58255
+ */
58256
+ GeneratePackagesSummaryRequest.prototype.toJSON = function toJSON() {
58257
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
58258
+ };
58259
+
58260
+ /**
58261
+ * Gets the default type url for GeneratePackagesSummaryRequest
58262
+ * @function getTypeUrl
58263
+ * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest
58264
+ * @static
58265
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
58266
+ * @returns {string} The default type url
58267
+ */
58268
+ GeneratePackagesSummaryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
58269
+ if (typeUrlPrefix === undefined) {
58270
+ typeUrlPrefix = "type.googleapis.com";
58271
+ }
58272
+ return typeUrlPrefix + "/google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest";
58273
+ };
58274
+
58275
+ return GeneratePackagesSummaryRequest;
58276
+ })();
58277
+
58278
+ v1beta1.PackagesSummaryResponse = (function() {
58279
+
58280
+ /**
58281
+ * Properties of a PackagesSummaryResponse.
58282
+ * @memberof google.devtools.containeranalysis.v1beta1
58283
+ * @interface IPackagesSummaryResponse
58284
+ * @property {string|null} [resourceUrl] PackagesSummaryResponse resourceUrl
58285
+ * @property {Array.<google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary>|null} [licensesSummary] PackagesSummaryResponse licensesSummary
58286
+ */
58287
+
58288
+ /**
58289
+ * Constructs a new PackagesSummaryResponse.
58290
+ * @memberof google.devtools.containeranalysis.v1beta1
58291
+ * @classdesc Represents a PackagesSummaryResponse.
58292
+ * @implements IPackagesSummaryResponse
58293
+ * @constructor
58294
+ * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse=} [properties] Properties to set
58295
+ */
58296
+ function PackagesSummaryResponse(properties) {
58297
+ this.licensesSummary = [];
58298
+ if (properties)
58299
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
58300
+ if (properties[keys[i]] != null)
58301
+ this[keys[i]] = properties[keys[i]];
58302
+ }
58303
+
58304
+ /**
58305
+ * PackagesSummaryResponse resourceUrl.
58306
+ * @member {string} resourceUrl
58307
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58308
+ * @instance
58309
+ */
58310
+ PackagesSummaryResponse.prototype.resourceUrl = "";
58311
+
58312
+ /**
58313
+ * PackagesSummaryResponse licensesSummary.
58314
+ * @member {Array.<google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary>} licensesSummary
58315
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58316
+ * @instance
58317
+ */
58318
+ PackagesSummaryResponse.prototype.licensesSummary = $util.emptyArray;
58319
+
58320
+ /**
58321
+ * Creates a new PackagesSummaryResponse instance using the specified properties.
58322
+ * @function create
58323
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58324
+ * @static
58325
+ * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse=} [properties] Properties to set
58326
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse instance
58327
+ */
58328
+ PackagesSummaryResponse.create = function create(properties) {
58329
+ return new PackagesSummaryResponse(properties);
58330
+ };
58331
+
58332
+ /**
58333
+ * Encodes the specified PackagesSummaryResponse message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.verify|verify} messages.
58334
+ * @function encode
58335
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58336
+ * @static
58337
+ * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse} message PackagesSummaryResponse message or plain object to encode
58338
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58339
+ * @returns {$protobuf.Writer} Writer
58340
+ */
58341
+ PackagesSummaryResponse.encode = function encode(message, writer) {
58342
+ if (!writer)
58343
+ writer = $Writer.create();
58344
+ if (message.resourceUrl != null && Object.hasOwnProperty.call(message, "resourceUrl"))
58345
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceUrl);
58346
+ if (message.licensesSummary != null && message.licensesSummary.length)
58347
+ for (var i = 0; i < message.licensesSummary.length; ++i)
58348
+ $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.encode(message.licensesSummary[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
58349
+ return writer;
58350
+ };
58351
+
58352
+ /**
58353
+ * Encodes the specified PackagesSummaryResponse message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.verify|verify} messages.
58354
+ * @function encodeDelimited
58355
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58356
+ * @static
58357
+ * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse} message PackagesSummaryResponse message or plain object to encode
58358
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58359
+ * @returns {$protobuf.Writer} Writer
58360
+ */
58361
+ PackagesSummaryResponse.encodeDelimited = function encodeDelimited(message, writer) {
58362
+ return this.encode(message, writer).ldelim();
58363
+ };
58364
+
58365
+ /**
58366
+ * Decodes a PackagesSummaryResponse message from the specified reader or buffer.
58367
+ * @function decode
58368
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58369
+ * @static
58370
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58371
+ * @param {number} [length] Message length if known beforehand
58372
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse
58373
+ * @throws {Error} If the payload is not a reader or valid buffer
58374
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58375
+ */
58376
+ PackagesSummaryResponse.decode = function decode(reader, length) {
58377
+ if (!(reader instanceof $Reader))
58378
+ reader = $Reader.create(reader);
58379
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse();
58380
+ while (reader.pos < end) {
58381
+ var tag = reader.uint32();
58382
+ switch (tag >>> 3) {
58383
+ case 1: {
58384
+ message.resourceUrl = reader.string();
58385
+ break;
58386
+ }
58387
+ case 2: {
58388
+ if (!(message.licensesSummary && message.licensesSummary.length))
58389
+ message.licensesSummary = [];
58390
+ message.licensesSummary.push($root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.decode(reader, reader.uint32()));
58391
+ break;
58392
+ }
58393
+ default:
58394
+ reader.skipType(tag & 7);
58395
+ break;
58396
+ }
58397
+ }
58398
+ return message;
58399
+ };
58400
+
58401
+ /**
58402
+ * Decodes a PackagesSummaryResponse message from the specified reader or buffer, length delimited.
58403
+ * @function decodeDelimited
58404
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58405
+ * @static
58406
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58407
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse
58408
+ * @throws {Error} If the payload is not a reader or valid buffer
58409
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58410
+ */
58411
+ PackagesSummaryResponse.decodeDelimited = function decodeDelimited(reader) {
58412
+ if (!(reader instanceof $Reader))
58413
+ reader = new $Reader(reader);
58414
+ return this.decode(reader, reader.uint32());
58415
+ };
58416
+
58417
+ /**
58418
+ * Verifies a PackagesSummaryResponse message.
58419
+ * @function verify
58420
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58421
+ * @static
58422
+ * @param {Object.<string,*>} message Plain object to verify
58423
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
58424
+ */
58425
+ PackagesSummaryResponse.verify = function verify(message) {
58426
+ if (typeof message !== "object" || message === null)
58427
+ return "object expected";
58428
+ if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl"))
58429
+ if (!$util.isString(message.resourceUrl))
58430
+ return "resourceUrl: string expected";
58431
+ if (message.licensesSummary != null && message.hasOwnProperty("licensesSummary")) {
58432
+ if (!Array.isArray(message.licensesSummary))
58433
+ return "licensesSummary: array expected";
58434
+ for (var i = 0; i < message.licensesSummary.length; ++i) {
58435
+ var error = $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify(message.licensesSummary[i]);
58436
+ if (error)
58437
+ return "licensesSummary." + error;
58438
+ }
58439
+ }
58440
+ return null;
58441
+ };
58442
+
58443
+ /**
58444
+ * Creates a PackagesSummaryResponse message from a plain object. Also converts values to their respective internal types.
58445
+ * @function fromObject
58446
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58447
+ * @static
58448
+ * @param {Object.<string,*>} object Plain object
58449
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse
58450
+ */
58451
+ PackagesSummaryResponse.fromObject = function fromObject(object) {
58452
+ if (object instanceof $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse)
58453
+ return object;
58454
+ var message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse();
58455
+ if (object.resourceUrl != null)
58456
+ message.resourceUrl = String(object.resourceUrl);
58457
+ if (object.licensesSummary) {
58458
+ if (!Array.isArray(object.licensesSummary))
58459
+ throw TypeError(".google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.licensesSummary: array expected");
58460
+ message.licensesSummary = [];
58461
+ for (var i = 0; i < object.licensesSummary.length; ++i) {
58462
+ if (typeof object.licensesSummary[i] !== "object")
58463
+ throw TypeError(".google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.licensesSummary: object expected");
58464
+ message.licensesSummary[i] = $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.fromObject(object.licensesSummary[i]);
58465
+ }
58466
+ }
58467
+ return message;
58468
+ };
58469
+
58470
+ /**
58471
+ * Creates a plain object from a PackagesSummaryResponse message. Also converts values to other types if specified.
58472
+ * @function toObject
58473
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58474
+ * @static
58475
+ * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} message PackagesSummaryResponse
58476
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
58477
+ * @returns {Object.<string,*>} Plain object
58478
+ */
58479
+ PackagesSummaryResponse.toObject = function toObject(message, options) {
58480
+ if (!options)
58481
+ options = {};
58482
+ var object = {};
58483
+ if (options.arrays || options.defaults)
58484
+ object.licensesSummary = [];
58485
+ if (options.defaults)
58486
+ object.resourceUrl = "";
58487
+ if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl"))
58488
+ object.resourceUrl = message.resourceUrl;
58489
+ if (message.licensesSummary && message.licensesSummary.length) {
58490
+ object.licensesSummary = [];
58491
+ for (var j = 0; j < message.licensesSummary.length; ++j)
58492
+ object.licensesSummary[j] = $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.toObject(message.licensesSummary[j], options);
58493
+ }
58494
+ return object;
58495
+ };
58496
+
58497
+ /**
58498
+ * Converts this PackagesSummaryResponse to JSON.
58499
+ * @function toJSON
58500
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58501
+ * @instance
58502
+ * @returns {Object.<string,*>} JSON object
58503
+ */
58504
+ PackagesSummaryResponse.prototype.toJSON = function toJSON() {
58505
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
58506
+ };
58507
+
58508
+ /**
58509
+ * Gets the default type url for PackagesSummaryResponse
58510
+ * @function getTypeUrl
58511
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58512
+ * @static
58513
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
58514
+ * @returns {string} The default type url
58515
+ */
58516
+ PackagesSummaryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
58517
+ if (typeUrlPrefix === undefined) {
58518
+ typeUrlPrefix = "type.googleapis.com";
58519
+ }
58520
+ return typeUrlPrefix + "/google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse";
58521
+ };
58522
+
58523
+ PackagesSummaryResponse.LicensesSummary = (function() {
58524
+
58525
+ /**
58526
+ * Properties of a LicensesSummary.
58527
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58528
+ * @interface ILicensesSummary
58529
+ * @property {string|null} [license] LicensesSummary license
58530
+ * @property {number|Long|null} [count] LicensesSummary count
58531
+ */
58532
+
58533
+ /**
58534
+ * Constructs a new LicensesSummary.
58535
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse
58536
+ * @classdesc Represents a LicensesSummary.
58537
+ * @implements ILicensesSummary
58538
+ * @constructor
58539
+ * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary=} [properties] Properties to set
58540
+ */
58541
+ function LicensesSummary(properties) {
58542
+ if (properties)
58543
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
58544
+ if (properties[keys[i]] != null)
58545
+ this[keys[i]] = properties[keys[i]];
58546
+ }
58547
+
58548
+ /**
58549
+ * LicensesSummary license.
58550
+ * @member {string} license
58551
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58552
+ * @instance
58553
+ */
58554
+ LicensesSummary.prototype.license = "";
58555
+
58556
+ /**
58557
+ * LicensesSummary count.
58558
+ * @member {number|Long} count
58559
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58560
+ * @instance
58561
+ */
58562
+ LicensesSummary.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
58563
+
58564
+ /**
58565
+ * Creates a new LicensesSummary instance using the specified properties.
58566
+ * @function create
58567
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58568
+ * @static
58569
+ * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary=} [properties] Properties to set
58570
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary instance
58571
+ */
58572
+ LicensesSummary.create = function create(properties) {
58573
+ return new LicensesSummary(properties);
58574
+ };
58575
+
58576
+ /**
58577
+ * Encodes the specified LicensesSummary message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify|verify} messages.
58578
+ * @function encode
58579
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58580
+ * @static
58581
+ * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary} message LicensesSummary message or plain object to encode
58582
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58583
+ * @returns {$protobuf.Writer} Writer
58584
+ */
58585
+ LicensesSummary.encode = function encode(message, writer) {
58586
+ if (!writer)
58587
+ writer = $Writer.create();
58588
+ if (message.license != null && Object.hasOwnProperty.call(message, "license"))
58589
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.license);
58590
+ if (message.count != null && Object.hasOwnProperty.call(message, "count"))
58591
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count);
58592
+ return writer;
58593
+ };
58594
+
58595
+ /**
58596
+ * Encodes the specified LicensesSummary message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify|verify} messages.
58597
+ * @function encodeDelimited
58598
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58599
+ * @static
58600
+ * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary} message LicensesSummary message or plain object to encode
58601
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58602
+ * @returns {$protobuf.Writer} Writer
58603
+ */
58604
+ LicensesSummary.encodeDelimited = function encodeDelimited(message, writer) {
58605
+ return this.encode(message, writer).ldelim();
58606
+ };
58607
+
58608
+ /**
58609
+ * Decodes a LicensesSummary message from the specified reader or buffer.
58610
+ * @function decode
58611
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58612
+ * @static
58613
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58614
+ * @param {number} [length] Message length if known beforehand
58615
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary
58616
+ * @throws {Error} If the payload is not a reader or valid buffer
58617
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58618
+ */
58619
+ LicensesSummary.decode = function decode(reader, length) {
58620
+ if (!(reader instanceof $Reader))
58621
+ reader = $Reader.create(reader);
58622
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary();
58623
+ while (reader.pos < end) {
58624
+ var tag = reader.uint32();
58625
+ switch (tag >>> 3) {
58626
+ case 1: {
58627
+ message.license = reader.string();
58628
+ break;
58629
+ }
58630
+ case 2: {
58631
+ message.count = reader.int64();
58632
+ break;
58633
+ }
58634
+ default:
58635
+ reader.skipType(tag & 7);
58636
+ break;
58637
+ }
58638
+ }
58639
+ return message;
58640
+ };
58641
+
58642
+ /**
58643
+ * Decodes a LicensesSummary message from the specified reader or buffer, length delimited.
58644
+ * @function decodeDelimited
58645
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58646
+ * @static
58647
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58648
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary
58649
+ * @throws {Error} If the payload is not a reader or valid buffer
58650
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58651
+ */
58652
+ LicensesSummary.decodeDelimited = function decodeDelimited(reader) {
58653
+ if (!(reader instanceof $Reader))
58654
+ reader = new $Reader(reader);
58655
+ return this.decode(reader, reader.uint32());
58656
+ };
58657
+
58658
+ /**
58659
+ * Verifies a LicensesSummary message.
58660
+ * @function verify
58661
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58662
+ * @static
58663
+ * @param {Object.<string,*>} message Plain object to verify
58664
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
58665
+ */
58666
+ LicensesSummary.verify = function verify(message) {
58667
+ if (typeof message !== "object" || message === null)
58668
+ return "object expected";
58669
+ if (message.license != null && message.hasOwnProperty("license"))
58670
+ if (!$util.isString(message.license))
58671
+ return "license: string expected";
58672
+ if (message.count != null && message.hasOwnProperty("count"))
58673
+ if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high)))
58674
+ return "count: integer|Long expected";
58675
+ return null;
58676
+ };
58677
+
58678
+ /**
58679
+ * Creates a LicensesSummary message from a plain object. Also converts values to their respective internal types.
58680
+ * @function fromObject
58681
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58682
+ * @static
58683
+ * @param {Object.<string,*>} object Plain object
58684
+ * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary
58685
+ */
58686
+ LicensesSummary.fromObject = function fromObject(object) {
58687
+ if (object instanceof $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary)
58688
+ return object;
58689
+ var message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary();
58690
+ if (object.license != null)
58691
+ message.license = String(object.license);
58692
+ if (object.count != null)
58693
+ if ($util.Long)
58694
+ (message.count = $util.Long.fromValue(object.count)).unsigned = false;
58695
+ else if (typeof object.count === "string")
58696
+ message.count = parseInt(object.count, 10);
58697
+ else if (typeof object.count === "number")
58698
+ message.count = object.count;
58699
+ else if (typeof object.count === "object")
58700
+ message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber();
58701
+ return message;
58702
+ };
58703
+
58704
+ /**
58705
+ * Creates a plain object from a LicensesSummary message. Also converts values to other types if specified.
58706
+ * @function toObject
58707
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58708
+ * @static
58709
+ * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} message LicensesSummary
58710
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
58711
+ * @returns {Object.<string,*>} Plain object
58712
+ */
58713
+ LicensesSummary.toObject = function toObject(message, options) {
58714
+ if (!options)
58715
+ options = {};
58716
+ var object = {};
58717
+ if (options.defaults) {
58718
+ object.license = "";
58719
+ if ($util.Long) {
58720
+ var long = new $util.Long(0, 0, false);
58721
+ object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
58722
+ } else
58723
+ object.count = options.longs === String ? "0" : 0;
58724
+ }
58725
+ if (message.license != null && message.hasOwnProperty("license"))
58726
+ object.license = message.license;
58727
+ if (message.count != null && message.hasOwnProperty("count"))
58728
+ if (typeof message.count === "number")
58729
+ object.count = options.longs === String ? String(message.count) : message.count;
58730
+ else
58731
+ object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;
58732
+ return object;
58733
+ };
58734
+
58735
+ /**
58736
+ * Converts this LicensesSummary to JSON.
58737
+ * @function toJSON
58738
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58739
+ * @instance
58740
+ * @returns {Object.<string,*>} JSON object
58741
+ */
58742
+ LicensesSummary.prototype.toJSON = function toJSON() {
58743
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
58744
+ };
58745
+
58746
+ /**
58747
+ * Gets the default type url for LicensesSummary
58748
+ * @function getTypeUrl
58749
+ * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary
58750
+ * @static
58751
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
58752
+ * @returns {string} The default type url
58753
+ */
58754
+ LicensesSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
58755
+ if (typeUrlPrefix === undefined) {
58756
+ typeUrlPrefix = "type.googleapis.com";
58757
+ }
58758
+ return typeUrlPrefix + "/google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary";
58759
+ };
58760
+
58761
+ return LicensesSummary;
58762
+ })();
58763
+
58764
+ return PackagesSummaryResponse;
58765
+ })();
58766
+
58001
58767
  return v1beta1;
58002
58768
  })();
58003
58769