diff --git a/packages/grafeas/.jsdoc.js b/packages/grafeas/.jsdoc.js index 8bd89cbb93f..014df06c146 100644 --- a/packages/grafeas/.jsdoc.js +++ b/packages/grafeas/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/grafeas', diff --git a/packages/grafeas/protos/grafeas/v1/compliance.proto b/packages/grafeas/protos/grafeas/v1/compliance.proto index 1d41db2c476..7913151eb2c 100644 --- a/packages/grafeas/protos/grafeas/v1/compliance.proto +++ b/packages/grafeas/protos/grafeas/v1/compliance.proto @@ -16,7 +16,7 @@ syntax = "proto3"; package grafeas.v1; -import "grafeas/v1/vulnerability.proto"; +import "grafeas/v1/severity.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; option java_multiple_files = true; diff --git a/packages/grafeas/protos/grafeas/v1/cvss.proto b/packages/grafeas/protos/grafeas/v1/cvss.proto index b41cd633d2a..bc2ed5209d8 100644 --- a/packages/grafeas/protos/grafeas/v1/cvss.proto +++ b/packages/grafeas/protos/grafeas/v1/cvss.proto @@ -83,3 +83,78 @@ message CVSSv3 { IMPACT_NONE = 3; } } + +// Common Vulnerability Scoring System. +// For details, see https://www.first.org/cvss/specification-document +// This is a message we will try to use for storing multiple versions of +// CVSS. The intention is that as new versions of CVSS scores get added, we +// will be able to modify this message rather than adding new protos for each +// new version of the score. +message CVSS { + // The base score is a function of the base metric scores. + float base_score = 1; + + float exploitability_score = 2; + + float impact_score = 3; + + // Base Metrics + // Represents the intrinsic characteristics of a vulnerability that are + // constant over time and across user environments. + AttackVector attack_vector = 4; + AttackComplexity attack_complexity = 5; + Authentication authentication = 6; + PrivilegesRequired privileges_required = 7; + UserInteraction user_interaction = 8; + Scope scope = 9; + Impact confidentiality_impact = 10; + Impact integrity_impact = 11; + Impact availability_impact = 12; + + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0; + ATTACK_VECTOR_NETWORK = 1; + ATTACK_VECTOR_ADJACENT = 2; + ATTACK_VECTOR_LOCAL = 3; + ATTACK_VECTOR_PHYSICAL = 4; + } + + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + ATTACK_COMPLEXITY_LOW = 1; + ATTACK_COMPLEXITY_HIGH = 2; + } + + enum Authentication { + AUTHENTICATION_UNSPECIFIED = 0; + AUTHENTICATION_MULTIPLE = 1; + AUTHENTICATION_SINGLE = 2; + AUTHENTICATION_NONE = 3; + } + + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + PRIVILEGES_REQUIRED_NONE = 1; + PRIVILEGES_REQUIRED_LOW = 2; + PRIVILEGES_REQUIRED_HIGH = 3; + } + + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0; + USER_INTERACTION_NONE = 1; + USER_INTERACTION_REQUIRED = 2; + } + + enum Scope { + SCOPE_UNSPECIFIED = 0; + SCOPE_UNCHANGED = 1; + SCOPE_CHANGED = 2; + } + + enum Impact { + IMPACT_UNSPECIFIED = 0; + IMPACT_HIGH = 1; + IMPACT_LOW = 2; + IMPACT_NONE = 3; + } +} diff --git a/packages/grafeas/protos/grafeas/v1/discovery.proto b/packages/grafeas/protos/grafeas/v1/discovery.proto index e07992557de..13939b25c59 100644 --- a/packages/grafeas/protos/grafeas/v1/discovery.proto +++ b/packages/grafeas/protos/grafeas/v1/discovery.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package grafeas.v1; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "grafeas/v1/common.proto"; @@ -80,4 +81,8 @@ message DiscoveryOccurrence { // The last time this resource was scanned. google.protobuf.Timestamp last_scan_time = 5; + + // The time occurrences related to this discovery occurrence were archived. + google.protobuf.Timestamp archive_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/grafeas/protos/grafeas/v1/severity.proto b/packages/grafeas/protos/grafeas/v1/severity.proto new file mode 100644 index 00000000000..cc9cc384535 --- /dev/null +++ b/packages/grafeas/protos/grafeas/v1/severity.proto @@ -0,0 +1,38 @@ +// Copyright 2021 The Grafeas Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grafeas.v1; + +option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; +option java_multiple_files = true; +option java_package = "io.grafeas.v1"; +option objc_class_prefix = "GRA"; + +// Note provider assigned severity/impact ranking. +enum Severity { + // Unknown. + SEVERITY_UNSPECIFIED = 0; + // Minimal severity. + MINIMAL = 1; + // Low severity. + LOW = 2; + // Medium severity. + MEDIUM = 3; + // High severity. + HIGH = 4; + // Critical severity. + CRITICAL = 5; +} diff --git a/packages/grafeas/protos/grafeas/v1/vulnerability.proto b/packages/grafeas/protos/grafeas/v1/vulnerability.proto index 476d320292e..434e14983c4 100644 --- a/packages/grafeas/protos/grafeas/v1/vulnerability.proto +++ b/packages/grafeas/protos/grafeas/v1/vulnerability.proto @@ -21,28 +21,13 @@ import "google/protobuf/timestamp.proto"; import "grafeas/v1/common.proto"; import "grafeas/v1/cvss.proto"; import "grafeas/v1/package.proto"; +import "grafeas/v1/severity.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; option java_multiple_files = true; option java_package = "io.grafeas.v1"; option objc_class_prefix = "GRA"; -// Note provider assigned severity/impact ranking. -enum Severity { - // Unknown. - SEVERITY_UNSPECIFIED = 0; - // Minimal severity. - MINIMAL = 1; - // Low severity. - LOW = 2; - // Medium severity. - MEDIUM = 3; - // High severity. - HIGH = 4; - // Critical severity. - CRITICAL = 5; -} - // A security vulnerability that can be found in resources. message VulnerabilityNote { // The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 @@ -50,7 +35,7 @@ message VulnerabilityNote { float cvss_score = 1; // The note provider assigned severity of this vulnerability. - Severity severity = 2; + grafeas.v1.Severity severity = 2; // Details of all known distros and packages affected by this vulnerability. repeated Detail details = 3; @@ -172,24 +157,15 @@ message VulnerabilityOccurrence { string type = 1; // Output only. The note provider assigned severity of this vulnerability. - Severity severity = 2; + grafeas.v1.Severity severity = 2; // Output only. 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. float cvss_score = 3; - // The CVSS v3 score for this vulnerability. - message CVSSV3 { - // The base score for for this vulnerability according to cvss v3. - float base_score = 1; - // The severity rating assigned to this vulnerability by vulnerability - // provider. - Severity severity = 2; - } - // The cvss v3 score for the vulnerability. - CVSSV3 cvssv3 = 10; + CVSS cvssv3 = 10; // Required. The set of affected locations and their fixes (if available) // within the associated resource. @@ -231,7 +207,8 @@ message VulnerabilityOccurrence { // The distro or language system assigned severity for this vulnerability // when that is available and note provider assigned severity when it is not // available. - Severity effective_severity = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + grafeas.v1.Severity effective_severity = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Output only. A one sentence description of this vulnerability. @@ -253,7 +230,7 @@ message VulnerabilityOccurrence { // PackageIssue level. In the case where multiple PackageIssues have differing // effective severities, this field should be the highest severity for any of // the PackageIssues. - Severity effective_severity = 8; + grafeas.v1.Severity effective_severity = 8; // Output only. Whether at least one of the affected packages has a fix // available. diff --git a/packages/grafeas/protos/protos.d.ts b/packages/grafeas/protos/protos.d.ts index 9ff62bb4a2a..50ecd4ad554 100644 --- a/packages/grafeas/protos/protos.d.ts +++ b/packages/grafeas/protos/protos.d.ts @@ -4301,5965 +4301,6088 @@ export namespace grafeas { CRITICAL = 5 } - /** Properties of a VulnerabilityNote. */ - interface IVulnerabilityNote { + /** Properties of a CVSSv3. */ + interface ICVSSv3 { - /** VulnerabilityNote cvssScore */ - cvssScore?: (number|null); + /** CVSSv3 baseScore */ + baseScore?: (number|null); - /** VulnerabilityNote severity */ - severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); + /** CVSSv3 exploitabilityScore */ + exploitabilityScore?: (number|null); - /** VulnerabilityNote details */ - details?: (grafeas.v1.VulnerabilityNote.IDetail[]|null); + /** CVSSv3 impactScore */ + impactScore?: (number|null); - /** VulnerabilityNote cvssV3 */ - cvssV3?: (grafeas.v1.ICVSSv3|null); + /** CVSSv3 attackVector */ + attackVector?: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector|null); - /** VulnerabilityNote windowsDetails */ - windowsDetails?: (grafeas.v1.VulnerabilityNote.IWindowsDetail[]|null); + /** CVSSv3 attackComplexity */ + attackComplexity?: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity|null); - /** VulnerabilityNote sourceUpdateTime */ - sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** CVSSv3 privilegesRequired */ + privilegesRequired?: (grafeas.v1.CVSSv3.PrivilegesRequired|keyof typeof grafeas.v1.CVSSv3.PrivilegesRequired|null); + + /** CVSSv3 userInteraction */ + userInteraction?: (grafeas.v1.CVSSv3.UserInteraction|keyof typeof grafeas.v1.CVSSv3.UserInteraction|null); + + /** CVSSv3 scope */ + scope?: (grafeas.v1.CVSSv3.Scope|keyof typeof grafeas.v1.CVSSv3.Scope|null); + + /** CVSSv3 confidentialityImpact */ + confidentialityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); + + /** CVSSv3 integrityImpact */ + integrityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); + + /** CVSSv3 availabilityImpact */ + availabilityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); } - /** Represents a VulnerabilityNote. */ - class VulnerabilityNote implements IVulnerabilityNote { + /** Represents a CVSSv3. */ + class CVSSv3 implements ICVSSv3 { /** - * Constructs a new VulnerabilityNote. + * Constructs a new CVSSv3. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IVulnerabilityNote); + constructor(properties?: grafeas.v1.ICVSSv3); - /** VulnerabilityNote cvssScore. */ - public cvssScore: number; + /** CVSSv3 baseScore. */ + public baseScore: number; - /** VulnerabilityNote severity. */ - public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + /** CVSSv3 exploitabilityScore. */ + public exploitabilityScore: number; - /** VulnerabilityNote details. */ - public details: grafeas.v1.VulnerabilityNote.IDetail[]; + /** CVSSv3 impactScore. */ + public impactScore: number; - /** VulnerabilityNote cvssV3. */ - public cvssV3?: (grafeas.v1.ICVSSv3|null); + /** CVSSv3 attackVector. */ + public attackVector: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector); - /** VulnerabilityNote windowsDetails. */ - public windowsDetails: grafeas.v1.VulnerabilityNote.IWindowsDetail[]; + /** CVSSv3 attackComplexity. */ + public attackComplexity: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity); - /** VulnerabilityNote sourceUpdateTime. */ - public sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** CVSSv3 privilegesRequired. */ + public privilegesRequired: (grafeas.v1.CVSSv3.PrivilegesRequired|keyof typeof grafeas.v1.CVSSv3.PrivilegesRequired); + + /** CVSSv3 userInteraction. */ + public userInteraction: (grafeas.v1.CVSSv3.UserInteraction|keyof typeof grafeas.v1.CVSSv3.UserInteraction); + + /** CVSSv3 scope. */ + public scope: (grafeas.v1.CVSSv3.Scope|keyof typeof grafeas.v1.CVSSv3.Scope); + + /** CVSSv3 confidentialityImpact. */ + public confidentialityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); + + /** CVSSv3 integrityImpact. */ + public integrityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); + + /** CVSSv3 availabilityImpact. */ + public availabilityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); /** - * Creates a new VulnerabilityNote instance using the specified properties. + * Creates a new CVSSv3 instance using the specified properties. * @param [properties] Properties to set - * @returns VulnerabilityNote instance + * @returns CVSSv3 instance */ - public static create(properties?: grafeas.v1.IVulnerabilityNote): grafeas.v1.VulnerabilityNote; + public static create(properties?: grafeas.v1.ICVSSv3): grafeas.v1.CVSSv3; /** - * Encodes the specified VulnerabilityNote message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. - * @param message VulnerabilityNote message or plain object to encode + * Encodes the specified CVSSv3 message. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IVulnerabilityNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VulnerabilityNote message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. - * @param message VulnerabilityNote message or plain object to encode + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IVulnerabilityNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer. + * Decodes a CVSSv3 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VulnerabilityNote + * @returns CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CVSSv3; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer, length delimited. + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VulnerabilityNote + * @returns CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CVSSv3; /** - * Verifies a VulnerabilityNote message. + * Verifies a CVSSv3 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VulnerabilityNote message from a plain object. Also converts values to their respective internal types. + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VulnerabilityNote + * @returns CVSSv3 */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CVSSv3; /** - * Creates a plain object from a VulnerabilityNote message. Also converts values to other types if specified. - * @param message VulnerabilityNote + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. + * @param message CVSSv3 * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.VulnerabilityNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VulnerabilityNote to JSON. + * Converts this CVSSv3 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace VulnerabilityNote { + namespace CVSSv3 { - /** Properties of a Detail. */ - interface IDetail { + /** AttackVector enum. */ + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0, + ATTACK_VECTOR_NETWORK = 1, + ATTACK_VECTOR_ADJACENT = 2, + ATTACK_VECTOR_LOCAL = 3, + ATTACK_VECTOR_PHYSICAL = 4 + } - /** Detail severityName */ - severityName?: (string|null); + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 + } - /** Detail description */ - description?: (string|null); + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } - /** Detail packageType */ - packageType?: (string|null); + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } - /** Detail affectedCpeUri */ - affectedCpeUri?: (string|null); + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } - /** Detail affectedPackage */ - affectedPackage?: (string|null); + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 + } + } - /** Detail affectedVersionStart */ - affectedVersionStart?: (grafeas.v1.IVersion|null); + /** Properties of a CVSS. */ + interface ICVSS { - /** Detail affectedVersionEnd */ - affectedVersionEnd?: (grafeas.v1.IVersion|null); + /** CVSS baseScore */ + baseScore?: (number|null); - /** Detail fixedCpeUri */ - fixedCpeUri?: (string|null); + /** CVSS exploitabilityScore */ + exploitabilityScore?: (number|null); - /** Detail fixedPackage */ - fixedPackage?: (string|null); + /** CVSS impactScore */ + impactScore?: (number|null); - /** Detail fixedVersion */ - fixedVersion?: (grafeas.v1.IVersion|null); + /** CVSS attackVector */ + attackVector?: (grafeas.v1.CVSS.AttackVector|keyof typeof grafeas.v1.CVSS.AttackVector|null); - /** Detail isObsolete */ - isObsolete?: (boolean|null); + /** CVSS attackComplexity */ + attackComplexity?: (grafeas.v1.CVSS.AttackComplexity|keyof typeof grafeas.v1.CVSS.AttackComplexity|null); - /** Detail sourceUpdateTime */ - sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** CVSS authentication */ + authentication?: (grafeas.v1.CVSS.Authentication|keyof typeof grafeas.v1.CVSS.Authentication|null); - /** Detail source */ - source?: (string|null); + /** CVSS privilegesRequired */ + privilegesRequired?: (grafeas.v1.CVSS.PrivilegesRequired|keyof typeof grafeas.v1.CVSS.PrivilegesRequired|null); - /** Detail vendor */ - vendor?: (string|null); - } + /** CVSS userInteraction */ + userInteraction?: (grafeas.v1.CVSS.UserInteraction|keyof typeof grafeas.v1.CVSS.UserInteraction|null); - /** Represents a Detail. */ - class Detail implements IDetail { + /** CVSS scope */ + scope?: (grafeas.v1.CVSS.Scope|keyof typeof grafeas.v1.CVSS.Scope|null); - /** - * Constructs a new Detail. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityNote.IDetail); + /** CVSS confidentialityImpact */ + confidentialityImpact?: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact|null); - /** Detail severityName. */ - public severityName: string; + /** CVSS integrityImpact */ + integrityImpact?: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact|null); - /** Detail description. */ - public description: string; + /** CVSS availabilityImpact */ + availabilityImpact?: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact|null); + } - /** Detail packageType. */ - public packageType: string; + /** Represents a CVSS. */ + class CVSS implements ICVSS { - /** Detail affectedCpeUri. */ - public affectedCpeUri: string; + /** + * Constructs a new CVSS. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.ICVSS); - /** Detail affectedPackage. */ - public affectedPackage: string; + /** CVSS baseScore. */ + public baseScore: number; - /** Detail affectedVersionStart. */ - public affectedVersionStart?: (grafeas.v1.IVersion|null); + /** CVSS exploitabilityScore. */ + public exploitabilityScore: number; - /** Detail affectedVersionEnd. */ - public affectedVersionEnd?: (grafeas.v1.IVersion|null); + /** CVSS impactScore. */ + public impactScore: number; - /** Detail fixedCpeUri. */ - public fixedCpeUri: string; + /** CVSS attackVector. */ + public attackVector: (grafeas.v1.CVSS.AttackVector|keyof typeof grafeas.v1.CVSS.AttackVector); - /** Detail fixedPackage. */ - public fixedPackage: string; + /** CVSS attackComplexity. */ + public attackComplexity: (grafeas.v1.CVSS.AttackComplexity|keyof typeof grafeas.v1.CVSS.AttackComplexity); - /** Detail fixedVersion. */ - public fixedVersion?: (grafeas.v1.IVersion|null); + /** CVSS authentication. */ + public authentication: (grafeas.v1.CVSS.Authentication|keyof typeof grafeas.v1.CVSS.Authentication); - /** Detail isObsolete. */ - public isObsolete: boolean; + /** CVSS privilegesRequired. */ + public privilegesRequired: (grafeas.v1.CVSS.PrivilegesRequired|keyof typeof grafeas.v1.CVSS.PrivilegesRequired); - /** Detail sourceUpdateTime. */ - public sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** CVSS userInteraction. */ + public userInteraction: (grafeas.v1.CVSS.UserInteraction|keyof typeof grafeas.v1.CVSS.UserInteraction); - /** Detail source. */ - public source: string; + /** CVSS scope. */ + public scope: (grafeas.v1.CVSS.Scope|keyof typeof grafeas.v1.CVSS.Scope); - /** Detail vendor. */ - public vendor: string; + /** CVSS confidentialityImpact. */ + public confidentialityImpact: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact); - /** - * Creates a new Detail instance using the specified properties. - * @param [properties] Properties to set - * @returns Detail instance - */ - public static create(properties?: grafeas.v1.VulnerabilityNote.IDetail): grafeas.v1.VulnerabilityNote.Detail; - - /** - * Encodes the specified Detail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. - * @param message Detail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.VulnerabilityNote.IDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Detail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. - * @param message Detail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.VulnerabilityNote.IDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Detail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Detail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote.Detail; - - /** - * Decodes a Detail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Detail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote.Detail; - - /** - * Verifies a Detail message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Detail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Detail - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote.Detail; - - /** - * Creates a plain object from a Detail message. Also converts values to other types if specified. - * @param message Detail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.VulnerabilityNote.Detail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Detail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WindowsDetail. */ - interface IWindowsDetail { - - /** WindowsDetail cpeUri */ - cpeUri?: (string|null); - - /** WindowsDetail name */ - name?: (string|null); - - /** WindowsDetail description */ - description?: (string|null); - - /** WindowsDetail fixingKbs */ - fixingKbs?: (grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase[]|null); - } - - /** Represents a WindowsDetail. */ - class WindowsDetail implements IWindowsDetail { - - /** - * Constructs a new WindowsDetail. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityNote.IWindowsDetail); - - /** WindowsDetail cpeUri. */ - public cpeUri: string; - - /** WindowsDetail name. */ - public name: string; - - /** WindowsDetail description. */ - public description: string; - - /** WindowsDetail fixingKbs. */ - public fixingKbs: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase[]; - - /** - * Creates a new WindowsDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsDetail instance - */ - public static create(properties?: grafeas.v1.VulnerabilityNote.IWindowsDetail): grafeas.v1.VulnerabilityNote.WindowsDetail; - - /** - * Encodes the specified WindowsDetail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. - * @param message WindowsDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.VulnerabilityNote.IWindowsDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WindowsDetail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. - * @param message WindowsDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.VulnerabilityNote.IWindowsDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WindowsDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote.WindowsDetail; - - /** - * Decodes a WindowsDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote.WindowsDetail; - - /** - * Verifies a WindowsDetail message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WindowsDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsDetail - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote.WindowsDetail; - - /** - * Creates a plain object from a WindowsDetail message. Also converts values to other types if specified. - * @param message WindowsDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.VulnerabilityNote.WindowsDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WindowsDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace WindowsDetail { - - /** Properties of a KnowledgeBase. */ - interface IKnowledgeBase { - - /** KnowledgeBase name */ - name?: (string|null); - - /** KnowledgeBase url */ - url?: (string|null); - } - - /** Represents a KnowledgeBase. */ - class KnowledgeBase implements IKnowledgeBase { - - /** - * Constructs a new KnowledgeBase. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase); - - /** KnowledgeBase name. */ - public name: string; - - /** KnowledgeBase url. */ - public url: string; - - /** - * Creates a new KnowledgeBase instance using the specified properties. - * @param [properties] Properties to set - * @returns KnowledgeBase instance - */ - public static create(properties?: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - - /** - * Encodes the specified KnowledgeBase message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. - * @param message KnowledgeBase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KnowledgeBase message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. - * @param message KnowledgeBase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KnowledgeBase message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KnowledgeBase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - - /** - * Decodes a KnowledgeBase message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KnowledgeBase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - - /** - * Verifies a KnowledgeBase message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KnowledgeBase message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KnowledgeBase - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - - /** - * Creates a plain object from a KnowledgeBase message. Also converts values to other types if specified. - * @param message KnowledgeBase - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KnowledgeBase to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Properties of a VulnerabilityOccurrence. */ - interface IVulnerabilityOccurrence { - - /** VulnerabilityOccurrence type */ - type?: (string|null); - - /** VulnerabilityOccurrence severity */ - severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - - /** VulnerabilityOccurrence cvssScore */ - cvssScore?: (number|null); - - /** VulnerabilityOccurrence cvssv3 */ - cvssv3?: (grafeas.v1.VulnerabilityOccurrence.ICVSSV3|null); - - /** VulnerabilityOccurrence packageIssue */ - packageIssue?: (grafeas.v1.VulnerabilityOccurrence.IPackageIssue[]|null); - - /** VulnerabilityOccurrence shortDescription */ - shortDescription?: (string|null); - - /** VulnerabilityOccurrence longDescription */ - longDescription?: (string|null); - - /** VulnerabilityOccurrence relatedUrls */ - relatedUrls?: (grafeas.v1.IRelatedUrl[]|null); - - /** VulnerabilityOccurrence effectiveSeverity */ - effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - - /** VulnerabilityOccurrence fixAvailable */ - fixAvailable?: (boolean|null); - } - - /** Represents a VulnerabilityOccurrence. */ - class VulnerabilityOccurrence implements IVulnerabilityOccurrence { - - /** - * Constructs a new VulnerabilityOccurrence. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IVulnerabilityOccurrence); - - /** VulnerabilityOccurrence type. */ - public type: string; - - /** VulnerabilityOccurrence severity. */ - public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - - /** VulnerabilityOccurrence cvssScore. */ - public cvssScore: number; - - /** VulnerabilityOccurrence cvssv3. */ - public cvssv3?: (grafeas.v1.VulnerabilityOccurrence.ICVSSV3|null); + /** CVSS integrityImpact. */ + public integrityImpact: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact); - /** VulnerabilityOccurrence packageIssue. */ - public packageIssue: grafeas.v1.VulnerabilityOccurrence.IPackageIssue[]; - - /** VulnerabilityOccurrence shortDescription. */ - public shortDescription: string; - - /** VulnerabilityOccurrence longDescription. */ - public longDescription: string; - - /** VulnerabilityOccurrence relatedUrls. */ - public relatedUrls: grafeas.v1.IRelatedUrl[]; - - /** VulnerabilityOccurrence effectiveSeverity. */ - public effectiveSeverity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - - /** VulnerabilityOccurrence fixAvailable. */ - public fixAvailable: boolean; + /** CVSS availabilityImpact. */ + public availabilityImpact: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact); /** - * Creates a new VulnerabilityOccurrence instance using the specified properties. + * Creates a new CVSS instance using the specified properties. * @param [properties] Properties to set - * @returns VulnerabilityOccurrence instance + * @returns CVSS instance */ - public static create(properties?: grafeas.v1.IVulnerabilityOccurrence): grafeas.v1.VulnerabilityOccurrence; + public static create(properties?: grafeas.v1.ICVSS): grafeas.v1.CVSS; /** - * Encodes the specified VulnerabilityOccurrence message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. - * @param message VulnerabilityOccurrence message or plain object to encode + * Encodes the specified CVSS message. Does not implicitly {@link grafeas.v1.CVSS.verify|verify} messages. + * @param message CVSS message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IVulnerabilityOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICVSS, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VulnerabilityOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. - * @param message VulnerabilityOccurrence message or plain object to encode + * Encodes the specified CVSS message, length delimited. Does not implicitly {@link grafeas.v1.CVSS.verify|verify} messages. + * @param message CVSS message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IVulnerabilityOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICVSS, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VulnerabilityOccurrence message from the specified reader or buffer. + * Decodes a CVSS message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VulnerabilityOccurrence + * @returns CVSS * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CVSS; /** - * Decodes a VulnerabilityOccurrence message from the specified reader or buffer, length delimited. + * Decodes a CVSS message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VulnerabilityOccurrence + * @returns CVSS * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CVSS; /** - * Verifies a VulnerabilityOccurrence message. + * Verifies a CVSS message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VulnerabilityOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a CVSS message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VulnerabilityOccurrence + * @returns CVSS */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CVSS; /** - * Creates a plain object from a VulnerabilityOccurrence message. Also converts values to other types if specified. - * @param message VulnerabilityOccurrence + * Creates a plain object from a CVSS message. Also converts values to other types if specified. + * @param message CVSS * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.VulnerabilityOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.CVSS, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VulnerabilityOccurrence to JSON. + * Converts this CVSS to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace VulnerabilityOccurrence { - - /** Properties of a CVSSV3. */ - interface ICVSSV3 { + namespace CVSS { - /** CVSSV3 baseScore */ - baseScore?: (number|null); - - /** CVSSV3 severity */ - severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); + /** AttackVector enum. */ + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0, + ATTACK_VECTOR_NETWORK = 1, + ATTACK_VECTOR_ADJACENT = 2, + ATTACK_VECTOR_LOCAL = 3, + ATTACK_VECTOR_PHYSICAL = 4 } - /** Represents a CVSSV3. */ - class CVSSV3 implements ICVSSV3 { - - /** - * Constructs a new CVSSV3. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityOccurrence.ICVSSV3); - - /** CVSSV3 baseScore. */ - public baseScore: number; - - /** CVSSV3 severity. */ - public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - - /** - * Creates a new CVSSV3 instance using the specified properties. - * @param [properties] Properties to set - * @returns CVSSV3 instance - */ - public static create(properties?: grafeas.v1.VulnerabilityOccurrence.ICVSSV3): grafeas.v1.VulnerabilityOccurrence.CVSSV3; - - /** - * Encodes the specified CVSSV3 message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.CVSSV3.verify|verify} messages. - * @param message CVSSV3 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.VulnerabilityOccurrence.ICVSSV3, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CVSSV3 message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.CVSSV3.verify|verify} messages. - * @param message CVSSV3 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.VulnerabilityOccurrence.ICVSSV3, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CVSSV3 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CVSSV3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityOccurrence.CVSSV3; - - /** - * Decodes a CVSSV3 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CVSSV3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityOccurrence.CVSSV3; - - /** - * Verifies a CVSSV3 message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CVSSV3 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CVSSV3 - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityOccurrence.CVSSV3; - - /** - * Creates a plain object from a CVSSV3 message. Also converts values to other types if specified. - * @param message CVSSV3 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.VulnerabilityOccurrence.CVSSV3, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CVSSV3 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 } - /** Properties of a PackageIssue. */ - interface IPackageIssue { - - /** PackageIssue affectedCpeUri */ - affectedCpeUri?: (string|null); - - /** PackageIssue affectedPackage */ - affectedPackage?: (string|null); - - /** PackageIssue affectedVersion */ - affectedVersion?: (grafeas.v1.IVersion|null); + /** Authentication enum. */ + enum Authentication { + AUTHENTICATION_UNSPECIFIED = 0, + AUTHENTICATION_MULTIPLE = 1, + AUTHENTICATION_SINGLE = 2, + AUTHENTICATION_NONE = 3 + } - /** PackageIssue fixedCpeUri */ - fixedCpeUri?: (string|null); + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } - /** PackageIssue fixedPackage */ - fixedPackage?: (string|null); + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } - /** PackageIssue fixedVersion */ - fixedVersion?: (grafeas.v1.IVersion|null); + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } - /** PackageIssue fixAvailable */ - fixAvailable?: (boolean|null); + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 + } + } - /** PackageIssue packageType */ - packageType?: (string|null); + /** Properties of a DeploymentNote. */ + interface IDeploymentNote { - /** PackageIssue effectiveSeverity */ - effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - } + /** DeploymentNote resourceUri */ + resourceUri?: (string[]|null); + } - /** Represents a PackageIssue. */ - class PackageIssue implements IPackageIssue { + /** Represents a DeploymentNote. */ + class DeploymentNote implements IDeploymentNote { - /** - * Constructs a new PackageIssue. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityOccurrence.IPackageIssue); + /** + * Constructs a new DeploymentNote. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IDeploymentNote); - /** PackageIssue affectedCpeUri. */ - public affectedCpeUri: string; + /** DeploymentNote resourceUri. */ + public resourceUri: string[]; - /** PackageIssue affectedPackage. */ - public affectedPackage: string; + /** + * Creates a new DeploymentNote instance using the specified properties. + * @param [properties] Properties to set + * @returns DeploymentNote instance + */ + public static create(properties?: grafeas.v1.IDeploymentNote): grafeas.v1.DeploymentNote; - /** PackageIssue affectedVersion. */ - public affectedVersion?: (grafeas.v1.IVersion|null); + /** + * Encodes the specified DeploymentNote message. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. + * @param message DeploymentNote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IDeploymentNote, writer?: $protobuf.Writer): $protobuf.Writer; - /** PackageIssue fixedCpeUri. */ - public fixedCpeUri: string; + /** + * Encodes the specified DeploymentNote message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. + * @param message DeploymentNote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IDeploymentNote, writer?: $protobuf.Writer): $protobuf.Writer; - /** PackageIssue fixedPackage. */ - public fixedPackage: string; + /** + * Decodes a DeploymentNote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeploymentNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeploymentNote; - /** PackageIssue fixedVersion. */ - public fixedVersion?: (grafeas.v1.IVersion|null); + /** + * Decodes a DeploymentNote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeploymentNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeploymentNote; - /** PackageIssue fixAvailable. */ - public fixAvailable: boolean; + /** + * Verifies a DeploymentNote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PackageIssue packageType. */ - public packageType: string; + /** + * Creates a DeploymentNote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeploymentNote + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentNote; - /** PackageIssue effectiveSeverity. */ - public effectiveSeverity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + /** + * Creates a plain object from a DeploymentNote message. Also converts values to other types if specified. + * @param message DeploymentNote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.DeploymentNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new PackageIssue instance using the specified properties. - * @param [properties] Properties to set - * @returns PackageIssue instance - */ - public static create(properties?: grafeas.v1.VulnerabilityOccurrence.IPackageIssue): grafeas.v1.VulnerabilityOccurrence.PackageIssue; + /** + * Converts this DeploymentNote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified PackageIssue message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. - * @param message PackageIssue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.VulnerabilityOccurrence.IPackageIssue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a DeploymentOccurrence. */ + interface IDeploymentOccurrence { - /** - * Encodes the specified PackageIssue message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. - * @param message PackageIssue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.VulnerabilityOccurrence.IPackageIssue, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeploymentOccurrence userEmail */ + userEmail?: (string|null); - /** - * Decodes a PackageIssue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PackageIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityOccurrence.PackageIssue; + /** DeploymentOccurrence deployTime */ + deployTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a PackageIssue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PackageIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityOccurrence.PackageIssue; + /** DeploymentOccurrence undeployTime */ + undeployTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a PackageIssue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DeploymentOccurrence config */ + config?: (string|null); - /** - * Creates a PackageIssue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PackageIssue - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityOccurrence.PackageIssue; + /** DeploymentOccurrence address */ + address?: (string|null); - /** - * Creates a plain object from a PackageIssue message. Also converts values to other types if specified. - * @param message PackageIssue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.VulnerabilityOccurrence.PackageIssue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DeploymentOccurrence resourceUri */ + resourceUri?: (string[]|null); - /** - * Converts this PackageIssue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** DeploymentOccurrence platform */ + platform?: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform|null); } - /** Properties of a CVSSv3. */ - interface ICVSSv3 { + /** Represents a DeploymentOccurrence. */ + class DeploymentOccurrence implements IDeploymentOccurrence { - /** CVSSv3 baseScore */ - baseScore?: (number|null); + /** + * Constructs a new DeploymentOccurrence. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IDeploymentOccurrence); - /** CVSSv3 exploitabilityScore */ - exploitabilityScore?: (number|null); + /** DeploymentOccurrence userEmail. */ + public userEmail: string; - /** CVSSv3 impactScore */ - impactScore?: (number|null); + /** DeploymentOccurrence deployTime. */ + public deployTime?: (google.protobuf.ITimestamp|null); - /** CVSSv3 attackVector */ - attackVector?: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector|null); + /** DeploymentOccurrence undeployTime. */ + public undeployTime?: (google.protobuf.ITimestamp|null); - /** CVSSv3 attackComplexity */ - attackComplexity?: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity|null); + /** DeploymentOccurrence config. */ + public config: string; - /** CVSSv3 privilegesRequired */ - privilegesRequired?: (grafeas.v1.CVSSv3.PrivilegesRequired|keyof typeof grafeas.v1.CVSSv3.PrivilegesRequired|null); + /** DeploymentOccurrence address. */ + public address: string; - /** CVSSv3 userInteraction */ - userInteraction?: (grafeas.v1.CVSSv3.UserInteraction|keyof typeof grafeas.v1.CVSSv3.UserInteraction|null); + /** DeploymentOccurrence resourceUri. */ + public resourceUri: string[]; - /** CVSSv3 scope */ - scope?: (grafeas.v1.CVSSv3.Scope|keyof typeof grafeas.v1.CVSSv3.Scope|null); + /** DeploymentOccurrence platform. */ + public platform: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform); - /** CVSSv3 confidentialityImpact */ - confidentialityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); + /** + * Creates a new DeploymentOccurrence instance using the specified properties. + * @param [properties] Properties to set + * @returns DeploymentOccurrence instance + */ + public static create(properties?: grafeas.v1.IDeploymentOccurrence): grafeas.v1.DeploymentOccurrence; - /** CVSSv3 integrityImpact */ - integrityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); + /** + * Encodes the specified DeploymentOccurrence message. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * @param message DeploymentOccurrence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IDeploymentOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; - /** CVSSv3 availabilityImpact */ - availabilityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); - } + /** + * Encodes the specified DeploymentOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * @param message DeploymentOccurrence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IDeploymentOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a CVSSv3. */ - class CVSSv3 implements ICVSSv3 { + /** + * Decodes a DeploymentOccurrence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeploymentOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeploymentOccurrence; /** - * Constructs a new CVSSv3. - * @param [properties] Properties to set + * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeploymentOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: grafeas.v1.ICVSSv3); + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeploymentOccurrence; - /** CVSSv3 baseScore. */ - public baseScore: number; + /** + * Verifies a DeploymentOccurrence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** CVSSv3 exploitabilityScore. */ - public exploitabilityScore: number; + /** + * Creates a DeploymentOccurrence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeploymentOccurrence + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentOccurrence; - /** CVSSv3 impactScore. */ - public impactScore: number; + /** + * Creates a plain object from a DeploymentOccurrence message. Also converts values to other types if specified. + * @param message DeploymentOccurrence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.DeploymentOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CVSSv3 attackVector. */ - public attackVector: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector); + /** + * Converts this DeploymentOccurrence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CVSSv3 attackComplexity. */ - public attackComplexity: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity); + namespace DeploymentOccurrence { - /** CVSSv3 privilegesRequired. */ - public privilegesRequired: (grafeas.v1.CVSSv3.PrivilegesRequired|keyof typeof grafeas.v1.CVSSv3.PrivilegesRequired); + /** Platform enum. */ + enum Platform { + PLATFORM_UNSPECIFIED = 0, + GKE = 1, + FLEX = 2, + CUSTOM = 3 + } + } - /** CVSSv3 userInteraction. */ - public userInteraction: (grafeas.v1.CVSSv3.UserInteraction|keyof typeof grafeas.v1.CVSSv3.UserInteraction); + /** Properties of a DiscoveryNote. */ + interface IDiscoveryNote { - /** CVSSv3 scope. */ - public scope: (grafeas.v1.CVSSv3.Scope|keyof typeof grafeas.v1.CVSSv3.Scope); + /** DiscoveryNote analysisKind */ + analysisKind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); + } - /** CVSSv3 confidentialityImpact. */ - public confidentialityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); + /** Represents a DiscoveryNote. */ + class DiscoveryNote implements IDiscoveryNote { - /** CVSSv3 integrityImpact. */ - public integrityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); + /** + * Constructs a new DiscoveryNote. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IDiscoveryNote); - /** CVSSv3 availabilityImpact. */ - public availabilityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); + /** DiscoveryNote analysisKind. */ + public analysisKind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); /** - * Creates a new CVSSv3 instance using the specified properties. + * Creates a new DiscoveryNote instance using the specified properties. * @param [properties] Properties to set - * @returns CVSSv3 instance + * @returns DiscoveryNote instance */ - public static create(properties?: grafeas.v1.ICVSSv3): grafeas.v1.CVSSv3; + public static create(properties?: grafeas.v1.IDiscoveryNote): grafeas.v1.DiscoveryNote; /** - * Encodes the specified CVSSv3 message. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. - * @param message CVSSv3 message or plain object to encode + * Encodes the specified DiscoveryNote message. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. + * @param message DiscoveryNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDiscoveryNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. - * @param message CVSSv3 message or plain object to encode + * Encodes the specified DiscoveryNote message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. + * @param message DiscoveryNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDiscoveryNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CVSSv3 message from the specified reader or buffer. + * Decodes a DiscoveryNote message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CVSSv3 + * @returns DiscoveryNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CVSSv3; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DiscoveryNote; /** - * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CVSSv3 + * @returns DiscoveryNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CVSSv3; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DiscoveryNote; /** - * Verifies a CVSSv3 message. + * Verifies a DiscoveryNote message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryNote message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CVSSv3 + * @returns DiscoveryNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.CVSSv3; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryNote; /** - * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. - * @param message CVSSv3 + * Creates a plain object from a DiscoveryNote message. Also converts values to other types if specified. + * @param message DiscoveryNote * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DiscoveryNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CVSSv3 to JSON. + * Converts this DiscoveryNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CVSSv3 { - - /** AttackVector enum. */ - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0, - ATTACK_VECTOR_NETWORK = 1, - ATTACK_VECTOR_ADJACENT = 2, - ATTACK_VECTOR_LOCAL = 3, - ATTACK_VECTOR_PHYSICAL = 4 - } - - /** AttackComplexity enum. */ - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0, - ATTACK_COMPLEXITY_LOW = 1, - ATTACK_COMPLEXITY_HIGH = 2 - } - - /** PrivilegesRequired enum. */ - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0, - PRIVILEGES_REQUIRED_NONE = 1, - PRIVILEGES_REQUIRED_LOW = 2, - PRIVILEGES_REQUIRED_HIGH = 3 - } - - /** UserInteraction enum. */ - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0, - USER_INTERACTION_NONE = 1, - USER_INTERACTION_REQUIRED = 2 - } - - /** Scope enum. */ - enum Scope { - SCOPE_UNSPECIFIED = 0, - SCOPE_UNCHANGED = 1, - SCOPE_CHANGED = 2 - } - - /** Impact enum. */ - enum Impact { - IMPACT_UNSPECIFIED = 0, - IMPACT_HIGH = 1, - IMPACT_LOW = 2, - IMPACT_NONE = 3 - } - } - - /** Architecture enum. */ - enum Architecture { - ARCHITECTURE_UNSPECIFIED = 0, - X86 = 1, - X64 = 2 - } - - /** Properties of a Distribution. */ - interface IDistribution { + /** Properties of a DiscoveryOccurrence. */ + interface IDiscoveryOccurrence { - /** Distribution cpeUri */ - cpeUri?: (string|null); + /** DiscoveryOccurrence continuousAnalysis */ + continuousAnalysis?: (grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|keyof typeof grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|null); - /** Distribution architecture */ - architecture?: (grafeas.v1.Architecture|keyof typeof grafeas.v1.Architecture|null); + /** DiscoveryOccurrence analysisStatus */ + analysisStatus?: (grafeas.v1.DiscoveryOccurrence.AnalysisStatus|keyof typeof grafeas.v1.DiscoveryOccurrence.AnalysisStatus|null); - /** Distribution latestVersion */ - latestVersion?: (grafeas.v1.IVersion|null); + /** DiscoveryOccurrence analysisStatusError */ + analysisStatusError?: (google.rpc.IStatus|null); - /** Distribution maintainer */ - maintainer?: (string|null); + /** DiscoveryOccurrence cpe */ + cpe?: (string|null); - /** Distribution url */ - url?: (string|null); + /** DiscoveryOccurrence lastScanTime */ + lastScanTime?: (google.protobuf.ITimestamp|null); - /** Distribution description */ - description?: (string|null); + /** DiscoveryOccurrence archiveTime */ + archiveTime?: (google.protobuf.ITimestamp|null); } - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** Represents a DiscoveryOccurrence. */ + class DiscoveryOccurrence implements IDiscoveryOccurrence { /** - * Constructs a new Distribution. + * Constructs a new DiscoveryOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDistribution); + constructor(properties?: grafeas.v1.IDiscoveryOccurrence); - /** Distribution cpeUri. */ - public cpeUri: string; + /** DiscoveryOccurrence continuousAnalysis. */ + public continuousAnalysis: (grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|keyof typeof grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis); - /** Distribution architecture. */ - public architecture: (grafeas.v1.Architecture|keyof typeof grafeas.v1.Architecture); + /** DiscoveryOccurrence analysisStatus. */ + public analysisStatus: (grafeas.v1.DiscoveryOccurrence.AnalysisStatus|keyof typeof grafeas.v1.DiscoveryOccurrence.AnalysisStatus); - /** Distribution latestVersion. */ - public latestVersion?: (grafeas.v1.IVersion|null); + /** DiscoveryOccurrence analysisStatusError. */ + public analysisStatusError?: (google.rpc.IStatus|null); - /** Distribution maintainer. */ - public maintainer: string; + /** DiscoveryOccurrence cpe. */ + public cpe: string; - /** Distribution url. */ - public url: string; + /** DiscoveryOccurrence lastScanTime. */ + public lastScanTime?: (google.protobuf.ITimestamp|null); - /** Distribution description. */ - public description: string; + /** DiscoveryOccurrence archiveTime. */ + public archiveTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new Distribution instance using the specified properties. + * Creates a new DiscoveryOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns Distribution instance + * @returns DiscoveryOccurrence instance */ - public static create(properties?: grafeas.v1.IDistribution): grafeas.v1.Distribution; + public static create(properties?: grafeas.v1.IDiscoveryOccurrence): grafeas.v1.DiscoveryOccurrence; /** - * Encodes the specified Distribution message. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified DiscoveryOccurrence message. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * @param message DiscoveryOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDiscoveryOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified DiscoveryOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * @param message DiscoveryOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDiscoveryOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a DiscoveryOccurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Distribution + * @returns DiscoveryOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Distribution; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DiscoveryOccurrence; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Distribution + * @returns DiscoveryOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Distribution; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DiscoveryOccurrence; /** - * Verifies a Distribution message. + * Verifies a DiscoveryOccurrence message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Distribution + * @returns DiscoveryOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Distribution; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryOccurrence; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution + * Creates a plain object from a DiscoveryOccurrence message. Also converts values to other types if specified. + * @param message DiscoveryOccurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DiscoveryOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Distribution to JSON. + * Converts this DiscoveryOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Location. */ - interface ILocation { + namespace DiscoveryOccurrence { - /** Location cpeUri */ - cpeUri?: (string|null); + /** ContinuousAnalysis enum. */ + enum ContinuousAnalysis { + CONTINUOUS_ANALYSIS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } - /** Location version */ - version?: (grafeas.v1.IVersion|null); + /** AnalysisStatus enum. */ + enum AnalysisStatus { + ANALYSIS_STATUS_UNSPECIFIED = 0, + PENDING = 1, + SCANNING = 2, + FINISHED_SUCCESS = 3, + FINISHED_FAILED = 4, + FINISHED_UNSUPPORTED = 5 + } + } - /** Location path */ - path?: (string|null); + /** Properties of a DSSEAttestationNote. */ + interface IDSSEAttestationNote { + + /** DSSEAttestationNote hint */ + hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); } - /** Represents a Location. */ - class Location implements ILocation { + /** Represents a DSSEAttestationNote. */ + class DSSEAttestationNote implements IDSSEAttestationNote { /** - * Constructs a new Location. + * Constructs a new DSSEAttestationNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ILocation); - - /** Location cpeUri. */ - public cpeUri: string; - - /** Location version. */ - public version?: (grafeas.v1.IVersion|null); + constructor(properties?: grafeas.v1.IDSSEAttestationNote); - /** Location path. */ - public path: string; + /** DSSEAttestationNote hint. */ + public hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); /** - * Creates a new Location instance using the specified properties. + * Creates a new DSSEAttestationNote instance using the specified properties. * @param [properties] Properties to set - * @returns Location instance + * @returns DSSEAttestationNote instance */ - public static create(properties?: grafeas.v1.ILocation): grafeas.v1.Location; + public static create(properties?: grafeas.v1.IDSSEAttestationNote): grafeas.v1.DSSEAttestationNote; /** - * Encodes the specified Location message. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. - * @param message Location message or plain object to encode + * Encodes the specified DSSEAttestationNote message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. + * @param message DSSEAttestationNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDSSEAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. - * @param message Location message or plain object to encode + * Encodes the specified DSSEAttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. + * @param message DSSEAttestationNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDSSEAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes a DSSEAttestationNote message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Location + * @returns DSSEAttestationNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Location; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationNote; /** - * Decodes a Location message from the specified reader or buffer, length delimited. + * Decodes a DSSEAttestationNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Location + * @returns DSSEAttestationNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Location; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationNote; /** - * Verifies a Location message. + * Verifies a DSSEAttestationNote message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. + * Creates a DSSEAttestationNote message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Location + * @returns DSSEAttestationNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Location; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationNote; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location + * Creates a plain object from a DSSEAttestationNote message. Also converts values to other types if specified. + * @param message DSSEAttestationNote * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DSSEAttestationNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Location to JSON. + * Converts this DSSEAttestationNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PackageNote. */ - interface IPackageNote { + namespace DSSEAttestationNote { - /** PackageNote name */ - name?: (string|null); + /** Properties of a DSSEHint. */ + interface IDSSEHint { - /** PackageNote distribution */ - distribution?: (grafeas.v1.IDistribution[]|null); + /** DSSEHint humanReadableName */ + humanReadableName?: (string|null); + } + + /** Represents a DSSEHint. */ + class DSSEHint implements IDSSEHint { + + /** + * Constructs a new DSSEHint. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.DSSEAttestationNote.IDSSEHint); + + /** DSSEHint humanReadableName. */ + public humanReadableName: string; + + /** + * Creates a new DSSEHint instance using the specified properties. + * @param [properties] Properties to set + * @returns DSSEHint instance + */ + public static create(properties?: grafeas.v1.DSSEAttestationNote.IDSSEHint): grafeas.v1.DSSEAttestationNote.DSSEHint; + + /** + * Encodes the specified DSSEHint message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. + * @param message DSSEHint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.DSSEAttestationNote.IDSSEHint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DSSEHint message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. + * @param message DSSEHint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.DSSEAttestationNote.IDSSEHint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DSSEHint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DSSEHint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationNote.DSSEHint; + + /** + * Decodes a DSSEHint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DSSEHint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationNote.DSSEHint; + + /** + * Verifies a DSSEHint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DSSEHint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DSSEHint + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationNote.DSSEHint; + + /** + * Creates a plain object from a DSSEHint message. Also converts values to other types if specified. + * @param message DSSEHint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.DSSEAttestationNote.DSSEHint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DSSEHint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a PackageNote. */ - class PackageNote implements IPackageNote { + /** Properties of a DSSEAttestationOccurrence. */ + interface IDSSEAttestationOccurrence { + + /** DSSEAttestationOccurrence envelope */ + envelope?: (grafeas.v1.IEnvelope|null); + + /** DSSEAttestationOccurrence statement */ + statement?: (grafeas.v1.IInTotoStatement|null); + } + + /** Represents a DSSEAttestationOccurrence. */ + class DSSEAttestationOccurrence implements IDSSEAttestationOccurrence { /** - * Constructs a new PackageNote. + * Constructs a new DSSEAttestationOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IPackageNote); + constructor(properties?: grafeas.v1.IDSSEAttestationOccurrence); - /** PackageNote name. */ - public name: string; + /** DSSEAttestationOccurrence envelope. */ + public envelope?: (grafeas.v1.IEnvelope|null); - /** PackageNote distribution. */ - public distribution: grafeas.v1.IDistribution[]; + /** DSSEAttestationOccurrence statement. */ + public statement?: (grafeas.v1.IInTotoStatement|null); + + /** DSSEAttestationOccurrence decodedPayload. */ + public decodedPayload?: "statement"; /** - * Creates a new PackageNote instance using the specified properties. + * Creates a new DSSEAttestationOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns PackageNote instance + * @returns DSSEAttestationOccurrence instance */ - public static create(properties?: grafeas.v1.IPackageNote): grafeas.v1.PackageNote; + public static create(properties?: grafeas.v1.IDSSEAttestationOccurrence): grafeas.v1.DSSEAttestationOccurrence; /** - * Encodes the specified PackageNote message. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. - * @param message PackageNote message or plain object to encode + * Encodes the specified DSSEAttestationOccurrence message. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. + * @param message DSSEAttestationOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IPackageNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDSSEAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PackageNote message, length delimited. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. - * @param message PackageNote message or plain object to encode + * Encodes the specified DSSEAttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. + * @param message DSSEAttestationOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IPackageNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDSSEAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PackageNote message from the specified reader or buffer. + * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PackageNote + * @returns DSSEAttestationOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.PackageNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationOccurrence; /** - * Decodes a PackageNote message from the specified reader or buffer, length delimited. + * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PackageNote + * @returns DSSEAttestationOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.PackageNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationOccurrence; /** - * Verifies a PackageNote message. + * Verifies a DSSEAttestationOccurrence message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PackageNote message from a plain object. Also converts values to their respective internal types. + * Creates a DSSEAttestationOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PackageNote + * @returns DSSEAttestationOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationOccurrence; /** - * Creates a plain object from a PackageNote message. Also converts values to other types if specified. - * @param message PackageNote + * Creates a plain object from a DSSEAttestationOccurrence message. Also converts values to other types if specified. + * @param message DSSEAttestationOccurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.PackageNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DSSEAttestationOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PackageNote to JSON. + * Converts this DSSEAttestationOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PackageOccurrence. */ - interface IPackageOccurrence { - - /** PackageOccurrence name */ - name?: (string|null); - - /** PackageOccurrence location */ - location?: (grafeas.v1.ILocation[]|null); - } + /** Represents a Grafeas */ + class Grafeas extends $protobuf.rpc.Service { - /** Represents a PackageOccurrence. */ - class PackageOccurrence implements IPackageOccurrence { + /** + * Constructs a new Grafeas service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Constructs a new PackageOccurrence. - * @param [properties] Properties to set + * Creates new Grafeas service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - constructor(properties?: grafeas.v1.IPackageOccurrence); + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Grafeas; - /** PackageOccurrence name. */ - public name: string; + /** + * Calls GetOccurrence. + * @param request GetOccurrenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Occurrence + */ + public getOccurrence(request: grafeas.v1.IGetOccurrenceRequest, callback: grafeas.v1.Grafeas.GetOccurrenceCallback): void; - /** PackageOccurrence location. */ - public location: grafeas.v1.ILocation[]; + /** + * Calls GetOccurrence. + * @param request GetOccurrenceRequest message or plain object + * @returns Promise + */ + public getOccurrence(request: grafeas.v1.IGetOccurrenceRequest): Promise; /** - * Creates a new PackageOccurrence instance using the specified properties. - * @param [properties] Properties to set - * @returns PackageOccurrence instance + * Calls ListOccurrences. + * @param request ListOccurrencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOccurrencesResponse */ - public static create(properties?: grafeas.v1.IPackageOccurrence): grafeas.v1.PackageOccurrence; + public listOccurrences(request: grafeas.v1.IListOccurrencesRequest, callback: grafeas.v1.Grafeas.ListOccurrencesCallback): void; /** - * Encodes the specified PackageOccurrence message. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. - * @param message PackageOccurrence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListOccurrences. + * @param request ListOccurrencesRequest message or plain object + * @returns Promise */ - public static encode(message: grafeas.v1.IPackageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public listOccurrences(request: grafeas.v1.IListOccurrencesRequest): Promise; /** - * Encodes the specified PackageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. - * @param message PackageOccurrence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteOccurrence. + * @param request DeleteOccurrenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static encodeDelimited(message: grafeas.v1.IPackageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest, callback: grafeas.v1.Grafeas.DeleteOccurrenceCallback): void; /** - * Decodes a PackageOccurrence message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PackageOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteOccurrence. + * @param request DeleteOccurrenceRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.PackageOccurrence; + public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest): Promise; /** - * Decodes a PackageOccurrence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PackageOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateOccurrence. + * @param request CreateOccurrenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Occurrence */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.PackageOccurrence; + public createOccurrence(request: grafeas.v1.ICreateOccurrenceRequest, callback: grafeas.v1.Grafeas.CreateOccurrenceCallback): void; /** - * Verifies a PackageOccurrence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateOccurrence. + * @param request CreateOccurrenceRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public createOccurrence(request: grafeas.v1.ICreateOccurrenceRequest): Promise; /** - * Creates a PackageOccurrence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PackageOccurrence + * Calls BatchCreateOccurrences. + * @param request BatchCreateOccurrencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateOccurrencesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageOccurrence; + public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest, callback: grafeas.v1.Grafeas.BatchCreateOccurrencesCallback): void; /** - * Creates a plain object from a PackageOccurrence message. Also converts values to other types if specified. - * @param message PackageOccurrence - * @param [options] Conversion options - * @returns Plain object + * Calls BatchCreateOccurrences. + * @param request BatchCreateOccurrencesRequest message or plain object + * @returns Promise */ - public static toObject(message: grafeas.v1.PackageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest): Promise; /** - * Converts this PackageOccurrence to JSON. - * @returns JSON object + * Calls UpdateOccurrence. + * @param request UpdateOccurrenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Occurrence */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Version. */ - interface IVersion { - - /** Version epoch */ - epoch?: (number|null); - - /** Version name */ - name?: (string|null); - - /** Version revision */ - revision?: (string|null); - - /** Version inclusive */ - inclusive?: (boolean|null); - - /** Version kind */ - kind?: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind|null); - - /** Version fullName */ - fullName?: (string|null); - } - - /** Represents a Version. */ - class Version implements IVersion { + public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest, callback: grafeas.v1.Grafeas.UpdateOccurrenceCallback): void; /** - * Constructs a new Version. - * @param [properties] Properties to set + * Calls UpdateOccurrence. + * @param request UpdateOccurrenceRequest message or plain object + * @returns Promise */ - constructor(properties?: grafeas.v1.IVersion); - - /** Version epoch. */ - public epoch: number; + public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest): Promise; - /** Version name. */ - public name: string; + /** + * Calls GetOccurrenceNote. + * @param request GetOccurrenceNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Note + */ + public getOccurrenceNote(request: grafeas.v1.IGetOccurrenceNoteRequest, callback: grafeas.v1.Grafeas.GetOccurrenceNoteCallback): void; - /** Version revision. */ - public revision: string; + /** + * Calls GetOccurrenceNote. + * @param request GetOccurrenceNoteRequest message or plain object + * @returns Promise + */ + public getOccurrenceNote(request: grafeas.v1.IGetOccurrenceNoteRequest): Promise; - /** Version inclusive. */ - public inclusive: boolean; + /** + * Calls GetNote. + * @param request GetNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Note + */ + public getNote(request: grafeas.v1.IGetNoteRequest, callback: grafeas.v1.Grafeas.GetNoteCallback): void; - /** Version kind. */ - public kind: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind); + /** + * Calls GetNote. + * @param request GetNoteRequest message or plain object + * @returns Promise + */ + public getNote(request: grafeas.v1.IGetNoteRequest): Promise; - /** Version fullName. */ - public fullName: string; + /** + * Calls ListNotes. + * @param request ListNotesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNotesResponse + */ + public listNotes(request: grafeas.v1.IListNotesRequest, callback: grafeas.v1.Grafeas.ListNotesCallback): void; /** - * Creates a new Version instance using the specified properties. - * @param [properties] Properties to set - * @returns Version instance + * Calls ListNotes. + * @param request ListNotesRequest message or plain object + * @returns Promise */ - public static create(properties?: grafeas.v1.IVersion): grafeas.v1.Version; + public listNotes(request: grafeas.v1.IListNotesRequest): Promise; /** - * Encodes the specified Version message. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteNote. + * @param request DeleteNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static encode(message: grafeas.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteNote(request: grafeas.v1.IDeleteNoteRequest, callback: grafeas.v1.Grafeas.DeleteNoteCallback): void; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteNote. + * @param request DeleteNoteRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: grafeas.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteNote(request: grafeas.v1.IDeleteNoteRequest): Promise; /** - * Decodes a Version message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateNote. + * @param request CreateNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Note */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Version; + public createNote(request: grafeas.v1.ICreateNoteRequest, callback: grafeas.v1.Grafeas.CreateNoteCallback): void; /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateNote. + * @param request CreateNoteRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Version; + public createNote(request: grafeas.v1.ICreateNoteRequest): Promise; /** - * Verifies a Version message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls BatchCreateNotes. + * @param request BatchCreateNotesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateNotesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest, callback: grafeas.v1.Grafeas.BatchCreateNotesCallback): void; /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Version + * Calls BatchCreateNotes. + * @param request BatchCreateNotesRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Version; + public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest): Promise; /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateNote. + * @param request UpdateNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Note */ - public static toObject(message: grafeas.v1.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateNote(request: grafeas.v1.IUpdateNoteRequest, callback: grafeas.v1.Grafeas.UpdateNoteCallback): void; /** - * Converts this Version to JSON. - * @returns JSON object + * Calls UpdateNote. + * @param request UpdateNoteRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } + public updateNote(request: grafeas.v1.IUpdateNoteRequest): Promise; - namespace Version { + /** + * Calls ListNoteOccurrences. + * @param request ListNoteOccurrencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNoteOccurrencesResponse + */ + public listNoteOccurrences(request: grafeas.v1.IListNoteOccurrencesRequest, callback: grafeas.v1.Grafeas.ListNoteOccurrencesCallback): void; - /** VersionKind enum. */ - enum VersionKind { - VERSION_KIND_UNSPECIFIED = 0, - NORMAL = 1, - MINIMUM = 2, - MAXIMUM = 3 - } + /** + * Calls ListNoteOccurrences. + * @param request ListNoteOccurrencesRequest message or plain object + * @returns Promise + */ + public listNoteOccurrences(request: grafeas.v1.IListNoteOccurrencesRequest): Promise; } - /** Properties of a DeploymentNote. */ - interface IDeploymentNote { + namespace Grafeas { - /** DeploymentNote resourceUri */ - resourceUri?: (string[]|null); - } + /** + * Callback as used by {@link grafeas.v1.Grafeas#getOccurrence}. + * @param error Error, if any + * @param [response] Occurrence + */ + type GetOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; - /** Represents a DeploymentNote. */ - class DeploymentNote implements IDeploymentNote { + /** + * Callback as used by {@link grafeas.v1.Grafeas#listOccurrences}. + * @param error Error, if any + * @param [response] ListOccurrencesResponse + */ + type ListOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.ListOccurrencesResponse) => void; /** - * Constructs a new DeploymentNote. - * @param [properties] Properties to set + * Callback as used by {@link grafeas.v1.Grafeas#deleteOccurrence}. + * @param error Error, if any + * @param [response] Empty */ - constructor(properties?: grafeas.v1.IDeploymentNote); + type DeleteOccurrenceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** DeploymentNote resourceUri. */ - public resourceUri: string[]; + /** + * Callback as used by {@link grafeas.v1.Grafeas#createOccurrence}. + * @param error Error, if any + * @param [response] Occurrence + */ + type CreateOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; /** - * Creates a new DeploymentNote instance using the specified properties. - * @param [properties] Properties to set - * @returns DeploymentNote instance + * Callback as used by {@link grafeas.v1.Grafeas#batchCreateOccurrences}. + * @param error Error, if any + * @param [response] BatchCreateOccurrencesResponse */ - public static create(properties?: grafeas.v1.IDeploymentNote): grafeas.v1.DeploymentNote; + type BatchCreateOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateOccurrencesResponse) => void; /** - * Encodes the specified DeploymentNote message. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. - * @param message DeploymentNote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link grafeas.v1.Grafeas#updateOccurrence}. + * @param error Error, if any + * @param [response] Occurrence */ - public static encode(message: grafeas.v1.IDeploymentNote, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; /** - * Encodes the specified DeploymentNote message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. - * @param message DeploymentNote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link grafeas.v1.Grafeas#getOccurrenceNote}. + * @param error Error, if any + * @param [response] Note */ - public static encodeDelimited(message: grafeas.v1.IDeploymentNote, writer?: $protobuf.Writer): $protobuf.Writer; + type GetOccurrenceNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; /** - * Decodes a DeploymentNote message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeploymentNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link grafeas.v1.Grafeas#getNote}. + * @param error Error, if any + * @param [response] Note */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeploymentNote; + type GetNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; /** - * Decodes a DeploymentNote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeploymentNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link grafeas.v1.Grafeas#listNotes}. + * @param error Error, if any + * @param [response] ListNotesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeploymentNote; + type ListNotesCallback = (error: (Error|null), response?: grafeas.v1.ListNotesResponse) => void; /** - * Verifies a DeploymentNote message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link grafeas.v1.Grafeas#deleteNote}. + * @param error Error, if any + * @param [response] Empty */ - public static verify(message: { [k: string]: any }): (string|null); + type DeleteNoteCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a DeploymentNote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeploymentNote + * Callback as used by {@link grafeas.v1.Grafeas#createNote}. + * @param error Error, if any + * @param [response] Note */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentNote; + type CreateNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; /** - * Creates a plain object from a DeploymentNote message. Also converts values to other types if specified. - * @param message DeploymentNote - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link grafeas.v1.Grafeas#batchCreateNotes}. + * @param error Error, if any + * @param [response] BatchCreateNotesResponse */ - public static toObject(message: grafeas.v1.DeploymentNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type BatchCreateNotesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateNotesResponse) => void; /** - * Converts this DeploymentNote to JSON. - * @returns JSON object + * Callback as used by {@link grafeas.v1.Grafeas#updateNote}. + * @param error Error, if any + * @param [response] Note */ - public toJSON(): { [k: string]: any }; + type UpdateNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; + + /** + * Callback as used by {@link grafeas.v1.Grafeas#listNoteOccurrences}. + * @param error Error, if any + * @param [response] ListNoteOccurrencesResponse + */ + type ListNoteOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.ListNoteOccurrencesResponse) => void; } - /** Properties of a DeploymentOccurrence. */ - interface IDeploymentOccurrence { + /** Properties of an Occurrence. */ + interface IOccurrence { - /** DeploymentOccurrence userEmail */ - userEmail?: (string|null); + /** Occurrence name */ + name?: (string|null); - /** DeploymentOccurrence deployTime */ - deployTime?: (google.protobuf.ITimestamp|null); + /** Occurrence resourceUri */ + resourceUri?: (string|null); - /** DeploymentOccurrence undeployTime */ - undeployTime?: (google.protobuf.ITimestamp|null); + /** Occurrence noteName */ + noteName?: (string|null); - /** DeploymentOccurrence config */ - config?: (string|null); + /** Occurrence kind */ + kind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); - /** DeploymentOccurrence address */ - address?: (string|null); + /** Occurrence remediation */ + remediation?: (string|null); - /** DeploymentOccurrence resourceUri */ - resourceUri?: (string[]|null); + /** Occurrence createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** DeploymentOccurrence platform */ - platform?: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform|null); + /** Occurrence updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Occurrence vulnerability */ + vulnerability?: (grafeas.v1.IVulnerabilityOccurrence|null); + + /** Occurrence build */ + build?: (grafeas.v1.IBuildOccurrence|null); + + /** Occurrence image */ + image?: (grafeas.v1.IImageOccurrence|null); + + /** Occurrence package */ + "package"?: (grafeas.v1.IPackageOccurrence|null); + + /** Occurrence deployment */ + deployment?: (grafeas.v1.IDeploymentOccurrence|null); + + /** Occurrence discovery */ + discovery?: (grafeas.v1.IDiscoveryOccurrence|null); + + /** Occurrence attestation */ + attestation?: (grafeas.v1.IAttestationOccurrence|null); + + /** Occurrence upgrade */ + upgrade?: (grafeas.v1.IUpgradeOccurrence|null); + + /** Occurrence compliance */ + compliance?: (grafeas.v1.IComplianceOccurrence|null); + + /** Occurrence dsseAttestation */ + dsseAttestation?: (grafeas.v1.IDSSEAttestationOccurrence|null); + + /** Occurrence envelope */ + envelope?: (grafeas.v1.IEnvelope|null); } - /** Represents a DeploymentOccurrence. */ - class DeploymentOccurrence implements IDeploymentOccurrence { + /** Represents an Occurrence. */ + class Occurrence implements IOccurrence { /** - * Constructs a new DeploymentOccurrence. + * Constructs a new Occurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDeploymentOccurrence); + constructor(properties?: grafeas.v1.IOccurrence); - /** DeploymentOccurrence userEmail. */ - public userEmail: string; + /** Occurrence name. */ + public name: string; - /** DeploymentOccurrence deployTime. */ - public deployTime?: (google.protobuf.ITimestamp|null); + /** Occurrence resourceUri. */ + public resourceUri: string; - /** DeploymentOccurrence undeployTime. */ - public undeployTime?: (google.protobuf.ITimestamp|null); + /** Occurrence noteName. */ + public noteName: string; - /** DeploymentOccurrence config. */ - public config: string; + /** Occurrence kind. */ + public kind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); - /** DeploymentOccurrence address. */ - public address: string; + /** Occurrence remediation. */ + public remediation: string; - /** DeploymentOccurrence resourceUri. */ - public resourceUri: string[]; + /** Occurrence createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** DeploymentOccurrence platform. */ - public platform: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform); + /** Occurrence updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Occurrence vulnerability. */ + public vulnerability?: (grafeas.v1.IVulnerabilityOccurrence|null); + + /** Occurrence build. */ + public build?: (grafeas.v1.IBuildOccurrence|null); + + /** Occurrence image. */ + public image?: (grafeas.v1.IImageOccurrence|null); + + /** Occurrence package. */ + public package?: (grafeas.v1.IPackageOccurrence|null); + + /** Occurrence deployment. */ + public deployment?: (grafeas.v1.IDeploymentOccurrence|null); + + /** Occurrence discovery. */ + public discovery?: (grafeas.v1.IDiscoveryOccurrence|null); + + /** Occurrence attestation. */ + public attestation?: (grafeas.v1.IAttestationOccurrence|null); + + /** Occurrence upgrade. */ + public upgrade?: (grafeas.v1.IUpgradeOccurrence|null); + + /** Occurrence compliance. */ + public compliance?: (grafeas.v1.IComplianceOccurrence|null); + + /** Occurrence dsseAttestation. */ + public dsseAttestation?: (grafeas.v1.IDSSEAttestationOccurrence|null); + + /** Occurrence envelope. */ + public envelope?: (grafeas.v1.IEnvelope|null); + + /** Occurrence details. */ + public details?: ("vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"); /** - * Creates a new DeploymentOccurrence instance using the specified properties. + * Creates a new Occurrence instance using the specified properties. * @param [properties] Properties to set - * @returns DeploymentOccurrence instance + * @returns Occurrence instance */ - public static create(properties?: grafeas.v1.IDeploymentOccurrence): grafeas.v1.DeploymentOccurrence; + public static create(properties?: grafeas.v1.IOccurrence): grafeas.v1.Occurrence; /** - * Encodes the specified DeploymentOccurrence message. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. - * @param message DeploymentOccurrence message or plain object to encode + * Encodes the specified Occurrence message. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. + * @param message Occurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDeploymentOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeploymentOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. - * @param message DeploymentOccurrence message or plain object to encode + * Encodes the specified Occurrence message, length delimited. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. + * @param message Occurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDeploymentOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer. + * Decodes an Occurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeploymentOccurrence + * @returns Occurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeploymentOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Occurrence; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. + * Decodes an Occurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeploymentOccurrence + * @returns Occurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeploymentOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Occurrence; /** - * Verifies a DeploymentOccurrence message. + * Verifies an Occurrence message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeploymentOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates an Occurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeploymentOccurrence + * @returns Occurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Occurrence; /** - * Creates a plain object from a DeploymentOccurrence message. Also converts values to other types if specified. - * @param message DeploymentOccurrence + * Creates a plain object from an Occurrence message. Also converts values to other types if specified. + * @param message Occurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DeploymentOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Occurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeploymentOccurrence to JSON. + * Converts this Occurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DeploymentOccurrence { + /** Properties of a Note. */ + interface INote { - /** Platform enum. */ - enum Platform { - PLATFORM_UNSPECIFIED = 0, - GKE = 1, - FLEX = 2, - CUSTOM = 3 - } - } + /** Note name */ + name?: (string|null); - /** Properties of a DiscoveryNote. */ - interface IDiscoveryNote { + /** Note shortDescription */ + shortDescription?: (string|null); - /** DiscoveryNote analysisKind */ - analysisKind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); + /** Note longDescription */ + longDescription?: (string|null); + + /** Note kind */ + kind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); + + /** Note relatedUrl */ + relatedUrl?: (grafeas.v1.IRelatedUrl[]|null); + + /** Note expirationTime */ + expirationTime?: (google.protobuf.ITimestamp|null); + + /** Note createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Note updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Note relatedNoteNames */ + relatedNoteNames?: (string[]|null); + + /** Note vulnerability */ + vulnerability?: (grafeas.v1.IVulnerabilityNote|null); + + /** Note build */ + build?: (grafeas.v1.IBuildNote|null); + + /** Note image */ + image?: (grafeas.v1.IImageNote|null); + + /** Note package */ + "package"?: (grafeas.v1.IPackageNote|null); + + /** Note deployment */ + deployment?: (grafeas.v1.IDeploymentNote|null); + + /** Note discovery */ + discovery?: (grafeas.v1.IDiscoveryNote|null); + + /** Note attestation */ + attestation?: (grafeas.v1.IAttestationNote|null); + + /** Note upgrade */ + upgrade?: (grafeas.v1.IUpgradeNote|null); + + /** Note compliance */ + compliance?: (grafeas.v1.IComplianceNote|null); + + /** Note dsseAttestation */ + dsseAttestation?: (grafeas.v1.IDSSEAttestationNote|null); } - /** Represents a DiscoveryNote. */ - class DiscoveryNote implements IDiscoveryNote { + /** Represents a Note. */ + class Note implements INote { /** - * Constructs a new DiscoveryNote. + * Constructs a new Note. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDiscoveryNote); + constructor(properties?: grafeas.v1.INote); - /** DiscoveryNote analysisKind. */ - public analysisKind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); + /** Note name. */ + public name: string; + + /** Note shortDescription. */ + public shortDescription: string; + + /** Note longDescription. */ + public longDescription: string; + + /** Note kind. */ + public kind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); + + /** Note relatedUrl. */ + public relatedUrl: grafeas.v1.IRelatedUrl[]; + + /** Note expirationTime. */ + public expirationTime?: (google.protobuf.ITimestamp|null); + + /** Note createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Note updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Note relatedNoteNames. */ + public relatedNoteNames: string[]; + + /** Note vulnerability. */ + public vulnerability?: (grafeas.v1.IVulnerabilityNote|null); + + /** Note build. */ + public build?: (grafeas.v1.IBuildNote|null); + + /** Note image. */ + public image?: (grafeas.v1.IImageNote|null); + + /** Note package. */ + public package?: (grafeas.v1.IPackageNote|null); + + /** Note deployment. */ + public deployment?: (grafeas.v1.IDeploymentNote|null); + + /** Note discovery. */ + public discovery?: (grafeas.v1.IDiscoveryNote|null); + + /** Note attestation. */ + public attestation?: (grafeas.v1.IAttestationNote|null); + + /** Note upgrade. */ + public upgrade?: (grafeas.v1.IUpgradeNote|null); + + /** Note compliance. */ + public compliance?: (grafeas.v1.IComplianceNote|null); + + /** Note dsseAttestation. */ + public dsseAttestation?: (grafeas.v1.IDSSEAttestationNote|null); + + /** Note type. */ + public type?: ("vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"); /** - * Creates a new DiscoveryNote instance using the specified properties. + * Creates a new Note instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoveryNote instance + * @returns Note instance */ - public static create(properties?: grafeas.v1.IDiscoveryNote): grafeas.v1.DiscoveryNote; + public static create(properties?: grafeas.v1.INote): grafeas.v1.Note; /** - * Encodes the specified DiscoveryNote message. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. - * @param message DiscoveryNote message or plain object to encode + * Encodes the specified Note message. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. + * @param message Note message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDiscoveryNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.INote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiscoveryNote message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. - * @param message DiscoveryNote message or plain object to encode + * Encodes the specified Note message, length delimited. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. + * @param message Note message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDiscoveryNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.INote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoveryNote message from the specified reader or buffer. + * Decodes a Note message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiscoveryNote + * @returns Note * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DiscoveryNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Note; /** - * Decodes a DiscoveryNote message from the specified reader or buffer, length delimited. + * Decodes a Note message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoveryNote + * @returns Note * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DiscoveryNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Note; /** - * Verifies a DiscoveryNote message. + * Verifies a Note message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DiscoveryNote message from a plain object. Also converts values to their respective internal types. + * Creates a Note message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoveryNote + * @returns Note */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Note; /** - * Creates a plain object from a DiscoveryNote message. Also converts values to other types if specified. - * @param message DiscoveryNote + * Creates a plain object from a Note message. Also converts values to other types if specified. + * @param message Note * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DiscoveryNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Note, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoveryNote to JSON. + * Converts this Note to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DiscoveryOccurrence. */ - interface IDiscoveryOccurrence { - - /** DiscoveryOccurrence continuousAnalysis */ - continuousAnalysis?: (grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|keyof typeof grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|null); - - /** DiscoveryOccurrence analysisStatus */ - analysisStatus?: (grafeas.v1.DiscoveryOccurrence.AnalysisStatus|keyof typeof grafeas.v1.DiscoveryOccurrence.AnalysisStatus|null); - - /** DiscoveryOccurrence analysisStatusError */ - analysisStatusError?: (google.rpc.IStatus|null); - - /** DiscoveryOccurrence cpe */ - cpe?: (string|null); + /** Properties of a GetOccurrenceRequest. */ + interface IGetOccurrenceRequest { - /** DiscoveryOccurrence lastScanTime */ - lastScanTime?: (google.protobuf.ITimestamp|null); + /** GetOccurrenceRequest name */ + name?: (string|null); } - /** Represents a DiscoveryOccurrence. */ - class DiscoveryOccurrence implements IDiscoveryOccurrence { - + /** Represents a GetOccurrenceRequest. */ + class GetOccurrenceRequest implements IGetOccurrenceRequest { + /** - * Constructs a new DiscoveryOccurrence. + * Constructs a new GetOccurrenceRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDiscoveryOccurrence); - - /** DiscoveryOccurrence continuousAnalysis. */ - public continuousAnalysis: (grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|keyof typeof grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis); - - /** DiscoveryOccurrence analysisStatus. */ - public analysisStatus: (grafeas.v1.DiscoveryOccurrence.AnalysisStatus|keyof typeof grafeas.v1.DiscoveryOccurrence.AnalysisStatus); - - /** DiscoveryOccurrence analysisStatusError. */ - public analysisStatusError?: (google.rpc.IStatus|null); - - /** DiscoveryOccurrence cpe. */ - public cpe: string; + constructor(properties?: grafeas.v1.IGetOccurrenceRequest); - /** DiscoveryOccurrence lastScanTime. */ - public lastScanTime?: (google.protobuf.ITimestamp|null); + /** GetOccurrenceRequest name. */ + public name: string; /** - * Creates a new DiscoveryOccurrence instance using the specified properties. + * Creates a new GetOccurrenceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoveryOccurrence instance + * @returns GetOccurrenceRequest instance */ - public static create(properties?: grafeas.v1.IDiscoveryOccurrence): grafeas.v1.DiscoveryOccurrence; + public static create(properties?: grafeas.v1.IGetOccurrenceRequest): grafeas.v1.GetOccurrenceRequest; /** - * Encodes the specified DiscoveryOccurrence message. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. - * @param message DiscoveryOccurrence message or plain object to encode + * Encodes the specified GetOccurrenceRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. + * @param message GetOccurrenceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDiscoveryOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiscoveryOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. - * @param message DiscoveryOccurrence message or plain object to encode + * Encodes the specified GetOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. + * @param message GetOccurrenceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDiscoveryOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer. + * Decodes a GetOccurrenceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiscoveryOccurrence + * @returns GetOccurrenceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DiscoveryOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetOccurrenceRequest; /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer, length delimited. + * Decodes a GetOccurrenceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoveryOccurrence + * @returns GetOccurrenceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DiscoveryOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetOccurrenceRequest; /** - * Verifies a DiscoveryOccurrence message. + * Verifies a GetOccurrenceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DiscoveryOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a GetOccurrenceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoveryOccurrence + * @returns GetOccurrenceRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceRequest; /** - * Creates a plain object from a DiscoveryOccurrence message. Also converts values to other types if specified. - * @param message DiscoveryOccurrence + * Creates a plain object from a GetOccurrenceRequest message. Also converts values to other types if specified. + * @param message GetOccurrenceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DiscoveryOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.GetOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoveryOccurrence to JSON. + * Converts this GetOccurrenceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DiscoveryOccurrence { + /** Properties of a ListOccurrencesRequest. */ + interface IListOccurrencesRequest { - /** ContinuousAnalysis enum. */ - enum ContinuousAnalysis { - CONTINUOUS_ANALYSIS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } + /** ListOccurrencesRequest parent */ + parent?: (string|null); - /** AnalysisStatus enum. */ - enum AnalysisStatus { - ANALYSIS_STATUS_UNSPECIFIED = 0, - PENDING = 1, - SCANNING = 2, - FINISHED_SUCCESS = 3, - FINISHED_FAILED = 4, - FINISHED_UNSUPPORTED = 5 - } - } + /** ListOccurrencesRequest filter */ + filter?: (string|null); - /** Properties of a DSSEAttestationNote. */ - interface IDSSEAttestationNote { + /** ListOccurrencesRequest pageSize */ + pageSize?: (number|null); - /** DSSEAttestationNote hint */ - hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); + /** ListOccurrencesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DSSEAttestationNote. */ - class DSSEAttestationNote implements IDSSEAttestationNote { + /** Represents a ListOccurrencesRequest. */ + class ListOccurrencesRequest implements IListOccurrencesRequest { /** - * Constructs a new DSSEAttestationNote. + * Constructs a new ListOccurrencesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDSSEAttestationNote); + constructor(properties?: grafeas.v1.IListOccurrencesRequest); - /** DSSEAttestationNote hint. */ - public hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); + /** ListOccurrencesRequest parent. */ + public parent: string; + + /** ListOccurrencesRequest filter. */ + public filter: string; + + /** ListOccurrencesRequest pageSize. */ + public pageSize: number; + + /** ListOccurrencesRequest pageToken. */ + public pageToken: string; /** - * Creates a new DSSEAttestationNote instance using the specified properties. + * Creates a new ListOccurrencesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DSSEAttestationNote instance + * @returns ListOccurrencesRequest instance */ - public static create(properties?: grafeas.v1.IDSSEAttestationNote): grafeas.v1.DSSEAttestationNote; + public static create(properties?: grafeas.v1.IListOccurrencesRequest): grafeas.v1.ListOccurrencesRequest; /** - * Encodes the specified DSSEAttestationNote message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. - * @param message DSSEAttestationNote message or plain object to encode + * Encodes the specified ListOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. + * @param message ListOccurrencesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDSSEAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DSSEAttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. - * @param message DSSEAttestationNote message or plain object to encode + * Encodes the specified ListOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. + * @param message ListOccurrencesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDSSEAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer. + * Decodes a ListOccurrencesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DSSEAttestationNote + * @returns ListOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListOccurrencesRequest; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer, length delimited. + * Decodes a ListOccurrencesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DSSEAttestationNote + * @returns ListOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListOccurrencesRequest; /** - * Verifies a DSSEAttestationNote message. + * Verifies a ListOccurrencesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DSSEAttestationNote message from a plain object. Also converts values to their respective internal types. + * Creates a ListOccurrencesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DSSEAttestationNote + * @returns ListOccurrencesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesRequest; /** - * Creates a plain object from a DSSEAttestationNote message. Also converts values to other types if specified. - * @param message DSSEAttestationNote + * Creates a plain object from a ListOccurrencesRequest message. Also converts values to other types if specified. + * @param message ListOccurrencesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DSSEAttestationNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DSSEAttestationNote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace DSSEAttestationNote { - - /** Properties of a DSSEHint. */ - interface IDSSEHint { - - /** DSSEHint humanReadableName */ - humanReadableName?: (string|null); - } - - /** Represents a DSSEHint. */ - class DSSEHint implements IDSSEHint { - - /** - * Constructs a new DSSEHint. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.DSSEAttestationNote.IDSSEHint); - - /** DSSEHint humanReadableName. */ - public humanReadableName: string; - - /** - * Creates a new DSSEHint instance using the specified properties. - * @param [properties] Properties to set - * @returns DSSEHint instance - */ - public static create(properties?: grafeas.v1.DSSEAttestationNote.IDSSEHint): grafeas.v1.DSSEAttestationNote.DSSEHint; - - /** - * Encodes the specified DSSEHint message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. - * @param message DSSEHint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.DSSEAttestationNote.IDSSEHint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DSSEHint message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. - * @param message DSSEHint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.DSSEAttestationNote.IDSSEHint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DSSEHint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DSSEHint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationNote.DSSEHint; - - /** - * Decodes a DSSEHint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DSSEHint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationNote.DSSEHint; - - /** - * Verifies a DSSEHint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DSSEHint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DSSEHint - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationNote.DSSEHint; - - /** - * Creates a plain object from a DSSEHint message. Also converts values to other types if specified. - * @param message DSSEHint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.DSSEAttestationNote.DSSEHint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DSSEHint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this ListOccurrencesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a DSSEAttestationOccurrence. */ - interface IDSSEAttestationOccurrence { + /** Properties of a ListOccurrencesResponse. */ + interface IListOccurrencesResponse { - /** DSSEAttestationOccurrence envelope */ - envelope?: (grafeas.v1.IEnvelope|null); + /** ListOccurrencesResponse occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); - /** DSSEAttestationOccurrence statement */ - statement?: (grafeas.v1.IInTotoStatement|null); + /** ListOccurrencesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DSSEAttestationOccurrence. */ - class DSSEAttestationOccurrence implements IDSSEAttestationOccurrence { + /** Represents a ListOccurrencesResponse. */ + class ListOccurrencesResponse implements IListOccurrencesResponse { /** - * Constructs a new DSSEAttestationOccurrence. + * Constructs a new ListOccurrencesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDSSEAttestationOccurrence); - - /** DSSEAttestationOccurrence envelope. */ - public envelope?: (grafeas.v1.IEnvelope|null); + constructor(properties?: grafeas.v1.IListOccurrencesResponse); - /** DSSEAttestationOccurrence statement. */ - public statement?: (grafeas.v1.IInTotoStatement|null); + /** ListOccurrencesResponse occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; - /** DSSEAttestationOccurrence decodedPayload. */ - public decodedPayload?: "statement"; + /** ListOccurrencesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DSSEAttestationOccurrence instance using the specified properties. + * Creates a new ListOccurrencesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DSSEAttestationOccurrence instance + * @returns ListOccurrencesResponse instance */ - public static create(properties?: grafeas.v1.IDSSEAttestationOccurrence): grafeas.v1.DSSEAttestationOccurrence; + public static create(properties?: grafeas.v1.IListOccurrencesResponse): grafeas.v1.ListOccurrencesResponse; /** - * Encodes the specified DSSEAttestationOccurrence message. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. - * @param message DSSEAttestationOccurrence message or plain object to encode + * Encodes the specified ListOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. + * @param message ListOccurrencesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDSSEAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DSSEAttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. - * @param message DSSEAttestationOccurrence message or plain object to encode + * Encodes the specified ListOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. + * @param message ListOccurrencesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDSSEAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer. + * Decodes a ListOccurrencesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DSSEAttestationOccurrence + * @returns ListOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListOccurrencesResponse; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer, length delimited. + * Decodes a ListOccurrencesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DSSEAttestationOccurrence + * @returns ListOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListOccurrencesResponse; /** - * Verifies a DSSEAttestationOccurrence message. + * Verifies a ListOccurrencesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DSSEAttestationOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a ListOccurrencesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DSSEAttestationOccurrence + * @returns ListOccurrencesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesResponse; /** - * Creates a plain object from a DSSEAttestationOccurrence message. Also converts values to other types if specified. - * @param message DSSEAttestationOccurrence + * Creates a plain object from a ListOccurrencesResponse message. Also converts values to other types if specified. + * @param message ListOccurrencesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DSSEAttestationOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DSSEAttestationOccurrence to JSON. + * Converts this ListOccurrencesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Grafeas */ - class Grafeas extends $protobuf.rpc.Service { + /** Properties of a DeleteOccurrenceRequest. */ + interface IDeleteOccurrenceRequest { + + /** DeleteOccurrenceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOccurrenceRequest. */ + class DeleteOccurrenceRequest implements IDeleteOccurrenceRequest { /** - * Constructs a new Grafeas service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new DeleteOccurrenceRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: grafeas.v1.IDeleteOccurrenceRequest); + + /** DeleteOccurrenceRequest name. */ + public name: string; /** - * Creates new Grafeas service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new DeleteOccurrenceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOccurrenceRequest instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Grafeas; + public static create(properties?: grafeas.v1.IDeleteOccurrenceRequest): grafeas.v1.DeleteOccurrenceRequest; /** - * Calls GetOccurrence. - * @param request GetOccurrenceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Occurrence + * Encodes the specified DeleteOccurrenceRequest message. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. + * @param message DeleteOccurrenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getOccurrence(request: grafeas.v1.IGetOccurrenceRequest, callback: grafeas.v1.Grafeas.GetOccurrenceCallback): void; + public static encode(message: grafeas.v1.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetOccurrence. - * @param request GetOccurrenceRequest message or plain object - * @returns Promise + * Encodes the specified DeleteOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. + * @param message DeleteOccurrenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getOccurrence(request: grafeas.v1.IGetOccurrenceRequest): Promise; + public static encodeDelimited(message: grafeas.v1.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListOccurrences. - * @param request ListOccurrencesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOccurrencesResponse + * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listOccurrences(request: grafeas.v1.IListOccurrencesRequest, callback: grafeas.v1.Grafeas.ListOccurrencesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeleteOccurrenceRequest; /** - * Calls ListOccurrences. - * @param request ListOccurrencesRequest message or plain object - * @returns Promise + * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listOccurrences(request: grafeas.v1.IListOccurrencesRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeleteOccurrenceRequest; /** - * Calls DeleteOccurrence. - * @param request DeleteOccurrenceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Verifies a DeleteOccurrenceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest, callback: grafeas.v1.Grafeas.DeleteOccurrenceCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteOccurrence. - * @param request DeleteOccurrenceRequest message or plain object - * @returns Promise + * Creates a DeleteOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOccurrenceRequest */ - public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest): Promise; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteOccurrenceRequest; /** - * Calls CreateOccurrence. - * @param request CreateOccurrenceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Occurrence + * Creates a plain object from a DeleteOccurrenceRequest message. Also converts values to other types if specified. + * @param message DeleteOccurrenceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.DeleteOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOccurrenceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateOccurrenceRequest. */ + interface ICreateOccurrenceRequest { + + /** CreateOccurrenceRequest parent */ + parent?: (string|null); + + /** CreateOccurrenceRequest occurrence */ + occurrence?: (grafeas.v1.IOccurrence|null); + } + + /** Represents a CreateOccurrenceRequest. */ + class CreateOccurrenceRequest implements ICreateOccurrenceRequest { + + /** + * Constructs a new CreateOccurrenceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.ICreateOccurrenceRequest); + + /** CreateOccurrenceRequest parent. */ + public parent: string; + + /** CreateOccurrenceRequest occurrence. */ + public occurrence?: (grafeas.v1.IOccurrence|null); + + /** + * Creates a new CreateOccurrenceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateOccurrenceRequest instance + */ + public static create(properties?: grafeas.v1.ICreateOccurrenceRequest): grafeas.v1.CreateOccurrenceRequest; + + /** + * Encodes the specified CreateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. + * @param message CreateOccurrenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.ICreateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. + * @param message CreateOccurrenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.ICreateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateOccurrenceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CreateOccurrenceRequest; + + /** + * Decodes a CreateOccurrenceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createOccurrence(request: grafeas.v1.ICreateOccurrenceRequest, callback: grafeas.v1.Grafeas.CreateOccurrenceCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CreateOccurrenceRequest; /** - * Calls CreateOccurrence. - * @param request CreateOccurrenceRequest message or plain object - * @returns Promise + * Verifies a CreateOccurrenceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createOccurrence(request: grafeas.v1.ICreateOccurrenceRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls BatchCreateOccurrences. - * @param request BatchCreateOccurrencesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchCreateOccurrencesResponse + * Creates a CreateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateOccurrenceRequest */ - public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest, callback: grafeas.v1.Grafeas.BatchCreateOccurrencesCallback): void; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateOccurrenceRequest; /** - * Calls BatchCreateOccurrences. - * @param request BatchCreateOccurrencesRequest message or plain object - * @returns Promise + * Creates a plain object from a CreateOccurrenceRequest message. Also converts values to other types if specified. + * @param message CreateOccurrenceRequest + * @param [options] Conversion options + * @returns Plain object */ - public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest): Promise; + public static toObject(message: grafeas.v1.CreateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateOccurrence. - * @param request UpdateOccurrenceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Occurrence + * Converts this CreateOccurrenceRequest to JSON. + * @returns JSON object */ - public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest, callback: grafeas.v1.Grafeas.UpdateOccurrenceCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateOccurrenceRequest. */ + interface IUpdateOccurrenceRequest { + + /** UpdateOccurrenceRequest name */ + name?: (string|null); + + /** UpdateOccurrenceRequest occurrence */ + occurrence?: (grafeas.v1.IOccurrence|null); + + /** UpdateOccurrenceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateOccurrenceRequest. */ + class UpdateOccurrenceRequest implements IUpdateOccurrenceRequest { /** - * Calls UpdateOccurrence. - * @param request UpdateOccurrenceRequest message or plain object - * @returns Promise + * Constructs a new UpdateOccurrenceRequest. + * @param [properties] Properties to set */ - public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest): Promise; + constructor(properties?: grafeas.v1.IUpdateOccurrenceRequest); + + /** UpdateOccurrenceRequest name. */ + public name: string; + + /** UpdateOccurrenceRequest occurrence. */ + public occurrence?: (grafeas.v1.IOccurrence|null); + + /** UpdateOccurrenceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls GetOccurrenceNote. - * @param request GetOccurrenceNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Note + * Creates a new UpdateOccurrenceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateOccurrenceRequest instance */ - public getOccurrenceNote(request: grafeas.v1.IGetOccurrenceNoteRequest, callback: grafeas.v1.Grafeas.GetOccurrenceNoteCallback): void; + public static create(properties?: grafeas.v1.IUpdateOccurrenceRequest): grafeas.v1.UpdateOccurrenceRequest; /** - * Calls GetOccurrenceNote. - * @param request GetOccurrenceNoteRequest message or plain object - * @returns Promise + * Encodes the specified UpdateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. + * @param message UpdateOccurrenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getOccurrenceNote(request: grafeas.v1.IGetOccurrenceNoteRequest): Promise; + public static encode(message: grafeas.v1.IUpdateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetNote. - * @param request GetNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Note + * Encodes the specified UpdateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. + * @param message UpdateOccurrenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getNote(request: grafeas.v1.IGetNoteRequest, callback: grafeas.v1.Grafeas.GetNoteCallback): void; + public static encodeDelimited(message: grafeas.v1.IUpdateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetNote. - * @param request GetNoteRequest message or plain object - * @returns Promise + * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getNote(request: grafeas.v1.IGetNoteRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpdateOccurrenceRequest; /** - * Calls ListNotes. - * @param request ListNotesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNotesResponse + * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listNotes(request: grafeas.v1.IListNotesRequest, callback: grafeas.v1.Grafeas.ListNotesCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpdateOccurrenceRequest; /** - * Calls ListNotes. - * @param request ListNotesRequest message or plain object - * @returns Promise + * Verifies an UpdateOccurrenceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listNotes(request: grafeas.v1.IListNotesRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteNote. - * @param request DeleteNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates an UpdateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateOccurrenceRequest */ - public deleteNote(request: grafeas.v1.IDeleteNoteRequest, callback: grafeas.v1.Grafeas.DeleteNoteCallback): void; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateOccurrenceRequest; /** - * Calls DeleteNote. - * @param request DeleteNoteRequest message or plain object - * @returns Promise + * Creates a plain object from an UpdateOccurrenceRequest message. Also converts values to other types if specified. + * @param message UpdateOccurrenceRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteNote(request: grafeas.v1.IDeleteNoteRequest): Promise; + public static toObject(message: grafeas.v1.UpdateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CreateNote. - * @param request CreateNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Note + * Converts this UpdateOccurrenceRequest to JSON. + * @returns JSON object */ - public createNote(request: grafeas.v1.ICreateNoteRequest, callback: grafeas.v1.Grafeas.CreateNoteCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetNoteRequest. */ + interface IGetNoteRequest { + + /** GetNoteRequest name */ + name?: (string|null); + } + + /** Represents a GetNoteRequest. */ + class GetNoteRequest implements IGetNoteRequest { /** - * Calls CreateNote. - * @param request CreateNoteRequest message or plain object - * @returns Promise + * Constructs a new GetNoteRequest. + * @param [properties] Properties to set */ - public createNote(request: grafeas.v1.ICreateNoteRequest): Promise; + constructor(properties?: grafeas.v1.IGetNoteRequest); + + /** GetNoteRequest name. */ + public name: string; /** - * Calls BatchCreateNotes. - * @param request BatchCreateNotesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchCreateNotesResponse + * Creates a new GetNoteRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNoteRequest instance */ - public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest, callback: grafeas.v1.Grafeas.BatchCreateNotesCallback): void; + public static create(properties?: grafeas.v1.IGetNoteRequest): grafeas.v1.GetNoteRequest; /** - * Calls BatchCreateNotes. - * @param request BatchCreateNotesRequest message or plain object - * @returns Promise + * Encodes the specified GetNoteRequest message. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. + * @param message GetNoteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest): Promise; + public static encode(message: grafeas.v1.IGetNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateNote. - * @param request UpdateNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Note + * Encodes the specified GetNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. + * @param message GetNoteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateNote(request: grafeas.v1.IUpdateNoteRequest, callback: grafeas.v1.Grafeas.UpdateNoteCallback): void; + public static encodeDelimited(message: grafeas.v1.IGetNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateNote. - * @param request UpdateNoteRequest message or plain object - * @returns Promise + * Decodes a GetNoteRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateNote(request: grafeas.v1.IUpdateNoteRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetNoteRequest; /** - * Calls ListNoteOccurrences. - * @param request ListNoteOccurrencesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNoteOccurrencesResponse + * Decodes a GetNoteRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listNoteOccurrences(request: grafeas.v1.IListNoteOccurrencesRequest, callback: grafeas.v1.Grafeas.ListNoteOccurrencesCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetNoteRequest; /** - * Calls ListNoteOccurrences. - * @param request ListNoteOccurrencesRequest message or plain object - * @returns Promise + * Verifies a GetNoteRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listNoteOccurrences(request: grafeas.v1.IListNoteOccurrencesRequest): Promise; - } - - namespace Grafeas { + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link grafeas.v1.Grafeas#getOccurrence}. - * @param error Error, if any - * @param [response] Occurrence + * Creates a GetNoteRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNoteRequest */ - type GetOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GetNoteRequest; /** - * Callback as used by {@link grafeas.v1.Grafeas#listOccurrences}. - * @param error Error, if any - * @param [response] ListOccurrencesResponse + * Creates a plain object from a GetNoteRequest message. Also converts values to other types if specified. + * @param message GetNoteRequest + * @param [options] Conversion options + * @returns Plain object */ - type ListOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.ListOccurrencesResponse) => void; + public static toObject(message: grafeas.v1.GetNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link grafeas.v1.Grafeas#deleteOccurrence}. - * @param error Error, if any - * @param [response] Empty + * Converts this GetNoteRequest to JSON. + * @returns JSON object */ - type DeleteOccurrenceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOccurrenceNoteRequest. */ + interface IGetOccurrenceNoteRequest { + + /** GetOccurrenceNoteRequest name */ + name?: (string|null); + } - /** - * Callback as used by {@link grafeas.v1.Grafeas#createOccurrence}. - * @param error Error, if any - * @param [response] Occurrence - */ - type CreateOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; + /** Represents a GetOccurrenceNoteRequest. */ + class GetOccurrenceNoteRequest implements IGetOccurrenceNoteRequest { /** - * Callback as used by {@link grafeas.v1.Grafeas#batchCreateOccurrences}. - * @param error Error, if any - * @param [response] BatchCreateOccurrencesResponse + * Constructs a new GetOccurrenceNoteRequest. + * @param [properties] Properties to set */ - type BatchCreateOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateOccurrencesResponse) => void; + constructor(properties?: grafeas.v1.IGetOccurrenceNoteRequest); + + /** GetOccurrenceNoteRequest name. */ + public name: string; /** - * Callback as used by {@link grafeas.v1.Grafeas#updateOccurrence}. - * @param error Error, if any - * @param [response] Occurrence + * Creates a new GetOccurrenceNoteRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOccurrenceNoteRequest instance */ - type UpdateOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; + public static create(properties?: grafeas.v1.IGetOccurrenceNoteRequest): grafeas.v1.GetOccurrenceNoteRequest; /** - * Callback as used by {@link grafeas.v1.Grafeas#getOccurrenceNote}. - * @param error Error, if any - * @param [response] Note + * Encodes the specified GetOccurrenceNoteRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. + * @param message GetOccurrenceNoteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetOccurrenceNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; + public static encode(message: grafeas.v1.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link grafeas.v1.Grafeas#getNote}. - * @param error Error, if any - * @param [response] Note + * Encodes the specified GetOccurrenceNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. + * @param message GetOccurrenceNoteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; + public static encodeDelimited(message: grafeas.v1.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link grafeas.v1.Grafeas#listNotes}. - * @param error Error, if any - * @param [response] ListNotesResponse + * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOccurrenceNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListNotesCallback = (error: (Error|null), response?: grafeas.v1.ListNotesResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetOccurrenceNoteRequest; /** - * Callback as used by {@link grafeas.v1.Grafeas#deleteNote}. - * @param error Error, if any - * @param [response] Empty + * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOccurrenceNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteNoteCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetOccurrenceNoteRequest; /** - * Callback as used by {@link grafeas.v1.Grafeas#createNote}. - * @param error Error, if any - * @param [response] Note + * Verifies a GetOccurrenceNoteRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreateNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link grafeas.v1.Grafeas#batchCreateNotes}. - * @param error Error, if any - * @param [response] BatchCreateNotesResponse + * Creates a GetOccurrenceNoteRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOccurrenceNoteRequest */ - type BatchCreateNotesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateNotesResponse) => void; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceNoteRequest; /** - * Callback as used by {@link grafeas.v1.Grafeas#updateNote}. - * @param error Error, if any - * @param [response] Note + * Creates a plain object from a GetOccurrenceNoteRequest message. Also converts values to other types if specified. + * @param message GetOccurrenceNoteRequest + * @param [options] Conversion options + * @returns Plain object */ - type UpdateNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; + public static toObject(message: grafeas.v1.GetOccurrenceNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link grafeas.v1.Grafeas#listNoteOccurrences}. - * @param error Error, if any - * @param [response] ListNoteOccurrencesResponse + * Converts this GetOccurrenceNoteRequest to JSON. + * @returns JSON object */ - type ListNoteOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.ListNoteOccurrencesResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of an Occurrence. */ - interface IOccurrence { - - /** Occurrence name */ - name?: (string|null); - - /** Occurrence resourceUri */ - resourceUri?: (string|null); - - /** Occurrence noteName */ - noteName?: (string|null); - - /** Occurrence kind */ - kind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); - - /** Occurrence remediation */ - remediation?: (string|null); - - /** Occurrence createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Occurrence updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Occurrence vulnerability */ - vulnerability?: (grafeas.v1.IVulnerabilityOccurrence|null); - - /** Occurrence build */ - build?: (grafeas.v1.IBuildOccurrence|null); - - /** Occurrence image */ - image?: (grafeas.v1.IImageOccurrence|null); - - /** Occurrence package */ - "package"?: (grafeas.v1.IPackageOccurrence|null); - - /** Occurrence deployment */ - deployment?: (grafeas.v1.IDeploymentOccurrence|null); - - /** Occurrence discovery */ - discovery?: (grafeas.v1.IDiscoveryOccurrence|null); - - /** Occurrence attestation */ - attestation?: (grafeas.v1.IAttestationOccurrence|null); + /** Properties of a ListNotesRequest. */ + interface IListNotesRequest { - /** Occurrence upgrade */ - upgrade?: (grafeas.v1.IUpgradeOccurrence|null); + /** ListNotesRequest parent */ + parent?: (string|null); - /** Occurrence compliance */ - compliance?: (grafeas.v1.IComplianceOccurrence|null); + /** ListNotesRequest filter */ + filter?: (string|null); - /** Occurrence dsseAttestation */ - dsseAttestation?: (grafeas.v1.IDSSEAttestationOccurrence|null); + /** ListNotesRequest pageSize */ + pageSize?: (number|null); - /** Occurrence envelope */ - envelope?: (grafeas.v1.IEnvelope|null); + /** ListNotesRequest pageToken */ + pageToken?: (string|null); } - /** Represents an Occurrence. */ - class Occurrence implements IOccurrence { + /** Represents a ListNotesRequest. */ + class ListNotesRequest implements IListNotesRequest { /** - * Constructs a new Occurrence. + * Constructs a new ListNotesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IOccurrence); + constructor(properties?: grafeas.v1.IListNotesRequest); - /** Occurrence name. */ - public name: string; + /** ListNotesRequest parent. */ + public parent: string; - /** Occurrence resourceUri. */ - public resourceUri: string; + /** ListNotesRequest filter. */ + public filter: string; - /** Occurrence noteName. */ - public noteName: string; + /** ListNotesRequest pageSize. */ + public pageSize: number; - /** Occurrence kind. */ - public kind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); + /** ListNotesRequest pageToken. */ + public pageToken: string; - /** Occurrence remediation. */ - public remediation: string; + /** + * Creates a new ListNotesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNotesRequest instance + */ + public static create(properties?: grafeas.v1.IListNotesRequest): grafeas.v1.ListNotesRequest; - /** Occurrence createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified ListNotesRequest message. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. + * @param message ListNotesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Occurrence updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified ListNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. + * @param message ListNotesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Occurrence vulnerability. */ - public vulnerability?: (grafeas.v1.IVulnerabilityOccurrence|null); + /** + * Decodes a ListNotesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNotesRequest; - /** Occurrence build. */ - public build?: (grafeas.v1.IBuildOccurrence|null); + /** + * Decodes a ListNotesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNotesRequest; - /** Occurrence image. */ - public image?: (grafeas.v1.IImageOccurrence|null); + /** + * Verifies a ListNotesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Occurrence package. */ - public package?: (grafeas.v1.IPackageOccurrence|null); + /** + * Creates a ListNotesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNotesRequest + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesRequest; + + /** + * Creates a plain object from a ListNotesRequest message. Also converts values to other types if specified. + * @param message ListNotesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.ListNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Occurrence deployment. */ - public deployment?: (grafeas.v1.IDeploymentOccurrence|null); + /** + * Converts this ListNotesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Occurrence discovery. */ - public discovery?: (grafeas.v1.IDiscoveryOccurrence|null); + /** Properties of a ListNotesResponse. */ + interface IListNotesResponse { - /** Occurrence attestation. */ - public attestation?: (grafeas.v1.IAttestationOccurrence|null); + /** ListNotesResponse notes */ + notes?: (grafeas.v1.INote[]|null); - /** Occurrence upgrade. */ - public upgrade?: (grafeas.v1.IUpgradeOccurrence|null); + /** ListNotesResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** Occurrence compliance. */ - public compliance?: (grafeas.v1.IComplianceOccurrence|null); + /** Represents a ListNotesResponse. */ + class ListNotesResponse implements IListNotesResponse { - /** Occurrence dsseAttestation. */ - public dsseAttestation?: (grafeas.v1.IDSSEAttestationOccurrence|null); + /** + * Constructs a new ListNotesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IListNotesResponse); - /** Occurrence envelope. */ - public envelope?: (grafeas.v1.IEnvelope|null); + /** ListNotesResponse notes. */ + public notes: grafeas.v1.INote[]; - /** Occurrence details. */ - public details?: ("vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"); + /** ListNotesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Occurrence instance using the specified properties. + * Creates a new ListNotesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Occurrence instance + * @returns ListNotesResponse instance */ - public static create(properties?: grafeas.v1.IOccurrence): grafeas.v1.Occurrence; + public static create(properties?: grafeas.v1.IListNotesResponse): grafeas.v1.ListNotesResponse; /** - * Encodes the specified Occurrence message. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. - * @param message Occurrence message or plain object to encode + * Encodes the specified ListNotesResponse message. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. + * @param message ListNotesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Occurrence message, length delimited. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. - * @param message Occurrence message or plain object to encode + * Encodes the specified ListNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. + * @param message ListNotesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Occurrence message from the specified reader or buffer. + * Decodes a ListNotesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Occurrence + * @returns ListNotesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Occurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNotesResponse; /** - * Decodes an Occurrence message from the specified reader or buffer, length delimited. + * Decodes a ListNotesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Occurrence + * @returns ListNotesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Occurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNotesResponse; /** - * Verifies an Occurrence message. + * Verifies a ListNotesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Occurrence message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Occurrence + * @returns ListNotesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Occurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesResponse; /** - * Creates a plain object from an Occurrence message. Also converts values to other types if specified. - * @param message Occurrence + * Creates a plain object from a ListNotesResponse message. Also converts values to other types if specified. + * @param message ListNotesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Occurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Occurrence to JSON. + * Converts this ListNotesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Note. */ - interface INote { + /** Properties of a DeleteNoteRequest. */ + interface IDeleteNoteRequest { - /** Note name */ + /** DeleteNoteRequest name */ name?: (string|null); - - /** Note shortDescription */ - shortDescription?: (string|null); - - /** Note longDescription */ - longDescription?: (string|null); - - /** Note kind */ - kind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); - - /** Note relatedUrl */ - relatedUrl?: (grafeas.v1.IRelatedUrl[]|null); - - /** Note expirationTime */ - expirationTime?: (google.protobuf.ITimestamp|null); - - /** Note createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Note updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Note relatedNoteNames */ - relatedNoteNames?: (string[]|null); - - /** Note vulnerability */ - vulnerability?: (grafeas.v1.IVulnerabilityNote|null); - - /** Note build */ - build?: (grafeas.v1.IBuildNote|null); - - /** Note image */ - image?: (grafeas.v1.IImageNote|null); - - /** Note package */ - "package"?: (grafeas.v1.IPackageNote|null); - - /** Note deployment */ - deployment?: (grafeas.v1.IDeploymentNote|null); - - /** Note discovery */ - discovery?: (grafeas.v1.IDiscoveryNote|null); - - /** Note attestation */ - attestation?: (grafeas.v1.IAttestationNote|null); - - /** Note upgrade */ - upgrade?: (grafeas.v1.IUpgradeNote|null); - - /** Note compliance */ - compliance?: (grafeas.v1.IComplianceNote|null); - - /** Note dsseAttestation */ - dsseAttestation?: (grafeas.v1.IDSSEAttestationNote|null); } - /** Represents a Note. */ - class Note implements INote { + /** Represents a DeleteNoteRequest. */ + class DeleteNoteRequest implements IDeleteNoteRequest { /** - * Constructs a new Note. + * Constructs a new DeleteNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.INote); + constructor(properties?: grafeas.v1.IDeleteNoteRequest); - /** Note name. */ + /** DeleteNoteRequest name. */ public name: string; - /** Note shortDescription. */ - public shortDescription: string; - - /** Note longDescription. */ - public longDescription: string; - - /** Note kind. */ - public kind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); - - /** Note relatedUrl. */ - public relatedUrl: grafeas.v1.IRelatedUrl[]; - - /** Note expirationTime. */ - public expirationTime?: (google.protobuf.ITimestamp|null); - - /** Note createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Note updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Note relatedNoteNames. */ - public relatedNoteNames: string[]; - - /** Note vulnerability. */ - public vulnerability?: (grafeas.v1.IVulnerabilityNote|null); - - /** Note build. */ - public build?: (grafeas.v1.IBuildNote|null); - - /** Note image. */ - public image?: (grafeas.v1.IImageNote|null); - - /** Note package. */ - public package?: (grafeas.v1.IPackageNote|null); - - /** Note deployment. */ - public deployment?: (grafeas.v1.IDeploymentNote|null); - - /** Note discovery. */ - public discovery?: (grafeas.v1.IDiscoveryNote|null); - - /** Note attestation. */ - public attestation?: (grafeas.v1.IAttestationNote|null); - - /** Note upgrade. */ - public upgrade?: (grafeas.v1.IUpgradeNote|null); - - /** Note compliance. */ - public compliance?: (grafeas.v1.IComplianceNote|null); - - /** Note dsseAttestation. */ - public dsseAttestation?: (grafeas.v1.IDSSEAttestationNote|null); - - /** Note type. */ - public type?: ("vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"); - /** - * Creates a new Note instance using the specified properties. + * Creates a new DeleteNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Note instance + * @returns DeleteNoteRequest instance */ - public static create(properties?: grafeas.v1.INote): grafeas.v1.Note; + public static create(properties?: grafeas.v1.IDeleteNoteRequest): grafeas.v1.DeleteNoteRequest; /** - * Encodes the specified Note message. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. - * @param message Note message or plain object to encode + * Encodes the specified DeleteNoteRequest message. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. + * @param message DeleteNoteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.INote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Note message, length delimited. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. - * @param message Note message or plain object to encode + * Encodes the specified DeleteNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. + * @param message DeleteNoteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.INote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Note message from the specified reader or buffer. + * Decodes a DeleteNoteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Note + * @returns DeleteNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Note; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeleteNoteRequest; /** - * Decodes a Note message from the specified reader or buffer, length delimited. + * Decodes a DeleteNoteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Note + * @returns DeleteNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Note; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeleteNoteRequest; /** - * Verifies a Note message. + * Verifies a DeleteNoteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Note message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteNoteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Note + * @returns DeleteNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Note; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteNoteRequest; /** - * Creates a plain object from a Note message. Also converts values to other types if specified. - * @param message Note + * Creates a plain object from a DeleteNoteRequest message. Also converts values to other types if specified. + * @param message DeleteNoteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Note, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DeleteNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Note to JSON. + * Converts this DeleteNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetOccurrenceRequest. */ - interface IGetOccurrenceRequest { + /** Properties of a CreateNoteRequest. */ + interface ICreateNoteRequest { - /** GetOccurrenceRequest name */ - name?: (string|null); + /** CreateNoteRequest parent */ + parent?: (string|null); + + /** CreateNoteRequest noteId */ + noteId?: (string|null); + + /** CreateNoteRequest note */ + note?: (grafeas.v1.INote|null); } - /** Represents a GetOccurrenceRequest. */ - class GetOccurrenceRequest implements IGetOccurrenceRequest { + /** Represents a CreateNoteRequest. */ + class CreateNoteRequest implements ICreateNoteRequest { /** - * Constructs a new GetOccurrenceRequest. + * Constructs a new CreateNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IGetOccurrenceRequest); + constructor(properties?: grafeas.v1.ICreateNoteRequest); - /** GetOccurrenceRequest name. */ - public name: string; + /** CreateNoteRequest parent. */ + public parent: string; + + /** CreateNoteRequest noteId. */ + public noteId: string; + + /** CreateNoteRequest note. */ + public note?: (grafeas.v1.INote|null); /** - * Creates a new GetOccurrenceRequest instance using the specified properties. + * Creates a new CreateNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetOccurrenceRequest instance + * @returns CreateNoteRequest instance */ - public static create(properties?: grafeas.v1.IGetOccurrenceRequest): grafeas.v1.GetOccurrenceRequest; + public static create(properties?: grafeas.v1.ICreateNoteRequest): grafeas.v1.CreateNoteRequest; /** - * Encodes the specified GetOccurrenceRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. - * @param message GetOccurrenceRequest message or plain object to encode + * Encodes the specified CreateNoteRequest message. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. + * @param message CreateNoteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. - * @param message GetOccurrenceRequest message or plain object to encode + * Encodes the specified CreateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. + * @param message CreateNoteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer. + * Decodes a CreateNoteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOccurrenceRequest + * @returns CreateNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CreateNoteRequest; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateNoteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOccurrenceRequest + * @returns CreateNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CreateNoteRequest; /** - * Verifies a GetOccurrenceRequest message. + * Verifies a CreateNoteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateNoteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOccurrenceRequest + * @returns CreateNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateNoteRequest; /** - * Creates a plain object from a GetOccurrenceRequest message. Also converts values to other types if specified. - * @param message GetOccurrenceRequest + * Creates a plain object from a CreateNoteRequest message. Also converts values to other types if specified. + * @param message CreateNoteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.GetOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.CreateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOccurrenceRequest to JSON. + * Converts this CreateNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListOccurrencesRequest. */ - interface IListOccurrencesRequest { - - /** ListOccurrencesRequest parent */ - parent?: (string|null); + /** Properties of an UpdateNoteRequest. */ + interface IUpdateNoteRequest { - /** ListOccurrencesRequest filter */ - filter?: (string|null); + /** UpdateNoteRequest name */ + name?: (string|null); - /** ListOccurrencesRequest pageSize */ - pageSize?: (number|null); + /** UpdateNoteRequest note */ + note?: (grafeas.v1.INote|null); - /** ListOccurrencesRequest pageToken */ - pageToken?: (string|null); + /** UpdateNoteRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListOccurrencesRequest. */ - class ListOccurrencesRequest implements IListOccurrencesRequest { + /** Represents an UpdateNoteRequest. */ + class UpdateNoteRequest implements IUpdateNoteRequest { /** - * Constructs a new ListOccurrencesRequest. + * Constructs a new UpdateNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListOccurrencesRequest); - - /** ListOccurrencesRequest parent. */ - public parent: string; + constructor(properties?: grafeas.v1.IUpdateNoteRequest); - /** ListOccurrencesRequest filter. */ - public filter: string; + /** UpdateNoteRequest name. */ + public name: string; - /** ListOccurrencesRequest pageSize. */ - public pageSize: number; + /** UpdateNoteRequest note. */ + public note?: (grafeas.v1.INote|null); - /** ListOccurrencesRequest pageToken. */ - public pageToken: string; + /** UpdateNoteRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListOccurrencesRequest instance using the specified properties. + * Creates a new UpdateNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListOccurrencesRequest instance + * @returns UpdateNoteRequest instance */ - public static create(properties?: grafeas.v1.IListOccurrencesRequest): grafeas.v1.ListOccurrencesRequest; + public static create(properties?: grafeas.v1.IUpdateNoteRequest): grafeas.v1.UpdateNoteRequest; /** - * Encodes the specified ListOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. - * @param message ListOccurrencesRequest message or plain object to encode + * Encodes the specified UpdateNoteRequest message. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. + * @param message UpdateNoteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. - * @param message ListOccurrencesRequest message or plain object to encode + * Encodes the specified UpdateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. + * @param message UpdateNoteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOccurrencesRequest message from the specified reader or buffer. + * Decodes an UpdateNoteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOccurrencesRequest + * @returns UpdateNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListOccurrencesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpdateNoteRequest; /** - * Decodes a ListOccurrencesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateNoteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOccurrencesRequest + * @returns UpdateNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListOccurrencesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpdateNoteRequest; /** - * Verifies a ListOccurrencesRequest message. + * Verifies an UpdateNoteRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListOccurrencesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateNoteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOccurrencesRequest + * @returns UpdateNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateNoteRequest; /** - * Creates a plain object from a ListOccurrencesRequest message. Also converts values to other types if specified. - * @param message ListOccurrencesRequest + * Creates a plain object from an UpdateNoteRequest message. Also converts values to other types if specified. + * @param message UpdateNoteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ListOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpdateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOccurrencesRequest to JSON. + * Converts this UpdateNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListOccurrencesResponse. */ - interface IListOccurrencesResponse { + /** Properties of a ListNoteOccurrencesRequest. */ + interface IListNoteOccurrencesRequest { - /** ListOccurrencesResponse occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** ListNoteOccurrencesRequest name */ + name?: (string|null); - /** ListOccurrencesResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListNoteOccurrencesRequest filter */ + filter?: (string|null); + + /** ListNoteOccurrencesRequest pageSize */ + pageSize?: (number|null); + + /** ListNoteOccurrencesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListOccurrencesResponse. */ - class ListOccurrencesResponse implements IListOccurrencesResponse { + /** Represents a ListNoteOccurrencesRequest. */ + class ListNoteOccurrencesRequest implements IListNoteOccurrencesRequest { /** - * Constructs a new ListOccurrencesResponse. + * Constructs a new ListNoteOccurrencesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListOccurrencesResponse); + constructor(properties?: grafeas.v1.IListNoteOccurrencesRequest); - /** ListOccurrencesResponse occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** ListNoteOccurrencesRequest name. */ + public name: string; - /** ListOccurrencesResponse nextPageToken. */ - public nextPageToken: string; + /** ListNoteOccurrencesRequest filter. */ + public filter: string; + + /** ListNoteOccurrencesRequest pageSize. */ + public pageSize: number; + + /** ListNoteOccurrencesRequest pageToken. */ + public pageToken: string; /** - * Creates a new ListOccurrencesResponse instance using the specified properties. + * Creates a new ListNoteOccurrencesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListOccurrencesResponse instance + * @returns ListNoteOccurrencesRequest instance */ - public static create(properties?: grafeas.v1.IListOccurrencesResponse): grafeas.v1.ListOccurrencesResponse; + public static create(properties?: grafeas.v1.IListNoteOccurrencesRequest): grafeas.v1.ListNoteOccurrencesRequest; /** - * Encodes the specified ListOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. - * @param message ListOccurrencesResponse message or plain object to encode + * Encodes the specified ListNoteOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. + * @param message ListNoteOccurrencesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IListOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. - * @param message ListOccurrencesResponse message or plain object to encode + * Encodes the specified ListNoteOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. + * @param message ListNoteOccurrencesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IListOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOccurrencesResponse message from the specified reader or buffer. + * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOccurrencesResponse + * @returns ListNoteOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListOccurrencesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNoteOccurrencesRequest; /** - * Decodes a ListOccurrencesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOccurrencesResponse + * @returns ListNoteOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListOccurrencesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNoteOccurrencesRequest; /** - * Verifies a ListOccurrencesResponse message. + * Verifies a ListNoteOccurrencesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListNoteOccurrencesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOccurrencesResponse + * @returns ListNoteOccurrencesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesRequest; /** - * Creates a plain object from a ListOccurrencesResponse message. Also converts values to other types if specified. - * @param message ListOccurrencesResponse + * Creates a plain object from a ListNoteOccurrencesRequest message. Also converts values to other types if specified. + * @param message ListNoteOccurrencesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ListOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListNoteOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOccurrencesResponse to JSON. + * Converts this ListNoteOccurrencesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteOccurrenceRequest. */ - interface IDeleteOccurrenceRequest { + /** Properties of a ListNoteOccurrencesResponse. */ + interface IListNoteOccurrencesResponse { + + /** ListNoteOccurrencesResponse occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); - /** DeleteOccurrenceRequest name */ - name?: (string|null); + /** ListNoteOccurrencesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteOccurrenceRequest. */ - class DeleteOccurrenceRequest implements IDeleteOccurrenceRequest { + /** Represents a ListNoteOccurrencesResponse. */ + class ListNoteOccurrencesResponse implements IListNoteOccurrencesResponse { /** - * Constructs a new DeleteOccurrenceRequest. + * Constructs a new ListNoteOccurrencesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDeleteOccurrenceRequest); + constructor(properties?: grafeas.v1.IListNoteOccurrencesResponse); - /** DeleteOccurrenceRequest name. */ - public name: string; + /** ListNoteOccurrencesResponse occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; + + /** ListNoteOccurrencesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteOccurrenceRequest instance using the specified properties. + * Creates a new ListNoteOccurrencesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteOccurrenceRequest instance + * @returns ListNoteOccurrencesResponse instance */ - public static create(properties?: grafeas.v1.IDeleteOccurrenceRequest): grafeas.v1.DeleteOccurrenceRequest; + public static create(properties?: grafeas.v1.IListNoteOccurrencesResponse): grafeas.v1.ListNoteOccurrencesResponse; /** - * Encodes the specified DeleteOccurrenceRequest message. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. - * @param message DeleteOccurrenceRequest message or plain object to encode + * Encodes the specified ListNoteOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. + * @param message ListNoteOccurrencesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. - * @param message DeleteOccurrenceRequest message or plain object to encode + * Encodes the specified ListNoteOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. + * @param message ListNoteOccurrencesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer. + * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteOccurrenceRequest + * @returns ListNoteOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeleteOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNoteOccurrencesResponse; /** - * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteOccurrenceRequest + * @returns ListNoteOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeleteOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNoteOccurrencesResponse; /** - * Verifies a DeleteOccurrenceRequest message. + * Verifies a ListNoteOccurrencesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNoteOccurrencesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteOccurrenceRequest + * @returns ListNoteOccurrencesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesResponse; /** - * Creates a plain object from a DeleteOccurrenceRequest message. Also converts values to other types if specified. - * @param message DeleteOccurrenceRequest + * Creates a plain object from a ListNoteOccurrencesResponse message. Also converts values to other types if specified. + * @param message ListNoteOccurrencesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DeleteOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListNoteOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteOccurrenceRequest to JSON. + * Converts this ListNoteOccurrencesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateOccurrenceRequest. */ - interface ICreateOccurrenceRequest { + /** Properties of a BatchCreateNotesRequest. */ + interface IBatchCreateNotesRequest { - /** CreateOccurrenceRequest parent */ + /** BatchCreateNotesRequest parent */ parent?: (string|null); - /** CreateOccurrenceRequest occurrence */ - occurrence?: (grafeas.v1.IOccurrence|null); + /** BatchCreateNotesRequest notes */ + notes?: ({ [k: string]: grafeas.v1.INote }|null); } - /** Represents a CreateOccurrenceRequest. */ - class CreateOccurrenceRequest implements ICreateOccurrenceRequest { + /** Represents a BatchCreateNotesRequest. */ + class BatchCreateNotesRequest implements IBatchCreateNotesRequest { /** - * Constructs a new CreateOccurrenceRequest. + * Constructs a new BatchCreateNotesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ICreateOccurrenceRequest); + constructor(properties?: grafeas.v1.IBatchCreateNotesRequest); - /** CreateOccurrenceRequest parent. */ + /** BatchCreateNotesRequest parent. */ public parent: string; - /** CreateOccurrenceRequest occurrence. */ - public occurrence?: (grafeas.v1.IOccurrence|null); + /** BatchCreateNotesRequest notes. */ + public notes: { [k: string]: grafeas.v1.INote }; /** - * Creates a new CreateOccurrenceRequest instance using the specified properties. + * Creates a new BatchCreateNotesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateOccurrenceRequest instance + * @returns BatchCreateNotesRequest instance */ - public static create(properties?: grafeas.v1.ICreateOccurrenceRequest): grafeas.v1.CreateOccurrenceRequest; + public static create(properties?: grafeas.v1.IBatchCreateNotesRequest): grafeas.v1.BatchCreateNotesRequest; /** - * Encodes the specified CreateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. - * @param message CreateOccurrenceRequest message or plain object to encode + * Encodes the specified BatchCreateNotesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. + * @param message BatchCreateNotesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ICreateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. - * @param message CreateOccurrenceRequest message or plain object to encode + * Encodes the specified BatchCreateNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. + * @param message BatchCreateNotesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ICreateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateOccurrenceRequest message from the specified reader or buffer. + * Decodes a BatchCreateNotesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateOccurrenceRequest + * @returns BatchCreateNotesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CreateOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateNotesRequest; /** - * Decodes a CreateOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateNotesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateOccurrenceRequest + * @returns BatchCreateNotesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CreateOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateNotesRequest; /** - * Verifies a CreateOccurrenceRequest message. + * Verifies a BatchCreateNotesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateNotesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateOccurrenceRequest + * @returns BatchCreateNotesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesRequest; /** - * Creates a plain object from a CreateOccurrenceRequest message. Also converts values to other types if specified. - * @param message CreateOccurrenceRequest + * Creates a plain object from a BatchCreateNotesRequest message. Also converts values to other types if specified. + * @param message BatchCreateNotesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.CreateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateOccurrenceRequest to JSON. + * Converts this BatchCreateNotesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateOccurrenceRequest. */ - interface IUpdateOccurrenceRequest { - - /** UpdateOccurrenceRequest name */ - name?: (string|null); - - /** UpdateOccurrenceRequest occurrence */ - occurrence?: (grafeas.v1.IOccurrence|null); + /** Properties of a BatchCreateNotesResponse. */ + interface IBatchCreateNotesResponse { - /** UpdateOccurrenceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** BatchCreateNotesResponse notes */ + notes?: (grafeas.v1.INote[]|null); } - /** Represents an UpdateOccurrenceRequest. */ - class UpdateOccurrenceRequest implements IUpdateOccurrenceRequest { + /** Represents a BatchCreateNotesResponse. */ + class BatchCreateNotesResponse implements IBatchCreateNotesResponse { /** - * Constructs a new UpdateOccurrenceRequest. + * Constructs a new BatchCreateNotesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IUpdateOccurrenceRequest); - - /** UpdateOccurrenceRequest name. */ - public name: string; - - /** UpdateOccurrenceRequest occurrence. */ - public occurrence?: (grafeas.v1.IOccurrence|null); + constructor(properties?: grafeas.v1.IBatchCreateNotesResponse); - /** UpdateOccurrenceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** BatchCreateNotesResponse notes. */ + public notes: grafeas.v1.INote[]; /** - * Creates a new UpdateOccurrenceRequest instance using the specified properties. + * Creates a new BatchCreateNotesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateOccurrenceRequest instance + * @returns BatchCreateNotesResponse instance */ - public static create(properties?: grafeas.v1.IUpdateOccurrenceRequest): grafeas.v1.UpdateOccurrenceRequest; + public static create(properties?: grafeas.v1.IBatchCreateNotesResponse): grafeas.v1.BatchCreateNotesResponse; /** - * Encodes the specified UpdateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. - * @param message UpdateOccurrenceRequest message or plain object to encode + * Encodes the specified BatchCreateNotesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. + * @param message BatchCreateNotesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IUpdateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. - * @param message UpdateOccurrenceRequest message or plain object to encode + * Encodes the specified BatchCreateNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. + * @param message BatchCreateNotesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IUpdateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer. + * Decodes a BatchCreateNotesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateOccurrenceRequest + * @returns BatchCreateNotesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpdateOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateNotesResponse; /** - * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateNotesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateOccurrenceRequest + * @returns BatchCreateNotesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpdateOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateNotesResponse; /** - * Verifies an UpdateOccurrenceRequest message. + * Verifies a BatchCreateNotesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateNotesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateOccurrenceRequest + * @returns BatchCreateNotesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesResponse; /** - * Creates a plain object from an UpdateOccurrenceRequest message. Also converts values to other types if specified. - * @param message UpdateOccurrenceRequest + * Creates a plain object from a BatchCreateNotesResponse message. Also converts values to other types if specified. + * @param message BatchCreateNotesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.UpdateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateOccurrenceRequest to JSON. + * Converts this BatchCreateNotesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetNoteRequest. */ - interface IGetNoteRequest { + /** Properties of a BatchCreateOccurrencesRequest. */ + interface IBatchCreateOccurrencesRequest { - /** GetNoteRequest name */ - name?: (string|null); + /** BatchCreateOccurrencesRequest parent */ + parent?: (string|null); + + /** BatchCreateOccurrencesRequest occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); } - /** Represents a GetNoteRequest. */ - class GetNoteRequest implements IGetNoteRequest { + /** Represents a BatchCreateOccurrencesRequest. */ + class BatchCreateOccurrencesRequest implements IBatchCreateOccurrencesRequest { /** - * Constructs a new GetNoteRequest. + * Constructs a new BatchCreateOccurrencesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IGetNoteRequest); + constructor(properties?: grafeas.v1.IBatchCreateOccurrencesRequest); - /** GetNoteRequest name. */ - public name: string; + /** BatchCreateOccurrencesRequest parent. */ + public parent: string; + + /** BatchCreateOccurrencesRequest occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; /** - * Creates a new GetNoteRequest instance using the specified properties. + * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetNoteRequest instance + * @returns BatchCreateOccurrencesRequest instance */ - public static create(properties?: grafeas.v1.IGetNoteRequest): grafeas.v1.GetNoteRequest; + public static create(properties?: grafeas.v1.IBatchCreateOccurrencesRequest): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Encodes the specified GetNoteRequest message. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. - * @param message GetNoteRequest message or plain object to encode + * Encodes the specified BatchCreateOccurrencesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. + * @param message BatchCreateOccurrencesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IGetNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. - * @param message GetNoteRequest message or plain object to encode + * Encodes the specified BatchCreateOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. + * @param message BatchCreateOccurrencesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IGetNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNoteRequest message from the specified reader or buffer. + * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNoteRequest + * @returns BatchCreateOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Decodes a GetNoteRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetNoteRequest + * @returns BatchCreateOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Verifies a GetNoteRequest message. + * Verifies a BatchCreateOccurrencesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateOccurrencesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNoteRequest + * @returns BatchCreateOccurrencesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GetNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Creates a plain object from a GetNoteRequest message. Also converts values to other types if specified. - * @param message GetNoteRequest + * Creates a plain object from a BatchCreateOccurrencesRequest message. Also converts values to other types if specified. + * @param message BatchCreateOccurrencesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.GetNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNoteRequest to JSON. + * Converts this BatchCreateOccurrencesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetOccurrenceNoteRequest. */ - interface IGetOccurrenceNoteRequest { + /** Properties of a BatchCreateOccurrencesResponse. */ + interface IBatchCreateOccurrencesResponse { - /** GetOccurrenceNoteRequest name */ - name?: (string|null); + /** BatchCreateOccurrencesResponse occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); } - /** Represents a GetOccurrenceNoteRequest. */ - class GetOccurrenceNoteRequest implements IGetOccurrenceNoteRequest { + /** Represents a BatchCreateOccurrencesResponse. */ + class BatchCreateOccurrencesResponse implements IBatchCreateOccurrencesResponse { /** - * Constructs a new GetOccurrenceNoteRequest. + * Constructs a new BatchCreateOccurrencesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IGetOccurrenceNoteRequest); + constructor(properties?: grafeas.v1.IBatchCreateOccurrencesResponse); - /** GetOccurrenceNoteRequest name. */ - public name: string; + /** BatchCreateOccurrencesResponse occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; /** - * Creates a new GetOccurrenceNoteRequest instance using the specified properties. + * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetOccurrenceNoteRequest instance + * @returns BatchCreateOccurrencesResponse instance */ - public static create(properties?: grafeas.v1.IGetOccurrenceNoteRequest): grafeas.v1.GetOccurrenceNoteRequest; + public static create(properties?: grafeas.v1.IBatchCreateOccurrencesResponse): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Encodes the specified GetOccurrenceNoteRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. - * @param message GetOccurrenceNoteRequest message or plain object to encode + * Encodes the specified BatchCreateOccurrencesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. + * @param message BatchCreateOccurrencesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOccurrenceNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. - * @param message GetOccurrenceNoteRequest message or plain object to encode + * Encodes the specified BatchCreateOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. + * @param message BatchCreateOccurrencesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer. + * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOccurrenceNoteRequest + * @returns BatchCreateOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetOccurrenceNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOccurrenceNoteRequest + * @returns BatchCreateOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetOccurrenceNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Verifies a GetOccurrenceNoteRequest message. + * Verifies a BatchCreateOccurrencesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetOccurrenceNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateOccurrencesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOccurrenceNoteRequest + * @returns BatchCreateOccurrencesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Creates a plain object from a GetOccurrenceNoteRequest message. Also converts values to other types if specified. - * @param message GetOccurrenceNoteRequest + * Creates a plain object from a BatchCreateOccurrencesResponse message. Also converts values to other types if specified. + * @param message BatchCreateOccurrencesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.GetOccurrenceNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOccurrenceNoteRequest to JSON. + * Converts this BatchCreateOccurrencesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNotesRequest. */ - interface IListNotesRequest { - - /** ListNotesRequest parent */ - parent?: (string|null); - - /** ListNotesRequest filter */ - filter?: (string|null); + /** Properties of a Layer. */ + interface ILayer { - /** ListNotesRequest pageSize */ - pageSize?: (number|null); + /** Layer directive */ + directive?: (string|null); - /** ListNotesRequest pageToken */ - pageToken?: (string|null); + /** Layer arguments */ + "arguments"?: (string|null); } - /** Represents a ListNotesRequest. */ - class ListNotesRequest implements IListNotesRequest { + /** Represents a Layer. */ + class Layer implements ILayer { /** - * Constructs a new ListNotesRequest. + * Constructs a new Layer. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNotesRequest); - - /** ListNotesRequest parent. */ - public parent: string; - - /** ListNotesRequest filter. */ - public filter: string; + constructor(properties?: grafeas.v1.ILayer); - /** ListNotesRequest pageSize. */ - public pageSize: number; + /** Layer directive. */ + public directive: string; - /** ListNotesRequest pageToken. */ - public pageToken: string; + /** Layer arguments. */ + public arguments: string; /** - * Creates a new ListNotesRequest instance using the specified properties. + * Creates a new Layer instance using the specified properties. * @param [properties] Properties to set - * @returns ListNotesRequest instance + * @returns Layer instance */ - public static create(properties?: grafeas.v1.IListNotesRequest): grafeas.v1.ListNotesRequest; + public static create(properties?: grafeas.v1.ILayer): grafeas.v1.Layer; /** - * Encodes the specified ListNotesRequest message. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. - * @param message ListNotesRequest message or plain object to encode + * Encodes the specified Layer message. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. + * @param message Layer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ILayer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. - * @param message ListNotesRequest message or plain object to encode + * Encodes the specified Layer message, length delimited. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. + * @param message Layer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ILayer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNotesRequest message from the specified reader or buffer. + * Decodes a Layer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNotesRequest + * @returns Layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNotesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Layer; /** - * Decodes a ListNotesRequest message from the specified reader or buffer, length delimited. + * Decodes a Layer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNotesRequest + * @returns Layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNotesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Layer; /** - * Verifies a ListNotesRequest message. + * Verifies a Layer message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListNotesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Layer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNotesRequest + * @returns Layer */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Layer; /** - * Creates a plain object from a ListNotesRequest message. Also converts values to other types if specified. - * @param message ListNotesRequest + * Creates a plain object from a Layer message. Also converts values to other types if specified. + * @param message Layer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ListNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Layer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNotesRequest to JSON. + * Converts this Layer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNotesResponse. */ - interface IListNotesResponse { + /** Properties of a Fingerprint. */ + interface IFingerprint { - /** ListNotesResponse notes */ - notes?: (grafeas.v1.INote[]|null); + /** Fingerprint v1Name */ + v1Name?: (string|null); - /** ListNotesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Fingerprint v2Blob */ + v2Blob?: (string[]|null); + + /** Fingerprint v2Name */ + v2Name?: (string|null); } - /** Represents a ListNotesResponse. */ - class ListNotesResponse implements IListNotesResponse { + /** Represents a Fingerprint. */ + class Fingerprint implements IFingerprint { /** - * Constructs a new ListNotesResponse. + * Constructs a new Fingerprint. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNotesResponse); + constructor(properties?: grafeas.v1.IFingerprint); - /** ListNotesResponse notes. */ - public notes: grafeas.v1.INote[]; + /** Fingerprint v1Name. */ + public v1Name: string; - /** ListNotesResponse nextPageToken. */ - public nextPageToken: string; + /** Fingerprint v2Blob. */ + public v2Blob: string[]; + + /** Fingerprint v2Name. */ + public v2Name: string; /** - * Creates a new ListNotesResponse instance using the specified properties. + * Creates a new Fingerprint instance using the specified properties. * @param [properties] Properties to set - * @returns ListNotesResponse instance + * @returns Fingerprint instance */ - public static create(properties?: grafeas.v1.IListNotesResponse): grafeas.v1.ListNotesResponse; + public static create(properties?: grafeas.v1.IFingerprint): grafeas.v1.Fingerprint; /** - * Encodes the specified ListNotesResponse message. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. - * @param message ListNotesResponse message or plain object to encode + * Encodes the specified Fingerprint message. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. + * @param message Fingerprint message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. - * @param message ListNotesResponse message or plain object to encode + * Encodes the specified Fingerprint message, length delimited. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. + * @param message Fingerprint message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNotesResponse message from the specified reader or buffer. + * Decodes a Fingerprint message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNotesResponse + * @returns Fingerprint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNotesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Fingerprint; /** - * Decodes a ListNotesResponse message from the specified reader or buffer, length delimited. + * Decodes a Fingerprint message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNotesResponse + * @returns Fingerprint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNotesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Fingerprint; /** - * Verifies a ListNotesResponse message. + * Verifies a Fingerprint message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListNotesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Fingerprint message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNotesResponse + * @returns Fingerprint */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Fingerprint; /** - * Creates a plain object from a ListNotesResponse message. Also converts values to other types if specified. - * @param message ListNotesResponse + * Creates a plain object from a Fingerprint message. Also converts values to other types if specified. + * @param message Fingerprint * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ListNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Fingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNotesResponse to JSON. + * Converts this Fingerprint to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteNoteRequest. */ - interface IDeleteNoteRequest { + /** Properties of an ImageNote. */ + interface IImageNote { - /** DeleteNoteRequest name */ - name?: (string|null); + /** ImageNote resourceUrl */ + resourceUrl?: (string|null); + + /** ImageNote fingerprint */ + fingerprint?: (grafeas.v1.IFingerprint|null); } - /** Represents a DeleteNoteRequest. */ - class DeleteNoteRequest implements IDeleteNoteRequest { + /** Represents an ImageNote. */ + class ImageNote implements IImageNote { /** - * Constructs a new DeleteNoteRequest. + * Constructs a new ImageNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDeleteNoteRequest); + constructor(properties?: grafeas.v1.IImageNote); - /** DeleteNoteRequest name. */ - public name: string; + /** ImageNote resourceUrl. */ + public resourceUrl: string; + + /** ImageNote fingerprint. */ + public fingerprint?: (grafeas.v1.IFingerprint|null); /** - * Creates a new DeleteNoteRequest instance using the specified properties. + * Creates a new ImageNote instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteNoteRequest instance + * @returns ImageNote instance */ - public static create(properties?: grafeas.v1.IDeleteNoteRequest): grafeas.v1.DeleteNoteRequest; + public static create(properties?: grafeas.v1.IImageNote): grafeas.v1.ImageNote; /** - * Encodes the specified DeleteNoteRequest message. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. - * @param message DeleteNoteRequest message or plain object to encode + * Encodes the specified ImageNote message. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. + * @param message ImageNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IImageNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. - * @param message DeleteNoteRequest message or plain object to encode + * Encodes the specified ImageNote message, length delimited. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. + * @param message ImageNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IImageNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteNoteRequest message from the specified reader or buffer. + * Decodes an ImageNote message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteNoteRequest + * @returns ImageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeleteNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ImageNote; /** - * Decodes a DeleteNoteRequest message from the specified reader or buffer, length delimited. + * Decodes an ImageNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteNoteRequest + * @returns ImageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeleteNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ImageNote; /** - * Verifies a DeleteNoteRequest message. + * Verifies an ImageNote message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImageNote message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteNoteRequest + * @returns ImageNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageNote; /** - * Creates a plain object from a DeleteNoteRequest message. Also converts values to other types if specified. - * @param message DeleteNoteRequest + * Creates a plain object from an ImageNote message. Also converts values to other types if specified. + * @param message ImageNote * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DeleteNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ImageNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteNoteRequest to JSON. + * Converts this ImageNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateNoteRequest. */ - interface ICreateNoteRequest { + /** Properties of an ImageOccurrence. */ + interface IImageOccurrence { - /** CreateNoteRequest parent */ - parent?: (string|null); + /** ImageOccurrence fingerprint */ + fingerprint?: (grafeas.v1.IFingerprint|null); - /** CreateNoteRequest noteId */ - noteId?: (string|null); + /** ImageOccurrence distance */ + distance?: (number|null); - /** CreateNoteRequest note */ - note?: (grafeas.v1.INote|null); + /** ImageOccurrence layerInfo */ + layerInfo?: (grafeas.v1.ILayer[]|null); + + /** ImageOccurrence baseResourceUrl */ + baseResourceUrl?: (string|null); } - /** Represents a CreateNoteRequest. */ - class CreateNoteRequest implements ICreateNoteRequest { + /** Represents an ImageOccurrence. */ + class ImageOccurrence implements IImageOccurrence { /** - * Constructs a new CreateNoteRequest. + * Constructs a new ImageOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ICreateNoteRequest); + constructor(properties?: grafeas.v1.IImageOccurrence); - /** CreateNoteRequest parent. */ - public parent: string; + /** ImageOccurrence fingerprint. */ + public fingerprint?: (grafeas.v1.IFingerprint|null); - /** CreateNoteRequest noteId. */ - public noteId: string; + /** ImageOccurrence distance. */ + public distance: number; - /** CreateNoteRequest note. */ - public note?: (grafeas.v1.INote|null); + /** ImageOccurrence layerInfo. */ + public layerInfo: grafeas.v1.ILayer[]; + + /** ImageOccurrence baseResourceUrl. */ + public baseResourceUrl: string; /** - * Creates a new CreateNoteRequest instance using the specified properties. + * Creates a new ImageOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns CreateNoteRequest instance + * @returns ImageOccurrence instance */ - public static create(properties?: grafeas.v1.ICreateNoteRequest): grafeas.v1.CreateNoteRequest; + public static create(properties?: grafeas.v1.IImageOccurrence): grafeas.v1.ImageOccurrence; /** - * Encodes the specified CreateNoteRequest message. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. - * @param message CreateNoteRequest message or plain object to encode + * Encodes the specified ImageOccurrence message. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. + * @param message ImageOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IImageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. - * @param message CreateNoteRequest message or plain object to encode + * Encodes the specified ImageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. + * @param message ImageOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IImageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateNoteRequest message from the specified reader or buffer. + * Decodes an ImageOccurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateNoteRequest + * @returns ImageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CreateNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ImageOccurrence; /** - * Decodes a CreateNoteRequest message from the specified reader or buffer, length delimited. + * Decodes an ImageOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateNoteRequest + * @returns ImageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CreateNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ImageOccurrence; /** - * Verifies a CreateNoteRequest message. + * Verifies an ImageOccurrence message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImageOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateNoteRequest + * @returns ImageOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageOccurrence; /** - * Creates a plain object from a CreateNoteRequest message. Also converts values to other types if specified. - * @param message CreateNoteRequest + * Creates a plain object from an ImageOccurrence message. Also converts values to other types if specified. + * @param message ImageOccurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.CreateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ImageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateNoteRequest to JSON. + * Converts this ImageOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateNoteRequest. */ - interface IUpdateNoteRequest { + /** Architecture enum. */ + enum Architecture { + ARCHITECTURE_UNSPECIFIED = 0, + X86 = 1, + X64 = 2 + } - /** UpdateNoteRequest name */ - name?: (string|null); + /** Properties of a Distribution. */ + interface IDistribution { - /** UpdateNoteRequest note */ - note?: (grafeas.v1.INote|null); + /** Distribution cpeUri */ + cpeUri?: (string|null); - /** UpdateNoteRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Distribution architecture */ + architecture?: (grafeas.v1.Architecture|keyof typeof grafeas.v1.Architecture|null); + + /** Distribution latestVersion */ + latestVersion?: (grafeas.v1.IVersion|null); + + /** Distribution maintainer */ + maintainer?: (string|null); + + /** Distribution url */ + url?: (string|null); + + /** Distribution description */ + description?: (string|null); } - /** Represents an UpdateNoteRequest. */ - class UpdateNoteRequest implements IUpdateNoteRequest { + /** Represents a Distribution. */ + class Distribution implements IDistribution { /** - * Constructs a new UpdateNoteRequest. + * Constructs a new Distribution. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IUpdateNoteRequest); + constructor(properties?: grafeas.v1.IDistribution); - /** UpdateNoteRequest name. */ - public name: string; + /** Distribution cpeUri. */ + public cpeUri: string; - /** UpdateNoteRequest note. */ - public note?: (grafeas.v1.INote|null); + /** Distribution architecture. */ + public architecture: (grafeas.v1.Architecture|keyof typeof grafeas.v1.Architecture); - /** UpdateNoteRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Distribution latestVersion. */ + public latestVersion?: (grafeas.v1.IVersion|null); + + /** Distribution maintainer. */ + public maintainer: string; + + /** Distribution url. */ + public url: string; + + /** Distribution description. */ + public description: string; /** - * Creates a new UpdateNoteRequest instance using the specified properties. + * Creates a new Distribution instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateNoteRequest instance + * @returns Distribution instance */ - public static create(properties?: grafeas.v1.IUpdateNoteRequest): grafeas.v1.UpdateNoteRequest; + public static create(properties?: grafeas.v1.IDistribution): grafeas.v1.Distribution; /** - * Encodes the specified UpdateNoteRequest message. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. - * @param message UpdateNoteRequest message or plain object to encode + * Encodes the specified Distribution message. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. - * @param message UpdateNoteRequest message or plain object to encode + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateNoteRequest message from the specified reader or buffer. + * Decodes a Distribution message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateNoteRequest + * @returns Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpdateNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Distribution; /** - * Decodes an UpdateNoteRequest message from the specified reader or buffer, length delimited. + * Decodes a Distribution message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateNoteRequest + * @returns Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpdateNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Distribution; /** - * Verifies an UpdateNoteRequest message. + * Verifies a Distribution message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateNoteRequest + * @returns Distribution */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Distribution; /** - * Creates a plain object from an UpdateNoteRequest message. Also converts values to other types if specified. - * @param message UpdateNoteRequest + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.UpdateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateNoteRequest to JSON. + * Converts this Distribution to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNoteOccurrencesRequest. */ - interface IListNoteOccurrencesRequest { - - /** ListNoteOccurrencesRequest name */ - name?: (string|null); + /** Properties of a Location. */ + interface ILocation { - /** ListNoteOccurrencesRequest filter */ - filter?: (string|null); + /** Location cpeUri */ + cpeUri?: (string|null); - /** ListNoteOccurrencesRequest pageSize */ - pageSize?: (number|null); + /** Location version */ + version?: (grafeas.v1.IVersion|null); - /** ListNoteOccurrencesRequest pageToken */ - pageToken?: (string|null); + /** Location path */ + path?: (string|null); } - /** Represents a ListNoteOccurrencesRequest. */ - class ListNoteOccurrencesRequest implements IListNoteOccurrencesRequest { + /** Represents a Location. */ + class Location implements ILocation { /** - * Constructs a new ListNoteOccurrencesRequest. + * Constructs a new Location. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNoteOccurrencesRequest); - - /** ListNoteOccurrencesRequest name. */ - public name: string; + constructor(properties?: grafeas.v1.ILocation); - /** ListNoteOccurrencesRequest filter. */ - public filter: string; + /** Location cpeUri. */ + public cpeUri: string; - /** ListNoteOccurrencesRequest pageSize. */ - public pageSize: number; + /** Location version. */ + public version?: (grafeas.v1.IVersion|null); - /** ListNoteOccurrencesRequest pageToken. */ - public pageToken: string; + /** Location path. */ + public path: string; /** - * Creates a new ListNoteOccurrencesRequest instance using the specified properties. + * Creates a new Location instance using the specified properties. * @param [properties] Properties to set - * @returns ListNoteOccurrencesRequest instance + * @returns Location instance */ - public static create(properties?: grafeas.v1.IListNoteOccurrencesRequest): grafeas.v1.ListNoteOccurrencesRequest; + public static create(properties?: grafeas.v1.ILocation): grafeas.v1.Location; /** - * Encodes the specified ListNoteOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. - * @param message ListNoteOccurrencesRequest message or plain object to encode + * Encodes the specified Location message. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. + * @param message Location message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNoteOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. - * @param message ListNoteOccurrencesRequest message or plain object to encode + * Encodes the specified Location message, length delimited. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. + * @param message Location message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNoteOccurrencesRequest + * @returns Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNoteOccurrencesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Location; /** - * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNoteOccurrencesRequest + * @returns Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNoteOccurrencesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Location; /** - * Verifies a ListNoteOccurrencesRequest message. + * Verifies a Location message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListNoteOccurrencesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNoteOccurrencesRequest + * @returns Location */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Location; /** - * Creates a plain object from a ListNoteOccurrencesRequest message. Also converts values to other types if specified. - * @param message ListNoteOccurrencesRequest + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ListNoteOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNoteOccurrencesRequest to JSON. + * Converts this Location to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNoteOccurrencesResponse. */ - interface IListNoteOccurrencesResponse { + /** Properties of a PackageNote. */ + interface IPackageNote { - /** ListNoteOccurrencesResponse occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** PackageNote name */ + name?: (string|null); - /** ListNoteOccurrencesResponse nextPageToken */ - nextPageToken?: (string|null); + /** PackageNote distribution */ + distribution?: (grafeas.v1.IDistribution[]|null); } - /** Represents a ListNoteOccurrencesResponse. */ - class ListNoteOccurrencesResponse implements IListNoteOccurrencesResponse { + /** Represents a PackageNote. */ + class PackageNote implements IPackageNote { /** - * Constructs a new ListNoteOccurrencesResponse. + * Constructs a new PackageNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNoteOccurrencesResponse); + constructor(properties?: grafeas.v1.IPackageNote); - /** ListNoteOccurrencesResponse occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** PackageNote name. */ + public name: string; - /** ListNoteOccurrencesResponse nextPageToken. */ - public nextPageToken: string; + /** PackageNote distribution. */ + public distribution: grafeas.v1.IDistribution[]; /** - * Creates a new ListNoteOccurrencesResponse instance using the specified properties. + * Creates a new PackageNote instance using the specified properties. * @param [properties] Properties to set - * @returns ListNoteOccurrencesResponse instance + * @returns PackageNote instance */ - public static create(properties?: grafeas.v1.IListNoteOccurrencesResponse): grafeas.v1.ListNoteOccurrencesResponse; + public static create(properties?: grafeas.v1.IPackageNote): grafeas.v1.PackageNote; /** - * Encodes the specified ListNoteOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. - * @param message ListNoteOccurrencesResponse message or plain object to encode + * Encodes the specified PackageNote message. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. + * @param message PackageNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IPackageNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNoteOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. - * @param message ListNoteOccurrencesResponse message or plain object to encode + * Encodes the specified PackageNote message, length delimited. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. + * @param message PackageNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IPackageNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer. + * Decodes a PackageNote message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNoteOccurrencesResponse + * @returns PackageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNoteOccurrencesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.PackageNote; /** - * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer, length delimited. + * Decodes a PackageNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNoteOccurrencesResponse + * @returns PackageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNoteOccurrencesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.PackageNote; /** - * Verifies a ListNoteOccurrencesResponse message. + * Verifies a PackageNote message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListNoteOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PackageNote message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNoteOccurrencesResponse + * @returns PackageNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageNote; /** - * Creates a plain object from a ListNoteOccurrencesResponse message. Also converts values to other types if specified. - * @param message ListNoteOccurrencesResponse + * Creates a plain object from a PackageNote message. Also converts values to other types if specified. + * @param message PackageNote * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ListNoteOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.PackageNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNoteOccurrencesResponse to JSON. + * Converts this PackageNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateNotesRequest. */ - interface IBatchCreateNotesRequest { + /** Properties of a PackageOccurrence. */ + interface IPackageOccurrence { - /** BatchCreateNotesRequest parent */ - parent?: (string|null); + /** PackageOccurrence name */ + name?: (string|null); - /** BatchCreateNotesRequest notes */ - notes?: ({ [k: string]: grafeas.v1.INote }|null); + /** PackageOccurrence location */ + location?: (grafeas.v1.ILocation[]|null); } - /** Represents a BatchCreateNotesRequest. */ - class BatchCreateNotesRequest implements IBatchCreateNotesRequest { + /** Represents a PackageOccurrence. */ + class PackageOccurrence implements IPackageOccurrence { /** - * Constructs a new BatchCreateNotesRequest. + * Constructs a new PackageOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateNotesRequest); + constructor(properties?: grafeas.v1.IPackageOccurrence); - /** BatchCreateNotesRequest parent. */ - public parent: string; + /** PackageOccurrence name. */ + public name: string; - /** BatchCreateNotesRequest notes. */ - public notes: { [k: string]: grafeas.v1.INote }; + /** PackageOccurrence location. */ + public location: grafeas.v1.ILocation[]; /** - * Creates a new BatchCreateNotesRequest instance using the specified properties. + * Creates a new PackageOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateNotesRequest instance + * @returns PackageOccurrence instance */ - public static create(properties?: grafeas.v1.IBatchCreateNotesRequest): grafeas.v1.BatchCreateNotesRequest; + public static create(properties?: grafeas.v1.IPackageOccurrence): grafeas.v1.PackageOccurrence; /** - * Encodes the specified BatchCreateNotesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. - * @param message BatchCreateNotesRequest message or plain object to encode + * Encodes the specified PackageOccurrence message. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. + * @param message PackageOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IPackageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. - * @param message BatchCreateNotesRequest message or plain object to encode + * Encodes the specified PackageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. + * @param message PackageOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IPackageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateNotesRequest message from the specified reader or buffer. + * Decodes a PackageOccurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateNotesRequest + * @returns PackageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateNotesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.PackageOccurrence; /** - * Decodes a BatchCreateNotesRequest message from the specified reader or buffer, length delimited. + * Decodes a PackageOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateNotesRequest + * @returns PackageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateNotesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.PackageOccurrence; /** - * Verifies a BatchCreateNotesRequest message. + * Verifies a PackageOccurrence message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchCreateNotesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PackageOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateNotesRequest + * @returns PackageOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageOccurrence; /** - * Creates a plain object from a BatchCreateNotesRequest message. Also converts values to other types if specified. - * @param message BatchCreateNotesRequest + * Creates a plain object from a PackageOccurrence message. Also converts values to other types if specified. + * @param message PackageOccurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.BatchCreateNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.PackageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateNotesRequest to JSON. + * Converts this PackageOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateNotesResponse. */ - interface IBatchCreateNotesResponse { + /** Properties of a Version. */ + interface IVersion { - /** BatchCreateNotesResponse notes */ - notes?: (grafeas.v1.INote[]|null); + /** Version epoch */ + epoch?: (number|null); + + /** Version name */ + name?: (string|null); + + /** Version revision */ + revision?: (string|null); + + /** Version inclusive */ + inclusive?: (boolean|null); + + /** Version kind */ + kind?: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind|null); + + /** Version fullName */ + fullName?: (string|null); } - /** Represents a BatchCreateNotesResponse. */ - class BatchCreateNotesResponse implements IBatchCreateNotesResponse { + /** Represents a Version. */ + class Version implements IVersion { /** - * Constructs a new BatchCreateNotesResponse. + * Constructs a new Version. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateNotesResponse); + constructor(properties?: grafeas.v1.IVersion); - /** BatchCreateNotesResponse notes. */ - public notes: grafeas.v1.INote[]; + /** Version epoch. */ + public epoch: number; + + /** Version name. */ + public name: string; + + /** Version revision. */ + public revision: string; + + /** Version inclusive. */ + public inclusive: boolean; + + /** Version kind. */ + public kind: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind); + + /** Version fullName. */ + public fullName: string; /** - * Creates a new BatchCreateNotesResponse instance using the specified properties. + * Creates a new Version instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateNotesResponse instance + * @returns Version instance */ - public static create(properties?: grafeas.v1.IBatchCreateNotesResponse): grafeas.v1.BatchCreateNotesResponse; + public static create(properties?: grafeas.v1.IVersion): grafeas.v1.Version; /** - * Encodes the specified BatchCreateNotesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. - * @param message BatchCreateNotesResponse message or plain object to encode + * Encodes the specified Version message. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. + * @param message Version message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. - * @param message BatchCreateNotesResponse message or plain object to encode + * Encodes the specified Version message, length delimited. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. + * @param message Version message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateNotesResponse message from the specified reader or buffer. + * Decodes a Version message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateNotesResponse + * @returns Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateNotesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Version; /** - * Decodes a BatchCreateNotesResponse message from the specified reader or buffer, length delimited. + * Decodes a Version message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateNotesResponse + * @returns Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateNotesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Version; /** - * Verifies a BatchCreateNotesResponse message. + * Verifies a Version message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchCreateNotesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Version message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateNotesResponse + * @returns Version */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Version; /** - * Creates a plain object from a BatchCreateNotesResponse message. Also converts values to other types if specified. - * @param message BatchCreateNotesResponse + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.BatchCreateNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateNotesResponse to JSON. + * Converts this Version to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateOccurrencesRequest. */ - interface IBatchCreateOccurrencesRequest { + namespace Version { - /** BatchCreateOccurrencesRequest parent */ - parent?: (string|null); + /** VersionKind enum. */ + enum VersionKind { + VERSION_KIND_UNSPECIFIED = 0, + NORMAL = 1, + MINIMUM = 2, + MAXIMUM = 3 + } + } - /** BatchCreateOccurrencesRequest occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** Properties of an UpgradeNote. */ + interface IUpgradeNote { + + /** UpgradeNote package */ + "package"?: (string|null); + + /** UpgradeNote version */ + version?: (grafeas.v1.IVersion|null); + + /** UpgradeNote distributions */ + distributions?: (grafeas.v1.IUpgradeDistribution[]|null); + + /** UpgradeNote windowsUpdate */ + windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); } - /** Represents a BatchCreateOccurrencesRequest. */ - class BatchCreateOccurrencesRequest implements IBatchCreateOccurrencesRequest { + /** Represents an UpgradeNote. */ + class UpgradeNote implements IUpgradeNote { /** - * Constructs a new BatchCreateOccurrencesRequest. + * Constructs a new UpgradeNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateOccurrencesRequest); + constructor(properties?: grafeas.v1.IUpgradeNote); - /** BatchCreateOccurrencesRequest parent. */ - public parent: string; + /** UpgradeNote package. */ + public package: string; - /** BatchCreateOccurrencesRequest occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** UpgradeNote version. */ + public version?: (grafeas.v1.IVersion|null); + + /** UpgradeNote distributions. */ + public distributions: grafeas.v1.IUpgradeDistribution[]; + + /** UpgradeNote windowsUpdate. */ + public windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); /** - * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. + * Creates a new UpgradeNote instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateOccurrencesRequest instance + * @returns UpgradeNote instance */ - public static create(properties?: grafeas.v1.IBatchCreateOccurrencesRequest): grafeas.v1.BatchCreateOccurrencesRequest; + public static create(properties?: grafeas.v1.IUpgradeNote): grafeas.v1.UpgradeNote; /** - * Encodes the specified BatchCreateOccurrencesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. - * @param message BatchCreateOccurrencesRequest message or plain object to encode + * Encodes the specified UpgradeNote message. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. + * @param message UpgradeNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpgradeNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. - * @param message BatchCreateOccurrencesRequest message or plain object to encode + * Encodes the specified UpgradeNote message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. + * @param message UpgradeNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpgradeNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer. + * Decodes an UpgradeNote message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateOccurrencesRequest + * @returns UpgradeNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateOccurrencesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeNote; /** - * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpgradeNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateOccurrencesRequest + * @returns UpgradeNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateOccurrencesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeNote; /** - * Verifies a BatchCreateOccurrencesRequest message. + * Verifies an UpgradeNote message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchCreateOccurrencesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpgradeNote message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateOccurrencesRequest + * @returns UpgradeNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeNote; /** - * Creates a plain object from a BatchCreateOccurrencesRequest message. Also converts values to other types if specified. - * @param message BatchCreateOccurrencesRequest + * Creates a plain object from an UpgradeNote message. Also converts values to other types if specified. + * @param message UpgradeNote * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.BatchCreateOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpgradeNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateOccurrencesRequest to JSON. + * Converts this UpgradeNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateOccurrencesResponse. */ - interface IBatchCreateOccurrencesResponse { + /** Properties of an UpgradeDistribution. */ + interface IUpgradeDistribution { - /** BatchCreateOccurrencesResponse occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** UpgradeDistribution cpeUri */ + cpeUri?: (string|null); + + /** UpgradeDistribution classification */ + classification?: (string|null); + + /** UpgradeDistribution severity */ + severity?: (string|null); + + /** UpgradeDistribution cve */ + cve?: (string[]|null); } - /** Represents a BatchCreateOccurrencesResponse. */ - class BatchCreateOccurrencesResponse implements IBatchCreateOccurrencesResponse { + /** Represents an UpgradeDistribution. */ + class UpgradeDistribution implements IUpgradeDistribution { /** - * Constructs a new BatchCreateOccurrencesResponse. + * Constructs a new UpgradeDistribution. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateOccurrencesResponse); + constructor(properties?: grafeas.v1.IUpgradeDistribution); - /** BatchCreateOccurrencesResponse occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** UpgradeDistribution cpeUri. */ + public cpeUri: string; + + /** UpgradeDistribution classification. */ + public classification: string; + + /** UpgradeDistribution severity. */ + public severity: string; + + /** UpgradeDistribution cve. */ + public cve: string[]; /** - * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. + * Creates a new UpgradeDistribution instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateOccurrencesResponse instance + * @returns UpgradeDistribution instance */ - public static create(properties?: grafeas.v1.IBatchCreateOccurrencesResponse): grafeas.v1.BatchCreateOccurrencesResponse; + public static create(properties?: grafeas.v1.IUpgradeDistribution): grafeas.v1.UpgradeDistribution; /** - * Encodes the specified BatchCreateOccurrencesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. - * @param message BatchCreateOccurrencesResponse message or plain object to encode + * Encodes the specified UpgradeDistribution message. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. + * @param message UpgradeDistribution message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpgradeDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. - * @param message BatchCreateOccurrencesResponse message or plain object to encode + * Encodes the specified UpgradeDistribution message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. + * @param message UpgradeDistribution message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpgradeDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer. + * Decodes an UpgradeDistribution message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateOccurrencesResponse + * @returns UpgradeDistribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateOccurrencesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeDistribution; /** - * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpgradeDistribution message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateOccurrencesResponse + * @returns UpgradeDistribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateOccurrencesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeDistribution; /** - * Verifies a BatchCreateOccurrencesResponse message. + * Verifies an UpgradeDistribution message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchCreateOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpgradeDistribution message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateOccurrencesResponse + * @returns UpgradeDistribution */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeDistribution; /** - * Creates a plain object from a BatchCreateOccurrencesResponse message. Also converts values to other types if specified. - * @param message BatchCreateOccurrencesResponse + * Creates a plain object from an UpgradeDistribution message. Also converts values to other types if specified. + * @param message UpgradeDistribution * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.BatchCreateOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpgradeDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateOccurrencesResponse to JSON. + * Converts this UpgradeDistribution to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Layer. */ - interface ILayer { + /** Properties of a WindowsUpdate. */ + interface IWindowsUpdate { - /** Layer directive */ - directive?: (string|null); + /** WindowsUpdate identity */ + identity?: (grafeas.v1.WindowsUpdate.IIdentity|null); - /** Layer arguments */ - "arguments"?: (string|null); + /** WindowsUpdate title */ + title?: (string|null); + + /** WindowsUpdate description */ + description?: (string|null); + + /** WindowsUpdate categories */ + categories?: (grafeas.v1.WindowsUpdate.ICategory[]|null); + + /** WindowsUpdate kbArticleIds */ + kbArticleIds?: (string[]|null); + + /** WindowsUpdate supportUrl */ + supportUrl?: (string|null); + + /** WindowsUpdate lastPublishedTimestamp */ + lastPublishedTimestamp?: (google.protobuf.ITimestamp|null); } - /** Represents a Layer. */ - class Layer implements ILayer { + /** Represents a WindowsUpdate. */ + class WindowsUpdate implements IWindowsUpdate { /** - * Constructs a new Layer. + * Constructs a new WindowsUpdate. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ILayer); + constructor(properties?: grafeas.v1.IWindowsUpdate); - /** Layer directive. */ - public directive: string; + /** WindowsUpdate identity. */ + public identity?: (grafeas.v1.WindowsUpdate.IIdentity|null); - /** Layer arguments. */ - public arguments: string; + /** WindowsUpdate title. */ + public title: string; + + /** WindowsUpdate description. */ + public description: string; + + /** WindowsUpdate categories. */ + public categories: grafeas.v1.WindowsUpdate.ICategory[]; + + /** WindowsUpdate kbArticleIds. */ + public kbArticleIds: string[]; + + /** WindowsUpdate supportUrl. */ + public supportUrl: string; + + /** WindowsUpdate lastPublishedTimestamp. */ + public lastPublishedTimestamp?: (google.protobuf.ITimestamp|null); /** - * Creates a new Layer instance using the specified properties. + * Creates a new WindowsUpdate instance using the specified properties. * @param [properties] Properties to set - * @returns Layer instance + * @returns WindowsUpdate instance */ - public static create(properties?: grafeas.v1.ILayer): grafeas.v1.Layer; + public static create(properties?: grafeas.v1.IWindowsUpdate): grafeas.v1.WindowsUpdate; /** - * Encodes the specified Layer message. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. - * @param message Layer message or plain object to encode + * Encodes the specified WindowsUpdate message. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. + * @param message WindowsUpdate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ILayer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IWindowsUpdate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Layer message, length delimited. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. - * @param message Layer message or plain object to encode + * Encodes the specified WindowsUpdate message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. + * @param message WindowsUpdate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ILayer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IWindowsUpdate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Layer message from the specified reader or buffer. + * Decodes a WindowsUpdate message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Layer + * @returns WindowsUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Layer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.WindowsUpdate; /** - * Decodes a Layer message from the specified reader or buffer, length delimited. + * Decodes a WindowsUpdate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Layer + * @returns WindowsUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Layer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.WindowsUpdate; /** - * Verifies a Layer message. + * Verifies a WindowsUpdate message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Layer message from a plain object. Also converts values to their respective internal types. + * Creates a WindowsUpdate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Layer + * @returns WindowsUpdate */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Layer; + public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate; /** - * Creates a plain object from a Layer message. Also converts values to other types if specified. - * @param message Layer + * Creates a plain object from a WindowsUpdate message. Also converts values to other types if specified. + * @param message WindowsUpdate * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Layer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.WindowsUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Layer to JSON. + * Converts this WindowsUpdate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Fingerprint. */ - interface IFingerprint { + namespace WindowsUpdate { - /** Fingerprint v1Name */ - v1Name?: (string|null); + /** Properties of an Identity. */ + interface IIdentity { - /** Fingerprint v2Blob */ - v2Blob?: (string[]|null); + /** Identity updateId */ + updateId?: (string|null); - /** Fingerprint v2Name */ - v2Name?: (string|null); - } + /** Identity revision */ + revision?: (number|null); + } - /** Represents a Fingerprint. */ - class Fingerprint implements IFingerprint { + /** Represents an Identity. */ + class Identity implements IIdentity { - /** - * Constructs a new Fingerprint. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IFingerprint); + /** + * Constructs a new Identity. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.WindowsUpdate.IIdentity); - /** Fingerprint v1Name. */ - public v1Name: string; + /** Identity updateId. */ + public updateId: string; - /** Fingerprint v2Blob. */ - public v2Blob: string[]; + /** Identity revision. */ + public revision: number; + + /** + * Creates a new Identity instance using the specified properties. + * @param [properties] Properties to set + * @returns Identity instance + */ + public static create(properties?: grafeas.v1.WindowsUpdate.IIdentity): grafeas.v1.WindowsUpdate.Identity; + + /** + * Encodes the specified Identity message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. + * @param message Identity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.WindowsUpdate.IIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Identity message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. + * @param message Identity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.WindowsUpdate.IIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Identity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Identity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.WindowsUpdate.Identity; + + /** + * Decodes an Identity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Identity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.WindowsUpdate.Identity; + + /** + * Verifies an Identity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Identity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Identity + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate.Identity; + + /** + * Creates a plain object from an Identity message. Also converts values to other types if specified. + * @param message Identity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.WindowsUpdate.Identity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Identity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Category. */ + interface ICategory { + + /** Category categoryId */ + categoryId?: (string|null); + + /** Category name */ + name?: (string|null); + } + + /** Represents a Category. */ + class Category implements ICategory { + + /** + * Constructs a new Category. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.WindowsUpdate.ICategory); - /** Fingerprint v2Name. */ - public v2Name: string; + /** Category categoryId. */ + public categoryId: string; - /** - * Creates a new Fingerprint instance using the specified properties. - * @param [properties] Properties to set - * @returns Fingerprint instance - */ - public static create(properties?: grafeas.v1.IFingerprint): grafeas.v1.Fingerprint; + /** Category name. */ + public name: string; - /** - * Encodes the specified Fingerprint message. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. - * @param message Fingerprint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.IFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Category instance using the specified properties. + * @param [properties] Properties to set + * @returns Category instance + */ + public static create(properties?: grafeas.v1.WindowsUpdate.ICategory): grafeas.v1.WindowsUpdate.Category; - /** - * Encodes the specified Fingerprint message, length delimited. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. - * @param message Fingerprint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.IFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Category message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. + * @param message Category message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.WindowsUpdate.ICategory, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Fingerprint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Fingerprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Fingerprint; + /** + * Encodes the specified Category message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. + * @param message Category message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.WindowsUpdate.ICategory, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Fingerprint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Fingerprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Fingerprint; + /** + * Decodes a Category message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Category + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.WindowsUpdate.Category; - /** - * Verifies a Fingerprint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a Category message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Category + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.WindowsUpdate.Category; - /** - * Creates a Fingerprint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Fingerprint - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Fingerprint; + /** + * Verifies a Category message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Fingerprint message. Also converts values to other types if specified. - * @param message Fingerprint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.Fingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a Category message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Category + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate.Category; - /** - * Converts this Fingerprint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a Category message. Also converts values to other types if specified. + * @param message Category + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.WindowsUpdate.Category, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Category to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of an ImageNote. */ - interface IImageNote { + /** Properties of an UpgradeOccurrence. */ + interface IUpgradeOccurrence { - /** ImageNote resourceUrl */ - resourceUrl?: (string|null); + /** UpgradeOccurrence package */ + "package"?: (string|null); - /** ImageNote fingerprint */ - fingerprint?: (grafeas.v1.IFingerprint|null); + /** UpgradeOccurrence parsedVersion */ + parsedVersion?: (grafeas.v1.IVersion|null); + + /** UpgradeOccurrence distribution */ + distribution?: (grafeas.v1.IUpgradeDistribution|null); + + /** UpgradeOccurrence windowsUpdate */ + windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); } - /** Represents an ImageNote. */ - class ImageNote implements IImageNote { + /** Represents an UpgradeOccurrence. */ + class UpgradeOccurrence implements IUpgradeOccurrence { /** - * Constructs a new ImageNote. + * Constructs a new UpgradeOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IImageNote); + constructor(properties?: grafeas.v1.IUpgradeOccurrence); - /** ImageNote resourceUrl. */ - public resourceUrl: string; + /** UpgradeOccurrence package. */ + public package: string; - /** ImageNote fingerprint. */ - public fingerprint?: (grafeas.v1.IFingerprint|null); + /** UpgradeOccurrence parsedVersion. */ + public parsedVersion?: (grafeas.v1.IVersion|null); + + /** UpgradeOccurrence distribution. */ + public distribution?: (grafeas.v1.IUpgradeDistribution|null); + + /** UpgradeOccurrence windowsUpdate. */ + public windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); /** - * Creates a new ImageNote instance using the specified properties. + * Creates a new UpgradeOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns ImageNote instance + * @returns UpgradeOccurrence instance */ - public static create(properties?: grafeas.v1.IImageNote): grafeas.v1.ImageNote; + public static create(properties?: grafeas.v1.IUpgradeOccurrence): grafeas.v1.UpgradeOccurrence; /** - * Encodes the specified ImageNote message. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. - * @param message ImageNote message or plain object to encode + * Encodes the specified UpgradeOccurrence message. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. + * @param message UpgradeOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IImageNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpgradeOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageNote message, length delimited. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. - * @param message ImageNote message or plain object to encode + * Encodes the specified UpgradeOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. + * @param message UpgradeOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IImageNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpgradeOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageNote message from the specified reader or buffer. + * Decodes an UpgradeOccurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageNote + * @returns UpgradeOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ImageNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeOccurrence; /** - * Decodes an ImageNote message from the specified reader or buffer, length delimited. + * Decodes an UpgradeOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageNote + * @returns UpgradeOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ImageNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeOccurrence; /** - * Verifies an ImageNote message. + * Verifies an UpgradeOccurrence message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImageNote message from a plain object. Also converts values to their respective internal types. + * Creates an UpgradeOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageNote + * @returns UpgradeOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeOccurrence; /** - * Creates a plain object from an ImageNote message. Also converts values to other types if specified. - * @param message ImageNote + * Creates a plain object from an UpgradeOccurrence message. Also converts values to other types if specified. + * @param message UpgradeOccurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ImageNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpgradeOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageNote to JSON. + * Converts this UpgradeOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageOccurrence. */ - interface IImageOccurrence { + /** Properties of a VulnerabilityNote. */ + interface IVulnerabilityNote { - /** ImageOccurrence fingerprint */ - fingerprint?: (grafeas.v1.IFingerprint|null); + /** VulnerabilityNote cvssScore */ + cvssScore?: (number|null); - /** ImageOccurrence distance */ - distance?: (number|null); + /** VulnerabilityNote severity */ + severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - /** ImageOccurrence layerInfo */ - layerInfo?: (grafeas.v1.ILayer[]|null); + /** VulnerabilityNote details */ + details?: (grafeas.v1.VulnerabilityNote.IDetail[]|null); - /** ImageOccurrence baseResourceUrl */ - baseResourceUrl?: (string|null); + /** VulnerabilityNote cvssV3 */ + cvssV3?: (grafeas.v1.ICVSSv3|null); + + /** VulnerabilityNote windowsDetails */ + windowsDetails?: (grafeas.v1.VulnerabilityNote.IWindowsDetail[]|null); + + /** VulnerabilityNote sourceUpdateTime */ + sourceUpdateTime?: (google.protobuf.ITimestamp|null); } - /** Represents an ImageOccurrence. */ - class ImageOccurrence implements IImageOccurrence { + /** Represents a VulnerabilityNote. */ + class VulnerabilityNote implements IVulnerabilityNote { /** - * Constructs a new ImageOccurrence. + * Constructs a new VulnerabilityNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IImageOccurrence); + constructor(properties?: grafeas.v1.IVulnerabilityNote); + + /** VulnerabilityNote cvssScore. */ + public cvssScore: number; + + /** VulnerabilityNote severity. */ + public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - /** ImageOccurrence fingerprint. */ - public fingerprint?: (grafeas.v1.IFingerprint|null); + /** VulnerabilityNote details. */ + public details: grafeas.v1.VulnerabilityNote.IDetail[]; - /** ImageOccurrence distance. */ - public distance: number; + /** VulnerabilityNote cvssV3. */ + public cvssV3?: (grafeas.v1.ICVSSv3|null); - /** ImageOccurrence layerInfo. */ - public layerInfo: grafeas.v1.ILayer[]; + /** VulnerabilityNote windowsDetails. */ + public windowsDetails: grafeas.v1.VulnerabilityNote.IWindowsDetail[]; - /** ImageOccurrence baseResourceUrl. */ - public baseResourceUrl: string; + /** VulnerabilityNote sourceUpdateTime. */ + public sourceUpdateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ImageOccurrence instance using the specified properties. + * Creates a new VulnerabilityNote instance using the specified properties. * @param [properties] Properties to set - * @returns ImageOccurrence instance + * @returns VulnerabilityNote instance */ - public static create(properties?: grafeas.v1.IImageOccurrence): grafeas.v1.ImageOccurrence; + public static create(properties?: grafeas.v1.IVulnerabilityNote): grafeas.v1.VulnerabilityNote; /** - * Encodes the specified ImageOccurrence message. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. - * @param message ImageOccurrence message or plain object to encode + * Encodes the specified VulnerabilityNote message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. + * @param message VulnerabilityNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IImageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IVulnerabilityNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. - * @param message ImageOccurrence message or plain object to encode + * Encodes the specified VulnerabilityNote message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. + * @param message VulnerabilityNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IImageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IVulnerabilityNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageOccurrence message from the specified reader or buffer. + * Decodes a VulnerabilityNote message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageOccurrence + * @returns VulnerabilityNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ImageOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote; /** - * Decodes an ImageOccurrence message from the specified reader or buffer, length delimited. + * Decodes a VulnerabilityNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageOccurrence + * @returns VulnerabilityNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ImageOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote; /** - * Verifies an ImageOccurrence message. + * Verifies a VulnerabilityNote message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImageOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a VulnerabilityNote message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageOccurrence + * @returns VulnerabilityNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote; /** - * Creates a plain object from an ImageOccurrence message. Also converts values to other types if specified. - * @param message ImageOccurrence + * Creates a plain object from a VulnerabilityNote message. Also converts values to other types if specified. + * @param message VulnerabilityNote * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ImageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.VulnerabilityNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageOccurrence to JSON. + * Converts this VulnerabilityNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpgradeNote. */ - interface IUpgradeNote { + namespace VulnerabilityNote { - /** UpgradeNote package */ - "package"?: (string|null); + /** Properties of a Detail. */ + interface IDetail { - /** UpgradeNote version */ - version?: (grafeas.v1.IVersion|null); + /** Detail severityName */ + severityName?: (string|null); - /** UpgradeNote distributions */ - distributions?: (grafeas.v1.IUpgradeDistribution[]|null); + /** Detail description */ + description?: (string|null); - /** UpgradeNote windowsUpdate */ - windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); - } + /** Detail packageType */ + packageType?: (string|null); - /** Represents an UpgradeNote. */ - class UpgradeNote implements IUpgradeNote { + /** Detail affectedCpeUri */ + affectedCpeUri?: (string|null); + + /** Detail affectedPackage */ + affectedPackage?: (string|null); + + /** Detail affectedVersionStart */ + affectedVersionStart?: (grafeas.v1.IVersion|null); + + /** Detail affectedVersionEnd */ + affectedVersionEnd?: (grafeas.v1.IVersion|null); + + /** Detail fixedCpeUri */ + fixedCpeUri?: (string|null); + + /** Detail fixedPackage */ + fixedPackage?: (string|null); + + /** Detail fixedVersion */ + fixedVersion?: (grafeas.v1.IVersion|null); + + /** Detail isObsolete */ + isObsolete?: (boolean|null); + + /** Detail sourceUpdateTime */ + sourceUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Detail source */ + source?: (string|null); + + /** Detail vendor */ + vendor?: (string|null); + } + + /** Represents a Detail. */ + class Detail implements IDetail { + + /** + * Constructs a new Detail. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.VulnerabilityNote.IDetail); + + /** Detail severityName. */ + public severityName: string; + + /** Detail description. */ + public description: string; + + /** Detail packageType. */ + public packageType: string; + + /** Detail affectedCpeUri. */ + public affectedCpeUri: string; + + /** Detail affectedPackage. */ + public affectedPackage: string; + + /** Detail affectedVersionStart. */ + public affectedVersionStart?: (grafeas.v1.IVersion|null); + + /** Detail affectedVersionEnd. */ + public affectedVersionEnd?: (grafeas.v1.IVersion|null); + + /** Detail fixedCpeUri. */ + public fixedCpeUri: string; + + /** Detail fixedPackage. */ + public fixedPackage: string; + + /** Detail fixedVersion. */ + public fixedVersion?: (grafeas.v1.IVersion|null); + + /** Detail isObsolete. */ + public isObsolete: boolean; + + /** Detail sourceUpdateTime. */ + public sourceUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Detail source. */ + public source: string; + + /** Detail vendor. */ + public vendor: string; + + /** + * Creates a new Detail instance using the specified properties. + * @param [properties] Properties to set + * @returns Detail instance + */ + public static create(properties?: grafeas.v1.VulnerabilityNote.IDetail): grafeas.v1.VulnerabilityNote.Detail; + + /** + * Encodes the specified Detail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. + * @param message Detail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.VulnerabilityNote.IDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Detail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. + * @param message Detail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.VulnerabilityNote.IDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Detail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Detail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote.Detail; + + /** + * Decodes a Detail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Detail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote.Detail; + + /** + * Verifies a Detail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Detail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Detail + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote.Detail; + + /** + * Creates a plain object from a Detail message. Also converts values to other types if specified. + * @param message Detail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.VulnerabilityNote.Detail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Detail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WindowsDetail. */ + interface IWindowsDetail { + + /** WindowsDetail cpeUri */ + cpeUri?: (string|null); + + /** WindowsDetail name */ + name?: (string|null); + + /** WindowsDetail description */ + description?: (string|null); + + /** WindowsDetail fixingKbs */ + fixingKbs?: (grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase[]|null); + } + + /** Represents a WindowsDetail. */ + class WindowsDetail implements IWindowsDetail { - /** - * Constructs a new UpgradeNote. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IUpgradeNote); + /** + * Constructs a new WindowsDetail. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.VulnerabilityNote.IWindowsDetail); - /** UpgradeNote package. */ - public package: string; + /** WindowsDetail cpeUri. */ + public cpeUri: string; - /** UpgradeNote version. */ - public version?: (grafeas.v1.IVersion|null); + /** WindowsDetail name. */ + public name: string; - /** UpgradeNote distributions. */ - public distributions: grafeas.v1.IUpgradeDistribution[]; + /** WindowsDetail description. */ + public description: string; - /** UpgradeNote windowsUpdate. */ - public windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); + /** WindowsDetail fixingKbs. */ + public fixingKbs: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase[]; - /** - * Creates a new UpgradeNote instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeNote instance - */ - public static create(properties?: grafeas.v1.IUpgradeNote): grafeas.v1.UpgradeNote; + /** + * Creates a new WindowsDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsDetail instance + */ + public static create(properties?: grafeas.v1.VulnerabilityNote.IWindowsDetail): grafeas.v1.VulnerabilityNote.WindowsDetail; - /** - * Encodes the specified UpgradeNote message. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. - * @param message UpgradeNote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.IUpgradeNote, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified WindowsDetail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. + * @param message WindowsDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.VulnerabilityNote.IWindowsDetail, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UpgradeNote message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. - * @param message UpgradeNote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.IUpgradeNote, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified WindowsDetail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. + * @param message WindowsDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.VulnerabilityNote.IWindowsDetail, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an UpgradeNote message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeNote; + /** + * Decodes a WindowsDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote.WindowsDetail; - /** - * Decodes an UpgradeNote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeNote; + /** + * Decodes a WindowsDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote.WindowsDetail; - /** - * Verifies an UpgradeNote message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a WindowsDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates an UpgradeNote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeNote - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeNote; + /** + * Creates a WindowsDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsDetail + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote.WindowsDetail; - /** - * Creates a plain object from an UpgradeNote message. Also converts values to other types if specified. - * @param message UpgradeNote - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.UpgradeNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a WindowsDetail message. Also converts values to other types if specified. + * @param message WindowsDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.VulnerabilityNote.WindowsDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this UpgradeNote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this WindowsDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of an UpgradeDistribution. */ - interface IUpgradeDistribution { + namespace WindowsDetail { - /** UpgradeDistribution cpeUri */ - cpeUri?: (string|null); + /** Properties of a KnowledgeBase. */ + interface IKnowledgeBase { - /** UpgradeDistribution classification */ - classification?: (string|null); + /** KnowledgeBase name */ + name?: (string|null); - /** UpgradeDistribution severity */ - severity?: (string|null); + /** KnowledgeBase url */ + url?: (string|null); + } - /** UpgradeDistribution cve */ - cve?: (string[]|null); - } + /** Represents a KnowledgeBase. */ + class KnowledgeBase implements IKnowledgeBase { - /** Represents an UpgradeDistribution. */ - class UpgradeDistribution implements IUpgradeDistribution { + /** + * Constructs a new KnowledgeBase. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase); - /** - * Constructs a new UpgradeDistribution. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IUpgradeDistribution); + /** KnowledgeBase name. */ + public name: string; - /** UpgradeDistribution cpeUri. */ - public cpeUri: string; + /** KnowledgeBase url. */ + public url: string; - /** UpgradeDistribution classification. */ - public classification: string; + /** + * Creates a new KnowledgeBase instance using the specified properties. + * @param [properties] Properties to set + * @returns KnowledgeBase instance + */ + public static create(properties?: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - /** UpgradeDistribution severity. */ - public severity: string; + /** + * Encodes the specified KnowledgeBase message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. + * @param message KnowledgeBase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase, writer?: $protobuf.Writer): $protobuf.Writer; - /** UpgradeDistribution cve. */ - public cve: string[]; + /** + * Encodes the specified KnowledgeBase message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. + * @param message KnowledgeBase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new UpgradeDistribution instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeDistribution instance - */ - public static create(properties?: grafeas.v1.IUpgradeDistribution): grafeas.v1.UpgradeDistribution; + /** + * Decodes a KnowledgeBase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KnowledgeBase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - /** - * Encodes the specified UpgradeDistribution message. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. - * @param message UpgradeDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.IUpgradeDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a KnowledgeBase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KnowledgeBase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - /** - * Encodes the specified UpgradeDistribution message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. - * @param message UpgradeDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.IUpgradeDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a KnowledgeBase message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an UpgradeDistribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeDistribution; + /** + * Creates a KnowledgeBase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KnowledgeBase + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase; - /** - * Decodes an UpgradeDistribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeDistribution; + /** + * Creates a plain object from a KnowledgeBase message. Also converts values to other types if specified. + * @param message KnowledgeBase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies an UpgradeDistribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this KnowledgeBase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } - /** - * Creates an UpgradeDistribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeDistribution - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeDistribution; + /** Properties of a VulnerabilityOccurrence. */ + interface IVulnerabilityOccurrence { - /** - * Creates a plain object from an UpgradeDistribution message. Also converts values to other types if specified. - * @param message UpgradeDistribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.UpgradeDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** VulnerabilityOccurrence type */ + type?: (string|null); - /** - * Converts this UpgradeDistribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** VulnerabilityOccurrence severity */ + severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - /** Properties of a WindowsUpdate. */ - interface IWindowsUpdate { + /** VulnerabilityOccurrence cvssScore */ + cvssScore?: (number|null); - /** WindowsUpdate identity */ - identity?: (grafeas.v1.WindowsUpdate.IIdentity|null); + /** VulnerabilityOccurrence cvssv3 */ + cvssv3?: (grafeas.v1.ICVSS|null); - /** WindowsUpdate title */ - title?: (string|null); + /** VulnerabilityOccurrence packageIssue */ + packageIssue?: (grafeas.v1.VulnerabilityOccurrence.IPackageIssue[]|null); - /** WindowsUpdate description */ - description?: (string|null); + /** VulnerabilityOccurrence shortDescription */ + shortDescription?: (string|null); - /** WindowsUpdate categories */ - categories?: (grafeas.v1.WindowsUpdate.ICategory[]|null); + /** VulnerabilityOccurrence longDescription */ + longDescription?: (string|null); - /** WindowsUpdate kbArticleIds */ - kbArticleIds?: (string[]|null); + /** VulnerabilityOccurrence relatedUrls */ + relatedUrls?: (grafeas.v1.IRelatedUrl[]|null); - /** WindowsUpdate supportUrl */ - supportUrl?: (string|null); + /** VulnerabilityOccurrence effectiveSeverity */ + effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - /** WindowsUpdate lastPublishedTimestamp */ - lastPublishedTimestamp?: (google.protobuf.ITimestamp|null); + /** VulnerabilityOccurrence fixAvailable */ + fixAvailable?: (boolean|null); } - /** Represents a WindowsUpdate. */ - class WindowsUpdate implements IWindowsUpdate { + /** Represents a VulnerabilityOccurrence. */ + class VulnerabilityOccurrence implements IVulnerabilityOccurrence { /** - * Constructs a new WindowsUpdate. + * Constructs a new VulnerabilityOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IWindowsUpdate); + constructor(properties?: grafeas.v1.IVulnerabilityOccurrence); - /** WindowsUpdate identity. */ - public identity?: (grafeas.v1.WindowsUpdate.IIdentity|null); + /** VulnerabilityOccurrence type. */ + public type: string; - /** WindowsUpdate title. */ - public title: string; + /** VulnerabilityOccurrence severity. */ + public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - /** WindowsUpdate description. */ - public description: string; + /** VulnerabilityOccurrence cvssScore. */ + public cvssScore: number; - /** WindowsUpdate categories. */ - public categories: grafeas.v1.WindowsUpdate.ICategory[]; + /** VulnerabilityOccurrence cvssv3. */ + public cvssv3?: (grafeas.v1.ICVSS|null); - /** WindowsUpdate kbArticleIds. */ - public kbArticleIds: string[]; + /** VulnerabilityOccurrence packageIssue. */ + public packageIssue: grafeas.v1.VulnerabilityOccurrence.IPackageIssue[]; - /** WindowsUpdate supportUrl. */ - public supportUrl: string; + /** VulnerabilityOccurrence shortDescription. */ + public shortDescription: string; - /** WindowsUpdate lastPublishedTimestamp. */ - public lastPublishedTimestamp?: (google.protobuf.ITimestamp|null); + /** VulnerabilityOccurrence longDescription. */ + public longDescription: string; + + /** VulnerabilityOccurrence relatedUrls. */ + public relatedUrls: grafeas.v1.IRelatedUrl[]; + + /** VulnerabilityOccurrence effectiveSeverity. */ + public effectiveSeverity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + + /** VulnerabilityOccurrence fixAvailable. */ + public fixAvailable: boolean; /** - * Creates a new WindowsUpdate instance using the specified properties. + * Creates a new VulnerabilityOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns WindowsUpdate instance + * @returns VulnerabilityOccurrence instance */ - public static create(properties?: grafeas.v1.IWindowsUpdate): grafeas.v1.WindowsUpdate; + public static create(properties?: grafeas.v1.IVulnerabilityOccurrence): grafeas.v1.VulnerabilityOccurrence; /** - * Encodes the specified WindowsUpdate message. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. - * @param message WindowsUpdate message or plain object to encode + * Encodes the specified VulnerabilityOccurrence message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. + * @param message VulnerabilityOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IWindowsUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IVulnerabilityOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WindowsUpdate message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. - * @param message WindowsUpdate message or plain object to encode + * Encodes the specified VulnerabilityOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. + * @param message VulnerabilityOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IWindowsUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IVulnerabilityOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WindowsUpdate message from the specified reader or buffer. + * Decodes a VulnerabilityOccurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WindowsUpdate + * @returns VulnerabilityOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.WindowsUpdate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityOccurrence; /** - * Decodes a WindowsUpdate message from the specified reader or buffer, length delimited. + * Decodes a VulnerabilityOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WindowsUpdate + * @returns VulnerabilityOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.WindowsUpdate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityOccurrence; /** - * Verifies a WindowsUpdate message. + * Verifies a VulnerabilityOccurrence message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WindowsUpdate message from a plain object. Also converts values to their respective internal types. + * Creates a VulnerabilityOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WindowsUpdate + * @returns VulnerabilityOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate; + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityOccurrence; /** - * Creates a plain object from a WindowsUpdate message. Also converts values to other types if specified. - * @param message WindowsUpdate + * Creates a plain object from a VulnerabilityOccurrence message. Also converts values to other types if specified. + * @param message VulnerabilityOccurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.WindowsUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.VulnerabilityOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WindowsUpdate to JSON. + * Converts this VulnerabilityOccurrence to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any }; - } - - namespace WindowsUpdate { - - /** Properties of an Identity. */ - interface IIdentity { - - /** Identity updateId */ - updateId?: (string|null); - - /** Identity revision */ - revision?: (number|null); - } - - /** Represents an Identity. */ - class Identity implements IIdentity { - - /** - * Constructs a new Identity. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.WindowsUpdate.IIdentity); - - /** Identity updateId. */ - public updateId: string; - - /** Identity revision. */ - public revision: number; - - /** - * Creates a new Identity instance using the specified properties. - * @param [properties] Properties to set - * @returns Identity instance - */ - public static create(properties?: grafeas.v1.WindowsUpdate.IIdentity): grafeas.v1.WindowsUpdate.Identity; - - /** - * Encodes the specified Identity message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. - * @param message Identity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.WindowsUpdate.IIdentity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Identity message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. - * @param message Identity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.WindowsUpdate.IIdentity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Identity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Identity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.WindowsUpdate.Identity; + public toJSON(): { [k: string]: any }; + } - /** - * Decodes an Identity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Identity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.WindowsUpdate.Identity; + namespace VulnerabilityOccurrence { - /** - * Verifies an Identity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a PackageIssue. */ + interface IPackageIssue { - /** - * Creates an Identity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Identity - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate.Identity; + /** PackageIssue affectedCpeUri */ + affectedCpeUri?: (string|null); - /** - * Creates a plain object from an Identity message. Also converts values to other types if specified. - * @param message Identity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.WindowsUpdate.Identity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PackageIssue affectedPackage */ + affectedPackage?: (string|null); - /** - * Converts this Identity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PackageIssue affectedVersion */ + affectedVersion?: (grafeas.v1.IVersion|null); - /** Properties of a Category. */ - interface ICategory { + /** PackageIssue fixedCpeUri */ + fixedCpeUri?: (string|null); - /** Category categoryId */ - categoryId?: (string|null); + /** PackageIssue fixedPackage */ + fixedPackage?: (string|null); - /** Category name */ - name?: (string|null); + /** PackageIssue fixedVersion */ + fixedVersion?: (grafeas.v1.IVersion|null); + + /** PackageIssue fixAvailable */ + fixAvailable?: (boolean|null); + + /** PackageIssue packageType */ + packageType?: (string|null); + + /** PackageIssue effectiveSeverity */ + effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); } - /** Represents a Category. */ - class Category implements ICategory { + /** Represents a PackageIssue. */ + class PackageIssue implements IPackageIssue { /** - * Constructs a new Category. + * Constructs a new PackageIssue. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.WindowsUpdate.ICategory); + constructor(properties?: grafeas.v1.VulnerabilityOccurrence.IPackageIssue); - /** Category categoryId. */ - public categoryId: string; + /** PackageIssue affectedCpeUri. */ + public affectedCpeUri: string; - /** Category name. */ - public name: string; + /** PackageIssue affectedPackage. */ + public affectedPackage: string; + + /** PackageIssue affectedVersion. */ + public affectedVersion?: (grafeas.v1.IVersion|null); + + /** PackageIssue fixedCpeUri. */ + public fixedCpeUri: string; + + /** PackageIssue fixedPackage. */ + public fixedPackage: string; + + /** PackageIssue fixedVersion. */ + public fixedVersion?: (grafeas.v1.IVersion|null); + + /** PackageIssue fixAvailable. */ + public fixAvailable: boolean; + + /** PackageIssue packageType. */ + public packageType: string; + + /** PackageIssue effectiveSeverity. */ + public effectiveSeverity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); /** - * Creates a new Category instance using the specified properties. + * Creates a new PackageIssue instance using the specified properties. * @param [properties] Properties to set - * @returns Category instance + * @returns PackageIssue instance */ - public static create(properties?: grafeas.v1.WindowsUpdate.ICategory): grafeas.v1.WindowsUpdate.Category; + public static create(properties?: grafeas.v1.VulnerabilityOccurrence.IPackageIssue): grafeas.v1.VulnerabilityOccurrence.PackageIssue; /** - * Encodes the specified Category message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. - * @param message Category message or plain object to encode + * Encodes the specified PackageIssue message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. + * @param message PackageIssue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.WindowsUpdate.ICategory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.VulnerabilityOccurrence.IPackageIssue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Category message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. - * @param message Category message or plain object to encode + * Encodes the specified PackageIssue message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. + * @param message PackageIssue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.WindowsUpdate.ICategory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.VulnerabilityOccurrence.IPackageIssue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Category message from the specified reader or buffer. + * Decodes a PackageIssue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Category + * @returns PackageIssue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.WindowsUpdate.Category; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityOccurrence.PackageIssue; /** - * Decodes a Category message from the specified reader or buffer, length delimited. + * Decodes a PackageIssue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Category + * @returns PackageIssue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.WindowsUpdate.Category; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityOccurrence.PackageIssue; /** - * Verifies a Category message. + * Verifies a PackageIssue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Category message from a plain object. Also converts values to their respective internal types. + * Creates a PackageIssue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Category + * @returns PackageIssue */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate.Category; + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityOccurrence.PackageIssue; /** - * Creates a plain object from a Category message. Also converts values to other types if specified. - * @param message Category + * Creates a plain object from a PackageIssue message. Also converts values to other types if specified. + * @param message PackageIssue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.WindowsUpdate.Category, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.VulnerabilityOccurrence.PackageIssue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Category to JSON. + * Converts this PackageIssue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - - /** Properties of an UpgradeOccurrence. */ - interface IUpgradeOccurrence { - - /** UpgradeOccurrence package */ - "package"?: (string|null); - - /** UpgradeOccurrence parsedVersion */ - parsedVersion?: (grafeas.v1.IVersion|null); - - /** UpgradeOccurrence distribution */ - distribution?: (grafeas.v1.IUpgradeDistribution|null); - - /** UpgradeOccurrence windowsUpdate */ - windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); - } - - /** Represents an UpgradeOccurrence. */ - class UpgradeOccurrence implements IUpgradeOccurrence { - - /** - * Constructs a new UpgradeOccurrence. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IUpgradeOccurrence); - - /** UpgradeOccurrence package. */ - public package: string; - - /** UpgradeOccurrence parsedVersion. */ - public parsedVersion?: (grafeas.v1.IVersion|null); - - /** UpgradeOccurrence distribution. */ - public distribution?: (grafeas.v1.IUpgradeDistribution|null); - - /** UpgradeOccurrence windowsUpdate. */ - public windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); - - /** - * Creates a new UpgradeOccurrence instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeOccurrence instance - */ - public static create(properties?: grafeas.v1.IUpgradeOccurrence): grafeas.v1.UpgradeOccurrence; - - /** - * Encodes the specified UpgradeOccurrence message. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. - * @param message UpgradeOccurrence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.IUpgradeOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. - * @param message UpgradeOccurrence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.IUpgradeOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeOccurrence message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeOccurrence; - - /** - * Decodes an UpgradeOccurrence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeOccurrence; - - /** - * Verifies an UpgradeOccurrence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpgradeOccurrence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeOccurrence - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeOccurrence; - - /** - * Creates a plain object from an UpgradeOccurrence message. Also converts values to other types if specified. - * @param message UpgradeOccurrence - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.UpgradeOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeOccurrence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } } diff --git a/packages/grafeas/protos/protos.js b/packages/grafeas/protos/protos.js index 2451b406b58..daed48fa826 100644 --- a/packages/grafeas/protos/protos.js +++ b/packages/grafeas/protos/protos.js @@ -10766,31 +10766,34 @@ return values; })(); - v1.VulnerabilityNote = (function() { + v1.CVSSv3 = (function() { /** - * Properties of a VulnerabilityNote. + * Properties of a CVSSv3. * @memberof grafeas.v1 - * @interface IVulnerabilityNote - * @property {number|null} [cvssScore] VulnerabilityNote cvssScore - * @property {grafeas.v1.Severity|null} [severity] VulnerabilityNote severity - * @property {Array.|null} [details] VulnerabilityNote details - * @property {grafeas.v1.ICVSSv3|null} [cvssV3] VulnerabilityNote cvssV3 - * @property {Array.|null} [windowsDetails] VulnerabilityNote windowsDetails - * @property {google.protobuf.ITimestamp|null} [sourceUpdateTime] VulnerabilityNote sourceUpdateTime + * @interface ICVSSv3 + * @property {number|null} [baseScore] CVSSv3 baseScore + * @property {number|null} [exploitabilityScore] CVSSv3 exploitabilityScore + * @property {number|null} [impactScore] CVSSv3 impactScore + * @property {grafeas.v1.CVSSv3.AttackVector|null} [attackVector] CVSSv3 attackVector + * @property {grafeas.v1.CVSSv3.AttackComplexity|null} [attackComplexity] CVSSv3 attackComplexity + * @property {grafeas.v1.CVSSv3.PrivilegesRequired|null} [privilegesRequired] CVSSv3 privilegesRequired + * @property {grafeas.v1.CVSSv3.UserInteraction|null} [userInteraction] CVSSv3 userInteraction + * @property {grafeas.v1.CVSSv3.Scope|null} [scope] CVSSv3 scope + * @property {grafeas.v1.CVSSv3.Impact|null} [confidentialityImpact] CVSSv3 confidentialityImpact + * @property {grafeas.v1.CVSSv3.Impact|null} [integrityImpact] CVSSv3 integrityImpact + * @property {grafeas.v1.CVSSv3.Impact|null} [availabilityImpact] CVSSv3 availabilityImpact */ /** - * Constructs a new VulnerabilityNote. + * Constructs a new CVSSv3. * @memberof grafeas.v1 - * @classdesc Represents a VulnerabilityNote. - * @implements IVulnerabilityNote + * @classdesc Represents a CVSSv3. + * @implements ICVSSv3 * @constructor - * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set + * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set */ - function VulnerabilityNote(properties) { - this.details = []; - this.windowsDetails = []; + function CVSSv3(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10798,146 +10801,205 @@ } /** - * VulnerabilityNote cvssScore. - * @member {number} cvssScore - * @memberof grafeas.v1.VulnerabilityNote + * CVSSv3 baseScore. + * @member {number} baseScore + * @memberof grafeas.v1.CVSSv3 * @instance */ - VulnerabilityNote.prototype.cvssScore = 0; + CVSSv3.prototype.baseScore = 0; /** - * VulnerabilityNote severity. - * @member {grafeas.v1.Severity} severity - * @memberof grafeas.v1.VulnerabilityNote + * CVSSv3 exploitabilityScore. + * @member {number} exploitabilityScore + * @memberof grafeas.v1.CVSSv3 * @instance */ - VulnerabilityNote.prototype.severity = 0; + CVSSv3.prototype.exploitabilityScore = 0; /** - * VulnerabilityNote details. - * @member {Array.} details - * @memberof grafeas.v1.VulnerabilityNote + * CVSSv3 impactScore. + * @member {number} impactScore + * @memberof grafeas.v1.CVSSv3 * @instance */ - VulnerabilityNote.prototype.details = $util.emptyArray; + CVSSv3.prototype.impactScore = 0; /** - * VulnerabilityNote cvssV3. - * @member {grafeas.v1.ICVSSv3|null|undefined} cvssV3 - * @memberof grafeas.v1.VulnerabilityNote + * CVSSv3 attackVector. + * @member {grafeas.v1.CVSSv3.AttackVector} attackVector + * @memberof grafeas.v1.CVSSv3 * @instance */ - VulnerabilityNote.prototype.cvssV3 = null; + CVSSv3.prototype.attackVector = 0; /** - * VulnerabilityNote windowsDetails. - * @member {Array.} windowsDetails - * @memberof grafeas.v1.VulnerabilityNote + * CVSSv3 attackComplexity. + * @member {grafeas.v1.CVSSv3.AttackComplexity} attackComplexity + * @memberof grafeas.v1.CVSSv3 * @instance */ - VulnerabilityNote.prototype.windowsDetails = $util.emptyArray; + CVSSv3.prototype.attackComplexity = 0; /** - * VulnerabilityNote sourceUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} sourceUpdateTime - * @memberof grafeas.v1.VulnerabilityNote + * CVSSv3 privilegesRequired. + * @member {grafeas.v1.CVSSv3.PrivilegesRequired} privilegesRequired + * @memberof grafeas.v1.CVSSv3 * @instance */ - VulnerabilityNote.prototype.sourceUpdateTime = null; + CVSSv3.prototype.privilegesRequired = 0; /** - * Creates a new VulnerabilityNote instance using the specified properties. + * CVSSv3 userInteraction. + * @member {grafeas.v1.CVSSv3.UserInteraction} userInteraction + * @memberof grafeas.v1.CVSSv3 + * @instance + */ + CVSSv3.prototype.userInteraction = 0; + + /** + * CVSSv3 scope. + * @member {grafeas.v1.CVSSv3.Scope} scope + * @memberof grafeas.v1.CVSSv3 + * @instance + */ + CVSSv3.prototype.scope = 0; + + /** + * CVSSv3 confidentialityImpact. + * @member {grafeas.v1.CVSSv3.Impact} confidentialityImpact + * @memberof grafeas.v1.CVSSv3 + * @instance + */ + CVSSv3.prototype.confidentialityImpact = 0; + + /** + * CVSSv3 integrityImpact. + * @member {grafeas.v1.CVSSv3.Impact} integrityImpact + * @memberof grafeas.v1.CVSSv3 + * @instance + */ + CVSSv3.prototype.integrityImpact = 0; + + /** + * CVSSv3 availabilityImpact. + * @member {grafeas.v1.CVSSv3.Impact} availabilityImpact + * @memberof grafeas.v1.CVSSv3 + * @instance + */ + CVSSv3.prototype.availabilityImpact = 0; + + /** + * Creates a new CVSSv3 instance using the specified properties. * @function create - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static - * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote instance + * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set + * @returns {grafeas.v1.CVSSv3} CVSSv3 instance */ - VulnerabilityNote.create = function create(properties) { - return new VulnerabilityNote(properties); + CVSSv3.create = function create(properties) { + return new CVSSv3(properties); }; /** - * Encodes the specified VulnerabilityNote message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. + * Encodes the specified CVSSv3 message. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. * @function encode - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static - * @param {grafeas.v1.IVulnerabilityNote} message VulnerabilityNote message or plain object to encode + * @param {grafeas.v1.ICVSSv3} message CVSSv3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VulnerabilityNote.encode = function encode(message, writer) { + CVSSv3.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cvssScore != null && Object.hasOwnProperty.call(message, "cvssScore")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cvssScore); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.grafeas.v1.VulnerabilityNote.Detail.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.cvssV3 != null && Object.hasOwnProperty.call(message, "cvssV3")) - $root.grafeas.v1.CVSSv3.encode(message.cvssV3, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.windowsDetails != null && message.windowsDetails.length) - for (var i = 0; i < message.windowsDetails.length; ++i) - $root.grafeas.v1.VulnerabilityNote.WindowsDetail.encode(message.windowsDetails[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sourceUpdateTime != null && Object.hasOwnProperty.call(message, "sourceUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.sourceUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); + if (message.exploitabilityScore != null && Object.hasOwnProperty.call(message, "exploitabilityScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.exploitabilityScore); + if (message.impactScore != null && Object.hasOwnProperty.call(message, "impactScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.impactScore); + if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); + if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); + if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); + if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); + if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); + if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); + if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); return writer; }; /** - * Encodes the specified VulnerabilityNote message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static - * @param {grafeas.v1.IVulnerabilityNote} message VulnerabilityNote message or plain object to encode + * @param {grafeas.v1.ICVSSv3} message CVSSv3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VulnerabilityNote.encodeDelimited = function encodeDelimited(message, writer) { + CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer. + * Decodes a CVSSv3 message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote + * @returns {grafeas.v1.CVSSv3} CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VulnerabilityNote.decode = function decode(reader, length) { + CVSSv3.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.CVSSv3(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cvssScore = reader.float(); + message.baseScore = reader.float(); break; case 2: - message.severity = reader.int32(); + message.exploitabilityScore = reader.float(); break; case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.grafeas.v1.VulnerabilityNote.Detail.decode(reader, reader.uint32())); - break; - case 4: - message.cvssV3 = $root.grafeas.v1.CVSSv3.decode(reader, reader.uint32()); + message.impactScore = reader.float(); break; case 5: - if (!(message.windowsDetails && message.windowsDetails.length)) - message.windowsDetails = []; - message.windowsDetails.push($root.grafeas.v1.VulnerabilityNote.WindowsDetail.decode(reader, reader.uint32())); + message.attackVector = reader.int32(); break; case 6: - message.sourceUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.attackComplexity = reader.int32(); + break; + case 7: + message.privilegesRequired = reader.int32(); + break; + case 8: + message.userInteraction = reader.int32(); + break; + case 9: + message.scope = reader.int32(); + break; + case 10: + message.confidentialityImpact = reader.int32(); + break; + case 11: + message.integrityImpact = reader.int32(); + break; + case 12: + message.availabilityImpact = reader.int32(); break; default: reader.skipType(tag & 7); @@ -10948,1417 +11010,1295 @@ }; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer, length delimited. + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote + * @returns {grafeas.v1.CVSSv3} CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VulnerabilityNote.decodeDelimited = function decodeDelimited(reader) { + CVSSv3.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VulnerabilityNote message. + * Verifies a CVSSv3 message. * @function verify - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VulnerabilityNote.verify = function verify(message) { + CVSSv3.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) - if (typeof message.cvssScore !== "number") - return "cvssScore: number expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + if (typeof message.baseScore !== "number") + return "baseScore: number expected"; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + if (typeof message.exploitabilityScore !== "number") + return "exploitabilityScore: number expected"; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + if (typeof message.impactScore !== "number") + return "impactScore: number expected"; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + switch (message.attackVector) { + default: + return "attackVector: enum value expected"; + case 0: + case 1: + case 2: case 3: case 4: - case 5: break; } - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.grafeas.v1.VulnerabilityNote.Detail.verify(message.details[i]); - if (error) - return "details." + error; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + switch (message.attackComplexity) { + default: + return "attackComplexity: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) { - var error = $root.grafeas.v1.CVSSv3.verify(message.cvssV3); - if (error) - return "cvssV3." + error; - } - if (message.windowsDetails != null && message.hasOwnProperty("windowsDetails")) { - if (!Array.isArray(message.windowsDetails)) - return "windowsDetails: array expected"; - for (var i = 0; i < message.windowsDetails.length; ++i) { - var error = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.verify(message.windowsDetails[i]); - if (error) - return "windowsDetails." + error; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + switch (message.privilegesRequired) { + default: + return "privilegesRequired: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + switch (message.userInteraction) { + default: + return "userInteraction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + switch (message.confidentialityImpact) { + default: + return "confidentialityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + switch (message.integrityImpact) { + default: + return "integrityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + switch (message.availabilityImpact) { + default: + return "availabilityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.sourceUpdateTime); - if (error) - return "sourceUpdateTime." + error; - } return null; }; /** - * Creates a VulnerabilityNote message from a plain object. Also converts values to their respective internal types. + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote + * @returns {grafeas.v1.CVSSv3} CVSSv3 */ - VulnerabilityNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityNote) + CVSSv3.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CVSSv3) return object; - var message = new $root.grafeas.v1.VulnerabilityNote(); - if (object.cvssScore != null) - message.cvssScore = Number(object.cvssScore); - switch (object.severity) { - case "SEVERITY_UNSPECIFIED": + var message = new $root.grafeas.v1.CVSSv3(); + if (object.baseScore != null) + message.baseScore = Number(object.baseScore); + if (object.exploitabilityScore != null) + message.exploitabilityScore = Number(object.exploitabilityScore); + if (object.impactScore != null) + message.impactScore = Number(object.impactScore); + switch (object.attackVector) { + case "ATTACK_VECTOR_UNSPECIFIED": case 0: - message.severity = 0; + message.attackVector = 0; break; - case "MINIMAL": + case "ATTACK_VECTOR_NETWORK": case 1: - message.severity = 1; + message.attackVector = 1; break; - case "LOW": + case "ATTACK_VECTOR_ADJACENT": case 2: - message.severity = 2; + message.attackVector = 2; break; - case "MEDIUM": + case "ATTACK_VECTOR_LOCAL": case 3: - message.severity = 3; + message.attackVector = 3; break; - case "HIGH": + case "ATTACK_VECTOR_PHYSICAL": case 4: - message.severity = 4; + message.attackVector = 4; break; - case "CRITICAL": - case 5: - message.severity = 5; + } + switch (object.attackComplexity) { + case "ATTACK_COMPLEXITY_UNSPECIFIED": + case 0: + message.attackComplexity = 0; + break; + case "ATTACK_COMPLEXITY_LOW": + case 1: + message.attackComplexity = 1; + break; + case "ATTACK_COMPLEXITY_HIGH": + case 2: + message.attackComplexity = 2; break; } - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".grafeas.v1.VulnerabilityNote.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.details: object expected"); - message.details[i] = $root.grafeas.v1.VulnerabilityNote.Detail.fromObject(object.details[i]); - } + switch (object.privilegesRequired) { + case "PRIVILEGES_REQUIRED_UNSPECIFIED": + case 0: + message.privilegesRequired = 0; + break; + case "PRIVILEGES_REQUIRED_NONE": + case 1: + message.privilegesRequired = 1; + break; + case "PRIVILEGES_REQUIRED_LOW": + case 2: + message.privilegesRequired = 2; + break; + case "PRIVILEGES_REQUIRED_HIGH": + case 3: + message.privilegesRequired = 3; + break; } - if (object.cvssV3 != null) { - if (typeof object.cvssV3 !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.cvssV3: object expected"); - message.cvssV3 = $root.grafeas.v1.CVSSv3.fromObject(object.cvssV3); + switch (object.userInteraction) { + case "USER_INTERACTION_UNSPECIFIED": + case 0: + message.userInteraction = 0; + break; + case "USER_INTERACTION_NONE": + case 1: + message.userInteraction = 1; + break; + case "USER_INTERACTION_REQUIRED": + case 2: + message.userInteraction = 2; + break; } - if (object.windowsDetails) { - if (!Array.isArray(object.windowsDetails)) - throw TypeError(".grafeas.v1.VulnerabilityNote.windowsDetails: array expected"); - message.windowsDetails = []; - for (var i = 0; i < object.windowsDetails.length; ++i) { - if (typeof object.windowsDetails[i] !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.windowsDetails: object expected"); - message.windowsDetails[i] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.fromObject(object.windowsDetails[i]); - } + switch (object.scope) { + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "SCOPE_UNCHANGED": + case 1: + message.scope = 1; + break; + case "SCOPE_CHANGED": + case 2: + message.scope = 2; + break; } - if (object.sourceUpdateTime != null) { - if (typeof object.sourceUpdateTime !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.sourceUpdateTime: object expected"); - message.sourceUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.sourceUpdateTime); + switch (object.confidentialityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.confidentialityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.confidentialityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.confidentialityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.confidentialityImpact = 3; + break; } - return message; - }; - - /** - * Creates a plain object from a VulnerabilityNote message. Also converts values to other types if specified. + switch (object.integrityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.integrityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.integrityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.integrityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.integrityImpact = 3; + break; + } + switch (object.availabilityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.availabilityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.availabilityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.availabilityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.availabilityImpact = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @static - * @param {grafeas.v1.VulnerabilityNote} message VulnerabilityNote + * @param {grafeas.v1.CVSSv3} message CVSSv3 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VulnerabilityNote.toObject = function toObject(message, options) { + CVSSv3.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.details = []; - object.windowsDetails = []; - } if (options.defaults) { - object.cvssScore = 0; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.cvssV3 = null; - object.sourceUpdateTime = null; - } - if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) - object.cvssScore = options.json && !isFinite(message.cvssScore) ? String(message.cvssScore) : message.cvssScore; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.grafeas.v1.Severity[message.severity] : message.severity; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.grafeas.v1.VulnerabilityNote.Detail.toObject(message.details[j], options); - } - if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) - object.cvssV3 = $root.grafeas.v1.CVSSv3.toObject(message.cvssV3, options); - if (message.windowsDetails && message.windowsDetails.length) { - object.windowsDetails = []; - for (var j = 0; j < message.windowsDetails.length; ++j) - object.windowsDetails[j] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.toObject(message.windowsDetails[j], options); + object.baseScore = 0; + object.exploitabilityScore = 0; + object.impactScore = 0; + object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; + object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; + object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; + object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; } - if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) - object.sourceUpdateTime = $root.google.protobuf.Timestamp.toObject(message.sourceUpdateTime, options); + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + object.exploitabilityScore = options.json && !isFinite(message.exploitabilityScore) ? String(message.exploitabilityScore) : message.exploitabilityScore; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + object.attackVector = options.enums === String ? $root.grafeas.v1.CVSSv3.AttackVector[message.attackVector] : message.attackVector; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + object.attackComplexity = options.enums === String ? $root.grafeas.v1.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + object.privilegesRequired = options.enums === String ? $root.grafeas.v1.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + object.userInteraction = options.enums === String ? $root.grafeas.v1.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.grafeas.v1.CVSSv3.Scope[message.scope] : message.scope; + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + object.confidentialityImpact = options.enums === String ? $root.grafeas.v1.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + object.integrityImpact = options.enums === String ? $root.grafeas.v1.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + object.availabilityImpact = options.enums === String ? $root.grafeas.v1.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; return object; }; /** - * Converts this VulnerabilityNote to JSON. + * Converts this CVSSv3 to JSON. * @function toJSON - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.CVSSv3 * @instance * @returns {Object.} JSON object */ - VulnerabilityNote.prototype.toJSON = function toJSON() { + CVSSv3.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - VulnerabilityNote.Detail = (function() { - - /** - * Properties of a Detail. - * @memberof grafeas.v1.VulnerabilityNote - * @interface IDetail - * @property {string|null} [severityName] Detail severityName - * @property {string|null} [description] Detail description - * @property {string|null} [packageType] Detail packageType - * @property {string|null} [affectedCpeUri] Detail affectedCpeUri - * @property {string|null} [affectedPackage] Detail affectedPackage - * @property {grafeas.v1.IVersion|null} [affectedVersionStart] Detail affectedVersionStart - * @property {grafeas.v1.IVersion|null} [affectedVersionEnd] Detail affectedVersionEnd - * @property {string|null} [fixedCpeUri] Detail fixedCpeUri - * @property {string|null} [fixedPackage] Detail fixedPackage - * @property {grafeas.v1.IVersion|null} [fixedVersion] Detail fixedVersion - * @property {boolean|null} [isObsolete] Detail isObsolete - * @property {google.protobuf.ITimestamp|null} [sourceUpdateTime] Detail sourceUpdateTime - * @property {string|null} [source] Detail source - * @property {string|null} [vendor] Detail vendor - */ + /** + * AttackVector enum. + * @name grafeas.v1.CVSSv3.AttackVector + * @enum {number} + * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value + * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value + * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value + * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value + * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value + */ + CVSSv3.AttackVector = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; + values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; + values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; + values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; + return values; + })(); - /** - * Constructs a new Detail. - * @memberof grafeas.v1.VulnerabilityNote - * @classdesc Represents a Detail. - * @implements IDetail - * @constructor - * @param {grafeas.v1.VulnerabilityNote.IDetail=} [properties] Properties to set - */ - function Detail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AttackComplexity enum. + * @name grafeas.v1.CVSSv3.AttackComplexity + * @enum {number} + * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value + * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value + * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + */ + CVSSv3.AttackComplexity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; + values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + return values; + })(); - /** - * Detail severityName. - * @member {string} severityName - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.severityName = ""; + /** + * PrivilegesRequired enum. + * @name grafeas.v1.CVSSv3.PrivilegesRequired + * @enum {number} + * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value + * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value + * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value + * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value + */ + CVSSv3.PrivilegesRequired = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; + values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; + values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; + return values; + })(); - /** - * Detail description. - * @member {string} description - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.description = ""; + /** + * UserInteraction enum. + * @name grafeas.v1.CVSSv3.UserInteraction + * @enum {number} + * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value + * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value + * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value + */ + CVSSv3.UserInteraction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; + values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; + return values; + })(); - /** - * Detail packageType. - * @member {string} packageType - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.packageType = ""; + /** + * Scope enum. + * @name grafeas.v1.CVSSv3.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value + * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value + */ + CVSSv3.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; + values[valuesById[2] = "SCOPE_CHANGED"] = 2; + return values; + })(); - /** - * Detail affectedCpeUri. - * @member {string} affectedCpeUri - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedCpeUri = ""; + /** + * Impact enum. + * @name grafeas.v1.CVSSv3.Impact + * @enum {number} + * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value + * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value + * @property {number} IMPACT_LOW=2 IMPACT_LOW value + * @property {number} IMPACT_NONE=3 IMPACT_NONE value + */ + CVSSv3.Impact = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPACT_HIGH"] = 1; + values[valuesById[2] = "IMPACT_LOW"] = 2; + values[valuesById[3] = "IMPACT_NONE"] = 3; + return values; + })(); - /** - * Detail affectedPackage. - * @member {string} affectedPackage - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedPackage = ""; + return CVSSv3; + })(); - /** - * Detail affectedVersionStart. - * @member {grafeas.v1.IVersion|null|undefined} affectedVersionStart - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedVersionStart = null; + v1.CVSS = (function() { - /** - * Detail affectedVersionEnd. - * @member {grafeas.v1.IVersion|null|undefined} affectedVersionEnd - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedVersionEnd = null; + /** + * Properties of a CVSS. + * @memberof grafeas.v1 + * @interface ICVSS + * @property {number|null} [baseScore] CVSS baseScore + * @property {number|null} [exploitabilityScore] CVSS exploitabilityScore + * @property {number|null} [impactScore] CVSS impactScore + * @property {grafeas.v1.CVSS.AttackVector|null} [attackVector] CVSS attackVector + * @property {grafeas.v1.CVSS.AttackComplexity|null} [attackComplexity] CVSS attackComplexity + * @property {grafeas.v1.CVSS.Authentication|null} [authentication] CVSS authentication + * @property {grafeas.v1.CVSS.PrivilegesRequired|null} [privilegesRequired] CVSS privilegesRequired + * @property {grafeas.v1.CVSS.UserInteraction|null} [userInteraction] CVSS userInteraction + * @property {grafeas.v1.CVSS.Scope|null} [scope] CVSS scope + * @property {grafeas.v1.CVSS.Impact|null} [confidentialityImpact] CVSS confidentialityImpact + * @property {grafeas.v1.CVSS.Impact|null} [integrityImpact] CVSS integrityImpact + * @property {grafeas.v1.CVSS.Impact|null} [availabilityImpact] CVSS availabilityImpact + */ + + /** + * Constructs a new CVSS. + * @memberof grafeas.v1 + * @classdesc Represents a CVSS. + * @implements ICVSS + * @constructor + * @param {grafeas.v1.ICVSS=} [properties] Properties to set + */ + function CVSS(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Detail fixedCpeUri. - * @member {string} fixedCpeUri - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.fixedCpeUri = ""; + /** + * CVSS baseScore. + * @member {number} baseScore + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.baseScore = 0; - /** - * Detail fixedPackage. - * @member {string} fixedPackage - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.fixedPackage = ""; + /** + * CVSS exploitabilityScore. + * @member {number} exploitabilityScore + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.exploitabilityScore = 0; - /** - * Detail fixedVersion. - * @member {grafeas.v1.IVersion|null|undefined} fixedVersion - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.fixedVersion = null; + /** + * CVSS impactScore. + * @member {number} impactScore + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.impactScore = 0; - /** - * Detail isObsolete. - * @member {boolean} isObsolete - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.isObsolete = false; + /** + * CVSS attackVector. + * @member {grafeas.v1.CVSS.AttackVector} attackVector + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.attackVector = 0; - /** - * Detail sourceUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} sourceUpdateTime - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.sourceUpdateTime = null; + /** + * CVSS attackComplexity. + * @member {grafeas.v1.CVSS.AttackComplexity} attackComplexity + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.attackComplexity = 0; - /** - * Detail source. - * @member {string} source - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.source = ""; + /** + * CVSS authentication. + * @member {grafeas.v1.CVSS.Authentication} authentication + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.authentication = 0; - /** - * Detail vendor. - * @member {string} vendor - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.vendor = ""; + /** + * CVSS privilegesRequired. + * @member {grafeas.v1.CVSS.PrivilegesRequired} privilegesRequired + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.privilegesRequired = 0; - /** - * Creates a new Detail instance using the specified properties. - * @function create - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {grafeas.v1.VulnerabilityNote.IDetail=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail instance - */ - Detail.create = function create(properties) { - return new Detail(properties); - }; + /** + * CVSS userInteraction. + * @member {grafeas.v1.CVSS.UserInteraction} userInteraction + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.userInteraction = 0; - /** - * Encodes the specified Detail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {grafeas.v1.VulnerabilityNote.IDetail} message Detail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Detail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.severityName != null && Object.hasOwnProperty.call(message, "severityName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.severityName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageType); - if (message.affectedCpeUri != null && Object.hasOwnProperty.call(message, "affectedCpeUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.affectedCpeUri); - if (message.affectedPackage != null && Object.hasOwnProperty.call(message, "affectedPackage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.affectedPackage); - if (message.affectedVersionStart != null && Object.hasOwnProperty.call(message, "affectedVersionStart")) - $root.grafeas.v1.Version.encode(message.affectedVersionStart, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.affectedVersionEnd != null && Object.hasOwnProperty.call(message, "affectedVersionEnd")) - $root.grafeas.v1.Version.encode(message.affectedVersionEnd, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.fixedCpeUri != null && Object.hasOwnProperty.call(message, "fixedCpeUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.fixedCpeUri); - if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.fixedPackage); - if (message.fixedVersion != null && Object.hasOwnProperty.call(message, "fixedVersion")) - $root.grafeas.v1.Version.encode(message.fixedVersion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.isObsolete != null && Object.hasOwnProperty.call(message, "isObsolete")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isObsolete); - if (message.sourceUpdateTime != null && Object.hasOwnProperty.call(message, "sourceUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.sourceUpdateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.source); - if (message.vendor != null && Object.hasOwnProperty.call(message, "vendor")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.vendor); - return writer; - }; + /** + * CVSS scope. + * @member {grafeas.v1.CVSS.Scope} scope + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.scope = 0; - /** - * Encodes the specified Detail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {grafeas.v1.VulnerabilityNote.IDetail} message Detail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Detail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * CVSS confidentialityImpact. + * @member {grafeas.v1.CVSS.Impact} confidentialityImpact + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.confidentialityImpact = 0; - /** - * Decodes a Detail message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Detail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote.Detail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.severityName = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.packageType = reader.string(); - break; - case 4: - message.affectedCpeUri = reader.string(); - break; - case 5: - message.affectedPackage = reader.string(); - break; - case 6: - message.affectedVersionStart = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 7: - message.affectedVersionEnd = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 8: - message.fixedCpeUri = reader.string(); - break; - case 9: - message.fixedPackage = reader.string(); - break; - case 10: - message.fixedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 11: - message.isObsolete = reader.bool(); - break; - case 12: - message.sourceUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 13: - message.source = reader.string(); - break; - case 14: - message.vendor = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * CVSS integrityImpact. + * @member {grafeas.v1.CVSS.Impact} integrityImpact + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.integrityImpact = 0; + + /** + * CVSS availabilityImpact. + * @member {grafeas.v1.CVSS.Impact} availabilityImpact + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.availabilityImpact = 0; + + /** + * Creates a new CVSS instance using the specified properties. + * @function create + * @memberof grafeas.v1.CVSS + * @static + * @param {grafeas.v1.ICVSS=} [properties] Properties to set + * @returns {grafeas.v1.CVSS} CVSS instance + */ + CVSS.create = function create(properties) { + return new CVSS(properties); + }; + + /** + * Encodes the specified CVSS message. Does not implicitly {@link grafeas.v1.CVSS.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.CVSS + * @static + * @param {grafeas.v1.ICVSS} message CVSS message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CVSS.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); + if (message.exploitabilityScore != null && Object.hasOwnProperty.call(message, "exploitabilityScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.exploitabilityScore); + if (message.impactScore != null && Object.hasOwnProperty.call(message, "impactScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.impactScore); + if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.attackVector); + if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackComplexity); + if (message.authentication != null && Object.hasOwnProperty.call(message, "authentication")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.authentication); + if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); + if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); + if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); + if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); + if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); + return writer; + }; + + /** + * Encodes the specified CVSS message, length delimited. Does not implicitly {@link grafeas.v1.CVSS.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.CVSS + * @static + * @param {grafeas.v1.ICVSS} message CVSS message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CVSS.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CVSS message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.CVSS + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.CVSS} CVSS + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CVSS.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.CVSS(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseScore = reader.float(); + break; + case 2: + message.exploitabilityScore = reader.float(); + break; + case 3: + message.impactScore = reader.float(); + break; + case 4: + message.attackVector = reader.int32(); + break; + case 5: + message.attackComplexity = reader.int32(); + break; + case 6: + message.authentication = reader.int32(); + break; + case 7: + message.privilegesRequired = reader.int32(); + break; + case 8: + message.userInteraction = reader.int32(); + break; + case 9: + message.scope = reader.int32(); + break; + case 10: + message.confidentialityImpact = reader.int32(); + break; + case 11: + message.integrityImpact = reader.int32(); + break; + case 12: + message.availabilityImpact = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a Detail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Detail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a CVSS message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.CVSS + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.CVSS} CVSS + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CVSS.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Detail message. - * @function verify - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Detail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.severityName != null && message.hasOwnProperty("severityName")) - if (!$util.isString(message.severityName)) - return "severityName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.packageType != null && message.hasOwnProperty("packageType")) - if (!$util.isString(message.packageType)) - return "packageType: string expected"; - if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) - if (!$util.isString(message.affectedCpeUri)) - return "affectedCpeUri: string expected"; - if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) - if (!$util.isString(message.affectedPackage)) - return "affectedPackage: string expected"; - if (message.affectedVersionStart != null && message.hasOwnProperty("affectedVersionStart")) { - var error = $root.grafeas.v1.Version.verify(message.affectedVersionStart); - if (error) - return "affectedVersionStart." + error; + /** + * Verifies a CVSS message. + * @function verify + * @memberof grafeas.v1.CVSS + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CVSS.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + if (typeof message.baseScore !== "number") + return "baseScore: number expected"; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + if (typeof message.exploitabilityScore !== "number") + return "exploitabilityScore: number expected"; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + if (typeof message.impactScore !== "number") + return "impactScore: number expected"; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + switch (message.attackVector) { + default: + return "attackVector: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } - if (message.affectedVersionEnd != null && message.hasOwnProperty("affectedVersionEnd")) { - var error = $root.grafeas.v1.Version.verify(message.affectedVersionEnd); - if (error) - return "affectedVersionEnd." + error; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + switch (message.attackComplexity) { + default: + return "attackComplexity: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) - if (!$util.isString(message.fixedCpeUri)) - return "fixedCpeUri: string expected"; - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) - if (!$util.isString(message.fixedPackage)) - return "fixedPackage: string expected"; - if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) { - var error = $root.grafeas.v1.Version.verify(message.fixedVersion); - if (error) - return "fixedVersion." + error; + if (message.authentication != null && message.hasOwnProperty("authentication")) + switch (message.authentication) { + default: + return "authentication: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - if (message.isObsolete != null && message.hasOwnProperty("isObsolete")) - if (typeof message.isObsolete !== "boolean") - return "isObsolete: boolean expected"; - if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.sourceUpdateTime); - if (error) - return "sourceUpdateTime." + error; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + switch (message.privilegesRequired) { + default: + return "privilegesRequired: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.vendor != null && message.hasOwnProperty("vendor")) - if (!$util.isString(message.vendor)) - return "vendor: string expected"; - return null; - }; - - /** - * Creates a Detail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail - */ - Detail.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityNote.Detail) - return object; - var message = new $root.grafeas.v1.VulnerabilityNote.Detail(); - if (object.severityName != null) - message.severityName = String(object.severityName); - if (object.description != null) - message.description = String(object.description); - if (object.packageType != null) - message.packageType = String(object.packageType); - if (object.affectedCpeUri != null) - message.affectedCpeUri = String(object.affectedCpeUri); - if (object.affectedPackage != null) - message.affectedPackage = String(object.affectedPackage); - if (object.affectedVersionStart != null) { - if (typeof object.affectedVersionStart !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.affectedVersionStart: object expected"); - message.affectedVersionStart = $root.grafeas.v1.Version.fromObject(object.affectedVersionStart); + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + switch (message.userInteraction) { + default: + return "userInteraction: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (object.affectedVersionEnd != null) { - if (typeof object.affectedVersionEnd !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.affectedVersionEnd: object expected"); - message.affectedVersionEnd = $root.grafeas.v1.Version.fromObject(object.affectedVersionEnd); + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (object.fixedCpeUri != null) - message.fixedCpeUri = String(object.fixedCpeUri); - if (object.fixedPackage != null) - message.fixedPackage = String(object.fixedPackage); - if (object.fixedVersion != null) { - if (typeof object.fixedVersion !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.fixedVersion: object expected"); - message.fixedVersion = $root.grafeas.v1.Version.fromObject(object.fixedVersion); + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + switch (message.confidentialityImpact) { + default: + return "confidentialityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - if (object.isObsolete != null) - message.isObsolete = Boolean(object.isObsolete); - if (object.sourceUpdateTime != null) { - if (typeof object.sourceUpdateTime !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.sourceUpdateTime: object expected"); - message.sourceUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.sourceUpdateTime); + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + switch (message.integrityImpact) { + default: + return "integrityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - if (object.source != null) - message.source = String(object.source); - if (object.vendor != null) - message.vendor = String(object.vendor); - return message; - }; - - /** - * Creates a plain object from a Detail message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @static - * @param {grafeas.v1.VulnerabilityNote.Detail} message Detail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Detail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.severityName = ""; - object.description = ""; - object.packageType = ""; - object.affectedCpeUri = ""; - object.affectedPackage = ""; - object.affectedVersionStart = null; - object.affectedVersionEnd = null; - object.fixedCpeUri = ""; - object.fixedPackage = ""; - object.fixedVersion = null; - object.isObsolete = false; - object.sourceUpdateTime = null; - object.source = ""; - object.vendor = ""; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + switch (message.availabilityImpact) { + default: + return "availabilityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - if (message.severityName != null && message.hasOwnProperty("severityName")) - object.severityName = message.severityName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.packageType != null && message.hasOwnProperty("packageType")) - object.packageType = message.packageType; - if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) - object.affectedCpeUri = message.affectedCpeUri; - if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) - object.affectedPackage = message.affectedPackage; - if (message.affectedVersionStart != null && message.hasOwnProperty("affectedVersionStart")) - object.affectedVersionStart = $root.grafeas.v1.Version.toObject(message.affectedVersionStart, options); - if (message.affectedVersionEnd != null && message.hasOwnProperty("affectedVersionEnd")) - object.affectedVersionEnd = $root.grafeas.v1.Version.toObject(message.affectedVersionEnd, options); - if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) - object.fixedCpeUri = message.fixedCpeUri; - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) - object.fixedPackage = message.fixedPackage; - if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) - object.fixedVersion = $root.grafeas.v1.Version.toObject(message.fixedVersion, options); - if (message.isObsolete != null && message.hasOwnProperty("isObsolete")) - object.isObsolete = message.isObsolete; - if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) - object.sourceUpdateTime = $root.google.protobuf.Timestamp.toObject(message.sourceUpdateTime, options); - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - if (message.vendor != null && message.hasOwnProperty("vendor")) - object.vendor = message.vendor; - return object; - }; - - /** - * Converts this Detail to JSON. - * @function toJSON - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - * @returns {Object.} JSON object - */ - Detail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Detail; - })(); - - VulnerabilityNote.WindowsDetail = (function() { - - /** - * Properties of a WindowsDetail. - * @memberof grafeas.v1.VulnerabilityNote - * @interface IWindowsDetail - * @property {string|null} [cpeUri] WindowsDetail cpeUri - * @property {string|null} [name] WindowsDetail name - * @property {string|null} [description] WindowsDetail description - * @property {Array.|null} [fixingKbs] WindowsDetail fixingKbs - */ + return null; + }; - /** - * Constructs a new WindowsDetail. - * @memberof grafeas.v1.VulnerabilityNote - * @classdesc Represents a WindowsDetail. - * @implements IWindowsDetail - * @constructor - * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail=} [properties] Properties to set - */ - function WindowsDetail(properties) { - this.fixingKbs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a CVSS message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.CVSS + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.CVSS} CVSS + */ + CVSS.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CVSS) + return object; + var message = new $root.grafeas.v1.CVSS(); + if (object.baseScore != null) + message.baseScore = Number(object.baseScore); + if (object.exploitabilityScore != null) + message.exploitabilityScore = Number(object.exploitabilityScore); + if (object.impactScore != null) + message.impactScore = Number(object.impactScore); + switch (object.attackVector) { + case "ATTACK_VECTOR_UNSPECIFIED": + case 0: + message.attackVector = 0; + break; + case "ATTACK_VECTOR_NETWORK": + case 1: + message.attackVector = 1; + break; + case "ATTACK_VECTOR_ADJACENT": + case 2: + message.attackVector = 2; + break; + case "ATTACK_VECTOR_LOCAL": + case 3: + message.attackVector = 3; + break; + case "ATTACK_VECTOR_PHYSICAL": + case 4: + message.attackVector = 4; + break; } - - /** - * WindowsDetail cpeUri. - * @member {string} cpeUri - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @instance - */ - WindowsDetail.prototype.cpeUri = ""; - - /** - * WindowsDetail name. - * @member {string} name - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @instance - */ - WindowsDetail.prototype.name = ""; - - /** - * WindowsDetail description. - * @member {string} description - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @instance - */ - WindowsDetail.prototype.description = ""; - - /** - * WindowsDetail fixingKbs. - * @member {Array.} fixingKbs - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @instance - */ - WindowsDetail.prototype.fixingKbs = $util.emptyArray; - - /** - * Creates a new WindowsDetail instance using the specified properties. - * @function create - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail instance - */ - WindowsDetail.create = function create(properties) { - return new WindowsDetail(properties); - }; - - /** - * Encodes the specified WindowsDetail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail} message WindowsDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.fixingKbs != null && message.fixingKbs.length) - for (var i = 0; i < message.fixingKbs.length; ++i) - $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.encode(message.fixingKbs[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WindowsDetail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail} message WindowsDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WindowsDetail message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsDetail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cpeUri = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.fixingKbs && message.fixingKbs.length)) - message.fixingKbs = []; - message.fixingKbs.push($root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WindowsDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsDetail message. - * @function verify - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - if (!$util.isString(message.cpeUri)) - return "cpeUri: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.fixingKbs != null && message.hasOwnProperty("fixingKbs")) { - if (!Array.isArray(message.fixingKbs)) - return "fixingKbs: array expected"; - for (var i = 0; i < message.fixingKbs.length; ++i) { - var error = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify(message.fixingKbs[i]); - if (error) - return "fixingKbs." + error; - } - } - return null; - }; - - /** - * Creates a WindowsDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail - */ - WindowsDetail.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityNote.WindowsDetail) - return object; - var message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail(); - if (object.cpeUri != null) - message.cpeUri = String(object.cpeUri); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.fixingKbs) { - if (!Array.isArray(object.fixingKbs)) - throw TypeError(".grafeas.v1.VulnerabilityNote.WindowsDetail.fixingKbs: array expected"); - message.fixingKbs = []; - for (var i = 0; i < object.fixingKbs.length; ++i) { - if (typeof object.fixingKbs[i] !== "object") - throw TypeError(".grafeas.v1.VulnerabilityNote.WindowsDetail.fixingKbs: object expected"); - message.fixingKbs[i] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.fromObject(object.fixingKbs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a WindowsDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @static - * @param {grafeas.v1.VulnerabilityNote.WindowsDetail} message WindowsDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fixingKbs = []; - if (options.defaults) { - object.cpeUri = ""; - object.name = ""; - object.description = ""; - } - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - object.cpeUri = message.cpeUri; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.fixingKbs && message.fixingKbs.length) { - object.fixingKbs = []; - for (var j = 0; j < message.fixingKbs.length; ++j) - object.fixingKbs[j] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.toObject(message.fixingKbs[j], options); - } - return object; - }; - - /** - * Converts this WindowsDetail to JSON. - * @function toJSON - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @instance - * @returns {Object.} JSON object - */ - WindowsDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - WindowsDetail.KnowledgeBase = (function() { - - /** - * Properties of a KnowledgeBase. - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @interface IKnowledgeBase - * @property {string|null} [name] KnowledgeBase name - * @property {string|null} [url] KnowledgeBase url - */ - - /** - * Constructs a new KnowledgeBase. - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail - * @classdesc Represents a KnowledgeBase. - * @implements IKnowledgeBase - * @constructor - * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase=} [properties] Properties to set - */ - function KnowledgeBase(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KnowledgeBase name. - * @member {string} name - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @instance - */ - KnowledgeBase.prototype.name = ""; - - /** - * KnowledgeBase url. - * @member {string} url - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @instance - */ - KnowledgeBase.prototype.url = ""; - - /** - * Creates a new KnowledgeBase instance using the specified properties. - * @function create - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase instance - */ - KnowledgeBase.create = function create(properties) { - return new KnowledgeBase(properties); - }; - - /** - * Encodes the specified KnowledgeBase message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase} message KnowledgeBase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeBase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); - return writer; - }; - - /** - * Encodes the specified KnowledgeBase message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase} message KnowledgeBase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeBase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KnowledgeBase message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeBase.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.url = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KnowledgeBase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeBase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KnowledgeBase message. - * @function verify - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KnowledgeBase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - return null; - }; - - /** - * Creates a KnowledgeBase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase - */ - KnowledgeBase.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) - return object; - var message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); - if (object.name != null) - message.name = String(object.name); - if (object.url != null) - message.url = String(object.url); - return message; - }; - - /** - * Creates a plain object from a KnowledgeBase message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @static - * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} message KnowledgeBase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KnowledgeBase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.url = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - return object; - }; - - /** - * Converts this KnowledgeBase to JSON. - * @function toJSON - * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - * @instance - * @returns {Object.} JSON object - */ - KnowledgeBase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KnowledgeBase; - })(); - - return WindowsDetail; - })(); - - return VulnerabilityNote; - })(); - - v1.VulnerabilityOccurrence = (function() { - - /** - * Properties of a VulnerabilityOccurrence. - * @memberof grafeas.v1 - * @interface IVulnerabilityOccurrence - * @property {string|null} [type] VulnerabilityOccurrence type - * @property {grafeas.v1.Severity|null} [severity] VulnerabilityOccurrence severity - * @property {number|null} [cvssScore] VulnerabilityOccurrence cvssScore - * @property {grafeas.v1.VulnerabilityOccurrence.ICVSSV3|null} [cvssv3] VulnerabilityOccurrence cvssv3 - * @property {Array.|null} [packageIssue] VulnerabilityOccurrence packageIssue - * @property {string|null} [shortDescription] VulnerabilityOccurrence shortDescription - * @property {string|null} [longDescription] VulnerabilityOccurrence longDescription - * @property {Array.|null} [relatedUrls] VulnerabilityOccurrence relatedUrls - * @property {grafeas.v1.Severity|null} [effectiveSeverity] VulnerabilityOccurrence effectiveSeverity - * @property {boolean|null} [fixAvailable] VulnerabilityOccurrence fixAvailable - */ + switch (object.attackComplexity) { + case "ATTACK_COMPLEXITY_UNSPECIFIED": + case 0: + message.attackComplexity = 0; + break; + case "ATTACK_COMPLEXITY_LOW": + case 1: + message.attackComplexity = 1; + break; + case "ATTACK_COMPLEXITY_HIGH": + case 2: + message.attackComplexity = 2; + break; + } + switch (object.authentication) { + case "AUTHENTICATION_UNSPECIFIED": + case 0: + message.authentication = 0; + break; + case "AUTHENTICATION_MULTIPLE": + case 1: + message.authentication = 1; + break; + case "AUTHENTICATION_SINGLE": + case 2: + message.authentication = 2; + break; + case "AUTHENTICATION_NONE": + case 3: + message.authentication = 3; + break; + } + switch (object.privilegesRequired) { + case "PRIVILEGES_REQUIRED_UNSPECIFIED": + case 0: + message.privilegesRequired = 0; + break; + case "PRIVILEGES_REQUIRED_NONE": + case 1: + message.privilegesRequired = 1; + break; + case "PRIVILEGES_REQUIRED_LOW": + case 2: + message.privilegesRequired = 2; + break; + case "PRIVILEGES_REQUIRED_HIGH": + case 3: + message.privilegesRequired = 3; + break; + } + switch (object.userInteraction) { + case "USER_INTERACTION_UNSPECIFIED": + case 0: + message.userInteraction = 0; + break; + case "USER_INTERACTION_NONE": + case 1: + message.userInteraction = 1; + break; + case "USER_INTERACTION_REQUIRED": + case 2: + message.userInteraction = 2; + break; + } + switch (object.scope) { + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "SCOPE_UNCHANGED": + case 1: + message.scope = 1; + break; + case "SCOPE_CHANGED": + case 2: + message.scope = 2; + break; + } + switch (object.confidentialityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.confidentialityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.confidentialityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.confidentialityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.confidentialityImpact = 3; + break; + } + switch (object.integrityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.integrityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.integrityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.integrityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.integrityImpact = 3; + break; + } + switch (object.availabilityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.availabilityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.availabilityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.availabilityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.availabilityImpact = 3; + break; + } + return message; + }; /** - * Constructs a new VulnerabilityOccurrence. - * @memberof grafeas.v1 - * @classdesc Represents a VulnerabilityOccurrence. - * @implements IVulnerabilityOccurrence - * @constructor - * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set + * Creates a plain object from a CVSS message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.CVSS + * @static + * @param {grafeas.v1.CVSS} message CVSS + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - function VulnerabilityOccurrence(properties) { - this.packageIssue = []; - this.relatedUrls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + CVSS.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.baseScore = 0; + object.exploitabilityScore = 0; + object.impactScore = 0; + object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; + object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; + object.authentication = options.enums === String ? "AUTHENTICATION_UNSPECIFIED" : 0; + object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; + object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + } + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + object.exploitabilityScore = options.json && !isFinite(message.exploitabilityScore) ? String(message.exploitabilityScore) : message.exploitabilityScore; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + object.attackVector = options.enums === String ? $root.grafeas.v1.CVSS.AttackVector[message.attackVector] : message.attackVector; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + object.attackComplexity = options.enums === String ? $root.grafeas.v1.CVSS.AttackComplexity[message.attackComplexity] : message.attackComplexity; + if (message.authentication != null && message.hasOwnProperty("authentication")) + object.authentication = options.enums === String ? $root.grafeas.v1.CVSS.Authentication[message.authentication] : message.authentication; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + object.privilegesRequired = options.enums === String ? $root.grafeas.v1.CVSS.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + object.userInteraction = options.enums === String ? $root.grafeas.v1.CVSS.UserInteraction[message.userInteraction] : message.userInteraction; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.grafeas.v1.CVSS.Scope[message.scope] : message.scope; + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + object.confidentialityImpact = options.enums === String ? $root.grafeas.v1.CVSS.Impact[message.confidentialityImpact] : message.confidentialityImpact; + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + object.integrityImpact = options.enums === String ? $root.grafeas.v1.CVSS.Impact[message.integrityImpact] : message.integrityImpact; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + object.availabilityImpact = options.enums === String ? $root.grafeas.v1.CVSS.Impact[message.availabilityImpact] : message.availabilityImpact; + return object; + }; /** - * VulnerabilityOccurrence type. - * @member {string} type - * @memberof grafeas.v1.VulnerabilityOccurrence + * Converts this CVSS to JSON. + * @function toJSON + * @memberof grafeas.v1.CVSS * @instance + * @returns {Object.} JSON object + */ + CVSS.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * AttackVector enum. + * @name grafeas.v1.CVSS.AttackVector + * @enum {number} + * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value + * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value + * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value + * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value + * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value */ - VulnerabilityOccurrence.prototype.type = ""; + CVSS.AttackVector = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; + values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; + values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; + values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; + return values; + })(); /** - * VulnerabilityOccurrence severity. - * @member {grafeas.v1.Severity} severity - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * AttackComplexity enum. + * @name grafeas.v1.CVSS.AttackComplexity + * @enum {number} + * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value + * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value + * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value */ - VulnerabilityOccurrence.prototype.severity = 0; + CVSS.AttackComplexity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; + values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + return values; + })(); /** - * VulnerabilityOccurrence cvssScore. - * @member {number} cvssScore - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Authentication enum. + * @name grafeas.v1.CVSS.Authentication + * @enum {number} + * @property {number} AUTHENTICATION_UNSPECIFIED=0 AUTHENTICATION_UNSPECIFIED value + * @property {number} AUTHENTICATION_MULTIPLE=1 AUTHENTICATION_MULTIPLE value + * @property {number} AUTHENTICATION_SINGLE=2 AUTHENTICATION_SINGLE value + * @property {number} AUTHENTICATION_NONE=3 AUTHENTICATION_NONE value */ - VulnerabilityOccurrence.prototype.cvssScore = 0; + CVSS.Authentication = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTHENTICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTHENTICATION_MULTIPLE"] = 1; + values[valuesById[2] = "AUTHENTICATION_SINGLE"] = 2; + values[valuesById[3] = "AUTHENTICATION_NONE"] = 3; + return values; + })(); /** - * VulnerabilityOccurrence cvssv3. - * @member {grafeas.v1.VulnerabilityOccurrence.ICVSSV3|null|undefined} cvssv3 - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * PrivilegesRequired enum. + * @name grafeas.v1.CVSS.PrivilegesRequired + * @enum {number} + * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value + * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value + * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value + * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value */ - VulnerabilityOccurrence.prototype.cvssv3 = null; + CVSS.PrivilegesRequired = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; + values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; + values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; + return values; + })(); /** - * VulnerabilityOccurrence packageIssue. - * @member {Array.} packageIssue - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * UserInteraction enum. + * @name grafeas.v1.CVSS.UserInteraction + * @enum {number} + * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value + * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value + * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value */ - VulnerabilityOccurrence.prototype.packageIssue = $util.emptyArray; + CVSS.UserInteraction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; + values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; + return values; + })(); /** - * VulnerabilityOccurrence shortDescription. - * @member {string} shortDescription - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Scope enum. + * @name grafeas.v1.CVSS.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value + * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value */ - VulnerabilityOccurrence.prototype.shortDescription = ""; + CVSS.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; + values[valuesById[2] = "SCOPE_CHANGED"] = 2; + return values; + })(); /** - * VulnerabilityOccurrence longDescription. - * @member {string} longDescription - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Impact enum. + * @name grafeas.v1.CVSS.Impact + * @enum {number} + * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value + * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value + * @property {number} IMPACT_LOW=2 IMPACT_LOW value + * @property {number} IMPACT_NONE=3 IMPACT_NONE value */ - VulnerabilityOccurrence.prototype.longDescription = ""; + CVSS.Impact = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPACT_HIGH"] = 1; + values[valuesById[2] = "IMPACT_LOW"] = 2; + values[valuesById[3] = "IMPACT_NONE"] = 3; + return values; + })(); + + return CVSS; + })(); + + v1.DeploymentNote = (function() { /** - * VulnerabilityOccurrence relatedUrls. - * @member {Array.} relatedUrls - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Properties of a DeploymentNote. + * @memberof grafeas.v1 + * @interface IDeploymentNote + * @property {Array.|null} [resourceUri] DeploymentNote resourceUri */ - VulnerabilityOccurrence.prototype.relatedUrls = $util.emptyArray; /** - * VulnerabilityOccurrence effectiveSeverity. - * @member {grafeas.v1.Severity} effectiveSeverity - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Constructs a new DeploymentNote. + * @memberof grafeas.v1 + * @classdesc Represents a DeploymentNote. + * @implements IDeploymentNote + * @constructor + * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set */ - VulnerabilityOccurrence.prototype.effectiveSeverity = 0; + function DeploymentNote(properties) { + this.resourceUri = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * VulnerabilityOccurrence fixAvailable. - * @member {boolean} fixAvailable - * @memberof grafeas.v1.VulnerabilityOccurrence + * DeploymentNote resourceUri. + * @member {Array.} resourceUri + * @memberof grafeas.v1.DeploymentNote * @instance */ - VulnerabilityOccurrence.prototype.fixAvailable = false; + DeploymentNote.prototype.resourceUri = $util.emptyArray; /** - * Creates a new VulnerabilityOccurrence instance using the specified properties. + * Creates a new DeploymentNote instance using the specified properties. * @function create - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @static - * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence instance + * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set + * @returns {grafeas.v1.DeploymentNote} DeploymentNote instance */ - VulnerabilityOccurrence.create = function create(properties) { - return new VulnerabilityOccurrence(properties); + DeploymentNote.create = function create(properties) { + return new DeploymentNote(properties); }; /** - * Encodes the specified VulnerabilityOccurrence message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. + * Encodes the specified DeploymentNote message. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @static - * @param {grafeas.v1.IVulnerabilityOccurrence} message VulnerabilityOccurrence message or plain object to encode + * @param {grafeas.v1.IDeploymentNote} message DeploymentNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VulnerabilityOccurrence.encode = function encode(message, writer) { + DeploymentNote.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); - if (message.cvssScore != null && Object.hasOwnProperty.call(message, "cvssScore")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.cvssScore); - if (message.packageIssue != null && message.packageIssue.length) - for (var i = 0; i < message.packageIssue.length; ++i) - $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.encode(message.packageIssue[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.shortDescription != null && Object.hasOwnProperty.call(message, "shortDescription")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.shortDescription); - if (message.longDescription != null && Object.hasOwnProperty.call(message, "longDescription")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.longDescription); - if (message.relatedUrls != null && message.relatedUrls.length) - for (var i = 0; i < message.relatedUrls.length; ++i) - $root.grafeas.v1.RelatedUrl.encode(message.relatedUrls[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.effectiveSeverity != null && Object.hasOwnProperty.call(message, "effectiveSeverity")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.effectiveSeverity); - if (message.fixAvailable != null && Object.hasOwnProperty.call(message, "fixAvailable")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.fixAvailable); - if (message.cvssv3 != null && Object.hasOwnProperty.call(message, "cvssv3")) - $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3.encode(message.cvssv3, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.resourceUri != null && message.resourceUri.length) + for (var i = 0; i < message.resourceUri.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceUri[i]); return writer; }; /** - * Encodes the specified VulnerabilityOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. + * Encodes the specified DeploymentNote message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence - * @static - * @param {grafeas.v1.IVulnerabilityOccurrence} message VulnerabilityOccurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VulnerabilityOccurrence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VulnerabilityOccurrence message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VulnerabilityOccurrence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityOccurrence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.severity = reader.int32(); - break; - case 3: - message.cvssScore = reader.float(); - break; - case 10: - message.cvssv3 = $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.packageIssue && message.packageIssue.length)) - message.packageIssue = []; - message.packageIssue.push($root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.decode(reader, reader.uint32())); - break; - case 5: - message.shortDescription = reader.string(); - break; - case 6: - message.longDescription = reader.string(); - break; - case 7: - if (!(message.relatedUrls && message.relatedUrls.length)) - message.relatedUrls = []; - message.relatedUrls.push($root.grafeas.v1.RelatedUrl.decode(reader, reader.uint32())); - break; - case 8: - message.effectiveSeverity = reader.int32(); - break; - case 9: - message.fixAvailable = reader.bool(); + * @param {grafeas.v1.IDeploymentNote} message DeploymentNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentNote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeploymentNote message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.DeploymentNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.DeploymentNote} DeploymentNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentNote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeploymentNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.resourceUri && message.resourceUri.length)) + message.resourceUri = []; + message.resourceUri.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -12369,1644 +12309,1534 @@ }; /** - * Decodes a VulnerabilityOccurrence message from the specified reader or buffer, length delimited. + * Decodes a DeploymentNote message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence + * @returns {grafeas.v1.DeploymentNote} DeploymentNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VulnerabilityOccurrence.decodeDelimited = function decodeDelimited(reader) { + DeploymentNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VulnerabilityOccurrence message. + * Verifies a DeploymentNote message. * @function verify - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VulnerabilityOccurrence.verify = function verify(message) { + DeploymentNote.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) - if (typeof message.cvssScore !== "number") - return "cvssScore: number expected"; - if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) { - var error = $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3.verify(message.cvssv3); - if (error) - return "cvssv3." + error; - } - if (message.packageIssue != null && message.hasOwnProperty("packageIssue")) { - if (!Array.isArray(message.packageIssue)) - return "packageIssue: array expected"; - for (var i = 0; i < message.packageIssue.length; ++i) { - var error = $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify(message.packageIssue[i]); - if (error) - return "packageIssue." + error; - } - } - if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) - if (!$util.isString(message.shortDescription)) - return "shortDescription: string expected"; - if (message.longDescription != null && message.hasOwnProperty("longDescription")) - if (!$util.isString(message.longDescription)) - return "longDescription: string expected"; - if (message.relatedUrls != null && message.hasOwnProperty("relatedUrls")) { - if (!Array.isArray(message.relatedUrls)) - return "relatedUrls: array expected"; - for (var i = 0; i < message.relatedUrls.length; ++i) { - var error = $root.grafeas.v1.RelatedUrl.verify(message.relatedUrls[i]); - if (error) - return "relatedUrls." + error; - } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) { + if (!Array.isArray(message.resourceUri)) + return "resourceUri: array expected"; + for (var i = 0; i < message.resourceUri.length; ++i) + if (!$util.isString(message.resourceUri[i])) + return "resourceUri: string[] expected"; } - if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) - switch (message.effectiveSeverity) { - default: - return "effectiveSeverity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) - if (typeof message.fixAvailable !== "boolean") - return "fixAvailable: boolean expected"; return null; }; /** - * Creates a VulnerabilityOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a DeploymentNote message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence + * @returns {grafeas.v1.DeploymentNote} DeploymentNote */ - VulnerabilityOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityOccurrence) + DeploymentNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeploymentNote) return object; - var message = new $root.grafeas.v1.VulnerabilityOccurrence(); - if (object.type != null) - message.type = String(object.type); - switch (object.severity) { - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "MINIMAL": - case 1: - message.severity = 1; - break; - case "LOW": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "HIGH": - case 4: - message.severity = 4; - break; - case "CRITICAL": - case 5: - message.severity = 5; - break; - } - if (object.cvssScore != null) - message.cvssScore = Number(object.cvssScore); - if (object.cvssv3 != null) { - if (typeof object.cvssv3 !== "object") - throw TypeError(".grafeas.v1.VulnerabilityOccurrence.cvssv3: object expected"); - message.cvssv3 = $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3.fromObject(object.cvssv3); - } - if (object.packageIssue) { - if (!Array.isArray(object.packageIssue)) - throw TypeError(".grafeas.v1.VulnerabilityOccurrence.packageIssue: array expected"); - message.packageIssue = []; - for (var i = 0; i < object.packageIssue.length; ++i) { - if (typeof object.packageIssue[i] !== "object") - throw TypeError(".grafeas.v1.VulnerabilityOccurrence.packageIssue: object expected"); - message.packageIssue[i] = $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.fromObject(object.packageIssue[i]); - } - } - if (object.shortDescription != null) - message.shortDescription = String(object.shortDescription); - if (object.longDescription != null) - message.longDescription = String(object.longDescription); - if (object.relatedUrls) { - if (!Array.isArray(object.relatedUrls)) - throw TypeError(".grafeas.v1.VulnerabilityOccurrence.relatedUrls: array expected"); - message.relatedUrls = []; - for (var i = 0; i < object.relatedUrls.length; ++i) { - if (typeof object.relatedUrls[i] !== "object") - throw TypeError(".grafeas.v1.VulnerabilityOccurrence.relatedUrls: object expected"); - message.relatedUrls[i] = $root.grafeas.v1.RelatedUrl.fromObject(object.relatedUrls[i]); - } - } - switch (object.effectiveSeverity) { - case "SEVERITY_UNSPECIFIED": - case 0: - message.effectiveSeverity = 0; - break; - case "MINIMAL": - case 1: - message.effectiveSeverity = 1; - break; - case "LOW": - case 2: - message.effectiveSeverity = 2; - break; - case "MEDIUM": - case 3: - message.effectiveSeverity = 3; - break; - case "HIGH": - case 4: - message.effectiveSeverity = 4; - break; - case "CRITICAL": - case 5: - message.effectiveSeverity = 5; - break; + var message = new $root.grafeas.v1.DeploymentNote(); + if (object.resourceUri) { + if (!Array.isArray(object.resourceUri)) + throw TypeError(".grafeas.v1.DeploymentNote.resourceUri: array expected"); + message.resourceUri = []; + for (var i = 0; i < object.resourceUri.length; ++i) + message.resourceUri[i] = String(object.resourceUri[i]); } - if (object.fixAvailable != null) - message.fixAvailable = Boolean(object.fixAvailable); return message; }; /** - * Creates a plain object from a VulnerabilityOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a DeploymentNote message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @static - * @param {grafeas.v1.VulnerabilityOccurrence} message VulnerabilityOccurrence + * @param {grafeas.v1.DeploymentNote} message DeploymentNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VulnerabilityOccurrence.toObject = function toObject(message, options) { + DeploymentNote.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.packageIssue = []; - object.relatedUrls = []; - } - if (options.defaults) { - object.type = ""; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.cvssScore = 0; - object.shortDescription = ""; - object.longDescription = ""; - object.effectiveSeverity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.fixAvailable = false; - object.cvssv3 = null; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.grafeas.v1.Severity[message.severity] : message.severity; - if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) - object.cvssScore = options.json && !isFinite(message.cvssScore) ? String(message.cvssScore) : message.cvssScore; - if (message.packageIssue && message.packageIssue.length) { - object.packageIssue = []; - for (var j = 0; j < message.packageIssue.length; ++j) - object.packageIssue[j] = $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.toObject(message.packageIssue[j], options); - } - if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) - object.shortDescription = message.shortDescription; - if (message.longDescription != null && message.hasOwnProperty("longDescription")) - object.longDescription = message.longDescription; - if (message.relatedUrls && message.relatedUrls.length) { - object.relatedUrls = []; - for (var j = 0; j < message.relatedUrls.length; ++j) - object.relatedUrls[j] = $root.grafeas.v1.RelatedUrl.toObject(message.relatedUrls[j], options); + if (options.arrays || options.defaults) + object.resourceUri = []; + if (message.resourceUri && message.resourceUri.length) { + object.resourceUri = []; + for (var j = 0; j < message.resourceUri.length; ++j) + object.resourceUri[j] = message.resourceUri[j]; } - if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) - object.effectiveSeverity = options.enums === String ? $root.grafeas.v1.Severity[message.effectiveSeverity] : message.effectiveSeverity; - if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) - object.fixAvailable = message.fixAvailable; - if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) - object.cvssv3 = $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3.toObject(message.cvssv3, options); return object; }; /** - * Converts this VulnerabilityOccurrence to JSON. + * Converts this DeploymentNote to JSON. * @function toJSON - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.DeploymentNote * @instance * @returns {Object.} JSON object */ - VulnerabilityOccurrence.prototype.toJSON = function toJSON() { + DeploymentNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - VulnerabilityOccurrence.CVSSV3 = (function() { + return DeploymentNote; + })(); - /** - * Properties of a CVSSV3. - * @memberof grafeas.v1.VulnerabilityOccurrence - * @interface ICVSSV3 - * @property {number|null} [baseScore] CVSSV3 baseScore - * @property {grafeas.v1.Severity|null} [severity] CVSSV3 severity - */ + v1.DeploymentOccurrence = (function() { - /** - * Constructs a new CVSSV3. - * @memberof grafeas.v1.VulnerabilityOccurrence - * @classdesc Represents a CVSSV3. - * @implements ICVSSV3 - * @constructor - * @param {grafeas.v1.VulnerabilityOccurrence.ICVSSV3=} [properties] Properties to set - */ - function CVSSV3(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a DeploymentOccurrence. + * @memberof grafeas.v1 + * @interface IDeploymentOccurrence + * @property {string|null} [userEmail] DeploymentOccurrence userEmail + * @property {google.protobuf.ITimestamp|null} [deployTime] DeploymentOccurrence deployTime + * @property {google.protobuf.ITimestamp|null} [undeployTime] DeploymentOccurrence undeployTime + * @property {string|null} [config] DeploymentOccurrence config + * @property {string|null} [address] DeploymentOccurrence address + * @property {Array.|null} [resourceUri] DeploymentOccurrence resourceUri + * @property {grafeas.v1.DeploymentOccurrence.Platform|null} [platform] DeploymentOccurrence platform + */ - /** - * CVSSV3 baseScore. - * @member {number} baseScore - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @instance - */ - CVSSV3.prototype.baseScore = 0; + /** + * Constructs a new DeploymentOccurrence. + * @memberof grafeas.v1 + * @classdesc Represents a DeploymentOccurrence. + * @implements IDeploymentOccurrence + * @constructor + * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set + */ + function DeploymentOccurrence(properties) { + this.resourceUri = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * CVSSV3 severity. - * @member {grafeas.v1.Severity} severity - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @instance - */ - CVSSV3.prototype.severity = 0; + /** + * DeploymentOccurrence userEmail. + * @member {string} userEmail + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.userEmail = ""; - /** - * Creates a new CVSSV3 instance using the specified properties. - * @function create - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.ICVSSV3=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityOccurrence.CVSSV3} CVSSV3 instance - */ - CVSSV3.create = function create(properties) { - return new CVSSV3(properties); - }; + /** + * DeploymentOccurrence deployTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployTime + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.deployTime = null; - /** - * Encodes the specified CVSSV3 message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.CVSSV3.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.ICVSSV3} message CVSSV3 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CVSSV3.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); - return writer; - }; + /** + * DeploymentOccurrence undeployTime. + * @member {google.protobuf.ITimestamp|null|undefined} undeployTime + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.undeployTime = null; - /** - * Encodes the specified CVSSV3 message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.CVSSV3.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.ICVSSV3} message CVSSV3 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CVSSV3.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeploymentOccurrence config. + * @member {string} config + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.config = ""; - /** - * Decodes a CVSSV3 message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.VulnerabilityOccurrence.CVSSV3} CVSSV3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CVSSV3.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseScore = reader.float(); - break; - case 2: - message.severity = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DeploymentOccurrence address. + * @member {string} address + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.address = ""; - /** - * Decodes a CVSSV3 message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityOccurrence.CVSSV3} CVSSV3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CVSSV3.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * DeploymentOccurrence resourceUri. + * @member {Array.} resourceUri + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.resourceUri = $util.emptyArray; - /** - * Verifies a CVSSV3 message. - * @function verify - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CVSSV3.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - if (typeof message.baseScore !== "number") - return "baseScore: number expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - return null; - }; + /** + * DeploymentOccurrence platform. + * @member {grafeas.v1.DeploymentOccurrence.Platform} platform + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.platform = 0; - /** - * Creates a CVSSV3 message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityOccurrence.CVSSV3} CVSSV3 - */ - CVSSV3.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3) - return object; - var message = new $root.grafeas.v1.VulnerabilityOccurrence.CVSSV3(); - if (object.baseScore != null) - message.baseScore = Number(object.baseScore); - switch (object.severity) { - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "MINIMAL": + /** + * Creates a new DeploymentOccurrence instance using the specified properties. + * @function create + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence instance + */ + DeploymentOccurrence.create = function create(properties) { + return new DeploymentOccurrence(properties); + }; + + /** + * Encodes the specified DeploymentOccurrence message. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentOccurrence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userEmail != null && Object.hasOwnProperty.call(message, "userEmail")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userEmail); + if (message.deployTime != null && Object.hasOwnProperty.call(message, "deployTime")) + $root.google.protobuf.Timestamp.encode(message.deployTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.undeployTime != null && Object.hasOwnProperty.call(message, "undeployTime")) + $root.google.protobuf.Timestamp.encode(message.undeployTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.config); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.address); + if (message.resourceUri != null && message.resourceUri.length) + for (var i = 0; i < message.resourceUri.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.resourceUri[i]); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.platform); + return writer; + }; + + /** + * Encodes the specified DeploymentOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeploymentOccurrence message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentOccurrence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeploymentOccurrence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.severity = 1; + message.userEmail = reader.string(); break; - case "LOW": case 2: - message.severity = 2; + message.deployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "MEDIUM": case 3: - message.severity = 3; + message.undeployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "HIGH": case 4: - message.severity = 4; + message.config = reader.string(); break; - case "CRITICAL": case 5: - message.severity = 5; + message.address = reader.string(); + break; + case 6: + if (!(message.resourceUri && message.resourceUri.length)) + message.resourceUri = []; + message.resourceUri.push(reader.string()); + break; + case 7: + message.platform = reader.int32(); + break; + default: + reader.skipType(tag & 7); break; } - return message; - }; - - /** - * Creates a plain object from a CVSSV3 message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.CVSSV3} message CVSSV3 - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CVSSV3.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.baseScore = 0; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - } - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.grafeas.v1.Severity[message.severity] : message.severity; - return object; - }; - - /** - * Converts this CVSSV3 to JSON. - * @function toJSON - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @instance - * @returns {Object.} JSON object - */ - CVSSV3.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - return CVSSV3; - })(); + /** + * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentOccurrence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - VulnerabilityOccurrence.PackageIssue = (function() { + /** + * Verifies a DeploymentOccurrence message. + * @function verify + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeploymentOccurrence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userEmail != null && message.hasOwnProperty("userEmail")) + if (!$util.isString(message.userEmail)) + return "userEmail: string expected"; + if (message.deployTime != null && message.hasOwnProperty("deployTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deployTime); + if (error) + return "deployTime." + error; + } + if (message.undeployTime != null && message.hasOwnProperty("undeployTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.undeployTime); + if (error) + return "undeployTime." + error; + } + if (message.config != null && message.hasOwnProperty("config")) + if (!$util.isString(message.config)) + return "config: string expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) { + if (!Array.isArray(message.resourceUri)) + return "resourceUri: array expected"; + for (var i = 0; i < message.resourceUri.length; ++i) + if (!$util.isString(message.resourceUri[i])) + return "resourceUri: string[] expected"; + } + if (message.platform != null && message.hasOwnProperty("platform")) + switch (message.platform) { + default: + return "platform: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; - /** - * Properties of a PackageIssue. - * @memberof grafeas.v1.VulnerabilityOccurrence - * @interface IPackageIssue - * @property {string|null} [affectedCpeUri] PackageIssue affectedCpeUri - * @property {string|null} [affectedPackage] PackageIssue affectedPackage - * @property {grafeas.v1.IVersion|null} [affectedVersion] PackageIssue affectedVersion - * @property {string|null} [fixedCpeUri] PackageIssue fixedCpeUri - * @property {string|null} [fixedPackage] PackageIssue fixedPackage - * @property {grafeas.v1.IVersion|null} [fixedVersion] PackageIssue fixedVersion - * @property {boolean|null} [fixAvailable] PackageIssue fixAvailable - * @property {string|null} [packageType] PackageIssue packageType - * @property {grafeas.v1.Severity|null} [effectiveSeverity] PackageIssue effectiveSeverity - */ + /** + * Creates a DeploymentOccurrence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + */ + DeploymentOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeploymentOccurrence) + return object; + var message = new $root.grafeas.v1.DeploymentOccurrence(); + if (object.userEmail != null) + message.userEmail = String(object.userEmail); + if (object.deployTime != null) { + if (typeof object.deployTime !== "object") + throw TypeError(".grafeas.v1.DeploymentOccurrence.deployTime: object expected"); + message.deployTime = $root.google.protobuf.Timestamp.fromObject(object.deployTime); + } + if (object.undeployTime != null) { + if (typeof object.undeployTime !== "object") + throw TypeError(".grafeas.v1.DeploymentOccurrence.undeployTime: object expected"); + message.undeployTime = $root.google.protobuf.Timestamp.fromObject(object.undeployTime); + } + if (object.config != null) + message.config = String(object.config); + if (object.address != null) + message.address = String(object.address); + if (object.resourceUri) { + if (!Array.isArray(object.resourceUri)) + throw TypeError(".grafeas.v1.DeploymentOccurrence.resourceUri: array expected"); + message.resourceUri = []; + for (var i = 0; i < object.resourceUri.length; ++i) + message.resourceUri[i] = String(object.resourceUri[i]); + } + switch (object.platform) { + case "PLATFORM_UNSPECIFIED": + case 0: + message.platform = 0; + break; + case "GKE": + case 1: + message.platform = 1; + break; + case "FLEX": + case 2: + message.platform = 2; + break; + case "CUSTOM": + case 3: + message.platform = 3; + break; + } + return message; + }; - /** - * Constructs a new PackageIssue. - * @memberof grafeas.v1.VulnerabilityOccurrence - * @classdesc Represents a PackageIssue. - * @implements IPackageIssue - * @constructor - * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue=} [properties] Properties to set - */ - function PackageIssue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a DeploymentOccurrence message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.DeploymentOccurrence + * @static + * @param {grafeas.v1.DeploymentOccurrence} message DeploymentOccurrence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeploymentOccurrence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceUri = []; + if (options.defaults) { + object.userEmail = ""; + object.deployTime = null; + object.undeployTime = null; + object.config = ""; + object.address = ""; + object.platform = options.enums === String ? "PLATFORM_UNSPECIFIED" : 0; + } + if (message.userEmail != null && message.hasOwnProperty("userEmail")) + object.userEmail = message.userEmail; + if (message.deployTime != null && message.hasOwnProperty("deployTime")) + object.deployTime = $root.google.protobuf.Timestamp.toObject(message.deployTime, options); + if (message.undeployTime != null && message.hasOwnProperty("undeployTime")) + object.undeployTime = $root.google.protobuf.Timestamp.toObject(message.undeployTime, options); + if (message.config != null && message.hasOwnProperty("config")) + object.config = message.config; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.resourceUri && message.resourceUri.length) { + object.resourceUri = []; + for (var j = 0; j < message.resourceUri.length; ++j) + object.resourceUri[j] = message.resourceUri[j]; } + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = options.enums === String ? $root.grafeas.v1.DeploymentOccurrence.Platform[message.platform] : message.platform; + return object; + }; - /** - * PackageIssue affectedCpeUri. - * @member {string} affectedCpeUri - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.affectedCpeUri = ""; - - /** - * PackageIssue affectedPackage. - * @member {string} affectedPackage - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.affectedPackage = ""; - - /** - * PackageIssue affectedVersion. - * @member {grafeas.v1.IVersion|null|undefined} affectedVersion - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.affectedVersion = null; - - /** - * PackageIssue fixedCpeUri. - * @member {string} fixedCpeUri - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixedCpeUri = ""; - - /** - * PackageIssue fixedPackage. - * @member {string} fixedPackage - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixedPackage = ""; + /** + * Converts this DeploymentOccurrence to JSON. + * @function toJSON + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + * @returns {Object.} JSON object + */ + DeploymentOccurrence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * PackageIssue fixedVersion. - * @member {grafeas.v1.IVersion|null|undefined} fixedVersion - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixedVersion = null; + /** + * Platform enum. + * @name grafeas.v1.DeploymentOccurrence.Platform + * @enum {number} + * @property {number} PLATFORM_UNSPECIFIED=0 PLATFORM_UNSPECIFIED value + * @property {number} GKE=1 GKE value + * @property {number} FLEX=2 FLEX value + * @property {number} CUSTOM=3 CUSTOM value + */ + DeploymentOccurrence.Platform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLATFORM_UNSPECIFIED"] = 0; + values[valuesById[1] = "GKE"] = 1; + values[valuesById[2] = "FLEX"] = 2; + values[valuesById[3] = "CUSTOM"] = 3; + return values; + })(); - /** - * PackageIssue fixAvailable. - * @member {boolean} fixAvailable - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixAvailable = false; + return DeploymentOccurrence; + })(); - /** - * PackageIssue packageType. - * @member {string} packageType - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.packageType = ""; + v1.DiscoveryNote = (function() { - /** - * PackageIssue effectiveSeverity. - * @member {grafeas.v1.Severity} effectiveSeverity - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.effectiveSeverity = 0; + /** + * Properties of a DiscoveryNote. + * @memberof grafeas.v1 + * @interface IDiscoveryNote + * @property {grafeas.v1.NoteKind|null} [analysisKind] DiscoveryNote analysisKind + */ - /** - * Creates a new PackageIssue instance using the specified properties. - * @function create - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue instance - */ - PackageIssue.create = function create(properties) { - return new PackageIssue(properties); - }; + /** + * Constructs a new DiscoveryNote. + * @memberof grafeas.v1 + * @classdesc Represents a DiscoveryNote. + * @implements IDiscoveryNote + * @constructor + * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set + */ + function DiscoveryNote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified PackageIssue message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue} message PackageIssue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PackageIssue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.affectedCpeUri != null && Object.hasOwnProperty.call(message, "affectedCpeUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.affectedCpeUri); - if (message.affectedPackage != null && Object.hasOwnProperty.call(message, "affectedPackage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.affectedPackage); - if (message.affectedVersion != null && Object.hasOwnProperty.call(message, "affectedVersion")) - $root.grafeas.v1.Version.encode(message.affectedVersion, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.fixedCpeUri != null && Object.hasOwnProperty.call(message, "fixedCpeUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.fixedCpeUri); - if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.fixedPackage); - if (message.fixedVersion != null && Object.hasOwnProperty.call(message, "fixedVersion")) - $root.grafeas.v1.Version.encode(message.fixedVersion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.fixAvailable != null && Object.hasOwnProperty.call(message, "fixAvailable")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fixAvailable); - if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.packageType); - if (message.effectiveSeverity != null && Object.hasOwnProperty.call(message, "effectiveSeverity")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.effectiveSeverity); - return writer; - }; + /** + * DiscoveryNote analysisKind. + * @member {grafeas.v1.NoteKind} analysisKind + * @memberof grafeas.v1.DiscoveryNote + * @instance + */ + DiscoveryNote.prototype.analysisKind = 0; - /** - * Encodes the specified PackageIssue message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue} message PackageIssue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PackageIssue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new DiscoveryNote instance using the specified properties. + * @function create + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set + * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote instance + */ + DiscoveryNote.create = function create(properties) { + return new DiscoveryNote(properties); + }; - /** - * Decodes a PackageIssue message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PackageIssue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.affectedCpeUri = reader.string(); - break; - case 2: - message.affectedPackage = reader.string(); - break; - case 3: - message.affectedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 4: - message.fixedCpeUri = reader.string(); - break; - case 5: - message.fixedPackage = reader.string(); - break; - case 6: - message.fixedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 7: - message.fixAvailable = reader.bool(); - break; - case 8: - message.packageType = reader.string(); - break; - case 9: - message.effectiveSeverity = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DiscoveryNote message. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryNote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.analysisKind != null && Object.hasOwnProperty.call(message, "analysisKind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.analysisKind); + return writer; + }; - /** - * Decodes a PackageIssue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PackageIssue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DiscoveryNote message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryNote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a PackageIssue message. - * @function verify - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PackageIssue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) - if (!$util.isString(message.affectedCpeUri)) - return "affectedCpeUri: string expected"; - if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) - if (!$util.isString(message.affectedPackage)) - return "affectedPackage: string expected"; - if (message.affectedVersion != null && message.hasOwnProperty("affectedVersion")) { - var error = $root.grafeas.v1.Version.verify(message.affectedVersion); - if (error) - return "affectedVersion." + error; - } - if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) - if (!$util.isString(message.fixedCpeUri)) - return "fixedCpeUri: string expected"; - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) - if (!$util.isString(message.fixedPackage)) - return "fixedPackage: string expected"; - if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) { - var error = $root.grafeas.v1.Version.verify(message.fixedVersion); - if (error) - return "fixedVersion." + error; + /** + * Decodes a DiscoveryNote message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryNote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DiscoveryNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.analysisKind = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) - if (typeof message.fixAvailable !== "boolean") - return "fixAvailable: boolean expected"; - if (message.packageType != null && message.hasOwnProperty("packageType")) - if (!$util.isString(message.packageType)) - return "packageType: string expected"; - if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) - switch (message.effectiveSeverity) { - default: - return "effectiveSeverity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - return null; - }; + } + return message; + }; - /** - * Creates a PackageIssue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue - */ - PackageIssue.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue) - return object; - var message = new $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); - if (object.affectedCpeUri != null) - message.affectedCpeUri = String(object.affectedCpeUri); - if (object.affectedPackage != null) - message.affectedPackage = String(object.affectedPackage); - if (object.affectedVersion != null) { - if (typeof object.affectedVersion !== "object") - throw TypeError(".grafeas.v1.VulnerabilityOccurrence.PackageIssue.affectedVersion: object expected"); - message.affectedVersion = $root.grafeas.v1.Version.fromObject(object.affectedVersion); - } - if (object.fixedCpeUri != null) - message.fixedCpeUri = String(object.fixedCpeUri); - if (object.fixedPackage != null) - message.fixedPackage = String(object.fixedPackage); - if (object.fixedVersion != null) { - if (typeof object.fixedVersion !== "object") - throw TypeError(".grafeas.v1.VulnerabilityOccurrence.PackageIssue.fixedVersion: object expected"); - message.fixedVersion = $root.grafeas.v1.Version.fromObject(object.fixedVersion); - } - if (object.fixAvailable != null) - message.fixAvailable = Boolean(object.fixAvailable); - if (object.packageType != null) - message.packageType = String(object.packageType); - switch (object.effectiveSeverity) { - case "SEVERITY_UNSPECIFIED": + /** + * Decodes a DiscoveryNote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryNote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryNote message. + * @function verify + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryNote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.analysisKind != null && message.hasOwnProperty("analysisKind")) + switch (message.analysisKind) { + default: + return "analysisKind: enum value expected"; case 0: - message.effectiveSeverity = 0; - break; - case "MINIMAL": case 1: - message.effectiveSeverity = 1; - break; - case "LOW": case 2: - message.effectiveSeverity = 2; - break; - case "MEDIUM": case 3: - message.effectiveSeverity = 3; - break; - case "HIGH": case 4: - message.effectiveSeverity = 4; - break; - case "CRITICAL": case 5: - message.effectiveSeverity = 5; + case 6: + case 7: + case 8: + case 9: + case 10: break; } - return message; - }; + return null; + }; - /** - * Creates a plain object from a PackageIssue message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @static - * @param {grafeas.v1.VulnerabilityOccurrence.PackageIssue} message PackageIssue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PackageIssue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.affectedCpeUri = ""; - object.affectedPackage = ""; - object.affectedVersion = null; - object.fixedCpeUri = ""; - object.fixedPackage = ""; - object.fixedVersion = null; - object.fixAvailable = false; - object.packageType = ""; - object.effectiveSeverity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - } - if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) - object.affectedCpeUri = message.affectedCpeUri; - if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) - object.affectedPackage = message.affectedPackage; - if (message.affectedVersion != null && message.hasOwnProperty("affectedVersion")) - object.affectedVersion = $root.grafeas.v1.Version.toObject(message.affectedVersion, options); - if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) - object.fixedCpeUri = message.fixedCpeUri; - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) - object.fixedPackage = message.fixedPackage; - if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) - object.fixedVersion = $root.grafeas.v1.Version.toObject(message.fixedVersion, options); - if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) - object.fixAvailable = message.fixAvailable; - if (message.packageType != null && message.hasOwnProperty("packageType")) - object.packageType = message.packageType; - if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) - object.effectiveSeverity = options.enums === String ? $root.grafeas.v1.Severity[message.effectiveSeverity] : message.effectiveSeverity; + /** + * Creates a DiscoveryNote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote + */ + DiscoveryNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DiscoveryNote) return object; - }; + var message = new $root.grafeas.v1.DiscoveryNote(); + switch (object.analysisKind) { + case "NOTE_KIND_UNSPECIFIED": + case 0: + message.analysisKind = 0; + break; + case "VULNERABILITY": + case 1: + message.analysisKind = 1; + break; + case "BUILD": + case 2: + message.analysisKind = 2; + break; + case "IMAGE": + case 3: + message.analysisKind = 3; + break; + case "PACKAGE": + case 4: + message.analysisKind = 4; + break; + case "DEPLOYMENT": + case 5: + message.analysisKind = 5; + break; + case "DISCOVERY": + case 6: + message.analysisKind = 6; + break; + case "ATTESTATION": + case 7: + message.analysisKind = 7; + break; + case "UPGRADE": + case 8: + message.analysisKind = 8; + break; + case "COMPLIANCE": + case 9: + message.analysisKind = 9; + break; + case "DSSE_ATTESTATION": + case 10: + message.analysisKind = 10; + break; + } + return message; + }; - /** - * Converts this PackageIssue to JSON. - * @function toJSON - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - * @returns {Object.} JSON object - */ - PackageIssue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DiscoveryNote message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.DiscoveryNote + * @static + * @param {grafeas.v1.DiscoveryNote} message DiscoveryNote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryNote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.analysisKind = options.enums === String ? "NOTE_KIND_UNSPECIFIED" : 0; + if (message.analysisKind != null && message.hasOwnProperty("analysisKind")) + object.analysisKind = options.enums === String ? $root.grafeas.v1.NoteKind[message.analysisKind] : message.analysisKind; + return object; + }; - return PackageIssue; - })(); + /** + * Converts this DiscoveryNote to JSON. + * @function toJSON + * @memberof grafeas.v1.DiscoveryNote + * @instance + * @returns {Object.} JSON object + */ + DiscoveryNote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return VulnerabilityOccurrence; + return DiscoveryNote; })(); - v1.CVSSv3 = (function() { + v1.DiscoveryOccurrence = (function() { /** - * Properties of a CVSSv3. + * Properties of a DiscoveryOccurrence. * @memberof grafeas.v1 - * @interface ICVSSv3 - * @property {number|null} [baseScore] CVSSv3 baseScore - * @property {number|null} [exploitabilityScore] CVSSv3 exploitabilityScore - * @property {number|null} [impactScore] CVSSv3 impactScore - * @property {grafeas.v1.CVSSv3.AttackVector|null} [attackVector] CVSSv3 attackVector - * @property {grafeas.v1.CVSSv3.AttackComplexity|null} [attackComplexity] CVSSv3 attackComplexity - * @property {grafeas.v1.CVSSv3.PrivilegesRequired|null} [privilegesRequired] CVSSv3 privilegesRequired - * @property {grafeas.v1.CVSSv3.UserInteraction|null} [userInteraction] CVSSv3 userInteraction - * @property {grafeas.v1.CVSSv3.Scope|null} [scope] CVSSv3 scope - * @property {grafeas.v1.CVSSv3.Impact|null} [confidentialityImpact] CVSSv3 confidentialityImpact - * @property {grafeas.v1.CVSSv3.Impact|null} [integrityImpact] CVSSv3 integrityImpact - * @property {grafeas.v1.CVSSv3.Impact|null} [availabilityImpact] CVSSv3 availabilityImpact + * @interface IDiscoveryOccurrence + * @property {grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|null} [continuousAnalysis] DiscoveryOccurrence continuousAnalysis + * @property {grafeas.v1.DiscoveryOccurrence.AnalysisStatus|null} [analysisStatus] DiscoveryOccurrence analysisStatus + * @property {google.rpc.IStatus|null} [analysisStatusError] DiscoveryOccurrence analysisStatusError + * @property {string|null} [cpe] DiscoveryOccurrence cpe + * @property {google.protobuf.ITimestamp|null} [lastScanTime] DiscoveryOccurrence lastScanTime + * @property {google.protobuf.ITimestamp|null} [archiveTime] DiscoveryOccurrence archiveTime + */ + + /** + * Constructs a new DiscoveryOccurrence. + * @memberof grafeas.v1 + * @classdesc Represents a DiscoveryOccurrence. + * @implements IDiscoveryOccurrence + * @constructor + * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set + */ + function DiscoveryOccurrence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryOccurrence continuousAnalysis. + * @member {grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} continuousAnalysis + * @memberof grafeas.v1.DiscoveryOccurrence + * @instance + */ + DiscoveryOccurrence.prototype.continuousAnalysis = 0; + + /** + * DiscoveryOccurrence analysisStatus. + * @member {grafeas.v1.DiscoveryOccurrence.AnalysisStatus} analysisStatus + * @memberof grafeas.v1.DiscoveryOccurrence + * @instance + */ + DiscoveryOccurrence.prototype.analysisStatus = 0; + + /** + * DiscoveryOccurrence analysisStatusError. + * @member {google.rpc.IStatus|null|undefined} analysisStatusError + * @memberof grafeas.v1.DiscoveryOccurrence + * @instance + */ + DiscoveryOccurrence.prototype.analysisStatusError = null; + + /** + * DiscoveryOccurrence cpe. + * @member {string} cpe + * @memberof grafeas.v1.DiscoveryOccurrence + * @instance + */ + DiscoveryOccurrence.prototype.cpe = ""; + + /** + * DiscoveryOccurrence lastScanTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastScanTime + * @memberof grafeas.v1.DiscoveryOccurrence + * @instance + */ + DiscoveryOccurrence.prototype.lastScanTime = null; + + /** + * DiscoveryOccurrence archiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} archiveTime + * @memberof grafeas.v1.DiscoveryOccurrence + * @instance + */ + DiscoveryOccurrence.prototype.archiveTime = null; + + /** + * Creates a new DiscoveryOccurrence instance using the specified properties. + * @function create + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence instance + */ + DiscoveryOccurrence.create = function create(properties) { + return new DiscoveryOccurrence(properties); + }; + + /** + * Encodes the specified DiscoveryOccurrence message. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOccurrence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.continuousAnalysis != null && Object.hasOwnProperty.call(message, "continuousAnalysis")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.continuousAnalysis); + if (message.analysisStatus != null && Object.hasOwnProperty.call(message, "analysisStatus")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.analysisStatus); + if (message.analysisStatusError != null && Object.hasOwnProperty.call(message, "analysisStatusError")) + $root.google.rpc.Status.encode(message.analysisStatusError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cpe != null && Object.hasOwnProperty.call(message, "cpe")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cpe); + if (message.lastScanTime != null && Object.hasOwnProperty.call(message, "lastScanTime")) + $root.google.protobuf.Timestamp.encode(message.lastScanTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.archiveTime != null && Object.hasOwnProperty.call(message, "archiveTime")) + $root.google.protobuf.Timestamp.encode(message.archiveTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryOccurrence message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DiscoveryOccurrence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DiscoveryOccurrence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.continuousAnalysis = reader.int32(); + break; + case 2: + message.analysisStatus = reader.int32(); + break; + case 3: + message.analysisStatusError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 4: + message.cpe = reader.string(); + break; + case 5: + message.lastScanTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.archiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Constructs a new CVSSv3. - * @memberof grafeas.v1 - * @classdesc Represents a CVSSv3. - * @implements ICVSSv3 - * @constructor - * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set + * Decodes a DiscoveryOccurrence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - function CVSSv3(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + DiscoveryOccurrence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * CVSSv3 baseScore. - * @member {number} baseScore - * @memberof grafeas.v1.CVSSv3 - * @instance + * Verifies a DiscoveryOccurrence message. + * @function verify + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CVSSv3.prototype.baseScore = 0; + DiscoveryOccurrence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.continuousAnalysis != null && message.hasOwnProperty("continuousAnalysis")) + switch (message.continuousAnalysis) { + default: + return "continuousAnalysis: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.analysisStatus != null && message.hasOwnProperty("analysisStatus")) + switch (message.analysisStatus) { + default: + return "analysisStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.analysisStatusError != null && message.hasOwnProperty("analysisStatusError")) { + var error = $root.google.rpc.Status.verify(message.analysisStatusError); + if (error) + return "analysisStatusError." + error; + } + if (message.cpe != null && message.hasOwnProperty("cpe")) + if (!$util.isString(message.cpe)) + return "cpe: string expected"; + if (message.lastScanTime != null && message.hasOwnProperty("lastScanTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastScanTime); + if (error) + return "lastScanTime." + error; + } + if (message.archiveTime != null && message.hasOwnProperty("archiveTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.archiveTime); + if (error) + return "archiveTime." + error; + } + return null; + }; /** - * CVSSv3 exploitabilityScore. - * @member {number} exploitabilityScore - * @memberof grafeas.v1.CVSSv3 - * @instance + * Creates a DiscoveryOccurrence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence */ - CVSSv3.prototype.exploitabilityScore = 0; + DiscoveryOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DiscoveryOccurrence) + return object; + var message = new $root.grafeas.v1.DiscoveryOccurrence(); + switch (object.continuousAnalysis) { + case "CONTINUOUS_ANALYSIS_UNSPECIFIED": + case 0: + message.continuousAnalysis = 0; + break; + case "ACTIVE": + case 1: + message.continuousAnalysis = 1; + break; + case "INACTIVE": + case 2: + message.continuousAnalysis = 2; + break; + } + switch (object.analysisStatus) { + case "ANALYSIS_STATUS_UNSPECIFIED": + case 0: + message.analysisStatus = 0; + break; + case "PENDING": + case 1: + message.analysisStatus = 1; + break; + case "SCANNING": + case 2: + message.analysisStatus = 2; + break; + case "FINISHED_SUCCESS": + case 3: + message.analysisStatus = 3; + break; + case "FINISHED_FAILED": + case 4: + message.analysisStatus = 4; + break; + case "FINISHED_UNSUPPORTED": + case 5: + message.analysisStatus = 5; + break; + } + if (object.analysisStatusError != null) { + if (typeof object.analysisStatusError !== "object") + throw TypeError(".grafeas.v1.DiscoveryOccurrence.analysisStatusError: object expected"); + message.analysisStatusError = $root.google.rpc.Status.fromObject(object.analysisStatusError); + } + if (object.cpe != null) + message.cpe = String(object.cpe); + if (object.lastScanTime != null) { + if (typeof object.lastScanTime !== "object") + throw TypeError(".grafeas.v1.DiscoveryOccurrence.lastScanTime: object expected"); + message.lastScanTime = $root.google.protobuf.Timestamp.fromObject(object.lastScanTime); + } + if (object.archiveTime != null) { + if (typeof object.archiveTime !== "object") + throw TypeError(".grafeas.v1.DiscoveryOccurrence.archiveTime: object expected"); + message.archiveTime = $root.google.protobuf.Timestamp.fromObject(object.archiveTime); + } + return message; + }; /** - * CVSSv3 impactScore. - * @member {number} impactScore - * @memberof grafeas.v1.CVSSv3 - * @instance + * Creates a plain object from a DiscoveryOccurrence message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.DiscoveryOccurrence + * @static + * @param {grafeas.v1.DiscoveryOccurrence} message DiscoveryOccurrence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - CVSSv3.prototype.impactScore = 0; + DiscoveryOccurrence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.continuousAnalysis = options.enums === String ? "CONTINUOUS_ANALYSIS_UNSPECIFIED" : 0; + object.analysisStatus = options.enums === String ? "ANALYSIS_STATUS_UNSPECIFIED" : 0; + object.analysisStatusError = null; + object.cpe = ""; + object.lastScanTime = null; + object.archiveTime = null; + } + if (message.continuousAnalysis != null && message.hasOwnProperty("continuousAnalysis")) + object.continuousAnalysis = options.enums === String ? $root.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis[message.continuousAnalysis] : message.continuousAnalysis; + if (message.analysisStatus != null && message.hasOwnProperty("analysisStatus")) + object.analysisStatus = options.enums === String ? $root.grafeas.v1.DiscoveryOccurrence.AnalysisStatus[message.analysisStatus] : message.analysisStatus; + if (message.analysisStatusError != null && message.hasOwnProperty("analysisStatusError")) + object.analysisStatusError = $root.google.rpc.Status.toObject(message.analysisStatusError, options); + if (message.cpe != null && message.hasOwnProperty("cpe")) + object.cpe = message.cpe; + if (message.lastScanTime != null && message.hasOwnProperty("lastScanTime")) + object.lastScanTime = $root.google.protobuf.Timestamp.toObject(message.lastScanTime, options); + if (message.archiveTime != null && message.hasOwnProperty("archiveTime")) + object.archiveTime = $root.google.protobuf.Timestamp.toObject(message.archiveTime, options); + return object; + }; /** - * CVSSv3 attackVector. - * @member {grafeas.v1.CVSSv3.AttackVector} attackVector - * @memberof grafeas.v1.CVSSv3 + * Converts this DiscoveryOccurrence to JSON. + * @function toJSON + * @memberof grafeas.v1.DiscoveryOccurrence * @instance + * @returns {Object.} JSON object */ - CVSSv3.prototype.attackVector = 0; + DiscoveryOccurrence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * CVSSv3 attackComplexity. - * @member {grafeas.v1.CVSSv3.AttackComplexity} attackComplexity - * @memberof grafeas.v1.CVSSv3 - * @instance + * ContinuousAnalysis enum. + * @name grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis + * @enum {number} + * @property {number} CONTINUOUS_ANALYSIS_UNSPECIFIED=0 CONTINUOUS_ANALYSIS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value */ - CVSSv3.prototype.attackComplexity = 0; + DiscoveryOccurrence.ContinuousAnalysis = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTINUOUS_ANALYSIS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); /** - * CVSSv3 privilegesRequired. - * @member {grafeas.v1.CVSSv3.PrivilegesRequired} privilegesRequired - * @memberof grafeas.v1.CVSSv3 - * @instance + * AnalysisStatus enum. + * @name grafeas.v1.DiscoveryOccurrence.AnalysisStatus + * @enum {number} + * @property {number} ANALYSIS_STATUS_UNSPECIFIED=0 ANALYSIS_STATUS_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} SCANNING=2 SCANNING value + * @property {number} FINISHED_SUCCESS=3 FINISHED_SUCCESS value + * @property {number} FINISHED_FAILED=4 FINISHED_FAILED value + * @property {number} FINISHED_UNSUPPORTED=5 FINISHED_UNSUPPORTED value */ - CVSSv3.prototype.privilegesRequired = 0; + DiscoveryOccurrence.AnalysisStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANALYSIS_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "SCANNING"] = 2; + values[valuesById[3] = "FINISHED_SUCCESS"] = 3; + values[valuesById[4] = "FINISHED_FAILED"] = 4; + values[valuesById[5] = "FINISHED_UNSUPPORTED"] = 5; + return values; + })(); - /** - * CVSSv3 userInteraction. - * @member {grafeas.v1.CVSSv3.UserInteraction} userInteraction - * @memberof grafeas.v1.CVSSv3 - * @instance - */ - CVSSv3.prototype.userInteraction = 0; + return DiscoveryOccurrence; + })(); - /** - * CVSSv3 scope. - * @member {grafeas.v1.CVSSv3.Scope} scope - * @memberof grafeas.v1.CVSSv3 - * @instance - */ - CVSSv3.prototype.scope = 0; + v1.DSSEAttestationNote = (function() { /** - * CVSSv3 confidentialityImpact. - * @member {grafeas.v1.CVSSv3.Impact} confidentialityImpact - * @memberof grafeas.v1.CVSSv3 - * @instance + * Properties of a DSSEAttestationNote. + * @memberof grafeas.v1 + * @interface IDSSEAttestationNote + * @property {grafeas.v1.DSSEAttestationNote.IDSSEHint|null} [hint] DSSEAttestationNote hint */ - CVSSv3.prototype.confidentialityImpact = 0; /** - * CVSSv3 integrityImpact. - * @member {grafeas.v1.CVSSv3.Impact} integrityImpact - * @memberof grafeas.v1.CVSSv3 - * @instance + * Constructs a new DSSEAttestationNote. + * @memberof grafeas.v1 + * @classdesc Represents a DSSEAttestationNote. + * @implements IDSSEAttestationNote + * @constructor + * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set */ - CVSSv3.prototype.integrityImpact = 0; + function DSSEAttestationNote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * CVSSv3 availabilityImpact. - * @member {grafeas.v1.CVSSv3.Impact} availabilityImpact - * @memberof grafeas.v1.CVSSv3 + * DSSEAttestationNote hint. + * @member {grafeas.v1.DSSEAttestationNote.IDSSEHint|null|undefined} hint + * @memberof grafeas.v1.DSSEAttestationNote * @instance */ - CVSSv3.prototype.availabilityImpact = 0; + DSSEAttestationNote.prototype.hint = null; /** - * Creates a new CVSSv3 instance using the specified properties. + * Creates a new DSSEAttestationNote instance using the specified properties. * @function create - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set - * @returns {grafeas.v1.CVSSv3} CVSSv3 instance + * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set + * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote instance */ - CVSSv3.create = function create(properties) { - return new CVSSv3(properties); + DSSEAttestationNote.create = function create(properties) { + return new DSSEAttestationNote(properties); }; /** - * Encodes the specified CVSSv3 message. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. + * Encodes the specified DSSEAttestationNote message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.ICVSSv3} message CVSSv3 message or plain object to encode + * @param {grafeas.v1.IDSSEAttestationNote} message DSSEAttestationNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CVSSv3.encode = function encode(message, writer) { + DSSEAttestationNote.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); - if (message.exploitabilityScore != null && Object.hasOwnProperty.call(message, "exploitabilityScore")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.exploitabilityScore); - if (message.impactScore != null && Object.hasOwnProperty.call(message, "impactScore")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.impactScore); - if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); - if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); - if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); - if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); - if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); - if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); - if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); + if (message.hint != null && Object.hasOwnProperty.call(message, "hint")) + $root.grafeas.v1.DSSEAttestationNote.DSSEHint.encode(message.hint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. + * Encodes the specified DSSEAttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.ICVSSv3} message CVSSv3 message or plain object to encode + * @param {grafeas.v1.IDSSEAttestationNote} message DSSEAttestationNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { + DSSEAttestationNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CVSSv3 message from the specified reader or buffer. + * Decodes a DSSEAttestationNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.DSSEAttestationNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.CVSSv3} CVSSv3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CVSSv3.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.CVSSv3(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseScore = reader.float(); - break; - case 2: - message.exploitabilityScore = reader.float(); - break; - case 3: - message.impactScore = reader.float(); - break; - case 5: - message.attackVector = reader.int32(); - break; - case 6: - message.attackComplexity = reader.int32(); - break; - case 7: - message.privilegesRequired = reader.int32(); - break; - case 8: - message.userInteraction = reader.int32(); - break; - case 9: - message.scope = reader.int32(); - break; - case 10: - message.confidentialityImpact = reader.int32(); - break; - case 11: - message.integrityImpact = reader.int32(); - break; - case 12: - message.availabilityImpact = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.CVSSv3 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.CVSSv3} CVSSv3 + * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CVSSv3.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CVSSv3 message. - * @function verify - * @memberof grafeas.v1.CVSSv3 - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CVSSv3.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - if (typeof message.baseScore !== "number") - return "baseScore: number expected"; - if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) - if (typeof message.exploitabilityScore !== "number") - return "exploitabilityScore: number expected"; - if (message.impactScore != null && message.hasOwnProperty("impactScore")) - if (typeof message.impactScore !== "number") - return "impactScore: number expected"; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - switch (message.attackVector) { - default: - return "attackVector: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - switch (message.attackComplexity) { - default: - return "attackComplexity: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - switch (message.privilegesRequired) { - default: - return "privilegesRequired: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - switch (message.userInteraction) { - default: - return "userInteraction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - switch (message.confidentialityImpact) { - default: - return "confidentialityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - switch (message.integrityImpact) { - default: - return "integrityImpact: enum value expected"; - case 0: + DSSEAttestationNote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DSSEAttestationNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - case 2: - case 3: + message.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.decode(reader, reader.uint32()); break; - } - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - switch (message.availabilityImpact) { default: - return "availabilityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: + reader.skipType(tag & 7); break; } - return null; + } + return message; }; /** - * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.CVSSv3 + * Decodes a DSSEAttestationNote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.CVSSv3} CVSSv3 + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CVSSv3.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.CVSSv3) - return object; - var message = new $root.grafeas.v1.CVSSv3(); - if (object.baseScore != null) - message.baseScore = Number(object.baseScore); - if (object.exploitabilityScore != null) - message.exploitabilityScore = Number(object.exploitabilityScore); - if (object.impactScore != null) - message.impactScore = Number(object.impactScore); - switch (object.attackVector) { - case "ATTACK_VECTOR_UNSPECIFIED": - case 0: - message.attackVector = 0; - break; - case "ATTACK_VECTOR_NETWORK": - case 1: - message.attackVector = 1; - break; - case "ATTACK_VECTOR_ADJACENT": - case 2: - message.attackVector = 2; - break; - case "ATTACK_VECTOR_LOCAL": - case 3: - message.attackVector = 3; - break; - case "ATTACK_VECTOR_PHYSICAL": - case 4: - message.attackVector = 4; - break; - } - switch (object.attackComplexity) { - case "ATTACK_COMPLEXITY_UNSPECIFIED": - case 0: - message.attackComplexity = 0; - break; - case "ATTACK_COMPLEXITY_LOW": - case 1: - message.attackComplexity = 1; - break; - case "ATTACK_COMPLEXITY_HIGH": - case 2: - message.attackComplexity = 2; - break; - } - switch (object.privilegesRequired) { - case "PRIVILEGES_REQUIRED_UNSPECIFIED": - case 0: - message.privilegesRequired = 0; - break; - case "PRIVILEGES_REQUIRED_NONE": - case 1: - message.privilegesRequired = 1; - break; - case "PRIVILEGES_REQUIRED_LOW": - case 2: - message.privilegesRequired = 2; - break; - case "PRIVILEGES_REQUIRED_HIGH": - case 3: - message.privilegesRequired = 3; - break; - } - switch (object.userInteraction) { - case "USER_INTERACTION_UNSPECIFIED": - case 0: - message.userInteraction = 0; - break; - case "USER_INTERACTION_NONE": - case 1: - message.userInteraction = 1; - break; - case "USER_INTERACTION_REQUIRED": - case 2: - message.userInteraction = 2; - break; - } - switch (object.scope) { - case "SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "SCOPE_UNCHANGED": - case 1: - message.scope = 1; - break; - case "SCOPE_CHANGED": - case 2: - message.scope = 2; - break; - } - switch (object.confidentialityImpact) { - case "IMPACT_UNSPECIFIED": - case 0: - message.confidentialityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.confidentialityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.confidentialityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.confidentialityImpact = 3; - break; - } - switch (object.integrityImpact) { - case "IMPACT_UNSPECIFIED": - case 0: - message.integrityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.integrityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.integrityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.integrityImpact = 3; - break; - } - switch (object.availabilityImpact) { - case "IMPACT_UNSPECIFIED": - case 0: - message.availabilityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.availabilityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.availabilityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.availabilityImpact = 3; - break; - } - return message; + DSSEAttestationNote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.CVSSv3 + * Verifies a DSSEAttestationNote message. + * @function verify + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.CVSSv3} message CVSSv3 - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CVSSv3.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.baseScore = 0; - object.exploitabilityScore = 0; - object.impactScore = 0; - object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; - object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; - object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; - object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; - object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; - object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + DSSEAttestationNote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hint != null && message.hasOwnProperty("hint")) { + var error = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.verify(message.hint); + if (error) + return "hint." + error; } - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; - if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) - object.exploitabilityScore = options.json && !isFinite(message.exploitabilityScore) ? String(message.exploitabilityScore) : message.exploitabilityScore; - if (message.impactScore != null && message.hasOwnProperty("impactScore")) - object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - object.attackVector = options.enums === String ? $root.grafeas.v1.CVSSv3.AttackVector[message.attackVector] : message.attackVector; - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - object.attackComplexity = options.enums === String ? $root.grafeas.v1.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - object.privilegesRequired = options.enums === String ? $root.grafeas.v1.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - object.userInteraction = options.enums === String ? $root.grafeas.v1.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.grafeas.v1.CVSSv3.Scope[message.scope] : message.scope; - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - object.confidentialityImpact = options.enums === String ? $root.grafeas.v1.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - object.integrityImpact = options.enums === String ? $root.grafeas.v1.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - object.availabilityImpact = options.enums === String ? $root.grafeas.v1.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; + return null; + }; + + /** + * Creates a DSSEAttestationNote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.DSSEAttestationNote + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote + */ + DSSEAttestationNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DSSEAttestationNote) + return object; + var message = new $root.grafeas.v1.DSSEAttestationNote(); + if (object.hint != null) { + if (typeof object.hint !== "object") + throw TypeError(".grafeas.v1.DSSEAttestationNote.hint: object expected"); + message.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.fromObject(object.hint); + } + return message; + }; + + /** + * Creates a plain object from a DSSEAttestationNote message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.DSSEAttestationNote + * @static + * @param {grafeas.v1.DSSEAttestationNote} message DSSEAttestationNote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DSSEAttestationNote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.hint = null; + if (message.hint != null && message.hasOwnProperty("hint")) + object.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.toObject(message.hint, options); return object; }; /** - * Converts this CVSSv3 to JSON. + * Converts this DSSEAttestationNote to JSON. * @function toJSON - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.DSSEAttestationNote * @instance * @returns {Object.} JSON object */ - CVSSv3.prototype.toJSON = function toJSON() { + DSSEAttestationNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * AttackVector enum. - * @name grafeas.v1.CVSSv3.AttackVector - * @enum {number} - * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value - * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value - * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value - * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value - * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value - */ - CVSSv3.AttackVector = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; - values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; - values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; - values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; - return values; - })(); + DSSEAttestationNote.DSSEHint = (function() { - /** - * AttackComplexity enum. - * @name grafeas.v1.CVSSv3.AttackComplexity - * @enum {number} - * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value - * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value - * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value - */ - CVSSv3.AttackComplexity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; - values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; - return values; - })(); + /** + * Properties of a DSSEHint. + * @memberof grafeas.v1.DSSEAttestationNote + * @interface IDSSEHint + * @property {string|null} [humanReadableName] DSSEHint humanReadableName + */ - /** - * PrivilegesRequired enum. - * @name grafeas.v1.CVSSv3.PrivilegesRequired - * @enum {number} - * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value - * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value - * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value - * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value - */ - CVSSv3.PrivilegesRequired = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; - values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; - values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; - return values; - })(); + /** + * Constructs a new DSSEHint. + * @memberof grafeas.v1.DSSEAttestationNote + * @classdesc Represents a DSSEHint. + * @implements IDSSEHint + * @constructor + * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint=} [properties] Properties to set + */ + function DSSEHint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * UserInteraction enum. - * @name grafeas.v1.CVSSv3.UserInteraction - * @enum {number} - * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value - * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value - * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value - */ - CVSSv3.UserInteraction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; - values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; - return values; - })(); + /** + * DSSEHint humanReadableName. + * @member {string} humanReadableName + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @instance + */ + DSSEHint.prototype.humanReadableName = ""; + + /** + * Creates a new DSSEHint instance using the specified properties. + * @function create + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint=} [properties] Properties to set + * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint instance + */ + DSSEHint.create = function create(properties) { + return new DSSEHint(properties); + }; + + /** + * Encodes the specified DSSEHint message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint} message DSSEHint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DSSEHint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.humanReadableName != null && Object.hasOwnProperty.call(message, "humanReadableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.humanReadableName); + return writer; + }; + + /** + * Encodes the specified DSSEHint message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint} message DSSEHint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DSSEHint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DSSEHint message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DSSEHint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DSSEAttestationNote.DSSEHint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.humanReadableName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DSSEHint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DSSEHint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DSSEHint message. + * @function verify + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DSSEHint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.humanReadableName != null && message.hasOwnProperty("humanReadableName")) + if (!$util.isString(message.humanReadableName)) + return "humanReadableName: string expected"; + return null; + }; + + /** + * Creates a DSSEHint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint + */ + DSSEHint.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DSSEAttestationNote.DSSEHint) + return object; + var message = new $root.grafeas.v1.DSSEAttestationNote.DSSEHint(); + if (object.humanReadableName != null) + message.humanReadableName = String(object.humanReadableName); + return message; + }; + + /** + * Creates a plain object from a DSSEHint message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @static + * @param {grafeas.v1.DSSEAttestationNote.DSSEHint} message DSSEHint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DSSEHint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.humanReadableName = ""; + if (message.humanReadableName != null && message.hasOwnProperty("humanReadableName")) + object.humanReadableName = message.humanReadableName; + return object; + }; - /** - * Scope enum. - * @name grafeas.v1.CVSSv3.Scope - * @enum {number} - * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value - * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value - * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value - */ - CVSSv3.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; - values[valuesById[2] = "SCOPE_CHANGED"] = 2; - return values; - })(); + /** + * Converts this DSSEHint to JSON. + * @function toJSON + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @instance + * @returns {Object.} JSON object + */ + DSSEHint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Impact enum. - * @name grafeas.v1.CVSSv3.Impact - * @enum {number} - * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value - * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value - * @property {number} IMPACT_LOW=2 IMPACT_LOW value - * @property {number} IMPACT_NONE=3 IMPACT_NONE value - */ - CVSSv3.Impact = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMPACT_HIGH"] = 1; - values[valuesById[2] = "IMPACT_LOW"] = 2; - values[valuesById[3] = "IMPACT_NONE"] = 3; - return values; + return DSSEHint; })(); - return CVSSv3; - })(); - - /** - * Architecture enum. - * @name grafeas.v1.Architecture - * @enum {number} - * @property {number} ARCHITECTURE_UNSPECIFIED=0 ARCHITECTURE_UNSPECIFIED value - * @property {number} X86=1 X86 value - * @property {number} X64=2 X64 value - */ - v1.Architecture = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ARCHITECTURE_UNSPECIFIED"] = 0; - values[valuesById[1] = "X86"] = 1; - values[valuesById[2] = "X64"] = 2; - return values; + return DSSEAttestationNote; })(); - v1.Distribution = (function() { + v1.DSSEAttestationOccurrence = (function() { /** - * Properties of a Distribution. + * Properties of a DSSEAttestationOccurrence. * @memberof grafeas.v1 - * @interface IDistribution - * @property {string|null} [cpeUri] Distribution cpeUri - * @property {grafeas.v1.Architecture|null} [architecture] Distribution architecture - * @property {grafeas.v1.IVersion|null} [latestVersion] Distribution latestVersion - * @property {string|null} [maintainer] Distribution maintainer - * @property {string|null} [url] Distribution url - * @property {string|null} [description] Distribution description + * @interface IDSSEAttestationOccurrence + * @property {grafeas.v1.IEnvelope|null} [envelope] DSSEAttestationOccurrence envelope + * @property {grafeas.v1.IInTotoStatement|null} [statement] DSSEAttestationOccurrence statement */ /** - * Constructs a new Distribution. + * Constructs a new DSSEAttestationOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a Distribution. - * @implements IDistribution + * @classdesc Represents a DSSEAttestationOccurrence. + * @implements IDSSEAttestationOccurrence * @constructor - * @param {grafeas.v1.IDistribution=} [properties] Properties to set + * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set */ - function Distribution(properties) { + function DSSEAttestationOccurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14014,140 +13844,102 @@ } /** - * Distribution cpeUri. - * @member {string} cpeUri - * @memberof grafeas.v1.Distribution - * @instance - */ - Distribution.prototype.cpeUri = ""; - - /** - * Distribution architecture. - * @member {grafeas.v1.Architecture} architecture - * @memberof grafeas.v1.Distribution - * @instance - */ - Distribution.prototype.architecture = 0; - - /** - * Distribution latestVersion. - * @member {grafeas.v1.IVersion|null|undefined} latestVersion - * @memberof grafeas.v1.Distribution + * DSSEAttestationOccurrence envelope. + * @member {grafeas.v1.IEnvelope|null|undefined} envelope + * @memberof grafeas.v1.DSSEAttestationOccurrence * @instance */ - Distribution.prototype.latestVersion = null; + DSSEAttestationOccurrence.prototype.envelope = null; /** - * Distribution maintainer. - * @member {string} maintainer - * @memberof grafeas.v1.Distribution + * DSSEAttestationOccurrence statement. + * @member {grafeas.v1.IInTotoStatement|null|undefined} statement + * @memberof grafeas.v1.DSSEAttestationOccurrence * @instance */ - Distribution.prototype.maintainer = ""; + DSSEAttestationOccurrence.prototype.statement = null; - /** - * Distribution url. - * @member {string} url - * @memberof grafeas.v1.Distribution - * @instance - */ - Distribution.prototype.url = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Distribution description. - * @member {string} description - * @memberof grafeas.v1.Distribution + * DSSEAttestationOccurrence decodedPayload. + * @member {"statement"|undefined} decodedPayload + * @memberof grafeas.v1.DSSEAttestationOccurrence * @instance */ - Distribution.prototype.description = ""; + Object.defineProperty(DSSEAttestationOccurrence.prototype, "decodedPayload", { + get: $util.oneOfGetter($oneOfFields = ["statement"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Distribution instance using the specified properties. + * Creates a new DSSEAttestationOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.IDistribution=} [properties] Properties to set - * @returns {grafeas.v1.Distribution} Distribution instance + * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence instance */ - Distribution.create = function create(properties) { - return new Distribution(properties); + DSSEAttestationOccurrence.create = function create(properties) { + return new DSSEAttestationOccurrence(properties); }; /** - * Encodes the specified Distribution message. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. + * Encodes the specified DSSEAttestationOccurrence message. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.IDistribution} message Distribution message or plain object to encode + * @param {grafeas.v1.IDSSEAttestationOccurrence} message DSSEAttestationOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encode = function encode(message, writer) { + DSSEAttestationOccurrence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); - if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.architecture); - if (message.latestVersion != null && Object.hasOwnProperty.call(message, "latestVersion")) - $root.grafeas.v1.Version.encode(message.latestVersion, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.maintainer != null && Object.hasOwnProperty.call(message, "maintainer")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.maintainer); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.url); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.envelope != null && Object.hasOwnProperty.call(message, "envelope")) + $root.grafeas.v1.Envelope.encode(message.envelope, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.statement != null && Object.hasOwnProperty.call(message, "statement")) + $root.grafeas.v1.InTotoStatement.encode(message.statement, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. + * Encodes the specified DSSEAttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.IDistribution} message Distribution message or plain object to encode + * @param {grafeas.v1.IDSSEAttestationOccurrence} message DSSEAttestationOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { + DSSEAttestationOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Distribution} Distribution + * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decode = function decode(reader, length) { + DSSEAttestationOccurrence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Distribution(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DSSEAttestationOccurrence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cpeUri = reader.string(); + message.envelope = $root.grafeas.v1.Envelope.decode(reader, reader.uint32()); break; case 2: - message.architecture = reader.int32(); - break; - case 3: - message.latestVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 4: - message.maintainer = reader.string(); - break; - case 5: - message.url = reader.string(); - break; - case 6: - message.description = reader.string(); + message.statement = $root.grafeas.v1.InTotoStatement.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14158,641 +13950,645 @@ }; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Distribution} Distribution + * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decodeDelimited = function decodeDelimited(reader) { + DSSEAttestationOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Distribution message. + * Verifies a DSSEAttestationOccurrence message. * @function verify - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Distribution.verify = function verify(message) { + DSSEAttestationOccurrence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - if (!$util.isString(message.cpeUri)) - return "cpeUri: string expected"; - if (message.architecture != null && message.hasOwnProperty("architecture")) - switch (message.architecture) { - default: - return "architecture: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.latestVersion != null && message.hasOwnProperty("latestVersion")) { - var error = $root.grafeas.v1.Version.verify(message.latestVersion); + var properties = {}; + if (message.envelope != null && message.hasOwnProperty("envelope")) { + var error = $root.grafeas.v1.Envelope.verify(message.envelope); if (error) - return "latestVersion." + error; + return "envelope." + error; + } + if (message.statement != null && message.hasOwnProperty("statement")) { + properties.decodedPayload = 1; + { + var error = $root.grafeas.v1.InTotoStatement.verify(message.statement); + if (error) + return "statement." + error; + } } - if (message.maintainer != null && message.hasOwnProperty("maintainer")) - if (!$util.isString(message.maintainer)) - return "maintainer: string expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; return null; }; /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a DSSEAttestationOccurrence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Distribution} Distribution + * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Distribution) + DSSEAttestationOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DSSEAttestationOccurrence) return object; - var message = new $root.grafeas.v1.Distribution(); - if (object.cpeUri != null) - message.cpeUri = String(object.cpeUri); - switch (object.architecture) { - case "ARCHITECTURE_UNSPECIFIED": - case 0: - message.architecture = 0; - break; - case "X86": - case 1: - message.architecture = 1; - break; - case "X64": - case 2: - message.architecture = 2; - break; + var message = new $root.grafeas.v1.DSSEAttestationOccurrence(); + if (object.envelope != null) { + if (typeof object.envelope !== "object") + throw TypeError(".grafeas.v1.DSSEAttestationOccurrence.envelope: object expected"); + message.envelope = $root.grafeas.v1.Envelope.fromObject(object.envelope); } - if (object.latestVersion != null) { - if (typeof object.latestVersion !== "object") - throw TypeError(".grafeas.v1.Distribution.latestVersion: object expected"); - message.latestVersion = $root.grafeas.v1.Version.fromObject(object.latestVersion); + if (object.statement != null) { + if (typeof object.statement !== "object") + throw TypeError(".grafeas.v1.DSSEAttestationOccurrence.statement: object expected"); + message.statement = $root.grafeas.v1.InTotoStatement.fromObject(object.statement); } - if (object.maintainer != null) - message.maintainer = String(object.maintainer); - if (object.url != null) - message.url = String(object.url); - if (object.description != null) - message.description = String(object.description); return message; }; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * Creates a plain object from a DSSEAttestationOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.Distribution} message Distribution + * @param {grafeas.v1.DSSEAttestationOccurrence} message DSSEAttestationOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Distribution.toObject = function toObject(message, options) { + DSSEAttestationOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.cpeUri = ""; - object.architecture = options.enums === String ? "ARCHITECTURE_UNSPECIFIED" : 0; - object.latestVersion = null; - object.maintainer = ""; - object.url = ""; - object.description = ""; + if (options.defaults) + object.envelope = null; + if (message.envelope != null && message.hasOwnProperty("envelope")) + object.envelope = $root.grafeas.v1.Envelope.toObject(message.envelope, options); + if (message.statement != null && message.hasOwnProperty("statement")) { + object.statement = $root.grafeas.v1.InTotoStatement.toObject(message.statement, options); + if (options.oneofs) + object.decodedPayload = "statement"; } - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - object.cpeUri = message.cpeUri; - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = options.enums === String ? $root.grafeas.v1.Architecture[message.architecture] : message.architecture; - if (message.latestVersion != null && message.hasOwnProperty("latestVersion")) - object.latestVersion = $root.grafeas.v1.Version.toObject(message.latestVersion, options); - if (message.maintainer != null && message.hasOwnProperty("maintainer")) - object.maintainer = message.maintainer; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; return object; }; /** - * Converts this Distribution to JSON. - * @function toJSON - * @memberof grafeas.v1.Distribution + * Converts this DSSEAttestationOccurrence to JSON. + * @function toJSON + * @memberof grafeas.v1.DSSEAttestationOccurrence + * @instance + * @returns {Object.} JSON object + */ + DSSEAttestationOccurrence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DSSEAttestationOccurrence; + })(); + + v1.Grafeas = (function() { + + /** + * Constructs a new Grafeas service. + * @memberof grafeas.v1 + * @classdesc Represents a Grafeas + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Grafeas(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Grafeas.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Grafeas; + + /** + * Creates new Grafeas service using the specified rpc implementation. + * @function create + * @memberof grafeas.v1.Grafeas + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Grafeas} RPC service. Useful where requests and/or responses are streamed. + */ + Grafeas.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link grafeas.v1.Grafeas#getOccurrence}. + * @memberof grafeas.v1.Grafeas + * @typedef GetOccurrenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.Occurrence} [response] Occurrence + */ + + /** + * Calls GetOccurrence. + * @function getOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetOccurrenceRequest} request GetOccurrenceRequest message or plain object + * @param {grafeas.v1.Grafeas.GetOccurrenceCallback} callback Node-style callback called with the error, if any, and Occurrence + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Grafeas.prototype.getOccurrence = function getOccurrence(request, callback) { + return this.rpcCall(getOccurrence, $root.grafeas.v1.GetOccurrenceRequest, $root.grafeas.v1.Occurrence, request, callback); + }, "name", { value: "GetOccurrence" }); + + /** + * Calls GetOccurrence. + * @function getOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetOccurrenceRequest} request GetOccurrenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link grafeas.v1.Grafeas#listOccurrences}. + * @memberof grafeas.v1.Grafeas + * @typedef ListOccurrencesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.ListOccurrencesResponse} [response] ListOccurrencesResponse + */ + + /** + * Calls ListOccurrences. + * @function listOccurrences + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IListOccurrencesRequest} request ListOccurrencesRequest message or plain object + * @param {grafeas.v1.Grafeas.ListOccurrencesCallback} callback Node-style callback called with the error, if any, and ListOccurrencesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Grafeas.prototype.listOccurrences = function listOccurrences(request, callback) { + return this.rpcCall(listOccurrences, $root.grafeas.v1.ListOccurrencesRequest, $root.grafeas.v1.ListOccurrencesResponse, request, callback); + }, "name", { value: "ListOccurrences" }); + + /** + * Calls ListOccurrences. + * @function listOccurrences + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IListOccurrencesRequest} request ListOccurrencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link grafeas.v1.Grafeas#deleteOccurrence}. + * @memberof grafeas.v1.Grafeas + * @typedef DeleteOccurrenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOccurrence. + * @function deleteOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IDeleteOccurrenceRequest} request DeleteOccurrenceRequest message or plain object + * @param {grafeas.v1.Grafeas.DeleteOccurrenceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Grafeas.prototype.deleteOccurrence = function deleteOccurrence(request, callback) { + return this.rpcCall(deleteOccurrence, $root.grafeas.v1.DeleteOccurrenceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOccurrence" }); + + /** + * Calls DeleteOccurrence. + * @function deleteOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IDeleteOccurrenceRequest} request DeleteOccurrenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link grafeas.v1.Grafeas#createOccurrence}. + * @memberof grafeas.v1.Grafeas + * @typedef CreateOccurrenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.Occurrence} [response] Occurrence + */ + + /** + * Calls CreateOccurrence. + * @function createOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.ICreateOccurrenceRequest} request CreateOccurrenceRequest message or plain object + * @param {grafeas.v1.Grafeas.CreateOccurrenceCallback} callback Node-style callback called with the error, if any, and Occurrence + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Grafeas.prototype.createOccurrence = function createOccurrence(request, callback) { + return this.rpcCall(createOccurrence, $root.grafeas.v1.CreateOccurrenceRequest, $root.grafeas.v1.Occurrence, request, callback); + }, "name", { value: "CreateOccurrence" }); + + /** + * Calls CreateOccurrence. + * @function createOccurrence + * @memberof grafeas.v1.Grafeas * @instance - * @returns {Object.} JSON object + * @param {grafeas.v1.ICreateOccurrenceRequest} request CreateOccurrenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Distribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Distribution; - })(); - - v1.Location = (function() { /** - * Properties of a Location. - * @memberof grafeas.v1 - * @interface ILocation - * @property {string|null} [cpeUri] Location cpeUri - * @property {grafeas.v1.IVersion|null} [version] Location version - * @property {string|null} [path] Location path + * Callback as used by {@link grafeas.v1.Grafeas#batchCreateOccurrences}. + * @memberof grafeas.v1.Grafeas + * @typedef BatchCreateOccurrencesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.BatchCreateOccurrencesResponse} [response] BatchCreateOccurrencesResponse */ /** - * Constructs a new Location. - * @memberof grafeas.v1 - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {grafeas.v1.ILocation=} [properties] Properties to set + * Calls BatchCreateOccurrences. + * @function batchCreateOccurrences + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IBatchCreateOccurrencesRequest} request BatchCreateOccurrencesRequest message or plain object + * @param {grafeas.v1.Grafeas.BatchCreateOccurrencesCallback} callback Node-style callback called with the error, if any, and BatchCreateOccurrencesResponse + * @returns {undefined} + * @variation 1 */ - function Location(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(Grafeas.prototype.batchCreateOccurrences = function batchCreateOccurrences(request, callback) { + return this.rpcCall(batchCreateOccurrences, $root.grafeas.v1.BatchCreateOccurrencesRequest, $root.grafeas.v1.BatchCreateOccurrencesResponse, request, callback); + }, "name", { value: "BatchCreateOccurrences" }); /** - * Location cpeUri. - * @member {string} cpeUri - * @memberof grafeas.v1.Location + * Calls BatchCreateOccurrences. + * @function batchCreateOccurrences + * @memberof grafeas.v1.Grafeas * @instance + * @param {grafeas.v1.IBatchCreateOccurrencesRequest} request BatchCreateOccurrencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Location.prototype.cpeUri = ""; /** - * Location version. - * @member {grafeas.v1.IVersion|null|undefined} version - * @memberof grafeas.v1.Location + * Callback as used by {@link grafeas.v1.Grafeas#updateOccurrence}. + * @memberof grafeas.v1.Grafeas + * @typedef UpdateOccurrenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.Occurrence} [response] Occurrence + */ + + /** + * Calls UpdateOccurrence. + * @function updateOccurrence + * @memberof grafeas.v1.Grafeas * @instance + * @param {grafeas.v1.IUpdateOccurrenceRequest} request UpdateOccurrenceRequest message or plain object + * @param {grafeas.v1.Grafeas.UpdateOccurrenceCallback} callback Node-style callback called with the error, if any, and Occurrence + * @returns {undefined} + * @variation 1 */ - Location.prototype.version = null; + Object.defineProperty(Grafeas.prototype.updateOccurrence = function updateOccurrence(request, callback) { + return this.rpcCall(updateOccurrence, $root.grafeas.v1.UpdateOccurrenceRequest, $root.grafeas.v1.Occurrence, request, callback); + }, "name", { value: "UpdateOccurrence" }); /** - * Location path. - * @member {string} path - * @memberof grafeas.v1.Location + * Calls UpdateOccurrence. + * @function updateOccurrence + * @memberof grafeas.v1.Grafeas * @instance + * @param {grafeas.v1.IUpdateOccurrenceRequest} request UpdateOccurrenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Location.prototype.path = ""; /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof grafeas.v1.Location - * @static - * @param {grafeas.v1.ILocation=} [properties] Properties to set - * @returns {grafeas.v1.Location} Location instance + * Callback as used by {@link grafeas.v1.Grafeas#getOccurrenceNote}. + * @memberof grafeas.v1.Grafeas + * @typedef GetOccurrenceNoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.Note} [response] Note */ - Location.create = function create(properties) { - return new Location(properties); - }; /** - * Encodes the specified Location message. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.Location - * @static - * @param {grafeas.v1.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetOccurrenceNote. + * @function getOccurrenceNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetOccurrenceNoteRequest} request GetOccurrenceNoteRequest message or plain object + * @param {grafeas.v1.Grafeas.GetOccurrenceNoteCallback} callback Node-style callback called with the error, if any, and Note + * @returns {undefined} + * @variation 1 */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.grafeas.v1.Version.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); - return writer; - }; + Object.defineProperty(Grafeas.prototype.getOccurrenceNote = function getOccurrenceNote(request, callback) { + return this.rpcCall(getOccurrenceNote, $root.grafeas.v1.GetOccurrenceNoteRequest, $root.grafeas.v1.Note, request, callback); + }, "name", { value: "GetOccurrenceNote" }); /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.Location - * @static - * @param {grafeas.v1.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetOccurrenceNote. + * @function getOccurrenceNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetOccurrenceNoteRequest} request GetOccurrenceNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link grafeas.v1.Grafeas#getNote}. + * @memberof grafeas.v1.Grafeas + * @typedef GetNoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.Note} [response] Note */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cpeUri = reader.string(); - break; - case 2: - message.version = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 3: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetNote. + * @function getNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetNoteRequest} request GetNoteRequest message or plain object + * @param {grafeas.v1.Grafeas.GetNoteCallback} callback Node-style callback called with the error, if any, and Note + * @returns {undefined} + * @variation 1 */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Grafeas.prototype.getNote = function getNote(request, callback) { + return this.rpcCall(getNote, $root.grafeas.v1.GetNoteRequest, $root.grafeas.v1.Note, request, callback); + }, "name", { value: "GetNote" }); /** - * Verifies a Location message. - * @function verify - * @memberof grafeas.v1.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetNote. + * @function getNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetNoteRequest} request GetNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - if (!$util.isString(message.cpeUri)) - return "cpeUri: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.grafeas.v1.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.Location - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.Location} Location + * Callback as used by {@link grafeas.v1.Grafeas#listNotes}. + * @memberof grafeas.v1.Grafeas + * @typedef ListNotesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.ListNotesResponse} [response] ListNotesResponse */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Location) - return object; - var message = new $root.grafeas.v1.Location(); - if (object.cpeUri != null) - message.cpeUri = String(object.cpeUri); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".grafeas.v1.Location.version: object expected"); - message.version = $root.grafeas.v1.Version.fromObject(object.version); - } - if (object.path != null) - message.path = String(object.path); - return message; - }; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.Location - * @static - * @param {grafeas.v1.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListNotes. + * @function listNotes + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IListNotesRequest} request ListNotesRequest message or plain object + * @param {grafeas.v1.Grafeas.ListNotesCallback} callback Node-style callback called with the error, if any, and ListNotesResponse + * @returns {undefined} + * @variation 1 */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpeUri = ""; - object.version = null; - object.path = ""; - } - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - object.cpeUri = message.cpeUri; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.grafeas.v1.Version.toObject(message.version, options); - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; + Object.defineProperty(Grafeas.prototype.listNotes = function listNotes(request, callback) { + return this.rpcCall(listNotes, $root.grafeas.v1.ListNotesRequest, $root.grafeas.v1.ListNotesResponse, request, callback); + }, "name", { value: "ListNotes" }); /** - * Converts this Location to JSON. - * @function toJSON - * @memberof grafeas.v1.Location + * Calls ListNotes. + * @function listNotes + * @memberof grafeas.v1.Grafeas * @instance - * @returns {Object.} JSON object + * @param {grafeas.v1.IListNotesRequest} request ListNotesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return Location; - })(); + /** + * Callback as used by {@link grafeas.v1.Grafeas#deleteNote}. + * @memberof grafeas.v1.Grafeas + * @typedef DeleteNoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - v1.PackageNote = (function() { + /** + * Calls DeleteNote. + * @function deleteNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IDeleteNoteRequest} request DeleteNoteRequest message or plain object + * @param {grafeas.v1.Grafeas.DeleteNoteCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Grafeas.prototype.deleteNote = function deleteNote(request, callback) { + return this.rpcCall(deleteNote, $root.grafeas.v1.DeleteNoteRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteNote" }); /** - * Properties of a PackageNote. - * @memberof grafeas.v1 - * @interface IPackageNote - * @property {string|null} [name] PackageNote name - * @property {Array.|null} [distribution] PackageNote distribution + * Calls DeleteNote. + * @function deleteNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IDeleteNoteRequest} request DeleteNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new PackageNote. - * @memberof grafeas.v1 - * @classdesc Represents a PackageNote. - * @implements IPackageNote - * @constructor - * @param {grafeas.v1.IPackageNote=} [properties] Properties to set + * Callback as used by {@link grafeas.v1.Grafeas#createNote}. + * @memberof grafeas.v1.Grafeas + * @typedef CreateNoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.Note} [response] Note */ - function PackageNote(properties) { - this.distribution = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * PackageNote name. - * @member {string} name - * @memberof grafeas.v1.PackageNote + * Calls CreateNote. + * @function createNote + * @memberof grafeas.v1.Grafeas * @instance + * @param {grafeas.v1.ICreateNoteRequest} request CreateNoteRequest message or plain object + * @param {grafeas.v1.Grafeas.CreateNoteCallback} callback Node-style callback called with the error, if any, and Note + * @returns {undefined} + * @variation 1 */ - PackageNote.prototype.name = ""; + Object.defineProperty(Grafeas.prototype.createNote = function createNote(request, callback) { + return this.rpcCall(createNote, $root.grafeas.v1.CreateNoteRequest, $root.grafeas.v1.Note, request, callback); + }, "name", { value: "CreateNote" }); /** - * PackageNote distribution. - * @member {Array.} distribution - * @memberof grafeas.v1.PackageNote + * Calls CreateNote. + * @function createNote + * @memberof grafeas.v1.Grafeas * @instance + * @param {grafeas.v1.ICreateNoteRequest} request CreateNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PackageNote.prototype.distribution = $util.emptyArray; /** - * Creates a new PackageNote instance using the specified properties. - * @function create - * @memberof grafeas.v1.PackageNote - * @static - * @param {grafeas.v1.IPackageNote=} [properties] Properties to set - * @returns {grafeas.v1.PackageNote} PackageNote instance + * Callback as used by {@link grafeas.v1.Grafeas#batchCreateNotes}. + * @memberof grafeas.v1.Grafeas + * @typedef BatchCreateNotesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.BatchCreateNotesResponse} [response] BatchCreateNotesResponse */ - PackageNote.create = function create(properties) { - return new PackageNote(properties); - }; /** - * Encodes the specified PackageNote message. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.PackageNote - * @static - * @param {grafeas.v1.IPackageNote} message PackageNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls BatchCreateNotes. + * @function batchCreateNotes + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IBatchCreateNotesRequest} request BatchCreateNotesRequest message or plain object + * @param {grafeas.v1.Grafeas.BatchCreateNotesCallback} callback Node-style callback called with the error, if any, and BatchCreateNotesResponse + * @returns {undefined} + * @variation 1 */ - PackageNote.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.distribution != null && message.distribution.length) - for (var i = 0; i < message.distribution.length; ++i) - $root.grafeas.v1.Distribution.encode(message.distribution[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + Object.defineProperty(Grafeas.prototype.batchCreateNotes = function batchCreateNotes(request, callback) { + return this.rpcCall(batchCreateNotes, $root.grafeas.v1.BatchCreateNotesRequest, $root.grafeas.v1.BatchCreateNotesResponse, request, callback); + }, "name", { value: "BatchCreateNotes" }); /** - * Encodes the specified PackageNote message, length delimited. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.PackageNote - * @static - * @param {grafeas.v1.IPackageNote} message PackageNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls BatchCreateNotes. + * @function batchCreateNotes + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IBatchCreateNotesRequest} request BatchCreateNotesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PackageNote.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a PackageNote message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.PackageNote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.PackageNote} PackageNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link grafeas.v1.Grafeas#updateNote}. + * @memberof grafeas.v1.Grafeas + * @typedef UpdateNoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.Note} [response] Note */ - PackageNote.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.PackageNote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 10: - if (!(message.distribution && message.distribution.length)) - message.distribution = []; - message.distribution.push($root.grafeas.v1.Distribution.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a PackageNote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.PackageNote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.PackageNote} PackageNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateNote. + * @function updateNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IUpdateNoteRequest} request UpdateNoteRequest message or plain object + * @param {grafeas.v1.Grafeas.UpdateNoteCallback} callback Node-style callback called with the error, if any, and Note + * @returns {undefined} + * @variation 1 */ - PackageNote.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Grafeas.prototype.updateNote = function updateNote(request, callback) { + return this.rpcCall(updateNote, $root.grafeas.v1.UpdateNoteRequest, $root.grafeas.v1.Note, request, callback); + }, "name", { value: "UpdateNote" }); /** - * Verifies a PackageNote message. - * @function verify - * @memberof grafeas.v1.PackageNote - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateNote. + * @function updateNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IUpdateNoteRequest} request UpdateNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PackageNote.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.distribution != null && message.hasOwnProperty("distribution")) { - if (!Array.isArray(message.distribution)) - return "distribution: array expected"; - for (var i = 0; i < message.distribution.length; ++i) { - var error = $root.grafeas.v1.Distribution.verify(message.distribution[i]); - if (error) - return "distribution." + error; - } - } - return null; - }; /** - * Creates a PackageNote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.PackageNote - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.PackageNote} PackageNote + * Callback as used by {@link grafeas.v1.Grafeas#listNoteOccurrences}. + * @memberof grafeas.v1.Grafeas + * @typedef ListNoteOccurrencesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {grafeas.v1.ListNoteOccurrencesResponse} [response] ListNoteOccurrencesResponse */ - PackageNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.PackageNote) - return object; - var message = new $root.grafeas.v1.PackageNote(); - if (object.name != null) - message.name = String(object.name); - if (object.distribution) { - if (!Array.isArray(object.distribution)) - throw TypeError(".grafeas.v1.PackageNote.distribution: array expected"); - message.distribution = []; - for (var i = 0; i < object.distribution.length; ++i) { - if (typeof object.distribution[i] !== "object") - throw TypeError(".grafeas.v1.PackageNote.distribution: object expected"); - message.distribution[i] = $root.grafeas.v1.Distribution.fromObject(object.distribution[i]); - } - } - return message; - }; /** - * Creates a plain object from a PackageNote message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.PackageNote - * @static - * @param {grafeas.v1.PackageNote} message PackageNote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListNoteOccurrences. + * @function listNoteOccurrences + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IListNoteOccurrencesRequest} request ListNoteOccurrencesRequest message or plain object + * @param {grafeas.v1.Grafeas.ListNoteOccurrencesCallback} callback Node-style callback called with the error, if any, and ListNoteOccurrencesResponse + * @returns {undefined} + * @variation 1 */ - PackageNote.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.distribution = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.distribution && message.distribution.length) { - object.distribution = []; - for (var j = 0; j < message.distribution.length; ++j) - object.distribution[j] = $root.grafeas.v1.Distribution.toObject(message.distribution[j], options); - } - return object; - }; + Object.defineProperty(Grafeas.prototype.listNoteOccurrences = function listNoteOccurrences(request, callback) { + return this.rpcCall(listNoteOccurrences, $root.grafeas.v1.ListNoteOccurrencesRequest, $root.grafeas.v1.ListNoteOccurrencesResponse, request, callback); + }, "name", { value: "ListNoteOccurrences" }); /** - * Converts this PackageNote to JSON. - * @function toJSON - * @memberof grafeas.v1.PackageNote + * Calls ListNoteOccurrences. + * @function listNoteOccurrences + * @memberof grafeas.v1.Grafeas * @instance - * @returns {Object.} JSON object + * @param {grafeas.v1.IListNoteOccurrencesRequest} request ListNoteOccurrencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PackageNote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return PackageNote; + return Grafeas; })(); - v1.PackageOccurrence = (function() { + v1.Occurrence = (function() { /** - * Properties of a PackageOccurrence. + * Properties of an Occurrence. * @memberof grafeas.v1 - * @interface IPackageOccurrence - * @property {string|null} [name] PackageOccurrence name - * @property {Array.|null} [location] PackageOccurrence location + * @interface IOccurrence + * @property {string|null} [name] Occurrence name + * @property {string|null} [resourceUri] Occurrence resourceUri + * @property {string|null} [noteName] Occurrence noteName + * @property {grafeas.v1.NoteKind|null} [kind] Occurrence kind + * @property {string|null} [remediation] Occurrence remediation + * @property {google.protobuf.ITimestamp|null} [createTime] Occurrence createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Occurrence updateTime + * @property {grafeas.v1.IVulnerabilityOccurrence|null} [vulnerability] Occurrence vulnerability + * @property {grafeas.v1.IBuildOccurrence|null} [build] Occurrence build + * @property {grafeas.v1.IImageOccurrence|null} [image] Occurrence image + * @property {grafeas.v1.IPackageOccurrence|null} ["package"] Occurrence package + * @property {grafeas.v1.IDeploymentOccurrence|null} [deployment] Occurrence deployment + * @property {grafeas.v1.IDiscoveryOccurrence|null} [discovery] Occurrence discovery + * @property {grafeas.v1.IAttestationOccurrence|null} [attestation] Occurrence attestation + * @property {grafeas.v1.IUpgradeOccurrence|null} [upgrade] Occurrence upgrade + * @property {grafeas.v1.IComplianceOccurrence|null} [compliance] Occurrence compliance + * @property {grafeas.v1.IDSSEAttestationOccurrence|null} [dsseAttestation] Occurrence dsseAttestation + * @property {grafeas.v1.IEnvelope|null} [envelope] Occurrence envelope */ /** - * Constructs a new PackageOccurrence. + * Constructs a new Occurrence. * @memberof grafeas.v1 - * @classdesc Represents a PackageOccurrence. - * @implements IPackageOccurrence + * @classdesc Represents an Occurrence. + * @implements IOccurrence * @constructor - * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IOccurrence=} [properties] Properties to set */ - function PackageOccurrence(properties) { - this.location = []; + function Occurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14800,568 +14596,770 @@ } /** - * PackageOccurrence name. + * Occurrence name. * @member {string} name - * @memberof grafeas.v1.PackageOccurrence + * @memberof grafeas.v1.Occurrence * @instance */ - PackageOccurrence.prototype.name = ""; + Occurrence.prototype.name = ""; /** - * PackageOccurrence location. - * @member {Array.} location - * @memberof grafeas.v1.PackageOccurrence + * Occurrence resourceUri. + * @member {string} resourceUri + * @memberof grafeas.v1.Occurrence * @instance */ - PackageOccurrence.prototype.location = $util.emptyArray; - - /** - * Creates a new PackageOccurrence instance using the specified properties. - * @function create - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence instance - */ - PackageOccurrence.create = function create(properties) { - return new PackageOccurrence(properties); - }; - - /** - * Encodes the specified PackageOccurrence message. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {grafeas.v1.IPackageOccurrence} message PackageOccurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PackageOccurrence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.grafeas.v1.Location.encode(message.location[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + Occurrence.prototype.resourceUri = ""; /** - * Encodes the specified PackageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {grafeas.v1.IPackageOccurrence} message PackageOccurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Occurrence noteName. + * @member {string} noteName + * @memberof grafeas.v1.Occurrence + * @instance */ - PackageOccurrence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Occurrence.prototype.noteName = ""; /** - * Decodes a PackageOccurrence message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PackageOccurrence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.PackageOccurrence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.grafeas.v1.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + * Occurrence kind. + * @member {grafeas.v1.NoteKind} kind + * @memberof grafeas.v1.Occurrence + * @instance + */ + Occurrence.prototype.kind = 0; /** - * Decodes a PackageOccurrence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Occurrence remediation. + * @member {string} remediation + * @memberof grafeas.v1.Occurrence + * @instance */ - PackageOccurrence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Occurrence.prototype.remediation = ""; /** - * Verifies a PackageOccurrence message. - * @function verify - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Occurrence createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof grafeas.v1.Occurrence + * @instance */ - PackageOccurrence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.grafeas.v1.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; + Occurrence.prototype.createTime = null; /** - * Creates a PackageOccurrence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence + * Occurrence updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof grafeas.v1.Occurrence + * @instance */ - PackageOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.PackageOccurrence) - return object; - var message = new $root.grafeas.v1.PackageOccurrence(); - if (object.name != null) - message.name = String(object.name); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".grafeas.v1.PackageOccurrence.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".grafeas.v1.PackageOccurrence.location: object expected"); - message.location[i] = $root.grafeas.v1.Location.fromObject(object.location[i]); - } - } - return message; - }; + Occurrence.prototype.updateTime = null; /** - * Creates a plain object from a PackageOccurrence message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.PackageOccurrence - * @static - * @param {grafeas.v1.PackageOccurrence} message PackageOccurrence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Occurrence vulnerability. + * @member {grafeas.v1.IVulnerabilityOccurrence|null|undefined} vulnerability + * @memberof grafeas.v1.Occurrence + * @instance */ - PackageOccurrence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.grafeas.v1.Location.toObject(message.location[j], options); - } - return object; - }; + Occurrence.prototype.vulnerability = null; /** - * Converts this PackageOccurrence to JSON. - * @function toJSON - * @memberof grafeas.v1.PackageOccurrence + * Occurrence build. + * @member {grafeas.v1.IBuildOccurrence|null|undefined} build + * @memberof grafeas.v1.Occurrence * @instance - * @returns {Object.} JSON object */ - PackageOccurrence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Occurrence.prototype.build = null; - return PackageOccurrence; - })(); + /** + * Occurrence image. + * @member {grafeas.v1.IImageOccurrence|null|undefined} image + * @memberof grafeas.v1.Occurrence + * @instance + */ + Occurrence.prototype.image = null; - v1.Version = (function() { + /** + * Occurrence package. + * @member {grafeas.v1.IPackageOccurrence|null|undefined} package + * @memberof grafeas.v1.Occurrence + * @instance + */ + Occurrence.prototype["package"] = null; /** - * Properties of a Version. - * @memberof grafeas.v1 - * @interface IVersion - * @property {number|null} [epoch] Version epoch - * @property {string|null} [name] Version name - * @property {string|null} [revision] Version revision - * @property {boolean|null} [inclusive] Version inclusive - * @property {grafeas.v1.Version.VersionKind|null} [kind] Version kind - * @property {string|null} [fullName] Version fullName + * Occurrence deployment. + * @member {grafeas.v1.IDeploymentOccurrence|null|undefined} deployment + * @memberof grafeas.v1.Occurrence + * @instance */ + Occurrence.prototype.deployment = null; /** - * Constructs a new Version. - * @memberof grafeas.v1 - * @classdesc Represents a Version. - * @implements IVersion - * @constructor - * @param {grafeas.v1.IVersion=} [properties] Properties to set + * Occurrence discovery. + * @member {grafeas.v1.IDiscoveryOccurrence|null|undefined} discovery + * @memberof grafeas.v1.Occurrence + * @instance */ - function Version(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Occurrence.prototype.discovery = null; /** - * Version epoch. - * @member {number} epoch - * @memberof grafeas.v1.Version + * Occurrence attestation. + * @member {grafeas.v1.IAttestationOccurrence|null|undefined} attestation + * @memberof grafeas.v1.Occurrence * @instance */ - Version.prototype.epoch = 0; + Occurrence.prototype.attestation = null; /** - * Version name. - * @member {string} name - * @memberof grafeas.v1.Version + * Occurrence upgrade. + * @member {grafeas.v1.IUpgradeOccurrence|null|undefined} upgrade + * @memberof grafeas.v1.Occurrence * @instance */ - Version.prototype.name = ""; + Occurrence.prototype.upgrade = null; /** - * Version revision. - * @member {string} revision - * @memberof grafeas.v1.Version + * Occurrence compliance. + * @member {grafeas.v1.IComplianceOccurrence|null|undefined} compliance + * @memberof grafeas.v1.Occurrence * @instance */ - Version.prototype.revision = ""; + Occurrence.prototype.compliance = null; /** - * Version inclusive. - * @member {boolean} inclusive - * @memberof grafeas.v1.Version + * Occurrence dsseAttestation. + * @member {grafeas.v1.IDSSEAttestationOccurrence|null|undefined} dsseAttestation + * @memberof grafeas.v1.Occurrence * @instance */ - Version.prototype.inclusive = false; + Occurrence.prototype.dsseAttestation = null; /** - * Version kind. - * @member {grafeas.v1.Version.VersionKind} kind - * @memberof grafeas.v1.Version + * Occurrence envelope. + * @member {grafeas.v1.IEnvelope|null|undefined} envelope + * @memberof grafeas.v1.Occurrence * @instance */ - Version.prototype.kind = 0; + Occurrence.prototype.envelope = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Version fullName. - * @member {string} fullName - * @memberof grafeas.v1.Version + * Occurrence details. + * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} details + * @memberof grafeas.v1.Occurrence * @instance */ - Version.prototype.fullName = ""; + Object.defineProperty(Occurrence.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["vulnerability", "build", "image", "package", "deployment", "discovery", "attestation", "upgrade", "compliance", "dsseAttestation"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Version instance using the specified properties. + * Creates a new Occurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.Occurrence * @static - * @param {grafeas.v1.IVersion=} [properties] Properties to set - * @returns {grafeas.v1.Version} Version instance + * @param {grafeas.v1.IOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.Occurrence} Occurrence instance */ - Version.create = function create(properties) { - return new Version(properties); + Occurrence.create = function create(properties) { + return new Occurrence(properties); }; /** - * Encodes the specified Version message. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. + * Encodes the specified Occurrence message. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.Occurrence * @static - * @param {grafeas.v1.IVersion} message Version message or plain object to encode + * @param {grafeas.v1.IOccurrence} message Occurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encode = function encode(message, writer) { + Occurrence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.epoch != null && Object.hasOwnProperty.call(message, "epoch")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.epoch); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.revision); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.noteName != null && Object.hasOwnProperty.call(message, "noteName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.noteName); if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.kind); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.fullName); - if (message.inclusive != null && Object.hasOwnProperty.call(message, "inclusive")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.inclusive); + if (message.remediation != null && Object.hasOwnProperty.call(message, "remediation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.remediation); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) + $root.grafeas.v1.VulnerabilityOccurrence.encode(message.vulnerability, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + $root.grafeas.v1.BuildOccurrence.encode(message.build, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.grafeas.v1.ImageOccurrence.encode(message.image, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + $root.grafeas.v1.PackageOccurrence.encode(message["package"], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) + $root.grafeas.v1.DeploymentOccurrence.encode(message.deployment, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.discovery != null && Object.hasOwnProperty.call(message, "discovery")) + $root.grafeas.v1.DiscoveryOccurrence.encode(message.discovery, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) + $root.grafeas.v1.AttestationOccurrence.encode(message.attestation, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.upgrade != null && Object.hasOwnProperty.call(message, "upgrade")) + $root.grafeas.v1.UpgradeOccurrence.encode(message.upgrade, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.compliance != null && Object.hasOwnProperty.call(message, "compliance")) + $root.grafeas.v1.ComplianceOccurrence.encode(message.compliance, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.dsseAttestation != null && Object.hasOwnProperty.call(message, "dsseAttestation")) + $root.grafeas.v1.DSSEAttestationOccurrence.encode(message.dsseAttestation, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.envelope != null && Object.hasOwnProperty.call(message, "envelope")) + $root.grafeas.v1.Envelope.encode(message.envelope, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. + * Encodes the specified Occurrence message, length delimited. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.Occurrence * @static - * @param {grafeas.v1.IVersion} message Version message or plain object to encode + * @param {grafeas.v1.IOccurrence} message Occurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encodeDelimited = function encodeDelimited(message, writer) { + Occurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Version message from the specified reader or buffer. + * Decodes an Occurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.Occurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Version} Version + * @returns {grafeas.v1.Occurrence} Occurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Version.decode = function decode(reader, length) { + Occurrence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Version(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Occurrence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.epoch = reader.int32(); + message.name = reader.string(); break; case 2: - message.name = reader.string(); + message.resourceUri = reader.string(); break; case 3: - message.revision = reader.string(); - break; - case 6: - message.inclusive = reader.bool(); + message.noteName = reader.string(); break; case 4: message.kind = reader.int32(); break; case 5: - message.fullName = reader.string(); + message.remediation = reader.string(); + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.vulnerability = $root.grafeas.v1.VulnerabilityOccurrence.decode(reader, reader.uint32()); + break; + case 9: + message.build = $root.grafeas.v1.BuildOccurrence.decode(reader, reader.uint32()); + break; + case 10: + message.image = $root.grafeas.v1.ImageOccurrence.decode(reader, reader.uint32()); + break; + case 11: + message["package"] = $root.grafeas.v1.PackageOccurrence.decode(reader, reader.uint32()); + break; + case 12: + message.deployment = $root.grafeas.v1.DeploymentOccurrence.decode(reader, reader.uint32()); + break; + case 13: + message.discovery = $root.grafeas.v1.DiscoveryOccurrence.decode(reader, reader.uint32()); + break; + case 14: + message.attestation = $root.grafeas.v1.AttestationOccurrence.decode(reader, reader.uint32()); + break; + case 15: + message.upgrade = $root.grafeas.v1.UpgradeOccurrence.decode(reader, reader.uint32()); + break; + case 16: + message.compliance = $root.grafeas.v1.ComplianceOccurrence.decode(reader, reader.uint32()); + break; + case 17: + message.dsseAttestation = $root.grafeas.v1.DSSEAttestationOccurrence.decode(reader, reader.uint32()); + break; + case 18: + message.envelope = $root.grafeas.v1.Envelope.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } - return message; - }; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Version} Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Version.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Version message. - * @function verify - * @memberof grafeas.v1.Version - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Version.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.epoch != null && message.hasOwnProperty("epoch")) - if (!$util.isInteger(message.epoch)) - return "epoch: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.revision != null && message.hasOwnProperty("revision")) - if (!$util.isString(message.revision)) - return "revision: string expected"; - if (message.inclusive != null && message.hasOwnProperty("inclusive")) - if (typeof message.inclusive !== "boolean") - return "inclusive: boolean expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; + return message; + }; + + /** + * Decodes an Occurrence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.Occurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.Occurrence} Occurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Occurrence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Occurrence message. + * @function verify + * @memberof grafeas.v1.Occurrence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Occurrence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.noteName != null && message.hasOwnProperty("noteName")) + if (!$util.isString(message.noteName)) + return "noteName: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.remediation != null && message.hasOwnProperty("remediation")) + if (!$util.isString(message.remediation)) + return "remediation: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { + properties.details = 1; + { + var error = $root.grafeas.v1.VulnerabilityOccurrence.verify(message.vulnerability); + if (error) + return "vulnerability." + error; + } + } + if (message.build != null && message.hasOwnProperty("build")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.BuildOccurrence.verify(message.build); + if (error) + return "build." + error; + } + } + if (message.image != null && message.hasOwnProperty("image")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.ImageOccurrence.verify(message.image); + if (error) + return "image." + error; + } + } + if (message["package"] != null && message.hasOwnProperty("package")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.PackageOccurrence.verify(message["package"]); + if (error) + return "package." + error; + } + } + if (message.deployment != null && message.hasOwnProperty("deployment")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.DeploymentOccurrence.verify(message.deployment); + if (error) + return "deployment." + error; + } + } + if (message.discovery != null && message.hasOwnProperty("discovery")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.DiscoveryOccurrence.verify(message.discovery); + if (error) + return "discovery." + error; + } + } + if (message.attestation != null && message.hasOwnProperty("attestation")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.AttestationOccurrence.verify(message.attestation); + if (error) + return "attestation." + error; + } + } + if (message.upgrade != null && message.hasOwnProperty("upgrade")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.UpgradeOccurrence.verify(message.upgrade); + if (error) + return "upgrade." + error; + } + } + if (message.compliance != null && message.hasOwnProperty("compliance")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.ComplianceOccurrence.verify(message.compliance); + if (error) + return "compliance." + error; + } + } + if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.grafeas.v1.DSSEAttestationOccurrence.verify(message.dsseAttestation); + if (error) + return "dsseAttestation." + error; + } + } + if (message.envelope != null && message.hasOwnProperty("envelope")) { + var error = $root.grafeas.v1.Envelope.verify(message.envelope); + if (error) + return "envelope." + error; + } return null; }; /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. + * Creates an Occurrence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.Occurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Version} Version + * @returns {grafeas.v1.Occurrence} Occurrence */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Version) + Occurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Occurrence) return object; - var message = new $root.grafeas.v1.Version(); - if (object.epoch != null) - message.epoch = object.epoch | 0; + var message = new $root.grafeas.v1.Occurrence(); if (object.name != null) message.name = String(object.name); - if (object.revision != null) - message.revision = String(object.revision); - if (object.inclusive != null) - message.inclusive = Boolean(object.inclusive); + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.noteName != null) + message.noteName = String(object.noteName); switch (object.kind) { - case "VERSION_KIND_UNSPECIFIED": + case "NOTE_KIND_UNSPECIFIED": case 0: message.kind = 0; break; - case "NORMAL": + case "VULNERABILITY": case 1: message.kind = 1; break; - case "MINIMUM": + case "BUILD": case 2: message.kind = 2; break; - case "MAXIMUM": + case "IMAGE": case 3: message.kind = 3; break; + case "PACKAGE": + case 4: + message.kind = 4; + break; + case "DEPLOYMENT": + case 5: + message.kind = 5; + break; + case "DISCOVERY": + case 6: + message.kind = 6; + break; + case "ATTESTATION": + case 7: + message.kind = 7; + break; + case "UPGRADE": + case 8: + message.kind = 8; + break; + case "COMPLIANCE": + case 9: + message.kind = 9; + break; + case "DSSE_ATTESTATION": + case 10: + message.kind = 10; + break; + } + if (object.remediation != null) + message.remediation = String(object.remediation); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".grafeas.v1.Occurrence.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".grafeas.v1.Occurrence.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.vulnerability != null) { + if (typeof object.vulnerability !== "object") + throw TypeError(".grafeas.v1.Occurrence.vulnerability: object expected"); + message.vulnerability = $root.grafeas.v1.VulnerabilityOccurrence.fromObject(object.vulnerability); + } + if (object.build != null) { + if (typeof object.build !== "object") + throw TypeError(".grafeas.v1.Occurrence.build: object expected"); + message.build = $root.grafeas.v1.BuildOccurrence.fromObject(object.build); + } + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".grafeas.v1.Occurrence.image: object expected"); + message.image = $root.grafeas.v1.ImageOccurrence.fromObject(object.image); + } + if (object["package"] != null) { + if (typeof object["package"] !== "object") + throw TypeError(".grafeas.v1.Occurrence.package: object expected"); + message["package"] = $root.grafeas.v1.PackageOccurrence.fromObject(object["package"]); + } + if (object.deployment != null) { + if (typeof object.deployment !== "object") + throw TypeError(".grafeas.v1.Occurrence.deployment: object expected"); + message.deployment = $root.grafeas.v1.DeploymentOccurrence.fromObject(object.deployment); + } + if (object.discovery != null) { + if (typeof object.discovery !== "object") + throw TypeError(".grafeas.v1.Occurrence.discovery: object expected"); + message.discovery = $root.grafeas.v1.DiscoveryOccurrence.fromObject(object.discovery); + } + if (object.attestation != null) { + if (typeof object.attestation !== "object") + throw TypeError(".grafeas.v1.Occurrence.attestation: object expected"); + message.attestation = $root.grafeas.v1.AttestationOccurrence.fromObject(object.attestation); + } + if (object.upgrade != null) { + if (typeof object.upgrade !== "object") + throw TypeError(".grafeas.v1.Occurrence.upgrade: object expected"); + message.upgrade = $root.grafeas.v1.UpgradeOccurrence.fromObject(object.upgrade); + } + if (object.compliance != null) { + if (typeof object.compliance !== "object") + throw TypeError(".grafeas.v1.Occurrence.compliance: object expected"); + message.compliance = $root.grafeas.v1.ComplianceOccurrence.fromObject(object.compliance); + } + if (object.dsseAttestation != null) { + if (typeof object.dsseAttestation !== "object") + throw TypeError(".grafeas.v1.Occurrence.dsseAttestation: object expected"); + message.dsseAttestation = $root.grafeas.v1.DSSEAttestationOccurrence.fromObject(object.dsseAttestation); + } + if (object.envelope != null) { + if (typeof object.envelope !== "object") + throw TypeError(".grafeas.v1.Occurrence.envelope: object expected"); + message.envelope = $root.grafeas.v1.Envelope.fromObject(object.envelope); + } + return message; + }; + + /** + * Creates a plain object from an Occurrence message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.Occurrence + * @static + * @param {grafeas.v1.Occurrence} message Occurrence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Occurrence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.resourceUri = ""; + object.noteName = ""; + object.kind = options.enums === String ? "NOTE_KIND_UNSPECIFIED" : 0; + object.remediation = ""; + object.createTime = null; + object.updateTime = null; + object.envelope = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.noteName != null && message.hasOwnProperty("noteName")) + object.noteName = message.noteName; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.grafeas.v1.NoteKind[message.kind] : message.kind; + if (message.remediation != null && message.hasOwnProperty("remediation")) + object.remediation = message.remediation; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { + object.vulnerability = $root.grafeas.v1.VulnerabilityOccurrence.toObject(message.vulnerability, options); + if (options.oneofs) + object.details = "vulnerability"; + } + if (message.build != null && message.hasOwnProperty("build")) { + object.build = $root.grafeas.v1.BuildOccurrence.toObject(message.build, options); + if (options.oneofs) + object.details = "build"; + } + if (message.image != null && message.hasOwnProperty("image")) { + object.image = $root.grafeas.v1.ImageOccurrence.toObject(message.image, options); + if (options.oneofs) + object.details = "image"; + } + if (message["package"] != null && message.hasOwnProperty("package")) { + object["package"] = $root.grafeas.v1.PackageOccurrence.toObject(message["package"], options); + if (options.oneofs) + object.details = "package"; + } + if (message.deployment != null && message.hasOwnProperty("deployment")) { + object.deployment = $root.grafeas.v1.DeploymentOccurrence.toObject(message.deployment, options); + if (options.oneofs) + object.details = "deployment"; } - if (object.fullName != null) - message.fullName = String(object.fullName); - return message; - }; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.Version - * @static - * @param {grafeas.v1.Version} message Version - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Version.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.epoch = 0; - object.name = ""; - object.revision = ""; - object.kind = options.enums === String ? "VERSION_KIND_UNSPECIFIED" : 0; - object.fullName = ""; - object.inclusive = false; + if (message.discovery != null && message.hasOwnProperty("discovery")) { + object.discovery = $root.grafeas.v1.DiscoveryOccurrence.toObject(message.discovery, options); + if (options.oneofs) + object.details = "discovery"; } - if (message.epoch != null && message.hasOwnProperty("epoch")) - object.epoch = message.epoch; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.revision != null && message.hasOwnProperty("revision")) - object.revision = message.revision; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.grafeas.v1.Version.VersionKind[message.kind] : message.kind; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.inclusive != null && message.hasOwnProperty("inclusive")) - object.inclusive = message.inclusive; + if (message.attestation != null && message.hasOwnProperty("attestation")) { + object.attestation = $root.grafeas.v1.AttestationOccurrence.toObject(message.attestation, options); + if (options.oneofs) + object.details = "attestation"; + } + if (message.upgrade != null && message.hasOwnProperty("upgrade")) { + object.upgrade = $root.grafeas.v1.UpgradeOccurrence.toObject(message.upgrade, options); + if (options.oneofs) + object.details = "upgrade"; + } + if (message.compliance != null && message.hasOwnProperty("compliance")) { + object.compliance = $root.grafeas.v1.ComplianceOccurrence.toObject(message.compliance, options); + if (options.oneofs) + object.details = "compliance"; + } + if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { + object.dsseAttestation = $root.grafeas.v1.DSSEAttestationOccurrence.toObject(message.dsseAttestation, options); + if (options.oneofs) + object.details = "dsseAttestation"; + } + if (message.envelope != null && message.hasOwnProperty("envelope")) + object.envelope = $root.grafeas.v1.Envelope.toObject(message.envelope, options); return object; }; /** - * Converts this Version to JSON. + * Converts this Occurrence to JSON. * @function toJSON - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.Occurrence * @instance * @returns {Object.} JSON object */ - Version.prototype.toJSON = function toJSON() { + Occurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VersionKind enum. - * @name grafeas.v1.Version.VersionKind - * @enum {number} - * @property {number} VERSION_KIND_UNSPECIFIED=0 VERSION_KIND_UNSPECIFIED value - * @property {number} NORMAL=1 NORMAL value - * @property {number} MINIMUM=2 MINIMUM value - * @property {number} MAXIMUM=3 MAXIMUM value - */ - Version.VersionKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "NORMAL"] = 1; - values[valuesById[2] = "MINIMUM"] = 2; - values[valuesById[3] = "MAXIMUM"] = 3; - return values; - })(); - - return Version; + return Occurrence; })(); - v1.DeploymentNote = (function() { + v1.Note = (function() { /** - * Properties of a DeploymentNote. + * Properties of a Note. * @memberof grafeas.v1 - * @interface IDeploymentNote - * @property {Array.|null} [resourceUri] DeploymentNote resourceUri + * @interface INote + * @property {string|null} [name] Note name + * @property {string|null} [shortDescription] Note shortDescription + * @property {string|null} [longDescription] Note longDescription + * @property {grafeas.v1.NoteKind|null} [kind] Note kind + * @property {Array.|null} [relatedUrl] Note relatedUrl + * @property {google.protobuf.ITimestamp|null} [expirationTime] Note expirationTime + * @property {google.protobuf.ITimestamp|null} [createTime] Note createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Note updateTime + * @property {Array.|null} [relatedNoteNames] Note relatedNoteNames + * @property {grafeas.v1.IVulnerabilityNote|null} [vulnerability] Note vulnerability + * @property {grafeas.v1.IBuildNote|null} [build] Note build + * @property {grafeas.v1.IImageNote|null} [image] Note image + * @property {grafeas.v1.IPackageNote|null} ["package"] Note package + * @property {grafeas.v1.IDeploymentNote|null} [deployment] Note deployment + * @property {grafeas.v1.IDiscoveryNote|null} [discovery] Note discovery + * @property {grafeas.v1.IAttestationNote|null} [attestation] Note attestation + * @property {grafeas.v1.IUpgradeNote|null} [upgrade] Note upgrade + * @property {grafeas.v1.IComplianceNote|null} [compliance] Note compliance + * @property {grafeas.v1.IDSSEAttestationNote|null} [dsseAttestation] Note dsseAttestation */ /** - * Constructs a new DeploymentNote. + * Constructs a new Note. * @memberof grafeas.v1 - * @classdesc Represents a DeploymentNote. - * @implements IDeploymentNote + * @classdesc Represents a Note. + * @implements INote * @constructor - * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set + * @param {grafeas.v1.INote=} [properties] Properties to set */ - function DeploymentNote(properties) { - this.resourceUri = []; + function Note(properties) { + this.relatedUrl = []; + this.relatedNoteNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15369,365 +15367,329 @@ } /** - * DeploymentNote resourceUri. - * @member {Array.} resourceUri - * @memberof grafeas.v1.DeploymentNote + * Note name. + * @member {string} name + * @memberof grafeas.v1.Note * @instance */ - DeploymentNote.prototype.resourceUri = $util.emptyArray; - - /** - * Creates a new DeploymentNote instance using the specified properties. - * @function create - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set - * @returns {grafeas.v1.DeploymentNote} DeploymentNote instance - */ - DeploymentNote.create = function create(properties) { - return new DeploymentNote(properties); - }; + Note.prototype.name = ""; /** - * Encodes the specified DeploymentNote message. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {grafeas.v1.IDeploymentNote} message DeploymentNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Note shortDescription. + * @member {string} shortDescription + * @memberof grafeas.v1.Note + * @instance */ - DeploymentNote.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceUri != null && message.resourceUri.length) - for (var i = 0; i < message.resourceUri.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceUri[i]); - return writer; - }; + Note.prototype.shortDescription = ""; /** - * Encodes the specified DeploymentNote message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {grafeas.v1.IDeploymentNote} message DeploymentNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Note longDescription. + * @member {string} longDescription + * @memberof grafeas.v1.Note + * @instance */ - DeploymentNote.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Note.prototype.longDescription = ""; /** - * Decodes a DeploymentNote message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DeploymentNote} DeploymentNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Note kind. + * @member {grafeas.v1.NoteKind} kind + * @memberof grafeas.v1.Note + * @instance */ - DeploymentNote.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeploymentNote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.resourceUri && message.resourceUri.length)) - message.resourceUri = []; - message.resourceUri.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Note.prototype.kind = 0; /** - * Decodes a DeploymentNote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeploymentNote} DeploymentNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Note relatedUrl. + * @member {Array.} relatedUrl + * @memberof grafeas.v1.Note + * @instance */ - DeploymentNote.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Note.prototype.relatedUrl = $util.emptyArray; /** - * Verifies a DeploymentNote message. - * @function verify - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeploymentNote.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) { - if (!Array.isArray(message.resourceUri)) - return "resourceUri: array expected"; - for (var i = 0; i < message.resourceUri.length; ++i) - if (!$util.isString(message.resourceUri[i])) - return "resourceUri: string[] expected"; - } - return null; - }; + * Note expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof grafeas.v1.Note + * @instance + */ + Note.prototype.expirationTime = null; /** - * Creates a DeploymentNote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.DeploymentNote} DeploymentNote + * Note createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof grafeas.v1.Note + * @instance */ - DeploymentNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeploymentNote) - return object; - var message = new $root.grafeas.v1.DeploymentNote(); - if (object.resourceUri) { - if (!Array.isArray(object.resourceUri)) - throw TypeError(".grafeas.v1.DeploymentNote.resourceUri: array expected"); - message.resourceUri = []; - for (var i = 0; i < object.resourceUri.length; ++i) - message.resourceUri[i] = String(object.resourceUri[i]); - } - return message; - }; + Note.prototype.createTime = null; /** - * Creates a plain object from a DeploymentNote message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.DeploymentNote - * @static - * @param {grafeas.v1.DeploymentNote} message DeploymentNote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Note updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof grafeas.v1.Note + * @instance */ - DeploymentNote.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceUri = []; - if (message.resourceUri && message.resourceUri.length) { - object.resourceUri = []; - for (var j = 0; j < message.resourceUri.length; ++j) - object.resourceUri[j] = message.resourceUri[j]; - } - return object; - }; + Note.prototype.updateTime = null; /** - * Converts this DeploymentNote to JSON. - * @function toJSON - * @memberof grafeas.v1.DeploymentNote + * Note relatedNoteNames. + * @member {Array.} relatedNoteNames + * @memberof grafeas.v1.Note * @instance - * @returns {Object.} JSON object */ - DeploymentNote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Note.prototype.relatedNoteNames = $util.emptyArray; - return DeploymentNote; - })(); + /** + * Note vulnerability. + * @member {grafeas.v1.IVulnerabilityNote|null|undefined} vulnerability + * @memberof grafeas.v1.Note + * @instance + */ + Note.prototype.vulnerability = null; - v1.DeploymentOccurrence = (function() { + /** + * Note build. + * @member {grafeas.v1.IBuildNote|null|undefined} build + * @memberof grafeas.v1.Note + * @instance + */ + Note.prototype.build = null; /** - * Properties of a DeploymentOccurrence. - * @memberof grafeas.v1 - * @interface IDeploymentOccurrence - * @property {string|null} [userEmail] DeploymentOccurrence userEmail - * @property {google.protobuf.ITimestamp|null} [deployTime] DeploymentOccurrence deployTime - * @property {google.protobuf.ITimestamp|null} [undeployTime] DeploymentOccurrence undeployTime - * @property {string|null} [config] DeploymentOccurrence config - * @property {string|null} [address] DeploymentOccurrence address - * @property {Array.|null} [resourceUri] DeploymentOccurrence resourceUri - * @property {grafeas.v1.DeploymentOccurrence.Platform|null} [platform] DeploymentOccurrence platform + * Note image. + * @member {grafeas.v1.IImageNote|null|undefined} image + * @memberof grafeas.v1.Note + * @instance */ + Note.prototype.image = null; /** - * Constructs a new DeploymentOccurrence. - * @memberof grafeas.v1 - * @classdesc Represents a DeploymentOccurrence. - * @implements IDeploymentOccurrence - * @constructor - * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set + * Note package. + * @member {grafeas.v1.IPackageNote|null|undefined} package + * @memberof grafeas.v1.Note + * @instance */ - function DeploymentOccurrence(properties) { - this.resourceUri = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Note.prototype["package"] = null; /** - * DeploymentOccurrence userEmail. - * @member {string} userEmail - * @memberof grafeas.v1.DeploymentOccurrence + * Note deployment. + * @member {grafeas.v1.IDeploymentNote|null|undefined} deployment + * @memberof grafeas.v1.Note * @instance */ - DeploymentOccurrence.prototype.userEmail = ""; + Note.prototype.deployment = null; /** - * DeploymentOccurrence deployTime. - * @member {google.protobuf.ITimestamp|null|undefined} deployTime - * @memberof grafeas.v1.DeploymentOccurrence + * Note discovery. + * @member {grafeas.v1.IDiscoveryNote|null|undefined} discovery + * @memberof grafeas.v1.Note * @instance */ - DeploymentOccurrence.prototype.deployTime = null; + Note.prototype.discovery = null; /** - * DeploymentOccurrence undeployTime. - * @member {google.protobuf.ITimestamp|null|undefined} undeployTime - * @memberof grafeas.v1.DeploymentOccurrence + * Note attestation. + * @member {grafeas.v1.IAttestationNote|null|undefined} attestation + * @memberof grafeas.v1.Note * @instance */ - DeploymentOccurrence.prototype.undeployTime = null; + Note.prototype.attestation = null; /** - * DeploymentOccurrence config. - * @member {string} config - * @memberof grafeas.v1.DeploymentOccurrence + * Note upgrade. + * @member {grafeas.v1.IUpgradeNote|null|undefined} upgrade + * @memberof grafeas.v1.Note * @instance */ - DeploymentOccurrence.prototype.config = ""; + Note.prototype.upgrade = null; /** - * DeploymentOccurrence address. - * @member {string} address - * @memberof grafeas.v1.DeploymentOccurrence + * Note compliance. + * @member {grafeas.v1.IComplianceNote|null|undefined} compliance + * @memberof grafeas.v1.Note * @instance */ - DeploymentOccurrence.prototype.address = ""; + Note.prototype.compliance = null; /** - * DeploymentOccurrence resourceUri. - * @member {Array.} resourceUri - * @memberof grafeas.v1.DeploymentOccurrence + * Note dsseAttestation. + * @member {grafeas.v1.IDSSEAttestationNote|null|undefined} dsseAttestation + * @memberof grafeas.v1.Note * @instance */ - DeploymentOccurrence.prototype.resourceUri = $util.emptyArray; + Note.prototype.dsseAttestation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DeploymentOccurrence platform. - * @member {grafeas.v1.DeploymentOccurrence.Platform} platform - * @memberof grafeas.v1.DeploymentOccurrence + * Note type. + * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} type + * @memberof grafeas.v1.Note * @instance */ - DeploymentOccurrence.prototype.platform = 0; + Object.defineProperty(Note.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["vulnerability", "build", "image", "package", "deployment", "discovery", "attestation", "upgrade", "compliance", "dsseAttestation"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DeploymentOccurrence instance using the specified properties. + * Creates a new Note instance using the specified properties. * @function create - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @static - * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence instance + * @param {grafeas.v1.INote=} [properties] Properties to set + * @returns {grafeas.v1.Note} Note instance */ - DeploymentOccurrence.create = function create(properties) { - return new DeploymentOccurrence(properties); + Note.create = function create(properties) { + return new Note(properties); }; /** - * Encodes the specified DeploymentOccurrence message. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * Encodes the specified Note message. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @static - * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode + * @param {grafeas.v1.INote} message Note message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentOccurrence.encode = function encode(message, writer) { + Note.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userEmail != null && Object.hasOwnProperty.call(message, "userEmail")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.userEmail); - if (message.deployTime != null && Object.hasOwnProperty.call(message, "deployTime")) - $root.google.protobuf.Timestamp.encode(message.deployTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.undeployTime != null && Object.hasOwnProperty.call(message, "undeployTime")) - $root.google.protobuf.Timestamp.encode(message.undeployTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.config); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.address); - if (message.resourceUri != null && message.resourceUri.length) - for (var i = 0; i < message.resourceUri.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.resourceUri[i]); - if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.platform); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.shortDescription != null && Object.hasOwnProperty.call(message, "shortDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shortDescription); + if (message.longDescription != null && Object.hasOwnProperty.call(message, "longDescription")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.longDescription); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.kind); + if (message.relatedUrl != null && message.relatedUrl.length) + for (var i = 0; i < message.relatedUrl.length; ++i) + $root.grafeas.v1.RelatedUrl.encode(message.relatedUrl[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.relatedNoteNames != null && message.relatedNoteNames.length) + for (var i = 0; i < message.relatedNoteNames.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.relatedNoteNames[i]); + if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) + $root.grafeas.v1.VulnerabilityNote.encode(message.vulnerability, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + $root.grafeas.v1.BuildNote.encode(message.build, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.grafeas.v1.ImageNote.encode(message.image, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + $root.grafeas.v1.PackageNote.encode(message["package"], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) + $root.grafeas.v1.DeploymentNote.encode(message.deployment, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.discovery != null && Object.hasOwnProperty.call(message, "discovery")) + $root.grafeas.v1.DiscoveryNote.encode(message.discovery, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) + $root.grafeas.v1.AttestationNote.encode(message.attestation, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.upgrade != null && Object.hasOwnProperty.call(message, "upgrade")) + $root.grafeas.v1.UpgradeNote.encode(message.upgrade, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.compliance != null && Object.hasOwnProperty.call(message, "compliance")) + $root.grafeas.v1.ComplianceNote.encode(message.compliance, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.dsseAttestation != null && Object.hasOwnProperty.call(message, "dsseAttestation")) + $root.grafeas.v1.DSSEAttestationNote.encode(message.dsseAttestation, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeploymentOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * Encodes the specified Note message, length delimited. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @static - * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode + * @param {grafeas.v1.INote} message Note message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + Note.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer. + * Decodes a Note message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + * @returns {grafeas.v1.Note} Note * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeploymentOccurrence.decode = function decode(reader, length) { + Note.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeploymentOccurrence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Note(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.userEmail = reader.string(); + message.name = reader.string(); break; case 2: - message.deployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.shortDescription = reader.string(); break; case 3: - message.undeployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.longDescription = reader.string(); break; case 4: - message.config = reader.string(); + message.kind = reader.int32(); break; case 5: - message.address = reader.string(); + if (!(message.relatedUrl && message.relatedUrl.length)) + message.relatedUrl = []; + message.relatedUrl.push($root.grafeas.v1.RelatedUrl.decode(reader, reader.uint32())); break; case 6: - if (!(message.resourceUri && message.resourceUri.length)) - message.resourceUri = []; - message.resourceUri.push(reader.string()); + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 7: - message.platform = reader.int32(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.relatedNoteNames && message.relatedNoteNames.length)) + message.relatedNoteNames = []; + message.relatedNoteNames.push(reader.string()); + break; + case 10: + message.vulnerability = $root.grafeas.v1.VulnerabilityNote.decode(reader, reader.uint32()); + break; + case 11: + message.build = $root.grafeas.v1.BuildNote.decode(reader, reader.uint32()); + break; + case 12: + message.image = $root.grafeas.v1.ImageNote.decode(reader, reader.uint32()); + break; + case 13: + message["package"] = $root.grafeas.v1.PackageNote.decode(reader, reader.uint32()); + break; + case 14: + message.deployment = $root.grafeas.v1.DeploymentNote.decode(reader, reader.uint32()); + break; + case 15: + message.discovery = $root.grafeas.v1.DiscoveryNote.decode(reader, reader.uint32()); + break; + case 16: + message.attestation = $root.grafeas.v1.AttestationNote.decode(reader, reader.uint32()); + break; + case 17: + message.upgrade = $root.grafeas.v1.UpgradeNote.decode(reader, reader.uint32()); + break; + case 18: + message.compliance = $root.grafeas.v1.ComplianceNote.decode(reader, reader.uint32()); + break; + case 19: + message.dsseAttestation = $root.grafeas.v1.DSSEAttestationNote.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15738,220 +15700,475 @@ }; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. + * Decodes a Note message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + * @returns {grafeas.v1.Note} Note * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeploymentOccurrence.decodeDelimited = function decodeDelimited(reader) { + Note.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeploymentOccurrence message. + * Verifies a Note message. * @function verify - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeploymentOccurrence.verify = function verify(message) { + Note.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userEmail != null && message.hasOwnProperty("userEmail")) - if (!$util.isString(message.userEmail)) - return "userEmail: string expected"; - if (message.deployTime != null && message.hasOwnProperty("deployTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deployTime); - if (error) - return "deployTime." + error; - } - if (message.undeployTime != null && message.hasOwnProperty("undeployTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.undeployTime); - if (error) - return "undeployTime." + error; - } - if (message.config != null && message.hasOwnProperty("config")) - if (!$util.isString(message.config)) - return "config: string expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) { - if (!Array.isArray(message.resourceUri)) - return "resourceUri: array expected"; - for (var i = 0; i < message.resourceUri.length; ++i) - if (!$util.isString(message.resourceUri[i])) - return "resourceUri: string[] expected"; - } - if (message.platform != null && message.hasOwnProperty("platform")) - switch (message.platform) { + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) + if (!$util.isString(message.shortDescription)) + return "shortDescription: string expected"; + if (message.longDescription != null && message.hasOwnProperty("longDescription")) + if (!$util.isString(message.longDescription)) + return "longDescription: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { default: - return "platform: enum value expected"; + return "kind: enum value expected"; case 0: case 1: case 2: case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: break; } + if (message.relatedUrl != null && message.hasOwnProperty("relatedUrl")) { + if (!Array.isArray(message.relatedUrl)) + return "relatedUrl: array expected"; + for (var i = 0; i < message.relatedUrl.length; ++i) { + var error = $root.grafeas.v1.RelatedUrl.verify(message.relatedUrl[i]); + if (error) + return "relatedUrl." + error; + } + } + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); + if (error) + return "expirationTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.relatedNoteNames != null && message.hasOwnProperty("relatedNoteNames")) { + if (!Array.isArray(message.relatedNoteNames)) + return "relatedNoteNames: array expected"; + for (var i = 0; i < message.relatedNoteNames.length; ++i) + if (!$util.isString(message.relatedNoteNames[i])) + return "relatedNoteNames: string[] expected"; + } + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { + properties.type = 1; + { + var error = $root.grafeas.v1.VulnerabilityNote.verify(message.vulnerability); + if (error) + return "vulnerability." + error; + } + } + if (message.build != null && message.hasOwnProperty("build")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.BuildNote.verify(message.build); + if (error) + return "build." + error; + } + } + if (message.image != null && message.hasOwnProperty("image")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.ImageNote.verify(message.image); + if (error) + return "image." + error; + } + } + if (message["package"] != null && message.hasOwnProperty("package")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.PackageNote.verify(message["package"]); + if (error) + return "package." + error; + } + } + if (message.deployment != null && message.hasOwnProperty("deployment")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.DeploymentNote.verify(message.deployment); + if (error) + return "deployment." + error; + } + } + if (message.discovery != null && message.hasOwnProperty("discovery")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.DiscoveryNote.verify(message.discovery); + if (error) + return "discovery." + error; + } + } + if (message.attestation != null && message.hasOwnProperty("attestation")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.AttestationNote.verify(message.attestation); + if (error) + return "attestation." + error; + } + } + if (message.upgrade != null && message.hasOwnProperty("upgrade")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.UpgradeNote.verify(message.upgrade); + if (error) + return "upgrade." + error; + } + } + if (message.compliance != null && message.hasOwnProperty("compliance")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.ComplianceNote.verify(message.compliance); + if (error) + return "compliance." + error; + } + } + if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.grafeas.v1.DSSEAttestationNote.verify(message.dsseAttestation); + if (error) + return "dsseAttestation." + error; + } + } return null; }; /** - * Creates a DeploymentOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a Note message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + * @returns {grafeas.v1.Note} Note */ - DeploymentOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeploymentOccurrence) + Note.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Note) return object; - var message = new $root.grafeas.v1.DeploymentOccurrence(); - if (object.userEmail != null) - message.userEmail = String(object.userEmail); - if (object.deployTime != null) { - if (typeof object.deployTime !== "object") - throw TypeError(".grafeas.v1.DeploymentOccurrence.deployTime: object expected"); - message.deployTime = $root.google.protobuf.Timestamp.fromObject(object.deployTime); - } - if (object.undeployTime != null) { - if (typeof object.undeployTime !== "object") - throw TypeError(".grafeas.v1.DeploymentOccurrence.undeployTime: object expected"); - message.undeployTime = $root.google.protobuf.Timestamp.fromObject(object.undeployTime); - } - if (object.config != null) - message.config = String(object.config); - if (object.address != null) - message.address = String(object.address); - if (object.resourceUri) { - if (!Array.isArray(object.resourceUri)) - throw TypeError(".grafeas.v1.DeploymentOccurrence.resourceUri: array expected"); - message.resourceUri = []; - for (var i = 0; i < object.resourceUri.length; ++i) - message.resourceUri[i] = String(object.resourceUri[i]); - } - switch (object.platform) { - case "PLATFORM_UNSPECIFIED": + var message = new $root.grafeas.v1.Note(); + if (object.name != null) + message.name = String(object.name); + if (object.shortDescription != null) + message.shortDescription = String(object.shortDescription); + if (object.longDescription != null) + message.longDescription = String(object.longDescription); + switch (object.kind) { + case "NOTE_KIND_UNSPECIFIED": case 0: - message.platform = 0; + message.kind = 0; break; - case "GKE": + case "VULNERABILITY": case 1: - message.platform = 1; + message.kind = 1; break; - case "FLEX": + case "BUILD": case 2: - message.platform = 2; + message.kind = 2; break; - case "CUSTOM": + case "IMAGE": case 3: - message.platform = 3; + message.kind = 3; + break; + case "PACKAGE": + case 4: + message.kind = 4; + break; + case "DEPLOYMENT": + case 5: + message.kind = 5; + break; + case "DISCOVERY": + case 6: + message.kind = 6; + break; + case "ATTESTATION": + case 7: + message.kind = 7; + break; + case "UPGRADE": + case 8: + message.kind = 8; + break; + case "COMPLIANCE": + case 9: + message.kind = 9; + break; + case "DSSE_ATTESTATION": + case 10: + message.kind = 10; break; } - return message; - }; - - /** - * Creates a plain object from a DeploymentOccurrence message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.DeploymentOccurrence - * @static - * @param {grafeas.v1.DeploymentOccurrence} message DeploymentOccurrence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeploymentOccurrence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceUri = []; - if (options.defaults) { - object.userEmail = ""; - object.deployTime = null; - object.undeployTime = null; - object.config = ""; - object.address = ""; - object.platform = options.enums === String ? "PLATFORM_UNSPECIFIED" : 0; + if (object.relatedUrl) { + if (!Array.isArray(object.relatedUrl)) + throw TypeError(".grafeas.v1.Note.relatedUrl: array expected"); + message.relatedUrl = []; + for (var i = 0; i < object.relatedUrl.length; ++i) { + if (typeof object.relatedUrl[i] !== "object") + throw TypeError(".grafeas.v1.Note.relatedUrl: object expected"); + message.relatedUrl[i] = $root.grafeas.v1.RelatedUrl.fromObject(object.relatedUrl[i]); + } + } + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".grafeas.v1.Note.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".grafeas.v1.Note.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".grafeas.v1.Note.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.relatedNoteNames) { + if (!Array.isArray(object.relatedNoteNames)) + throw TypeError(".grafeas.v1.Note.relatedNoteNames: array expected"); + message.relatedNoteNames = []; + for (var i = 0; i < object.relatedNoteNames.length; ++i) + message.relatedNoteNames[i] = String(object.relatedNoteNames[i]); + } + if (object.vulnerability != null) { + if (typeof object.vulnerability !== "object") + throw TypeError(".grafeas.v1.Note.vulnerability: object expected"); + message.vulnerability = $root.grafeas.v1.VulnerabilityNote.fromObject(object.vulnerability); + } + if (object.build != null) { + if (typeof object.build !== "object") + throw TypeError(".grafeas.v1.Note.build: object expected"); + message.build = $root.grafeas.v1.BuildNote.fromObject(object.build); + } + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".grafeas.v1.Note.image: object expected"); + message.image = $root.grafeas.v1.ImageNote.fromObject(object.image); + } + if (object["package"] != null) { + if (typeof object["package"] !== "object") + throw TypeError(".grafeas.v1.Note.package: object expected"); + message["package"] = $root.grafeas.v1.PackageNote.fromObject(object["package"]); + } + if (object.deployment != null) { + if (typeof object.deployment !== "object") + throw TypeError(".grafeas.v1.Note.deployment: object expected"); + message.deployment = $root.grafeas.v1.DeploymentNote.fromObject(object.deployment); + } + if (object.discovery != null) { + if (typeof object.discovery !== "object") + throw TypeError(".grafeas.v1.Note.discovery: object expected"); + message.discovery = $root.grafeas.v1.DiscoveryNote.fromObject(object.discovery); + } + if (object.attestation != null) { + if (typeof object.attestation !== "object") + throw TypeError(".grafeas.v1.Note.attestation: object expected"); + message.attestation = $root.grafeas.v1.AttestationNote.fromObject(object.attestation); + } + if (object.upgrade != null) { + if (typeof object.upgrade !== "object") + throw TypeError(".grafeas.v1.Note.upgrade: object expected"); + message.upgrade = $root.grafeas.v1.UpgradeNote.fromObject(object.upgrade); + } + if (object.compliance != null) { + if (typeof object.compliance !== "object") + throw TypeError(".grafeas.v1.Note.compliance: object expected"); + message.compliance = $root.grafeas.v1.ComplianceNote.fromObject(object.compliance); + } + if (object.dsseAttestation != null) { + if (typeof object.dsseAttestation !== "object") + throw TypeError(".grafeas.v1.Note.dsseAttestation: object expected"); + message.dsseAttestation = $root.grafeas.v1.DSSEAttestationNote.fromObject(object.dsseAttestation); + } + return message; + }; + + /** + * Creates a plain object from a Note message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.Note + * @static + * @param {grafeas.v1.Note} message Note + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Note.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.relatedUrl = []; + object.relatedNoteNames = []; + } + if (options.defaults) { + object.name = ""; + object.shortDescription = ""; + object.longDescription = ""; + object.kind = options.enums === String ? "NOTE_KIND_UNSPECIFIED" : 0; + object.expirationTime = null; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) + object.shortDescription = message.shortDescription; + if (message.longDescription != null && message.hasOwnProperty("longDescription")) + object.longDescription = message.longDescription; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.grafeas.v1.NoteKind[message.kind] : message.kind; + if (message.relatedUrl && message.relatedUrl.length) { + object.relatedUrl = []; + for (var j = 0; j < message.relatedUrl.length; ++j) + object.relatedUrl[j] = $root.grafeas.v1.RelatedUrl.toObject(message.relatedUrl[j], options); + } + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.relatedNoteNames && message.relatedNoteNames.length) { + object.relatedNoteNames = []; + for (var j = 0; j < message.relatedNoteNames.length; ++j) + object.relatedNoteNames[j] = message.relatedNoteNames[j]; + } + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { + object.vulnerability = $root.grafeas.v1.VulnerabilityNote.toObject(message.vulnerability, options); + if (options.oneofs) + object.type = "vulnerability"; + } + if (message.build != null && message.hasOwnProperty("build")) { + object.build = $root.grafeas.v1.BuildNote.toObject(message.build, options); + if (options.oneofs) + object.type = "build"; + } + if (message.image != null && message.hasOwnProperty("image")) { + object.image = $root.grafeas.v1.ImageNote.toObject(message.image, options); + if (options.oneofs) + object.type = "image"; + } + if (message["package"] != null && message.hasOwnProperty("package")) { + object["package"] = $root.grafeas.v1.PackageNote.toObject(message["package"], options); + if (options.oneofs) + object.type = "package"; + } + if (message.deployment != null && message.hasOwnProperty("deployment")) { + object.deployment = $root.grafeas.v1.DeploymentNote.toObject(message.deployment, options); + if (options.oneofs) + object.type = "deployment"; + } + if (message.discovery != null && message.hasOwnProperty("discovery")) { + object.discovery = $root.grafeas.v1.DiscoveryNote.toObject(message.discovery, options); + if (options.oneofs) + object.type = "discovery"; + } + if (message.attestation != null && message.hasOwnProperty("attestation")) { + object.attestation = $root.grafeas.v1.AttestationNote.toObject(message.attestation, options); + if (options.oneofs) + object.type = "attestation"; } - if (message.userEmail != null && message.hasOwnProperty("userEmail")) - object.userEmail = message.userEmail; - if (message.deployTime != null && message.hasOwnProperty("deployTime")) - object.deployTime = $root.google.protobuf.Timestamp.toObject(message.deployTime, options); - if (message.undeployTime != null && message.hasOwnProperty("undeployTime")) - object.undeployTime = $root.google.protobuf.Timestamp.toObject(message.undeployTime, options); - if (message.config != null && message.hasOwnProperty("config")) - object.config = message.config; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.resourceUri && message.resourceUri.length) { - object.resourceUri = []; - for (var j = 0; j < message.resourceUri.length; ++j) - object.resourceUri[j] = message.resourceUri[j]; + if (message.upgrade != null && message.hasOwnProperty("upgrade")) { + object.upgrade = $root.grafeas.v1.UpgradeNote.toObject(message.upgrade, options); + if (options.oneofs) + object.type = "upgrade"; + } + if (message.compliance != null && message.hasOwnProperty("compliance")) { + object.compliance = $root.grafeas.v1.ComplianceNote.toObject(message.compliance, options); + if (options.oneofs) + object.type = "compliance"; + } + if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { + object.dsseAttestation = $root.grafeas.v1.DSSEAttestationNote.toObject(message.dsseAttestation, options); + if (options.oneofs) + object.type = "dsseAttestation"; } - if (message.platform != null && message.hasOwnProperty("platform")) - object.platform = options.enums === String ? $root.grafeas.v1.DeploymentOccurrence.Platform[message.platform] : message.platform; return object; }; /** - * Converts this DeploymentOccurrence to JSON. + * Converts this Note to JSON. * @function toJSON - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.Note * @instance * @returns {Object.} JSON object */ - DeploymentOccurrence.prototype.toJSON = function toJSON() { + Note.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Platform enum. - * @name grafeas.v1.DeploymentOccurrence.Platform - * @enum {number} - * @property {number} PLATFORM_UNSPECIFIED=0 PLATFORM_UNSPECIFIED value - * @property {number} GKE=1 GKE value - * @property {number} FLEX=2 FLEX value - * @property {number} CUSTOM=3 CUSTOM value - */ - DeploymentOccurrence.Platform = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PLATFORM_UNSPECIFIED"] = 0; - values[valuesById[1] = "GKE"] = 1; - values[valuesById[2] = "FLEX"] = 2; - values[valuesById[3] = "CUSTOM"] = 3; - return values; - })(); - - return DeploymentOccurrence; + return Note; })(); - v1.DiscoveryNote = (function() { + v1.GetOccurrenceRequest = (function() { /** - * Properties of a DiscoveryNote. + * Properties of a GetOccurrenceRequest. * @memberof grafeas.v1 - * @interface IDiscoveryNote - * @property {grafeas.v1.NoteKind|null} [analysisKind] DiscoveryNote analysisKind + * @interface IGetOccurrenceRequest + * @property {string|null} [name] GetOccurrenceRequest name */ /** - * Constructs a new DiscoveryNote. + * Constructs a new GetOccurrenceRequest. * @memberof grafeas.v1 - * @classdesc Represents a DiscoveryNote. - * @implements IDiscoveryNote + * @classdesc Represents a GetOccurrenceRequest. + * @implements IGetOccurrenceRequest * @constructor - * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set + * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set */ - function DiscoveryNote(properties) { + function GetOccurrenceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15959,75 +16176,75 @@ } /** - * DiscoveryNote analysisKind. - * @member {grafeas.v1.NoteKind} analysisKind - * @memberof grafeas.v1.DiscoveryNote + * GetOccurrenceRequest name. + * @member {string} name + * @memberof grafeas.v1.GetOccurrenceRequest * @instance */ - DiscoveryNote.prototype.analysisKind = 0; + GetOccurrenceRequest.prototype.name = ""; /** - * Creates a new DiscoveryNote instance using the specified properties. + * Creates a new GetOccurrenceRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set - * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote instance + * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest instance */ - DiscoveryNote.create = function create(properties) { - return new DiscoveryNote(properties); + GetOccurrenceRequest.create = function create(properties) { + return new GetOccurrenceRequest(properties); }; /** - * Encodes the specified DiscoveryNote message. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. + * Encodes the specified GetOccurrenceRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode + * @param {grafeas.v1.IGetOccurrenceRequest} message GetOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryNote.encode = function encode(message, writer) { + GetOccurrenceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.analysisKind != null && Object.hasOwnProperty.call(message, "analysisKind")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.analysisKind); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DiscoveryNote message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. + * Encodes the specified GetOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode + * @param {grafeas.v1.IGetOccurrenceRequest} message GetOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryNote.encodeDelimited = function encodeDelimited(message, writer) { + GetOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryNote message from the specified reader or buffer. + * Decodes a GetOccurrenceRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.GetOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote + * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryNote.decode = function decode(reader, length) { + GetOccurrenceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DiscoveryNote(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.GetOccurrenceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.analysisKind = reader.int32(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -16038,169 +16255,110 @@ }; /** - * Decodes a DiscoveryNote message from the specified reader or buffer, length delimited. + * Decodes a GetOccurrenceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.GetOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote + * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryNote.decodeDelimited = function decodeDelimited(reader) { + GetOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoveryNote message. - * @function verify - * @memberof grafeas.v1.DiscoveryNote - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoveryNote.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.analysisKind != null && message.hasOwnProperty("analysisKind")) - switch (message.analysisKind) { - default: - return "analysisKind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - break; - } - return null; - }; - - /** - * Creates a DiscoveryNote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.DiscoveryNote - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote - */ - DiscoveryNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DiscoveryNote) - return object; - var message = new $root.grafeas.v1.DiscoveryNote(); - switch (object.analysisKind) { - case "NOTE_KIND_UNSPECIFIED": - case 0: - message.analysisKind = 0; - break; - case "VULNERABILITY": - case 1: - message.analysisKind = 1; - break; - case "BUILD": - case 2: - message.analysisKind = 2; - break; - case "IMAGE": - case 3: - message.analysisKind = 3; - break; - case "PACKAGE": - case 4: - message.analysisKind = 4; - break; - case "DEPLOYMENT": - case 5: - message.analysisKind = 5; - break; - case "DISCOVERY": - case 6: - message.analysisKind = 6; - break; - case "ATTESTATION": - case 7: - message.analysisKind = 7; - break; - case "UPGRADE": - case 8: - message.analysisKind = 8; - break; - case "COMPLIANCE": - case 9: - message.analysisKind = 9; - break; - case "DSSE_ATTESTATION": - case 10: - message.analysisKind = 10; - break; - } + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOccurrenceRequest message. + * @function verify + * @memberof grafeas.v1.GetOccurrenceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOccurrenceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.GetOccurrenceRequest + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest + */ + GetOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GetOccurrenceRequest) + return object; + var message = new $root.grafeas.v1.GetOccurrenceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a DiscoveryNote message. Also converts values to other types if specified. + * Creates a plain object from a GetOccurrenceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.DiscoveryNote} message DiscoveryNote + * @param {grafeas.v1.GetOccurrenceRequest} message GetOccurrenceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryNote.toObject = function toObject(message, options) { + GetOccurrenceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.analysisKind = options.enums === String ? "NOTE_KIND_UNSPECIFIED" : 0; - if (message.analysisKind != null && message.hasOwnProperty("analysisKind")) - object.analysisKind = options.enums === String ? $root.grafeas.v1.NoteKind[message.analysisKind] : message.analysisKind; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DiscoveryNote to JSON. + * Converts this GetOccurrenceRequest to JSON. * @function toJSON - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.GetOccurrenceRequest * @instance * @returns {Object.} JSON object */ - DiscoveryNote.prototype.toJSON = function toJSON() { + GetOccurrenceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DiscoveryNote; + return GetOccurrenceRequest; })(); - v1.DiscoveryOccurrence = (function() { + v1.ListOccurrencesRequest = (function() { /** - * Properties of a DiscoveryOccurrence. + * Properties of a ListOccurrencesRequest. * @memberof grafeas.v1 - * @interface IDiscoveryOccurrence - * @property {grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|null} [continuousAnalysis] DiscoveryOccurrence continuousAnalysis - * @property {grafeas.v1.DiscoveryOccurrence.AnalysisStatus|null} [analysisStatus] DiscoveryOccurrence analysisStatus - * @property {google.rpc.IStatus|null} [analysisStatusError] DiscoveryOccurrence analysisStatusError - * @property {string|null} [cpe] DiscoveryOccurrence cpe - * @property {google.protobuf.ITimestamp|null} [lastScanTime] DiscoveryOccurrence lastScanTime + * @interface IListOccurrencesRequest + * @property {string|null} [parent] ListOccurrencesRequest parent + * @property {string|null} [filter] ListOccurrencesRequest filter + * @property {number|null} [pageSize] ListOccurrencesRequest pageSize + * @property {string|null} [pageToken] ListOccurrencesRequest pageToken */ /** - * Constructs a new DiscoveryOccurrence. + * Constructs a new ListOccurrencesRequest. * @memberof grafeas.v1 - * @classdesc Represents a DiscoveryOccurrence. - * @implements IDiscoveryOccurrence + * @classdesc Represents a ListOccurrencesRequest. + * @implements IListOccurrencesRequest * @constructor - * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set */ - function DiscoveryOccurrence(properties) { + function ListOccurrencesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16208,370 +16366,252 @@ } /** - * DiscoveryOccurrence continuousAnalysis. - * @member {grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} continuousAnalysis - * @memberof grafeas.v1.DiscoveryOccurrence - * @instance - */ - DiscoveryOccurrence.prototype.continuousAnalysis = 0; - - /** - * DiscoveryOccurrence analysisStatus. - * @member {grafeas.v1.DiscoveryOccurrence.AnalysisStatus} analysisStatus - * @memberof grafeas.v1.DiscoveryOccurrence + * ListOccurrencesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.ListOccurrencesRequest * @instance */ - DiscoveryOccurrence.prototype.analysisStatus = 0; + ListOccurrencesRequest.prototype.parent = ""; /** - * DiscoveryOccurrence analysisStatusError. - * @member {google.rpc.IStatus|null|undefined} analysisStatusError - * @memberof grafeas.v1.DiscoveryOccurrence + * ListOccurrencesRequest filter. + * @member {string} filter + * @memberof grafeas.v1.ListOccurrencesRequest * @instance */ - DiscoveryOccurrence.prototype.analysisStatusError = null; + ListOccurrencesRequest.prototype.filter = ""; /** - * DiscoveryOccurrence cpe. - * @member {string} cpe - * @memberof grafeas.v1.DiscoveryOccurrence + * ListOccurrencesRequest pageSize. + * @member {number} pageSize + * @memberof grafeas.v1.ListOccurrencesRequest * @instance */ - DiscoveryOccurrence.prototype.cpe = ""; + ListOccurrencesRequest.prototype.pageSize = 0; /** - * DiscoveryOccurrence lastScanTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastScanTime - * @memberof grafeas.v1.DiscoveryOccurrence + * ListOccurrencesRequest pageToken. + * @member {string} pageToken + * @memberof grafeas.v1.ListOccurrencesRequest * @instance */ - DiscoveryOccurrence.prototype.lastScanTime = null; + ListOccurrencesRequest.prototype.pageToken = ""; /** - * Creates a new DiscoveryOccurrence instance using the specified properties. + * Creates a new ListOccurrencesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence instance + * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set + * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest instance */ - DiscoveryOccurrence.create = function create(properties) { - return new DiscoveryOccurrence(properties); + ListOccurrencesRequest.create = function create(properties) { + return new ListOccurrencesRequest(properties); }; /** - * Encodes the specified DiscoveryOccurrence message. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * Encodes the specified ListOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode + * @param {grafeas.v1.IListOccurrencesRequest} message ListOccurrencesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryOccurrence.encode = function encode(message, writer) { + ListOccurrencesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.continuousAnalysis != null && Object.hasOwnProperty.call(message, "continuousAnalysis")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.continuousAnalysis); - if (message.analysisStatus != null && Object.hasOwnProperty.call(message, "analysisStatus")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.analysisStatus); - if (message.analysisStatusError != null && Object.hasOwnProperty.call(message, "analysisStatusError")) - $root.google.rpc.Status.encode(message.analysisStatusError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.cpe != null && Object.hasOwnProperty.call(message, "cpe")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cpe); - if (message.lastScanTime != null && Object.hasOwnProperty.call(message, "lastScanTime")) - $root.google.protobuf.Timestamp.encode(message.lastScanTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified DiscoveryOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * Encodes the specified ListOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode + * @param {grafeas.v1.IListOccurrencesRequest} message ListOccurrencesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + ListOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer. + * Decodes a ListOccurrencesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.ListOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence + * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryOccurrence.decode = function decode(reader, length) { + ListOccurrencesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DiscoveryOccurrence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListOccurrencesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.continuousAnalysis = reader.int32(); + message.parent = reader.string(); break; case 2: - message.analysisStatus = reader.int32(); + message.filter = reader.string(); break; case 3: - message.analysisStatusError = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 4: - message.cpe = reader.string(); - break; - case 5: - message.lastScanTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.DiscoveryOccurrence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoveryOccurrence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoveryOccurrence message. - * @function verify - * @memberof grafeas.v1.DiscoveryOccurrence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoveryOccurrence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.continuousAnalysis != null && message.hasOwnProperty("continuousAnalysis")) - switch (message.continuousAnalysis) { - default: - return "continuousAnalysis: enum value expected"; - case 0: - case 1: - case 2: + message.pageToken = reader.string(); break; - } - if (message.analysisStatus != null && message.hasOwnProperty("analysisStatus")) - switch (message.analysisStatus) { default: - return "analysisStatus: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.analysisStatusError != null && message.hasOwnProperty("analysisStatusError")) { - var error = $root.google.rpc.Status.verify(message.analysisStatusError); - if (error) - return "analysisStatusError." + error; - } - if (message.cpe != null && message.hasOwnProperty("cpe")) - if (!$util.isString(message.cpe)) - return "cpe: string expected"; - if (message.lastScanTime != null && message.hasOwnProperty("lastScanTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastScanTime); - if (error) - return "lastScanTime." + error; + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a ListOccurrencesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.ListOccurrencesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOccurrencesRequest message. + * @function verify + * @memberof grafeas.v1.ListOccurrencesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOccurrencesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a DiscoveryOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a ListOccurrencesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.ListOccurrencesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence + * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest */ - DiscoveryOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DiscoveryOccurrence) + ListOccurrencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListOccurrencesRequest) return object; - var message = new $root.grafeas.v1.DiscoveryOccurrence(); - switch (object.continuousAnalysis) { - case "CONTINUOUS_ANALYSIS_UNSPECIFIED": - case 0: - message.continuousAnalysis = 0; - break; - case "ACTIVE": - case 1: - message.continuousAnalysis = 1; - break; - case "INACTIVE": - case 2: - message.continuousAnalysis = 2; - break; - } - switch (object.analysisStatus) { - case "ANALYSIS_STATUS_UNSPECIFIED": - case 0: - message.analysisStatus = 0; - break; - case "PENDING": - case 1: - message.analysisStatus = 1; - break; - case "SCANNING": - case 2: - message.analysisStatus = 2; - break; - case "FINISHED_SUCCESS": - case 3: - message.analysisStatus = 3; - break; - case "FINISHED_FAILED": - case 4: - message.analysisStatus = 4; - break; - case "FINISHED_UNSUPPORTED": - case 5: - message.analysisStatus = 5; - break; - } - if (object.analysisStatusError != null) { - if (typeof object.analysisStatusError !== "object") - throw TypeError(".grafeas.v1.DiscoveryOccurrence.analysisStatusError: object expected"); - message.analysisStatusError = $root.google.rpc.Status.fromObject(object.analysisStatusError); - } - if (object.cpe != null) - message.cpe = String(object.cpe); - if (object.lastScanTime != null) { - if (typeof object.lastScanTime !== "object") - throw TypeError(".grafeas.v1.DiscoveryOccurrence.lastScanTime: object expected"); - message.lastScanTime = $root.google.protobuf.Timestamp.fromObject(object.lastScanTime); - } + var message = new $root.grafeas.v1.ListOccurrencesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a DiscoveryOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a ListOccurrencesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.DiscoveryOccurrence} message DiscoveryOccurrence + * @param {grafeas.v1.ListOccurrencesRequest} message ListOccurrencesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryOccurrence.toObject = function toObject(message, options) { + ListOccurrencesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.continuousAnalysis = options.enums === String ? "CONTINUOUS_ANALYSIS_UNSPECIFIED" : 0; - object.analysisStatus = options.enums === String ? "ANALYSIS_STATUS_UNSPECIFIED" : 0; - object.analysisStatusError = null; - object.cpe = ""; - object.lastScanTime = null; + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.continuousAnalysis != null && message.hasOwnProperty("continuousAnalysis")) - object.continuousAnalysis = options.enums === String ? $root.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis[message.continuousAnalysis] : message.continuousAnalysis; - if (message.analysisStatus != null && message.hasOwnProperty("analysisStatus")) - object.analysisStatus = options.enums === String ? $root.grafeas.v1.DiscoveryOccurrence.AnalysisStatus[message.analysisStatus] : message.analysisStatus; - if (message.analysisStatusError != null && message.hasOwnProperty("analysisStatusError")) - object.analysisStatusError = $root.google.rpc.Status.toObject(message.analysisStatusError, options); - if (message.cpe != null && message.hasOwnProperty("cpe")) - object.cpe = message.cpe; - if (message.lastScanTime != null && message.hasOwnProperty("lastScanTime")) - object.lastScanTime = $root.google.protobuf.Timestamp.toObject(message.lastScanTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this DiscoveryOccurrence to JSON. + * Converts this ListOccurrencesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.ListOccurrencesRequest * @instance * @returns {Object.} JSON object */ - DiscoveryOccurrence.prototype.toJSON = function toJSON() { + ListOccurrencesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ContinuousAnalysis enum. - * @name grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis - * @enum {number} - * @property {number} CONTINUOUS_ANALYSIS_UNSPECIFIED=0 CONTINUOUS_ANALYSIS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - DiscoveryOccurrence.ContinuousAnalysis = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONTINUOUS_ANALYSIS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); - - /** - * AnalysisStatus enum. - * @name grafeas.v1.DiscoveryOccurrence.AnalysisStatus - * @enum {number} - * @property {number} ANALYSIS_STATUS_UNSPECIFIED=0 ANALYSIS_STATUS_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} SCANNING=2 SCANNING value - * @property {number} FINISHED_SUCCESS=3 FINISHED_SUCCESS value - * @property {number} FINISHED_FAILED=4 FINISHED_FAILED value - * @property {number} FINISHED_UNSUPPORTED=5 FINISHED_UNSUPPORTED value - */ - DiscoveryOccurrence.AnalysisStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ANALYSIS_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "SCANNING"] = 2; - values[valuesById[3] = "FINISHED_SUCCESS"] = 3; - values[valuesById[4] = "FINISHED_FAILED"] = 4; - values[valuesById[5] = "FINISHED_UNSUPPORTED"] = 5; - return values; - })(); - - return DiscoveryOccurrence; + return ListOccurrencesRequest; })(); - v1.DSSEAttestationNote = (function() { + v1.ListOccurrencesResponse = (function() { /** - * Properties of a DSSEAttestationNote. + * Properties of a ListOccurrencesResponse. * @memberof grafeas.v1 - * @interface IDSSEAttestationNote - * @property {grafeas.v1.DSSEAttestationNote.IDSSEHint|null} [hint] DSSEAttestationNote hint + * @interface IListOccurrencesResponse + * @property {Array.|null} [occurrences] ListOccurrencesResponse occurrences + * @property {string|null} [nextPageToken] ListOccurrencesResponse nextPageToken */ /** - * Constructs a new DSSEAttestationNote. + * Constructs a new ListOccurrencesResponse. * @memberof grafeas.v1 - * @classdesc Represents a DSSEAttestationNote. - * @implements IDSSEAttestationNote + * @classdesc Represents a ListOccurrencesResponse. + * @implements IListOccurrencesResponse * @constructor - * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set + * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set */ - function DSSEAttestationNote(properties) { + function ListOccurrencesResponse(properties) { + this.occurrences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16579,75 +16619,91 @@ } /** - * DSSEAttestationNote hint. - * @member {grafeas.v1.DSSEAttestationNote.IDSSEHint|null|undefined} hint - * @memberof grafeas.v1.DSSEAttestationNote + * ListOccurrencesResponse occurrences. + * @member {Array.} occurrences + * @memberof grafeas.v1.ListOccurrencesResponse * @instance */ - DSSEAttestationNote.prototype.hint = null; + ListOccurrencesResponse.prototype.occurrences = $util.emptyArray; /** - * Creates a new DSSEAttestationNote instance using the specified properties. + * ListOccurrencesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof grafeas.v1.ListOccurrencesResponse + * @instance + */ + ListOccurrencesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOccurrencesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static - * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set - * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote instance + * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set + * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse instance */ - DSSEAttestationNote.create = function create(properties) { - return new DSSEAttestationNote(properties); + ListOccurrencesResponse.create = function create(properties) { + return new ListOccurrencesResponse(properties); }; /** - * Encodes the specified DSSEAttestationNote message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. + * Encodes the specified ListOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static - * @param {grafeas.v1.IDSSEAttestationNote} message DSSEAttestationNote message or plain object to encode + * @param {grafeas.v1.IListOccurrencesResponse} message ListOccurrencesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationNote.encode = function encode(message, writer) { + ListOccurrencesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hint != null && Object.hasOwnProperty.call(message, "hint")) - $root.grafeas.v1.DSSEAttestationNote.DSSEHint.encode(message.hint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.occurrences != null && message.occurrences.length) + for (var i = 0; i < message.occurrences.length; ++i) + $root.grafeas.v1.Occurrence.encode(message.occurrences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DSSEAttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. + * Encodes the specified ListOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static - * @param {grafeas.v1.IDSSEAttestationNote} message DSSEAttestationNote message or plain object to encode + * @param {grafeas.v1.IListOccurrencesResponse} message ListOccurrencesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationNote.encodeDelimited = function encodeDelimited(message, writer) { + ListOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer. + * Decodes a ListOccurrencesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote + * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DSSEAttestationNote.decode = function decode(reader, length) { + ListOccurrencesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DSSEAttestationNote(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListOccurrencesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.decode(reader, reader.uint32()); + if (!(message.occurrences && message.occurrences.length)) + message.occurrences = []; + message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -16658,300 +16714,133 @@ }; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer, length delimited. + * Decodes a ListOccurrencesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote + * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DSSEAttestationNote.decodeDelimited = function decodeDelimited(reader) { + ListOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DSSEAttestationNote message. + * Verifies a ListOccurrencesResponse message. * @function verify - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DSSEAttestationNote.verify = function verify(message) { + ListOccurrencesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hint != null && message.hasOwnProperty("hint")) { - var error = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.verify(message.hint); - if (error) - return "hint." + error; - } - return null; - }; - - /** - * Creates a DSSEAttestationNote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.DSSEAttestationNote - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote - */ - DSSEAttestationNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DSSEAttestationNote) - return object; - var message = new $root.grafeas.v1.DSSEAttestationNote(); - if (object.hint != null) { - if (typeof object.hint !== "object") - throw TypeError(".grafeas.v1.DSSEAttestationNote.hint: object expected"); - message.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.fromObject(object.hint); - } - return message; - }; - - /** - * Creates a plain object from a DSSEAttestationNote message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.DSSEAttestationNote - * @static - * @param {grafeas.v1.DSSEAttestationNote} message DSSEAttestationNote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DSSEAttestationNote.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hint = null; - if (message.hint != null && message.hasOwnProperty("hint")) - object.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.toObject(message.hint, options); - return object; - }; - - /** - * Converts this DSSEAttestationNote to JSON. - * @function toJSON - * @memberof grafeas.v1.DSSEAttestationNote - * @instance - * @returns {Object.} JSON object - */ - DSSEAttestationNote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - DSSEAttestationNote.DSSEHint = (function() { - - /** - * Properties of a DSSEHint. - * @memberof grafeas.v1.DSSEAttestationNote - * @interface IDSSEHint - * @property {string|null} [humanReadableName] DSSEHint humanReadableName - */ - - /** - * Constructs a new DSSEHint. - * @memberof grafeas.v1.DSSEAttestationNote - * @classdesc Represents a DSSEHint. - * @implements IDSSEHint - * @constructor - * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint=} [properties] Properties to set - */ - function DSSEHint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DSSEHint humanReadableName. - * @member {string} humanReadableName - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @instance - */ - DSSEHint.prototype.humanReadableName = ""; - - /** - * Creates a new DSSEHint instance using the specified properties. - * @function create - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint=} [properties] Properties to set - * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint instance - */ - DSSEHint.create = function create(properties) { - return new DSSEHint(properties); - }; - - /** - * Encodes the specified DSSEHint message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint} message DSSEHint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DSSEHint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.humanReadableName != null && Object.hasOwnProperty.call(message, "humanReadableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.humanReadableName); - return writer; - }; - - /** - * Encodes the specified DSSEHint message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.DSSEHint.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {grafeas.v1.DSSEAttestationNote.IDSSEHint} message DSSEHint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DSSEHint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DSSEHint message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DSSEHint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DSSEAttestationNote.DSSEHint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.humanReadableName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DSSEHint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DSSEHint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DSSEHint message. - * @function verify - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DSSEHint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.humanReadableName != null && message.hasOwnProperty("humanReadableName")) - if (!$util.isString(message.humanReadableName)) - return "humanReadableName: string expected"; - return null; - }; - - /** - * Creates a DSSEHint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.DSSEAttestationNote.DSSEHint} DSSEHint - */ - DSSEHint.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DSSEAttestationNote.DSSEHint) - return object; - var message = new $root.grafeas.v1.DSSEAttestationNote.DSSEHint(); - if (object.humanReadableName != null) - message.humanReadableName = String(object.humanReadableName); - return message; - }; + if (message.occurrences != null && message.hasOwnProperty("occurrences")) { + if (!Array.isArray(message.occurrences)) + return "occurrences: array expected"; + for (var i = 0; i < message.occurrences.length; ++i) { + var error = $root.grafeas.v1.Occurrence.verify(message.occurrences[i]); + if (error) + return "occurrences." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a plain object from a DSSEHint message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @static - * @param {grafeas.v1.DSSEAttestationNote.DSSEHint} message DSSEHint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DSSEHint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.humanReadableName = ""; - if (message.humanReadableName != null && message.hasOwnProperty("humanReadableName")) - object.humanReadableName = message.humanReadableName; + /** + * Creates a ListOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.ListOccurrencesResponse + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse + */ + ListOccurrencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListOccurrencesResponse) return object; - }; + var message = new $root.grafeas.v1.ListOccurrencesResponse(); + if (object.occurrences) { + if (!Array.isArray(object.occurrences)) + throw TypeError(".grafeas.v1.ListOccurrencesResponse.occurrences: array expected"); + message.occurrences = []; + for (var i = 0; i < object.occurrences.length; ++i) { + if (typeof object.occurrences[i] !== "object") + throw TypeError(".grafeas.v1.ListOccurrencesResponse.occurrences: object expected"); + message.occurrences[i] = $root.grafeas.v1.Occurrence.fromObject(object.occurrences[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Converts this DSSEHint to JSON. - * @function toJSON - * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint - * @instance - * @returns {Object.} JSON object - */ - DSSEHint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListOccurrencesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.ListOccurrencesResponse + * @static + * @param {grafeas.v1.ListOccurrencesResponse} message ListOccurrencesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOccurrencesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.occurrences = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.occurrences && message.occurrences.length) { + object.occurrences = []; + for (var j = 0; j < message.occurrences.length; ++j) + object.occurrences[j] = $root.grafeas.v1.Occurrence.toObject(message.occurrences[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return DSSEHint; - })(); + /** + * Converts this ListOccurrencesResponse to JSON. + * @function toJSON + * @memberof grafeas.v1.ListOccurrencesResponse + * @instance + * @returns {Object.} JSON object + */ + ListOccurrencesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DSSEAttestationNote; + return ListOccurrencesResponse; })(); - v1.DSSEAttestationOccurrence = (function() { + v1.DeleteOccurrenceRequest = (function() { /** - * Properties of a DSSEAttestationOccurrence. + * Properties of a DeleteOccurrenceRequest. * @memberof grafeas.v1 - * @interface IDSSEAttestationOccurrence - * @property {grafeas.v1.IEnvelope|null} [envelope] DSSEAttestationOccurrence envelope - * @property {grafeas.v1.IInTotoStatement|null} [statement] DSSEAttestationOccurrence statement + * @interface IDeleteOccurrenceRequest + * @property {string|null} [name] DeleteOccurrenceRequest name */ /** - * Constructs a new DSSEAttestationOccurrence. + * Constructs a new DeleteOccurrenceRequest. * @memberof grafeas.v1 - * @classdesc Represents a DSSEAttestationOccurrence. - * @implements IDSSEAttestationOccurrence + * @classdesc Represents a DeleteOccurrenceRequest. + * @implements IDeleteOccurrenceRequest * @constructor - * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set */ - function DSSEAttestationOccurrence(properties) { + function DeleteOccurrenceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16959,102 +16848,75 @@ } /** - * DSSEAttestationOccurrence envelope. - * @member {grafeas.v1.IEnvelope|null|undefined} envelope - * @memberof grafeas.v1.DSSEAttestationOccurrence - * @instance - */ - DSSEAttestationOccurrence.prototype.envelope = null; - - /** - * DSSEAttestationOccurrence statement. - * @member {grafeas.v1.IInTotoStatement|null|undefined} statement - * @memberof grafeas.v1.DSSEAttestationOccurrence - * @instance - */ - DSSEAttestationOccurrence.prototype.statement = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DSSEAttestationOccurrence decodedPayload. - * @member {"statement"|undefined} decodedPayload - * @memberof grafeas.v1.DSSEAttestationOccurrence + * DeleteOccurrenceRequest name. + * @member {string} name + * @memberof grafeas.v1.DeleteOccurrenceRequest * @instance */ - Object.defineProperty(DSSEAttestationOccurrence.prototype, "decodedPayload", { - get: $util.oneOfGetter($oneOfFields = ["statement"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteOccurrenceRequest.prototype.name = ""; /** - * Creates a new DSSEAttestationOccurrence instance using the specified properties. + * Creates a new DeleteOccurrenceRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence instance + * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest instance */ - DSSEAttestationOccurrence.create = function create(properties) { - return new DSSEAttestationOccurrence(properties); + DeleteOccurrenceRequest.create = function create(properties) { + return new DeleteOccurrenceRequest(properties); }; /** - * Encodes the specified DSSEAttestationOccurrence message. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. + * Encodes the specified DeleteOccurrenceRequest message. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.IDSSEAttestationOccurrence} message DSSEAttestationOccurrence message or plain object to encode + * @param {grafeas.v1.IDeleteOccurrenceRequest} message DeleteOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationOccurrence.encode = function encode(message, writer) { + DeleteOccurrenceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.envelope != null && Object.hasOwnProperty.call(message, "envelope")) - $root.grafeas.v1.Envelope.encode(message.envelope, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.statement != null && Object.hasOwnProperty.call(message, "statement")) - $root.grafeas.v1.InTotoStatement.encode(message.statement, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DSSEAttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. + * Encodes the specified DeleteOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.IDSSEAttestationOccurrence} message DSSEAttestationOccurrence message or plain object to encode + * @param {grafeas.v1.IDeleteOccurrenceRequest} message DeleteOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + DeleteOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer. + * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence + * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DSSEAttestationOccurrence.decode = function decode(reader, length) { + DeleteOccurrenceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DSSEAttestationOccurrence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeleteOccurrenceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.envelope = $root.grafeas.v1.Envelope.decode(reader, reader.uint32()); - break; - case 2: - message.statement = $root.grafeas.v1.InTotoStatement.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -17065,645 +16927,751 @@ }; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer, length delimited. + * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence + * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DSSEAttestationOccurrence.decodeDelimited = function decodeDelimited(reader) { + DeleteOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DSSEAttestationOccurrence message. + * Verifies a DeleteOccurrenceRequest message. * @function verify - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DSSEAttestationOccurrence.verify = function verify(message) { + DeleteOccurrenceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.envelope != null && message.hasOwnProperty("envelope")) { - var error = $root.grafeas.v1.Envelope.verify(message.envelope); - if (error) - return "envelope." + error; - } - if (message.statement != null && message.hasOwnProperty("statement")) { - properties.decodedPayload = 1; - { - var error = $root.grafeas.v1.InTotoStatement.verify(message.statement); - if (error) - return "statement." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a DSSEAttestationOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOccurrenceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence - */ - DSSEAttestationOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DSSEAttestationOccurrence) - return object; - var message = new $root.grafeas.v1.DSSEAttestationOccurrence(); - if (object.envelope != null) { - if (typeof object.envelope !== "object") - throw TypeError(".grafeas.v1.DSSEAttestationOccurrence.envelope: object expected"); - message.envelope = $root.grafeas.v1.Envelope.fromObject(object.envelope); - } - if (object.statement != null) { - if (typeof object.statement !== "object") - throw TypeError(".grafeas.v1.DSSEAttestationOccurrence.statement: object expected"); - message.statement = $root.grafeas.v1.InTotoStatement.fromObject(object.statement); - } + * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest + */ + DeleteOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeleteOccurrenceRequest) + return object; + var message = new $root.grafeas.v1.DeleteOccurrenceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a DSSEAttestationOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a DeleteOccurrenceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.DSSEAttestationOccurrence} message DSSEAttestationOccurrence + * @param {grafeas.v1.DeleteOccurrenceRequest} message DeleteOccurrenceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DSSEAttestationOccurrence.toObject = function toObject(message, options) { + DeleteOccurrenceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.envelope = null; - if (message.envelope != null && message.hasOwnProperty("envelope")) - object.envelope = $root.grafeas.v1.Envelope.toObject(message.envelope, options); - if (message.statement != null && message.hasOwnProperty("statement")) { - object.statement = $root.grafeas.v1.InTotoStatement.toObject(message.statement, options); - if (options.oneofs) - object.decodedPayload = "statement"; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DSSEAttestationOccurrence to JSON. + * Converts this DeleteOccurrenceRequest to JSON. * @function toJSON - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @instance * @returns {Object.} JSON object */ - DSSEAttestationOccurrence.prototype.toJSON = function toJSON() { + DeleteOccurrenceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DSSEAttestationOccurrence; + return DeleteOccurrenceRequest; })(); - v1.Grafeas = (function() { + v1.CreateOccurrenceRequest = (function() { /** - * Constructs a new Grafeas service. + * Properties of a CreateOccurrenceRequest. * @memberof grafeas.v1 - * @classdesc Represents a Grafeas - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Grafeas(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Grafeas.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Grafeas; - - /** - * Creates new Grafeas service using the specified rpc implementation. - * @function create - * @memberof grafeas.v1.Grafeas - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Grafeas} RPC service. Useful where requests and/or responses are streamed. - */ - Grafeas.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link grafeas.v1.Grafeas#getOccurrence}. - * @memberof grafeas.v1.Grafeas - * @typedef GetOccurrenceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.Occurrence} [response] Occurrence - */ - - /** - * Calls GetOccurrence. - * @function getOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IGetOccurrenceRequest} request GetOccurrenceRequest message or plain object - * @param {grafeas.v1.Grafeas.GetOccurrenceCallback} callback Node-style callback called with the error, if any, and Occurrence - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Grafeas.prototype.getOccurrence = function getOccurrence(request, callback) { - return this.rpcCall(getOccurrence, $root.grafeas.v1.GetOccurrenceRequest, $root.grafeas.v1.Occurrence, request, callback); - }, "name", { value: "GetOccurrence" }); - - /** - * Calls GetOccurrence. - * @function getOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IGetOccurrenceRequest} request GetOccurrenceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @interface ICreateOccurrenceRequest + * @property {string|null} [parent] CreateOccurrenceRequest parent + * @property {grafeas.v1.IOccurrence|null} [occurrence] CreateOccurrenceRequest occurrence */ /** - * Callback as used by {@link grafeas.v1.Grafeas#listOccurrences}. - * @memberof grafeas.v1.Grafeas - * @typedef ListOccurrencesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.ListOccurrencesResponse} [response] ListOccurrencesResponse + * Constructs a new CreateOccurrenceRequest. + * @memberof grafeas.v1 + * @classdesc Represents a CreateOccurrenceRequest. + * @implements ICreateOccurrenceRequest + * @constructor + * @param {grafeas.v1.ICreateOccurrenceRequest=} [properties] Properties to set */ + function CreateOccurrenceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListOccurrences. - * @function listOccurrences - * @memberof grafeas.v1.Grafeas + * CreateOccurrenceRequest parent. + * @member {string} parent + * @memberof grafeas.v1.CreateOccurrenceRequest * @instance - * @param {grafeas.v1.IListOccurrencesRequest} request ListOccurrencesRequest message or plain object - * @param {grafeas.v1.Grafeas.ListOccurrencesCallback} callback Node-style callback called with the error, if any, and ListOccurrencesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Grafeas.prototype.listOccurrences = function listOccurrences(request, callback) { - return this.rpcCall(listOccurrences, $root.grafeas.v1.ListOccurrencesRequest, $root.grafeas.v1.ListOccurrencesResponse, request, callback); - }, "name", { value: "ListOccurrences" }); + CreateOccurrenceRequest.prototype.parent = ""; /** - * Calls ListOccurrences. - * @function listOccurrences - * @memberof grafeas.v1.Grafeas + * CreateOccurrenceRequest occurrence. + * @member {grafeas.v1.IOccurrence|null|undefined} occurrence + * @memberof grafeas.v1.CreateOccurrenceRequest * @instance - * @param {grafeas.v1.IListOccurrencesRequest} request ListOccurrencesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateOccurrenceRequest.prototype.occurrence = null; /** - * Callback as used by {@link grafeas.v1.Grafeas#deleteOccurrence}. - * @memberof grafeas.v1.Grafeas - * @typedef DeleteOccurrenceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a new CreateOccurrenceRequest instance using the specified properties. + * @function create + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {grafeas.v1.ICreateOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest instance */ + CreateOccurrenceRequest.create = function create(properties) { + return new CreateOccurrenceRequest(properties); + }; /** - * Calls DeleteOccurrence. - * @function deleteOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IDeleteOccurrenceRequest} request DeleteOccurrenceRequest message or plain object - * @param {grafeas.v1.Grafeas.DeleteOccurrenceCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified CreateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {grafeas.v1.ICreateOccurrenceRequest} message CreateOccurrenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Grafeas.prototype.deleteOccurrence = function deleteOccurrence(request, callback) { - return this.rpcCall(deleteOccurrence, $root.grafeas.v1.DeleteOccurrenceRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOccurrence" }); + CreateOccurrenceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.occurrence != null && Object.hasOwnProperty.call(message, "occurrence")) + $root.grafeas.v1.Occurrence.encode(message.occurrence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Calls DeleteOccurrence. - * @function deleteOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IDeleteOccurrenceRequest} request DeleteOccurrenceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CreateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {grafeas.v1.ICreateOccurrenceRequest} message CreateOccurrenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link grafeas.v1.Grafeas#createOccurrence}. - * @memberof grafeas.v1.Grafeas - * @typedef CreateOccurrenceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.Occurrence} [response] Occurrence + * Decodes a CreateOccurrenceRequest message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateOccurrenceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.CreateOccurrenceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.occurrence = $root.grafeas.v1.Occurrence.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls CreateOccurrence. - * @function createOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.ICreateOccurrenceRequest} request CreateOccurrenceRequest message or plain object - * @param {grafeas.v1.Grafeas.CreateOccurrenceCallback} callback Node-style callback called with the error, if any, and Occurrence - * @returns {undefined} - * @variation 1 + * Decodes a CreateOccurrenceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Grafeas.prototype.createOccurrence = function createOccurrence(request, callback) { - return this.rpcCall(createOccurrence, $root.grafeas.v1.CreateOccurrenceRequest, $root.grafeas.v1.Occurrence, request, callback); - }, "name", { value: "CreateOccurrence" }); + CreateOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateOccurrence. - * @function createOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.ICreateOccurrenceRequest} request CreateOccurrenceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a CreateOccurrenceRequest message. + * @function verify + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + CreateOccurrenceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.occurrence != null && message.hasOwnProperty("occurrence")) { + var error = $root.grafeas.v1.Occurrence.verify(message.occurrence); + if (error) + return "occurrence." + error; + } + return null; + }; /** - * Callback as used by {@link grafeas.v1.Grafeas#batchCreateOccurrences}. - * @memberof grafeas.v1.Grafeas - * @typedef BatchCreateOccurrencesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.BatchCreateOccurrencesResponse} [response] BatchCreateOccurrencesResponse + * Creates a CreateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest */ + CreateOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CreateOccurrenceRequest) + return object; + var message = new $root.grafeas.v1.CreateOccurrenceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.occurrence != null) { + if (typeof object.occurrence !== "object") + throw TypeError(".grafeas.v1.CreateOccurrenceRequest.occurrence: object expected"); + message.occurrence = $root.grafeas.v1.Occurrence.fromObject(object.occurrence); + } + return message; + }; /** - * Calls BatchCreateOccurrences. - * @function batchCreateOccurrences - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IBatchCreateOccurrencesRequest} request BatchCreateOccurrencesRequest message or plain object - * @param {grafeas.v1.Grafeas.BatchCreateOccurrencesCallback} callback Node-style callback called with the error, if any, and BatchCreateOccurrencesResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a CreateOccurrenceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.CreateOccurrenceRequest + * @static + * @param {grafeas.v1.CreateOccurrenceRequest} message CreateOccurrenceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Grafeas.prototype.batchCreateOccurrences = function batchCreateOccurrences(request, callback) { - return this.rpcCall(batchCreateOccurrences, $root.grafeas.v1.BatchCreateOccurrencesRequest, $root.grafeas.v1.BatchCreateOccurrencesResponse, request, callback); - }, "name", { value: "BatchCreateOccurrences" }); + CreateOccurrenceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.occurrence = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.occurrence != null && message.hasOwnProperty("occurrence")) + object.occurrence = $root.grafeas.v1.Occurrence.toObject(message.occurrence, options); + return object; + }; /** - * Calls BatchCreateOccurrences. - * @function batchCreateOccurrences - * @memberof grafeas.v1.Grafeas + * Converts this CreateOccurrenceRequest to JSON. + * @function toJSON + * @memberof grafeas.v1.CreateOccurrenceRequest * @instance - * @param {grafeas.v1.IBatchCreateOccurrencesRequest} request BatchCreateOccurrencesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + CreateOccurrenceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link grafeas.v1.Grafeas#updateOccurrence}. - * @memberof grafeas.v1.Grafeas - * @typedef UpdateOccurrenceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.Occurrence} [response] Occurrence - */ + return CreateOccurrenceRequest; + })(); + + v1.UpdateOccurrenceRequest = (function() { /** - * Calls UpdateOccurrence. - * @function updateOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IUpdateOccurrenceRequest} request UpdateOccurrenceRequest message or plain object - * @param {grafeas.v1.Grafeas.UpdateOccurrenceCallback} callback Node-style callback called with the error, if any, and Occurrence - * @returns {undefined} - * @variation 1 + * Properties of an UpdateOccurrenceRequest. + * @memberof grafeas.v1 + * @interface IUpdateOccurrenceRequest + * @property {string|null} [name] UpdateOccurrenceRequest name + * @property {grafeas.v1.IOccurrence|null} [occurrence] UpdateOccurrenceRequest occurrence + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOccurrenceRequest updateMask */ - Object.defineProperty(Grafeas.prototype.updateOccurrence = function updateOccurrence(request, callback) { - return this.rpcCall(updateOccurrence, $root.grafeas.v1.UpdateOccurrenceRequest, $root.grafeas.v1.Occurrence, request, callback); - }, "name", { value: "UpdateOccurrence" }); /** - * Calls UpdateOccurrence. - * @function updateOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IUpdateOccurrenceRequest} request UpdateOccurrenceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new UpdateOccurrenceRequest. + * @memberof grafeas.v1 + * @classdesc Represents an UpdateOccurrenceRequest. + * @implements IUpdateOccurrenceRequest + * @constructor + * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set */ + function UpdateOccurrenceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link grafeas.v1.Grafeas#getOccurrenceNote}. - * @memberof grafeas.v1.Grafeas - * @typedef GetOccurrenceNoteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.Note} [response] Note + * UpdateOccurrenceRequest name. + * @member {string} name + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @instance */ + UpdateOccurrenceRequest.prototype.name = ""; /** - * Calls GetOccurrenceNote. - * @function getOccurrenceNote - * @memberof grafeas.v1.Grafeas + * UpdateOccurrenceRequest occurrence. + * @member {grafeas.v1.IOccurrence|null|undefined} occurrence + * @memberof grafeas.v1.UpdateOccurrenceRequest * @instance - * @param {grafeas.v1.IGetOccurrenceNoteRequest} request GetOccurrenceNoteRequest message or plain object - * @param {grafeas.v1.Grafeas.GetOccurrenceNoteCallback} callback Node-style callback called with the error, if any, and Note - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Grafeas.prototype.getOccurrenceNote = function getOccurrenceNote(request, callback) { - return this.rpcCall(getOccurrenceNote, $root.grafeas.v1.GetOccurrenceNoteRequest, $root.grafeas.v1.Note, request, callback); - }, "name", { value: "GetOccurrenceNote" }); + UpdateOccurrenceRequest.prototype.occurrence = null; /** - * Calls GetOccurrenceNote. - * @function getOccurrenceNote - * @memberof grafeas.v1.Grafeas + * UpdateOccurrenceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof grafeas.v1.UpdateOccurrenceRequest * @instance - * @param {grafeas.v1.IGetOccurrenceNoteRequest} request GetOccurrenceNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + UpdateOccurrenceRequest.prototype.updateMask = null; /** - * Callback as used by {@link grafeas.v1.Grafeas#getNote}. - * @memberof grafeas.v1.Grafeas - * @typedef GetNoteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.Note} [response] Note + * Creates a new UpdateOccurrenceRequest instance using the specified properties. + * @function create + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest instance */ + UpdateOccurrenceRequest.create = function create(properties) { + return new UpdateOccurrenceRequest(properties); + }; /** - * Calls GetNote. - * @function getNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IGetNoteRequest} request GetNoteRequest message or plain object - * @param {grafeas.v1.Grafeas.GetNoteCallback} callback Node-style callback called with the error, if any, and Note - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Grafeas.prototype.getNote = function getNote(request, callback) { - return this.rpcCall(getNote, $root.grafeas.v1.GetNoteRequest, $root.grafeas.v1.Note, request, callback); - }, "name", { value: "GetNote" }); + UpdateOccurrenceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.occurrence != null && Object.hasOwnProperty.call(message, "occurrence")) + $root.grafeas.v1.Occurrence.encode(message.occurrence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls GetNote. - * @function getNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IGetNoteRequest} request GetNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified UpdateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link grafeas.v1.Grafeas#listNotes}. - * @memberof grafeas.v1.Grafeas - * @typedef ListNotesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.ListNotesResponse} [response] ListNotesResponse + * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateOccurrenceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpdateOccurrenceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.occurrence = $root.grafeas.v1.Occurrence.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListNotes. - * @function listNotes - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IListNotesRequest} request ListNotesRequest message or plain object - * @param {grafeas.v1.Grafeas.ListNotesCallback} callback Node-style callback called with the error, if any, and ListNotesResponse - * @returns {undefined} - * @variation 1 + * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Grafeas.prototype.listNotes = function listNotes(request, callback) { - return this.rpcCall(listNotes, $root.grafeas.v1.ListNotesRequest, $root.grafeas.v1.ListNotesResponse, request, callback); - }, "name", { value: "ListNotes" }); + UpdateOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListNotes. - * @function listNotes - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IListNotesRequest} request ListNotesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an UpdateOccurrenceRequest message. + * @function verify + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + UpdateOccurrenceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.occurrence != null && message.hasOwnProperty("occurrence")) { + var error = $root.grafeas.v1.Occurrence.verify(message.occurrence); + if (error) + return "occurrence." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * Callback as used by {@link grafeas.v1.Grafeas#deleteNote}. - * @memberof grafeas.v1.Grafeas - * @typedef DeleteNoteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates an UpdateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest */ + UpdateOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpdateOccurrenceRequest) + return object; + var message = new $root.grafeas.v1.UpdateOccurrenceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.occurrence != null) { + if (typeof object.occurrence !== "object") + throw TypeError(".grafeas.v1.UpdateOccurrenceRequest.occurrence: object expected"); + message.occurrence = $root.grafeas.v1.Occurrence.fromObject(object.occurrence); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".grafeas.v1.UpdateOccurrenceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * Calls DeleteNote. - * @function deleteNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IDeleteNoteRequest} request DeleteNoteRequest message or plain object - * @param {grafeas.v1.Grafeas.DeleteNoteCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from an UpdateOccurrenceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @static + * @param {grafeas.v1.UpdateOccurrenceRequest} message UpdateOccurrenceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Grafeas.prototype.deleteNote = function deleteNote(request, callback) { - return this.rpcCall(deleteNote, $root.grafeas.v1.DeleteNoteRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteNote" }); + UpdateOccurrenceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.occurrence = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.occurrence != null && message.hasOwnProperty("occurrence")) + object.occurrence = $root.grafeas.v1.Occurrence.toObject(message.occurrence, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * Calls DeleteNote. - * @function deleteNote - * @memberof grafeas.v1.Grafeas + * Converts this UpdateOccurrenceRequest to JSON. + * @function toJSON + * @memberof grafeas.v1.UpdateOccurrenceRequest * @instance - * @param {grafeas.v1.IDeleteNoteRequest} request DeleteNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + UpdateOccurrenceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateOccurrenceRequest; + })(); + + v1.GetNoteRequest = (function() { /** - * Callback as used by {@link grafeas.v1.Grafeas#createNote}. - * @memberof grafeas.v1.Grafeas - * @typedef CreateNoteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.Note} [response] Note + * Properties of a GetNoteRequest. + * @memberof grafeas.v1 + * @interface IGetNoteRequest + * @property {string|null} [name] GetNoteRequest name */ /** - * Calls CreateNote. - * @function createNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.ICreateNoteRequest} request CreateNoteRequest message or plain object - * @param {grafeas.v1.Grafeas.CreateNoteCallback} callback Node-style callback called with the error, if any, and Note - * @returns {undefined} - * @variation 1 + * Constructs a new GetNoteRequest. + * @memberof grafeas.v1 + * @classdesc Represents a GetNoteRequest. + * @implements IGetNoteRequest + * @constructor + * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set */ - Object.defineProperty(Grafeas.prototype.createNote = function createNote(request, callback) { - return this.rpcCall(createNote, $root.grafeas.v1.CreateNoteRequest, $root.grafeas.v1.Note, request, callback); - }, "name", { value: "CreateNote" }); + function GetNoteRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateNote. - * @function createNote - * @memberof grafeas.v1.Grafeas + * GetNoteRequest name. + * @member {string} name + * @memberof grafeas.v1.GetNoteRequest * @instance - * @param {grafeas.v1.ICreateNoteRequest} request CreateNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetNoteRequest.prototype.name = ""; /** - * Callback as used by {@link grafeas.v1.Grafeas#batchCreateNotes}. - * @memberof grafeas.v1.Grafeas - * @typedef BatchCreateNotesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.BatchCreateNotesResponse} [response] BatchCreateNotesResponse + * Creates a new GetNoteRequest instance using the specified properties. + * @function create + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest instance */ + GetNoteRequest.create = function create(properties) { + return new GetNoteRequest(properties); + }; /** - * Calls BatchCreateNotes. - * @function batchCreateNotes - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IBatchCreateNotesRequest} request BatchCreateNotesRequest message or plain object - * @param {grafeas.v1.Grafeas.BatchCreateNotesCallback} callback Node-style callback called with the error, if any, and BatchCreateNotesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetNoteRequest message. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Grafeas.prototype.batchCreateNotes = function batchCreateNotes(request, callback) { - return this.rpcCall(batchCreateNotes, $root.grafeas.v1.BatchCreateNotesRequest, $root.grafeas.v1.BatchCreateNotesResponse, request, callback); - }, "name", { value: "BatchCreateNotes" }); + GetNoteRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls BatchCreateNotes. - * @function batchCreateNotes - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IBatchCreateNotesRequest} request BatchCreateNotesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link grafeas.v1.Grafeas#updateNote}. - * @memberof grafeas.v1.Grafeas - * @typedef UpdateNoteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.Note} [response] Note + * Decodes a GetNoteRequest message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetNoteRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.GetNoteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateNote. - * @function updateNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IUpdateNoteRequest} request UpdateNoteRequest message or plain object - * @param {grafeas.v1.Grafeas.UpdateNoteCallback} callback Node-style callback called with the error, if any, and Note - * @returns {undefined} - * @variation 1 + * Decodes a GetNoteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Grafeas.prototype.updateNote = function updateNote(request, callback) { - return this.rpcCall(updateNote, $root.grafeas.v1.UpdateNoteRequest, $root.grafeas.v1.Note, request, callback); - }, "name", { value: "UpdateNote" }); + GetNoteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateNote. - * @function updateNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IUpdateNoteRequest} request UpdateNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetNoteRequest message. + * @function verify + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetNoteRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Callback as used by {@link grafeas.v1.Grafeas#listNoteOccurrences}. - * @memberof grafeas.v1.Grafeas - * @typedef ListNoteOccurrencesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {grafeas.v1.ListNoteOccurrencesResponse} [response] ListNoteOccurrencesResponse + * Creates a GetNoteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest */ + GetNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GetNoteRequest) + return object; + var message = new $root.grafeas.v1.GetNoteRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls ListNoteOccurrences. - * @function listNoteOccurrences - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IListNoteOccurrencesRequest} request ListNoteOccurrencesRequest message or plain object - * @param {grafeas.v1.Grafeas.ListNoteOccurrencesCallback} callback Node-style callback called with the error, if any, and ListNoteOccurrencesResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GetNoteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.GetNoteRequest + * @static + * @param {grafeas.v1.GetNoteRequest} message GetNoteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Grafeas.prototype.listNoteOccurrences = function listNoteOccurrences(request, callback) { - return this.rpcCall(listNoteOccurrences, $root.grafeas.v1.ListNoteOccurrencesRequest, $root.grafeas.v1.ListNoteOccurrencesResponse, request, callback); - }, "name", { value: "ListNoteOccurrences" }); + GetNoteRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls ListNoteOccurrences. - * @function listNoteOccurrences - * @memberof grafeas.v1.Grafeas + * Converts this GetNoteRequest to JSON. + * @function toJSON + * @memberof grafeas.v1.GetNoteRequest * @instance - * @param {grafeas.v1.IListNoteOccurrencesRequest} request ListNoteOccurrencesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetNoteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Grafeas; + return GetNoteRequest; })(); - v1.Occurrence = (function() { + v1.GetOccurrenceNoteRequest = (function() { /** - * Properties of an Occurrence. + * Properties of a GetOccurrenceNoteRequest. * @memberof grafeas.v1 - * @interface IOccurrence - * @property {string|null} [name] Occurrence name - * @property {string|null} [resourceUri] Occurrence resourceUri - * @property {string|null} [noteName] Occurrence noteName - * @property {grafeas.v1.NoteKind|null} [kind] Occurrence kind - * @property {string|null} [remediation] Occurrence remediation - * @property {google.protobuf.ITimestamp|null} [createTime] Occurrence createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Occurrence updateTime - * @property {grafeas.v1.IVulnerabilityOccurrence|null} [vulnerability] Occurrence vulnerability - * @property {grafeas.v1.IBuildOccurrence|null} [build] Occurrence build - * @property {grafeas.v1.IImageOccurrence|null} [image] Occurrence image - * @property {grafeas.v1.IPackageOccurrence|null} ["package"] Occurrence package - * @property {grafeas.v1.IDeploymentOccurrence|null} [deployment] Occurrence deployment - * @property {grafeas.v1.IDiscoveryOccurrence|null} [discovery] Occurrence discovery - * @property {grafeas.v1.IAttestationOccurrence|null} [attestation] Occurrence attestation - * @property {grafeas.v1.IUpgradeOccurrence|null} [upgrade] Occurrence upgrade - * @property {grafeas.v1.IComplianceOccurrence|null} [compliance] Occurrence compliance - * @property {grafeas.v1.IDSSEAttestationOccurrence|null} [dsseAttestation] Occurrence dsseAttestation - * @property {grafeas.v1.IEnvelope|null} [envelope] Occurrence envelope + * @interface IGetOccurrenceNoteRequest + * @property {string|null} [name] GetOccurrenceNoteRequest name */ /** - * Constructs a new Occurrence. + * Constructs a new GetOccurrenceNoteRequest. * @memberof grafeas.v1 - * @classdesc Represents an Occurrence. - * @implements IOccurrence + * @classdesc Represents a GetOccurrenceNoteRequest. + * @implements IGetOccurrenceNoteRequest * @constructor - * @param {grafeas.v1.IOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set */ - function Occurrence(properties) { + function GetOccurrenceNoteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17711,310 +17679,304 @@ } /** - * Occurrence name. + * GetOccurrenceNoteRequest name. * @member {string} name - * @memberof grafeas.v1.Occurrence - * @instance - */ - Occurrence.prototype.name = ""; - - /** - * Occurrence resourceUri. - * @member {string} resourceUri - * @memberof grafeas.v1.Occurrence - * @instance - */ - Occurrence.prototype.resourceUri = ""; - - /** - * Occurrence noteName. - * @member {string} noteName - * @memberof grafeas.v1.Occurrence - * @instance - */ - Occurrence.prototype.noteName = ""; - - /** - * Occurrence kind. - * @member {grafeas.v1.NoteKind} kind - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @instance */ - Occurrence.prototype.kind = 0; + GetOccurrenceNoteRequest.prototype.name = ""; /** - * Occurrence remediation. - * @member {string} remediation - * @memberof grafeas.v1.Occurrence - * @instance + * Creates a new GetOccurrenceNoteRequest instance using the specified properties. + * @function create + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest instance */ - Occurrence.prototype.remediation = ""; + GetOccurrenceNoteRequest.create = function create(properties) { + return new GetOccurrenceNoteRequest(properties); + }; /** - * Occurrence createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof grafeas.v1.Occurrence - * @instance + * Encodes the specified GetOccurrenceNoteRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Occurrence.prototype.createTime = null; + GetOccurrenceNoteRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Occurrence updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof grafeas.v1.Occurrence - * @instance + * Encodes the specified GetOccurrenceNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Occurrence.prototype.updateTime = null; + GetOccurrenceNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Occurrence vulnerability. - * @member {grafeas.v1.IVulnerabilityOccurrence|null|undefined} vulnerability - * @memberof grafeas.v1.Occurrence - * @instance + * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Occurrence.prototype.vulnerability = null; + GetOccurrenceNoteRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.GetOccurrenceNoteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Occurrence build. - * @member {grafeas.v1.IBuildOccurrence|null|undefined} build - * @memberof grafeas.v1.Occurrence - * @instance + * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Occurrence.prototype.build = null; + GetOccurrenceNoteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Occurrence image. - * @member {grafeas.v1.IImageOccurrence|null|undefined} image - * @memberof grafeas.v1.Occurrence - * @instance + * Verifies a GetOccurrenceNoteRequest message. + * @function verify + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Occurrence.prototype.image = null; + GetOccurrenceNoteRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Occurrence package. - * @member {grafeas.v1.IPackageOccurrence|null|undefined} package - * @memberof grafeas.v1.Occurrence - * @instance + * Creates a GetOccurrenceNoteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest */ - Occurrence.prototype["package"] = null; + GetOccurrenceNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GetOccurrenceNoteRequest) + return object; + var message = new $root.grafeas.v1.GetOccurrenceNoteRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Occurrence deployment. - * @member {grafeas.v1.IDeploymentOccurrence|null|undefined} deployment - * @memberof grafeas.v1.Occurrence - * @instance + * Creates a plain object from a GetOccurrenceNoteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @static + * @param {grafeas.v1.GetOccurrenceNoteRequest} message GetOccurrenceNoteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Occurrence.prototype.deployment = null; + GetOccurrenceNoteRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Occurrence discovery. - * @member {grafeas.v1.IDiscoveryOccurrence|null|undefined} discovery - * @memberof grafeas.v1.Occurrence + * Converts this GetOccurrenceNoteRequest to JSON. + * @function toJSON + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @instance + * @returns {Object.} JSON object */ - Occurrence.prototype.discovery = null; + GetOccurrenceNoteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOccurrenceNoteRequest; + })(); + + v1.ListNotesRequest = (function() { /** - * Occurrence attestation. - * @member {grafeas.v1.IAttestationOccurrence|null|undefined} attestation - * @memberof grafeas.v1.Occurrence - * @instance + * Properties of a ListNotesRequest. + * @memberof grafeas.v1 + * @interface IListNotesRequest + * @property {string|null} [parent] ListNotesRequest parent + * @property {string|null} [filter] ListNotesRequest filter + * @property {number|null} [pageSize] ListNotesRequest pageSize + * @property {string|null} [pageToken] ListNotesRequest pageToken */ - Occurrence.prototype.attestation = null; /** - * Occurrence upgrade. - * @member {grafeas.v1.IUpgradeOccurrence|null|undefined} upgrade - * @memberof grafeas.v1.Occurrence - * @instance + * Constructs a new ListNotesRequest. + * @memberof grafeas.v1 + * @classdesc Represents a ListNotesRequest. + * @implements IListNotesRequest + * @constructor + * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set */ - Occurrence.prototype.upgrade = null; + function ListNotesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Occurrence compliance. - * @member {grafeas.v1.IComplianceOccurrence|null|undefined} compliance - * @memberof grafeas.v1.Occurrence + * ListNotesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.ListNotesRequest * @instance */ - Occurrence.prototype.compliance = null; + ListNotesRequest.prototype.parent = ""; /** - * Occurrence dsseAttestation. - * @member {grafeas.v1.IDSSEAttestationOccurrence|null|undefined} dsseAttestation - * @memberof grafeas.v1.Occurrence + * ListNotesRequest filter. + * @member {string} filter + * @memberof grafeas.v1.ListNotesRequest * @instance */ - Occurrence.prototype.dsseAttestation = null; + ListNotesRequest.prototype.filter = ""; /** - * Occurrence envelope. - * @member {grafeas.v1.IEnvelope|null|undefined} envelope - * @memberof grafeas.v1.Occurrence + * ListNotesRequest pageSize. + * @member {number} pageSize + * @memberof grafeas.v1.ListNotesRequest * @instance */ - Occurrence.prototype.envelope = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListNotesRequest.prototype.pageSize = 0; /** - * Occurrence details. - * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} details - * @memberof grafeas.v1.Occurrence + * ListNotesRequest pageToken. + * @member {string} pageToken + * @memberof grafeas.v1.ListNotesRequest * @instance */ - Object.defineProperty(Occurrence.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["vulnerability", "build", "image", "package", "deployment", "discovery", "attestation", "upgrade", "compliance", "dsseAttestation"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListNotesRequest.prototype.pageToken = ""; /** - * Creates a new Occurrence instance using the specified properties. + * Creates a new ListNotesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Occurrence - * @static - * @param {grafeas.v1.IOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.Occurrence} Occurrence instance - */ - Occurrence.create = function create(properties) { - return new Occurrence(properties); - }; - - /** - * Encodes the specified Occurrence message. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ListNotesRequest * @static - * @param {grafeas.v1.IOccurrence} message Occurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set + * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest instance */ - Occurrence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.noteName != null && Object.hasOwnProperty.call(message, "noteName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.noteName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.kind); - if (message.remediation != null && Object.hasOwnProperty.call(message, "remediation")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.remediation); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) - $root.grafeas.v1.VulnerabilityOccurrence.encode(message.vulnerability, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - $root.grafeas.v1.BuildOccurrence.encode(message.build, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.grafeas.v1.ImageOccurrence.encode(message.image, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - $root.grafeas.v1.PackageOccurrence.encode(message["package"], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) - $root.grafeas.v1.DeploymentOccurrence.encode(message.deployment, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.discovery != null && Object.hasOwnProperty.call(message, "discovery")) - $root.grafeas.v1.DiscoveryOccurrence.encode(message.discovery, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) - $root.grafeas.v1.AttestationOccurrence.encode(message.attestation, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.upgrade != null && Object.hasOwnProperty.call(message, "upgrade")) - $root.grafeas.v1.UpgradeOccurrence.encode(message.upgrade, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.compliance != null && Object.hasOwnProperty.call(message, "compliance")) - $root.grafeas.v1.ComplianceOccurrence.encode(message.compliance, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.dsseAttestation != null && Object.hasOwnProperty.call(message, "dsseAttestation")) - $root.grafeas.v1.DSSEAttestationOccurrence.encode(message.dsseAttestation, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.envelope != null && Object.hasOwnProperty.call(message, "envelope")) - $root.grafeas.v1.Envelope.encode(message.envelope, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + ListNotesRequest.create = function create(properties) { + return new ListNotesRequest(properties); + }; + + /** + * Encodes the specified ListNotesRequest message. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.ListNotesRequest + * @static + * @param {grafeas.v1.IListNotesRequest} message ListNotesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified Occurrence message, length delimited. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. + * Encodes the specified ListNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ListNotesRequest * @static - * @param {grafeas.v1.IOccurrence} message Occurrence message or plain object to encode + * @param {grafeas.v1.IListNotesRequest} message ListNotesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Occurrence.encodeDelimited = function encodeDelimited(message, writer) { + ListNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Occurrence message from the specified reader or buffer. + * Decodes a ListNotesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ListNotesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Occurrence} Occurrence + * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Occurrence.decode = function decode(reader, length) { + ListNotesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Occurrence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNotesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.resourceUri = reader.string(); + message.filter = reader.string(); break; case 3: - message.noteName = reader.string(); + message.pageSize = reader.int32(); break; case 4: - message.kind = reader.int32(); - break; - case 5: - message.remediation = reader.string(); - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.vulnerability = $root.grafeas.v1.VulnerabilityOccurrence.decode(reader, reader.uint32()); - break; - case 9: - message.build = $root.grafeas.v1.BuildOccurrence.decode(reader, reader.uint32()); - break; - case 10: - message.image = $root.grafeas.v1.ImageOccurrence.decode(reader, reader.uint32()); - break; - case 11: - message["package"] = $root.grafeas.v1.PackageOccurrence.decode(reader, reader.uint32()); - break; - case 12: - message.deployment = $root.grafeas.v1.DeploymentOccurrence.decode(reader, reader.uint32()); - break; - case 13: - message.discovery = $root.grafeas.v1.DiscoveryOccurrence.decode(reader, reader.uint32()); - break; - case 14: - message.attestation = $root.grafeas.v1.AttestationOccurrence.decode(reader, reader.uint32()); - break; - case 15: - message.upgrade = $root.grafeas.v1.UpgradeOccurrence.decode(reader, reader.uint32()); - break; - case 16: - message.compliance = $root.grafeas.v1.ComplianceOccurrence.decode(reader, reader.uint32()); - break; - case 17: - message.dsseAttestation = $root.grafeas.v1.DSSEAttestationOccurrence.decode(reader, reader.uint32()); - break; - case 18: - message.envelope = $root.grafeas.v1.Envelope.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -18025,456 +17987,134 @@ }; /** - * Decodes an Occurrence message from the specified reader or buffer, length delimited. + * Decodes a ListNotesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ListNotesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Occurrence} Occurrence + * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Occurrence.decodeDelimited = function decodeDelimited(reader) { + ListNotesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Occurrence message. - * @function verify - * @memberof grafeas.v1.Occurrence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Occurrence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.noteName != null && message.hasOwnProperty("noteName")) - if (!$util.isString(message.noteName)) - return "noteName: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - break; - } - if (message.remediation != null && message.hasOwnProperty("remediation")) - if (!$util.isString(message.remediation)) - return "remediation: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { - properties.details = 1; - { - var error = $root.grafeas.v1.VulnerabilityOccurrence.verify(message.vulnerability); - if (error) - return "vulnerability." + error; - } - } - if (message.build != null && message.hasOwnProperty("build")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.BuildOccurrence.verify(message.build); - if (error) - return "build." + error; - } - } - if (message.image != null && message.hasOwnProperty("image")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.ImageOccurrence.verify(message.image); - if (error) - return "image." + error; - } - } - if (message["package"] != null && message.hasOwnProperty("package")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.PackageOccurrence.verify(message["package"]); - if (error) - return "package." + error; - } - } - if (message.deployment != null && message.hasOwnProperty("deployment")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.DeploymentOccurrence.verify(message.deployment); - if (error) - return "deployment." + error; - } - } - if (message.discovery != null && message.hasOwnProperty("discovery")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.DiscoveryOccurrence.verify(message.discovery); - if (error) - return "discovery." + error; - } - } - if (message.attestation != null && message.hasOwnProperty("attestation")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.AttestationOccurrence.verify(message.attestation); - if (error) - return "attestation." + error; - } - } - if (message.upgrade != null && message.hasOwnProperty("upgrade")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.UpgradeOccurrence.verify(message.upgrade); - if (error) - return "upgrade." + error; - } - } - if (message.compliance != null && message.hasOwnProperty("compliance")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.ComplianceOccurrence.verify(message.compliance); - if (error) - return "compliance." + error; - } - } - if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.grafeas.v1.DSSEAttestationOccurrence.verify(message.dsseAttestation); - if (error) - return "dsseAttestation." + error; - } - } - if (message.envelope != null && message.hasOwnProperty("envelope")) { - var error = $root.grafeas.v1.Envelope.verify(message.envelope); - if (error) - return "envelope." + error; - } + }; + + /** + * Verifies a ListNotesRequest message. + * @function verify + * @memberof grafeas.v1.ListNotesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNotesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an Occurrence message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ListNotesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Occurrence} Occurrence + * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest */ - Occurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Occurrence) + ListNotesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNotesRequest) return object; - var message = new $root.grafeas.v1.Occurrence(); - if (object.name != null) - message.name = String(object.name); - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.noteName != null) - message.noteName = String(object.noteName); - switch (object.kind) { - case "NOTE_KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "VULNERABILITY": - case 1: - message.kind = 1; - break; - case "BUILD": - case 2: - message.kind = 2; - break; - case "IMAGE": - case 3: - message.kind = 3; - break; - case "PACKAGE": - case 4: - message.kind = 4; - break; - case "DEPLOYMENT": - case 5: - message.kind = 5; - break; - case "DISCOVERY": - case 6: - message.kind = 6; - break; - case "ATTESTATION": - case 7: - message.kind = 7; - break; - case "UPGRADE": - case 8: - message.kind = 8; - break; - case "COMPLIANCE": - case 9: - message.kind = 9; - break; - case "DSSE_ATTESTATION": - case 10: - message.kind = 10; - break; - } - if (object.remediation != null) - message.remediation = String(object.remediation); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".grafeas.v1.Occurrence.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".grafeas.v1.Occurrence.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.vulnerability != null) { - if (typeof object.vulnerability !== "object") - throw TypeError(".grafeas.v1.Occurrence.vulnerability: object expected"); - message.vulnerability = $root.grafeas.v1.VulnerabilityOccurrence.fromObject(object.vulnerability); - } - if (object.build != null) { - if (typeof object.build !== "object") - throw TypeError(".grafeas.v1.Occurrence.build: object expected"); - message.build = $root.grafeas.v1.BuildOccurrence.fromObject(object.build); - } - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".grafeas.v1.Occurrence.image: object expected"); - message.image = $root.grafeas.v1.ImageOccurrence.fromObject(object.image); - } - if (object["package"] != null) { - if (typeof object["package"] !== "object") - throw TypeError(".grafeas.v1.Occurrence.package: object expected"); - message["package"] = $root.grafeas.v1.PackageOccurrence.fromObject(object["package"]); - } - if (object.deployment != null) { - if (typeof object.deployment !== "object") - throw TypeError(".grafeas.v1.Occurrence.deployment: object expected"); - message.deployment = $root.grafeas.v1.DeploymentOccurrence.fromObject(object.deployment); - } - if (object.discovery != null) { - if (typeof object.discovery !== "object") - throw TypeError(".grafeas.v1.Occurrence.discovery: object expected"); - message.discovery = $root.grafeas.v1.DiscoveryOccurrence.fromObject(object.discovery); - } - if (object.attestation != null) { - if (typeof object.attestation !== "object") - throw TypeError(".grafeas.v1.Occurrence.attestation: object expected"); - message.attestation = $root.grafeas.v1.AttestationOccurrence.fromObject(object.attestation); - } - if (object.upgrade != null) { - if (typeof object.upgrade !== "object") - throw TypeError(".grafeas.v1.Occurrence.upgrade: object expected"); - message.upgrade = $root.grafeas.v1.UpgradeOccurrence.fromObject(object.upgrade); - } - if (object.compliance != null) { - if (typeof object.compliance !== "object") - throw TypeError(".grafeas.v1.Occurrence.compliance: object expected"); - message.compliance = $root.grafeas.v1.ComplianceOccurrence.fromObject(object.compliance); - } - if (object.dsseAttestation != null) { - if (typeof object.dsseAttestation !== "object") - throw TypeError(".grafeas.v1.Occurrence.dsseAttestation: object expected"); - message.dsseAttestation = $root.grafeas.v1.DSSEAttestationOccurrence.fromObject(object.dsseAttestation); - } - if (object.envelope != null) { - if (typeof object.envelope !== "object") - throw TypeError(".grafeas.v1.Occurrence.envelope: object expected"); - message.envelope = $root.grafeas.v1.Envelope.fromObject(object.envelope); - } + var message = new $root.grafeas.v1.ListNotesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an Occurrence message. Also converts values to other types if specified. + * Creates a plain object from a ListNotesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ListNotesRequest * @static - * @param {grafeas.v1.Occurrence} message Occurrence + * @param {grafeas.v1.ListNotesRequest} message ListNotesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Occurrence.toObject = function toObject(message, options) { + ListNotesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.resourceUri = ""; - object.noteName = ""; - object.kind = options.enums === String ? "NOTE_KIND_UNSPECIFIED" : 0; - object.remediation = ""; - object.createTime = null; - object.updateTime = null; - object.envelope = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.noteName != null && message.hasOwnProperty("noteName")) - object.noteName = message.noteName; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.grafeas.v1.NoteKind[message.kind] : message.kind; - if (message.remediation != null && message.hasOwnProperty("remediation")) - object.remediation = message.remediation; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { - object.vulnerability = $root.grafeas.v1.VulnerabilityOccurrence.toObject(message.vulnerability, options); - if (options.oneofs) - object.details = "vulnerability"; - } - if (message.build != null && message.hasOwnProperty("build")) { - object.build = $root.grafeas.v1.BuildOccurrence.toObject(message.build, options); - if (options.oneofs) - object.details = "build"; - } - if (message.image != null && message.hasOwnProperty("image")) { - object.image = $root.grafeas.v1.ImageOccurrence.toObject(message.image, options); - if (options.oneofs) - object.details = "image"; - } - if (message["package"] != null && message.hasOwnProperty("package")) { - object["package"] = $root.grafeas.v1.PackageOccurrence.toObject(message["package"], options); - if (options.oneofs) - object.details = "package"; - } - if (message.deployment != null && message.hasOwnProperty("deployment")) { - object.deployment = $root.grafeas.v1.DeploymentOccurrence.toObject(message.deployment, options); - if (options.oneofs) - object.details = "deployment"; - } - if (message.discovery != null && message.hasOwnProperty("discovery")) { - object.discovery = $root.grafeas.v1.DiscoveryOccurrence.toObject(message.discovery, options); - if (options.oneofs) - object.details = "discovery"; - } - if (message.attestation != null && message.hasOwnProperty("attestation")) { - object.attestation = $root.grafeas.v1.AttestationOccurrence.toObject(message.attestation, options); - if (options.oneofs) - object.details = "attestation"; - } - if (message.upgrade != null && message.hasOwnProperty("upgrade")) { - object.upgrade = $root.grafeas.v1.UpgradeOccurrence.toObject(message.upgrade, options); - if (options.oneofs) - object.details = "upgrade"; - } - if (message.compliance != null && message.hasOwnProperty("compliance")) { - object.compliance = $root.grafeas.v1.ComplianceOccurrence.toObject(message.compliance, options); - if (options.oneofs) - object.details = "compliance"; - } - if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { - object.dsseAttestation = $root.grafeas.v1.DSSEAttestationOccurrence.toObject(message.dsseAttestation, options); - if (options.oneofs) - object.details = "dsseAttestation"; + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.envelope != null && message.hasOwnProperty("envelope")) - object.envelope = $root.grafeas.v1.Envelope.toObject(message.envelope, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this Occurrence to JSON. + * Converts this ListNotesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ListNotesRequest * @instance * @returns {Object.} JSON object */ - Occurrence.prototype.toJSON = function toJSON() { + ListNotesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Occurrence; + return ListNotesRequest; })(); - v1.Note = (function() { + v1.ListNotesResponse = (function() { /** - * Properties of a Note. + * Properties of a ListNotesResponse. * @memberof grafeas.v1 - * @interface INote - * @property {string|null} [name] Note name - * @property {string|null} [shortDescription] Note shortDescription - * @property {string|null} [longDescription] Note longDescription - * @property {grafeas.v1.NoteKind|null} [kind] Note kind - * @property {Array.|null} [relatedUrl] Note relatedUrl - * @property {google.protobuf.ITimestamp|null} [expirationTime] Note expirationTime - * @property {google.protobuf.ITimestamp|null} [createTime] Note createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Note updateTime - * @property {Array.|null} [relatedNoteNames] Note relatedNoteNames - * @property {grafeas.v1.IVulnerabilityNote|null} [vulnerability] Note vulnerability - * @property {grafeas.v1.IBuildNote|null} [build] Note build - * @property {grafeas.v1.IImageNote|null} [image] Note image - * @property {grafeas.v1.IPackageNote|null} ["package"] Note package - * @property {grafeas.v1.IDeploymentNote|null} [deployment] Note deployment - * @property {grafeas.v1.IDiscoveryNote|null} [discovery] Note discovery - * @property {grafeas.v1.IAttestationNote|null} [attestation] Note attestation - * @property {grafeas.v1.IUpgradeNote|null} [upgrade] Note upgrade - * @property {grafeas.v1.IComplianceNote|null} [compliance] Note compliance - * @property {grafeas.v1.IDSSEAttestationNote|null} [dsseAttestation] Note dsseAttestation + * @interface IListNotesResponse + * @property {Array.|null} [notes] ListNotesResponse notes + * @property {string|null} [nextPageToken] ListNotesResponse nextPageToken */ /** - * Constructs a new Note. + * Constructs a new ListNotesResponse. * @memberof grafeas.v1 - * @classdesc Represents a Note. - * @implements INote + * @classdesc Represents a ListNotesResponse. + * @implements IListNotesResponse * @constructor - * @param {grafeas.v1.INote=} [properties] Properties to set + * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set */ - function Note(properties) { - this.relatedUrl = []; - this.relatedNoteNames = []; + function ListNotesResponse(properties) { + this.notes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18482,329 +18122,304 @@ } /** - * Note name. - * @member {string} name - * @memberof grafeas.v1.Note - * @instance - */ - Note.prototype.name = ""; - - /** - * Note shortDescription. - * @member {string} shortDescription - * @memberof grafeas.v1.Note - * @instance - */ - Note.prototype.shortDescription = ""; - - /** - * Note longDescription. - * @member {string} longDescription - * @memberof grafeas.v1.Note - * @instance - */ - Note.prototype.longDescription = ""; - - /** - * Note kind. - * @member {grafeas.v1.NoteKind} kind - * @memberof grafeas.v1.Note - * @instance - */ - Note.prototype.kind = 0; - - /** - * Note relatedUrl. - * @member {Array.} relatedUrl - * @memberof grafeas.v1.Note + * ListNotesResponse notes. + * @member {Array.} notes + * @memberof grafeas.v1.ListNotesResponse * @instance */ - Note.prototype.relatedUrl = $util.emptyArray; + ListNotesResponse.prototype.notes = $util.emptyArray; /** - * Note expirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} expirationTime - * @memberof grafeas.v1.Note + * ListNotesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof grafeas.v1.ListNotesResponse * @instance */ - Note.prototype.expirationTime = null; + ListNotesResponse.prototype.nextPageToken = ""; /** - * Note createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof grafeas.v1.Note - * @instance + * Creates a new ListNotesResponse instance using the specified properties. + * @function create + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set + * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse instance */ - Note.prototype.createTime = null; + ListNotesResponse.create = function create(properties) { + return new ListNotesResponse(properties); + }; /** - * Note updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof grafeas.v1.Note - * @instance + * Encodes the specified ListNotesResponse message. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Note.prototype.updateTime = null; + ListNotesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notes != null && message.notes.length) + for (var i = 0; i < message.notes.length; ++i) + $root.grafeas.v1.Note.encode(message.notes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; /** - * Note relatedNoteNames. - * @member {Array.} relatedNoteNames - * @memberof grafeas.v1.Note - * @instance + * Encodes the specified ListNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Note.prototype.relatedNoteNames = $util.emptyArray; + ListNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Note vulnerability. - * @member {grafeas.v1.IVulnerabilityNote|null|undefined} vulnerability - * @memberof grafeas.v1.Note - * @instance + * Decodes a ListNotesResponse message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Note.prototype.vulnerability = null; + ListNotesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNotesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.notes && message.notes.length)) + message.notes = []; + message.notes.push($root.grafeas.v1.Note.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Note build. - * @member {grafeas.v1.IBuildNote|null|undefined} build - * @memberof grafeas.v1.Note - * @instance + * Decodes a ListNotesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Note.prototype.build = null; + ListNotesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Note image. - * @member {grafeas.v1.IImageNote|null|undefined} image - * @memberof grafeas.v1.Note - * @instance + * Verifies a ListNotesResponse message. + * @function verify + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Note.prototype.image = null; + ListNotesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notes != null && message.hasOwnProperty("notes")) { + if (!Array.isArray(message.notes)) + return "notes: array expected"; + for (var i = 0; i < message.notes.length; ++i) { + var error = $root.grafeas.v1.Note.verify(message.notes[i]); + if (error) + return "notes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * Note package. - * @member {grafeas.v1.IPackageNote|null|undefined} package - * @memberof grafeas.v1.Note - * @instance + * Creates a ListNotesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse */ - Note.prototype["package"] = null; + ListNotesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNotesResponse) + return object; + var message = new $root.grafeas.v1.ListNotesResponse(); + if (object.notes) { + if (!Array.isArray(object.notes)) + throw TypeError(".grafeas.v1.ListNotesResponse.notes: array expected"); + message.notes = []; + for (var i = 0; i < object.notes.length; ++i) { + if (typeof object.notes[i] !== "object") + throw TypeError(".grafeas.v1.ListNotesResponse.notes: object expected"); + message.notes[i] = $root.grafeas.v1.Note.fromObject(object.notes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * Note deployment. - * @member {grafeas.v1.IDeploymentNote|null|undefined} deployment - * @memberof grafeas.v1.Note - * @instance + * Creates a plain object from a ListNotesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.ListNotesResponse + * @static + * @param {grafeas.v1.ListNotesResponse} message ListNotesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Note.prototype.deployment = null; + ListNotesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.notes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.notes && message.notes.length) { + object.notes = []; + for (var j = 0; j < message.notes.length; ++j) + object.notes[j] = $root.grafeas.v1.Note.toObject(message.notes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Note discovery. - * @member {grafeas.v1.IDiscoveryNote|null|undefined} discovery - * @memberof grafeas.v1.Note + * Converts this ListNotesResponse to JSON. + * @function toJSON + * @memberof grafeas.v1.ListNotesResponse * @instance + * @returns {Object.} JSON object */ - Note.prototype.discovery = null; + ListNotesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Note attestation. - * @member {grafeas.v1.IAttestationNote|null|undefined} attestation - * @memberof grafeas.v1.Note - * @instance - */ - Note.prototype.attestation = null; + return ListNotesResponse; + })(); - /** - * Note upgrade. - * @member {grafeas.v1.IUpgradeNote|null|undefined} upgrade - * @memberof grafeas.v1.Note - * @instance - */ - Note.prototype.upgrade = null; + v1.DeleteNoteRequest = (function() { /** - * Note compliance. - * @member {grafeas.v1.IComplianceNote|null|undefined} compliance - * @memberof grafeas.v1.Note - * @instance + * Properties of a DeleteNoteRequest. + * @memberof grafeas.v1 + * @interface IDeleteNoteRequest + * @property {string|null} [name] DeleteNoteRequest name */ - Note.prototype.compliance = null; /** - * Note dsseAttestation. - * @member {grafeas.v1.IDSSEAttestationNote|null|undefined} dsseAttestation - * @memberof grafeas.v1.Note - * @instance + * Constructs a new DeleteNoteRequest. + * @memberof grafeas.v1 + * @classdesc Represents a DeleteNoteRequest. + * @implements IDeleteNoteRequest + * @constructor + * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set */ - Note.prototype.dsseAttestation = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function DeleteNoteRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Note type. - * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} type - * @memberof grafeas.v1.Note + * DeleteNoteRequest name. + * @member {string} name + * @memberof grafeas.v1.DeleteNoteRequest * @instance */ - Object.defineProperty(Note.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["vulnerability", "build", "image", "package", "deployment", "discovery", "attestation", "upgrade", "compliance", "dsseAttestation"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteNoteRequest.prototype.name = ""; /** - * Creates a new Note instance using the specified properties. + * Creates a new DeleteNoteRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.DeleteNoteRequest * @static - * @param {grafeas.v1.INote=} [properties] Properties to set - * @returns {grafeas.v1.Note} Note instance + * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest instance */ - Note.create = function create(properties) { - return new Note(properties); + DeleteNoteRequest.create = function create(properties) { + return new DeleteNoteRequest(properties); }; /** - * Encodes the specified Note message. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. + * Encodes the specified DeleteNoteRequest message. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.DeleteNoteRequest * @static - * @param {grafeas.v1.INote} message Note message or plain object to encode + * @param {grafeas.v1.IDeleteNoteRequest} message DeleteNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Note.encode = function encode(message, writer) { + DeleteNoteRequest.encode = function encode(message, writer) { if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.shortDescription != null && Object.hasOwnProperty.call(message, "shortDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shortDescription); - if (message.longDescription != null && Object.hasOwnProperty.call(message, "longDescription")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.longDescription); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.kind); - if (message.relatedUrl != null && message.relatedUrl.length) - for (var i = 0; i < message.relatedUrl.length; ++i) - $root.grafeas.v1.RelatedUrl.encode(message.relatedUrl[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) - $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.relatedNoteNames != null && message.relatedNoteNames.length) - for (var i = 0; i < message.relatedNoteNames.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.relatedNoteNames[i]); - if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) - $root.grafeas.v1.VulnerabilityNote.encode(message.vulnerability, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - $root.grafeas.v1.BuildNote.encode(message.build, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.grafeas.v1.ImageNote.encode(message.image, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - $root.grafeas.v1.PackageNote.encode(message["package"], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) - $root.grafeas.v1.DeploymentNote.encode(message.deployment, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.discovery != null && Object.hasOwnProperty.call(message, "discovery")) - $root.grafeas.v1.DiscoveryNote.encode(message.discovery, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) - $root.grafeas.v1.AttestationNote.encode(message.attestation, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.upgrade != null && Object.hasOwnProperty.call(message, "upgrade")) - $root.grafeas.v1.UpgradeNote.encode(message.upgrade, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.compliance != null && Object.hasOwnProperty.call(message, "compliance")) - $root.grafeas.v1.ComplianceNote.encode(message.compliance, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.dsseAttestation != null && Object.hasOwnProperty.call(message, "dsseAttestation")) - $root.grafeas.v1.DSSEAttestationNote.encode(message.dsseAttestation, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Note message, length delimited. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.Note - * @static - * @param {grafeas.v1.INote} message Note message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Note.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Note message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.Note - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Note} Note - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Note.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Note(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.shortDescription = reader.string(); - break; - case 3: - message.longDescription = reader.string(); - break; - case 4: - message.kind = reader.int32(); - break; - case 5: - if (!(message.relatedUrl && message.relatedUrl.length)) - message.relatedUrl = []; - message.relatedUrl.push($root.grafeas.v1.RelatedUrl.decode(reader, reader.uint32())); - break; - case 6: - message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.relatedNoteNames && message.relatedNoteNames.length)) - message.relatedNoteNames = []; - message.relatedNoteNames.push(reader.string()); - break; - case 10: - message.vulnerability = $root.grafeas.v1.VulnerabilityNote.decode(reader, reader.uint32()); - break; - case 11: - message.build = $root.grafeas.v1.BuildNote.decode(reader, reader.uint32()); - break; - case 12: - message.image = $root.grafeas.v1.ImageNote.decode(reader, reader.uint32()); - break; - case 13: - message["package"] = $root.grafeas.v1.PackageNote.decode(reader, reader.uint32()); - break; - case 14: - message.deployment = $root.grafeas.v1.DeploymentNote.decode(reader, reader.uint32()); - break; - case 15: - message.discovery = $root.grafeas.v1.DiscoveryNote.decode(reader, reader.uint32()); - break; - case 16: - message.attestation = $root.grafeas.v1.AttestationNote.decode(reader, reader.uint32()); - break; - case 17: - message.upgrade = $root.grafeas.v1.UpgradeNote.decode(reader, reader.uint32()); - break; - case 18: - message.compliance = $root.grafeas.v1.ComplianceNote.decode(reader, reader.uint32()); - break; - case 19: - message.dsseAttestation = $root.grafeas.v1.DSSEAttestationNote.decode(reader, reader.uint32()); + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.DeleteNoteRequest + * @static + * @param {grafeas.v1.IDeleteNoteRequest} message DeleteNoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteNoteRequest message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.DeleteNoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteNoteRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeleteNoteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -18815,475 +18430,346 @@ }; /** - * Decodes a Note message from the specified reader or buffer, length delimited. + * Decodes a DeleteNoteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.DeleteNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Note} Note + * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Note.decodeDelimited = function decodeDelimited(reader) { + DeleteNoteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Note message. + * Verifies a DeleteNoteRequest message. * @function verify - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.DeleteNoteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Note.verify = function verify(message) { + DeleteNoteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) - if (!$util.isString(message.shortDescription)) - return "shortDescription: string expected"; - if (message.longDescription != null && message.hasOwnProperty("longDescription")) - if (!$util.isString(message.longDescription)) - return "longDescription: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - break; - } - if (message.relatedUrl != null && message.hasOwnProperty("relatedUrl")) { - if (!Array.isArray(message.relatedUrl)) - return "relatedUrl: array expected"; - for (var i = 0; i < message.relatedUrl.length; ++i) { - var error = $root.grafeas.v1.RelatedUrl.verify(message.relatedUrl[i]); - if (error) - return "relatedUrl." + error; - } - } - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); - if (error) - return "expirationTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.relatedNoteNames != null && message.hasOwnProperty("relatedNoteNames")) { - if (!Array.isArray(message.relatedNoteNames)) - return "relatedNoteNames: array expected"; - for (var i = 0; i < message.relatedNoteNames.length; ++i) - if (!$util.isString(message.relatedNoteNames[i])) - return "relatedNoteNames: string[] expected"; - } - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { - properties.type = 1; - { - var error = $root.grafeas.v1.VulnerabilityNote.verify(message.vulnerability); - if (error) - return "vulnerability." + error; - } - } - if (message.build != null && message.hasOwnProperty("build")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.BuildNote.verify(message.build); - if (error) - return "build." + error; - } - } - if (message.image != null && message.hasOwnProperty("image")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.ImageNote.verify(message.image); - if (error) - return "image." + error; - } - } - if (message["package"] != null && message.hasOwnProperty("package")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.PackageNote.verify(message["package"]); - if (error) - return "package." + error; - } - } - if (message.deployment != null && message.hasOwnProperty("deployment")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.DeploymentNote.verify(message.deployment); - if (error) - return "deployment." + error; - } - } - if (message.discovery != null && message.hasOwnProperty("discovery")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.DiscoveryNote.verify(message.discovery); - if (error) - return "discovery." + error; - } - } - if (message.attestation != null && message.hasOwnProperty("attestation")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.AttestationNote.verify(message.attestation); - if (error) - return "attestation." + error; - } - } - if (message.upgrade != null && message.hasOwnProperty("upgrade")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.UpgradeNote.verify(message.upgrade); - if (error) - return "upgrade." + error; - } - } - if (message.compliance != null && message.hasOwnProperty("compliance")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.ComplianceNote.verify(message.compliance); - if (error) - return "compliance." + error; - } - } - if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.grafeas.v1.DSSEAttestationNote.verify(message.dsseAttestation); - if (error) - return "dsseAttestation." + error; - } - } return null; }; /** - * Creates a Note message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.Note + * Creates a DeleteNoteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.DeleteNoteRequest + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest + */ + DeleteNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeleteNoteRequest) + return object; + var message = new $root.grafeas.v1.DeleteNoteRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteNoteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.DeleteNoteRequest + * @static + * @param {grafeas.v1.DeleteNoteRequest} message DeleteNoteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteNoteRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteNoteRequest to JSON. + * @function toJSON + * @memberof grafeas.v1.DeleteNoteRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteNoteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteNoteRequest; + })(); + + v1.CreateNoteRequest = (function() { + + /** + * Properties of a CreateNoteRequest. + * @memberof grafeas.v1 + * @interface ICreateNoteRequest + * @property {string|null} [parent] CreateNoteRequest parent + * @property {string|null} [noteId] CreateNoteRequest noteId + * @property {grafeas.v1.INote|null} [note] CreateNoteRequest note + */ + + /** + * Constructs a new CreateNoteRequest. + * @memberof grafeas.v1 + * @classdesc Represents a CreateNoteRequest. + * @implements ICreateNoteRequest + * @constructor + * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set + */ + function CreateNoteRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateNoteRequest parent. + * @member {string} parent + * @memberof grafeas.v1.CreateNoteRequest + * @instance + */ + CreateNoteRequest.prototype.parent = ""; + + /** + * CreateNoteRequest noteId. + * @member {string} noteId + * @memberof grafeas.v1.CreateNoteRequest + * @instance + */ + CreateNoteRequest.prototype.noteId = ""; + + /** + * CreateNoteRequest note. + * @member {grafeas.v1.INote|null|undefined} note + * @memberof grafeas.v1.CreateNoteRequest + * @instance + */ + CreateNoteRequest.prototype.note = null; + + /** + * Creates a new CreateNoteRequest instance using the specified properties. + * @function create + * @memberof grafeas.v1.CreateNoteRequest + * @static + * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest instance + */ + CreateNoteRequest.create = function create(properties) { + return new CreateNoteRequest(properties); + }; + + /** + * Encodes the specified CreateNoteRequest message. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.CreateNoteRequest * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.Note} Note + * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Note.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Note) - return object; - var message = new $root.grafeas.v1.Note(); - if (object.name != null) - message.name = String(object.name); - if (object.shortDescription != null) - message.shortDescription = String(object.shortDescription); - if (object.longDescription != null) - message.longDescription = String(object.longDescription); - switch (object.kind) { - case "NOTE_KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "VULNERABILITY": - case 1: - message.kind = 1; - break; - case "BUILD": - case 2: - message.kind = 2; - break; - case "IMAGE": - case 3: - message.kind = 3; - break; - case "PACKAGE": - case 4: - message.kind = 4; - break; - case "DEPLOYMENT": - case 5: - message.kind = 5; - break; - case "DISCOVERY": - case 6: - message.kind = 6; - break; - case "ATTESTATION": - case 7: - message.kind = 7; - break; - case "UPGRADE": - case 8: - message.kind = 8; - break; - case "COMPLIANCE": - case 9: - message.kind = 9; - break; - case "DSSE_ATTESTATION": - case 10: - message.kind = 10; - break; - } - if (object.relatedUrl) { - if (!Array.isArray(object.relatedUrl)) - throw TypeError(".grafeas.v1.Note.relatedUrl: array expected"); - message.relatedUrl = []; - for (var i = 0; i < object.relatedUrl.length; ++i) { - if (typeof object.relatedUrl[i] !== "object") - throw TypeError(".grafeas.v1.Note.relatedUrl: object expected"); - message.relatedUrl[i] = $root.grafeas.v1.RelatedUrl.fromObject(object.relatedUrl[i]); - } - } - if (object.expirationTime != null) { - if (typeof object.expirationTime !== "object") - throw TypeError(".grafeas.v1.Note.expirationTime: object expected"); - message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".grafeas.v1.Note.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".grafeas.v1.Note.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.relatedNoteNames) { - if (!Array.isArray(object.relatedNoteNames)) - throw TypeError(".grafeas.v1.Note.relatedNoteNames: array expected"); - message.relatedNoteNames = []; - for (var i = 0; i < object.relatedNoteNames.length; ++i) - message.relatedNoteNames[i] = String(object.relatedNoteNames[i]); - } - if (object.vulnerability != null) { - if (typeof object.vulnerability !== "object") - throw TypeError(".grafeas.v1.Note.vulnerability: object expected"); - message.vulnerability = $root.grafeas.v1.VulnerabilityNote.fromObject(object.vulnerability); - } - if (object.build != null) { - if (typeof object.build !== "object") - throw TypeError(".grafeas.v1.Note.build: object expected"); - message.build = $root.grafeas.v1.BuildNote.fromObject(object.build); - } - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".grafeas.v1.Note.image: object expected"); - message.image = $root.grafeas.v1.ImageNote.fromObject(object.image); - } - if (object["package"] != null) { - if (typeof object["package"] !== "object") - throw TypeError(".grafeas.v1.Note.package: object expected"); - message["package"] = $root.grafeas.v1.PackageNote.fromObject(object["package"]); - } - if (object.deployment != null) { - if (typeof object.deployment !== "object") - throw TypeError(".grafeas.v1.Note.deployment: object expected"); - message.deployment = $root.grafeas.v1.DeploymentNote.fromObject(object.deployment); - } - if (object.discovery != null) { - if (typeof object.discovery !== "object") - throw TypeError(".grafeas.v1.Note.discovery: object expected"); - message.discovery = $root.grafeas.v1.DiscoveryNote.fromObject(object.discovery); - } - if (object.attestation != null) { - if (typeof object.attestation !== "object") - throw TypeError(".grafeas.v1.Note.attestation: object expected"); - message.attestation = $root.grafeas.v1.AttestationNote.fromObject(object.attestation); - } - if (object.upgrade != null) { - if (typeof object.upgrade !== "object") - throw TypeError(".grafeas.v1.Note.upgrade: object expected"); - message.upgrade = $root.grafeas.v1.UpgradeNote.fromObject(object.upgrade); + CreateNoteRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.noteId != null && Object.hasOwnProperty.call(message, "noteId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.noteId); + if (message.note != null && Object.hasOwnProperty.call(message, "note")) + $root.grafeas.v1.Note.encode(message.note, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.CreateNoteRequest + * @static + * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateNoteRequest message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.CreateNoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNoteRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.CreateNoteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.noteId = reader.string(); + break; + case 3: + message.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (object.compliance != null) { - if (typeof object.compliance !== "object") - throw TypeError(".grafeas.v1.Note.compliance: object expected"); - message.compliance = $root.grafeas.v1.ComplianceNote.fromObject(object.compliance); + return message; + }; + + /** + * Decodes a CreateNoteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.CreateNoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNoteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateNoteRequest message. + * @function verify + * @memberof grafeas.v1.CreateNoteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateNoteRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.noteId != null && message.hasOwnProperty("noteId")) + if (!$util.isString(message.noteId)) + return "noteId: string expected"; + if (message.note != null && message.hasOwnProperty("note")) { + var error = $root.grafeas.v1.Note.verify(message.note); + if (error) + return "note." + error; } - if (object.dsseAttestation != null) { - if (typeof object.dsseAttestation !== "object") - throw TypeError(".grafeas.v1.Note.dsseAttestation: object expected"); - message.dsseAttestation = $root.grafeas.v1.DSSEAttestationNote.fromObject(object.dsseAttestation); + return null; + }; + + /** + * Creates a CreateNoteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.CreateNoteRequest + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + */ + CreateNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CreateNoteRequest) + return object; + var message = new $root.grafeas.v1.CreateNoteRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.noteId != null) + message.noteId = String(object.noteId); + if (object.note != null) { + if (typeof object.note !== "object") + throw TypeError(".grafeas.v1.CreateNoteRequest.note: object expected"); + message.note = $root.grafeas.v1.Note.fromObject(object.note); } return message; }; /** - * Creates a plain object from a Note message. Also converts values to other types if specified. + * Creates a plain object from a CreateNoteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.CreateNoteRequest * @static - * @param {grafeas.v1.Note} message Note + * @param {grafeas.v1.CreateNoteRequest} message CreateNoteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Note.toObject = function toObject(message, options) { + CreateNoteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.relatedUrl = []; - object.relatedNoteNames = []; - } if (options.defaults) { - object.name = ""; - object.shortDescription = ""; - object.longDescription = ""; - object.kind = options.enums === String ? "NOTE_KIND_UNSPECIFIED" : 0; - object.expirationTime = null; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) - object.shortDescription = message.shortDescription; - if (message.longDescription != null && message.hasOwnProperty("longDescription")) - object.longDescription = message.longDescription; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.grafeas.v1.NoteKind[message.kind] : message.kind; - if (message.relatedUrl && message.relatedUrl.length) { - object.relatedUrl = []; - for (var j = 0; j < message.relatedUrl.length; ++j) - object.relatedUrl[j] = $root.grafeas.v1.RelatedUrl.toObject(message.relatedUrl[j], options); - } - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) - object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.relatedNoteNames && message.relatedNoteNames.length) { - object.relatedNoteNames = []; - for (var j = 0; j < message.relatedNoteNames.length; ++j) - object.relatedNoteNames[j] = message.relatedNoteNames[j]; - } - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { - object.vulnerability = $root.grafeas.v1.VulnerabilityNote.toObject(message.vulnerability, options); - if (options.oneofs) - object.type = "vulnerability"; - } - if (message.build != null && message.hasOwnProperty("build")) { - object.build = $root.grafeas.v1.BuildNote.toObject(message.build, options); - if (options.oneofs) - object.type = "build"; - } - if (message.image != null && message.hasOwnProperty("image")) { - object.image = $root.grafeas.v1.ImageNote.toObject(message.image, options); - if (options.oneofs) - object.type = "image"; - } - if (message["package"] != null && message.hasOwnProperty("package")) { - object["package"] = $root.grafeas.v1.PackageNote.toObject(message["package"], options); - if (options.oneofs) - object.type = "package"; - } - if (message.deployment != null && message.hasOwnProperty("deployment")) { - object.deployment = $root.grafeas.v1.DeploymentNote.toObject(message.deployment, options); - if (options.oneofs) - object.type = "deployment"; - } - if (message.discovery != null && message.hasOwnProperty("discovery")) { - object.discovery = $root.grafeas.v1.DiscoveryNote.toObject(message.discovery, options); - if (options.oneofs) - object.type = "discovery"; - } - if (message.attestation != null && message.hasOwnProperty("attestation")) { - object.attestation = $root.grafeas.v1.AttestationNote.toObject(message.attestation, options); - if (options.oneofs) - object.type = "attestation"; - } - if (message.upgrade != null && message.hasOwnProperty("upgrade")) { - object.upgrade = $root.grafeas.v1.UpgradeNote.toObject(message.upgrade, options); - if (options.oneofs) - object.type = "upgrade"; - } - if (message.compliance != null && message.hasOwnProperty("compliance")) { - object.compliance = $root.grafeas.v1.ComplianceNote.toObject(message.compliance, options); - if (options.oneofs) - object.type = "compliance"; - } - if (message.dsseAttestation != null && message.hasOwnProperty("dsseAttestation")) { - object.dsseAttestation = $root.grafeas.v1.DSSEAttestationNote.toObject(message.dsseAttestation, options); - if (options.oneofs) - object.type = "dsseAttestation"; + object.parent = ""; + object.noteId = ""; + object.note = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.noteId != null && message.hasOwnProperty("noteId")) + object.noteId = message.noteId; + if (message.note != null && message.hasOwnProperty("note")) + object.note = $root.grafeas.v1.Note.toObject(message.note, options); return object; }; /** - * Converts this Note to JSON. + * Converts this CreateNoteRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.CreateNoteRequest * @instance * @returns {Object.} JSON object */ - Note.prototype.toJSON = function toJSON() { + CreateNoteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Note; + return CreateNoteRequest; })(); - v1.GetOccurrenceRequest = (function() { + v1.UpdateNoteRequest = (function() { /** - * Properties of a GetOccurrenceRequest. + * Properties of an UpdateNoteRequest. * @memberof grafeas.v1 - * @interface IGetOccurrenceRequest - * @property {string|null} [name] GetOccurrenceRequest name + * @interface IUpdateNoteRequest + * @property {string|null} [name] UpdateNoteRequest name + * @property {grafeas.v1.INote|null} [note] UpdateNoteRequest note + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateNoteRequest updateMask */ /** - * Constructs a new GetOccurrenceRequest. + * Constructs a new UpdateNoteRequest. * @memberof grafeas.v1 - * @classdesc Represents a GetOccurrenceRequest. - * @implements IGetOccurrenceRequest + * @classdesc Represents an UpdateNoteRequest. + * @implements IUpdateNoteRequest * @constructor - * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set + * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set */ - function GetOccurrenceRequest(properties) { + function UpdateNoteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19291,76 +18777,102 @@ } /** - * GetOccurrenceRequest name. + * UpdateNoteRequest name. * @member {string} name - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @instance */ - GetOccurrenceRequest.prototype.name = ""; + UpdateNoteRequest.prototype.name = ""; /** - * Creates a new GetOccurrenceRequest instance using the specified properties. + * UpdateNoteRequest note. + * @member {grafeas.v1.INote|null|undefined} note + * @memberof grafeas.v1.UpdateNoteRequest + * @instance + */ + UpdateNoteRequest.prototype.note = null; + + /** + * UpdateNoteRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof grafeas.v1.UpdateNoteRequest + * @instance + */ + UpdateNoteRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateNoteRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set - * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest instance + * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest instance */ - GetOccurrenceRequest.create = function create(properties) { - return new GetOccurrenceRequest(properties); + UpdateNoteRequest.create = function create(properties) { + return new UpdateNoteRequest(properties); }; /** - * Encodes the specified GetOccurrenceRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. + * Encodes the specified UpdateNoteRequest message. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.IGetOccurrenceRequest} message GetOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IUpdateNoteRequest} message UpdateNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOccurrenceRequest.encode = function encode(message, writer) { + UpdateNoteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.note != null && Object.hasOwnProperty.call(message, "note")) + $root.grafeas.v1.Note.encode(message.note, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. + * Encodes the specified UpdateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.IGetOccurrenceRequest} message GetOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IUpdateNoteRequest} message UpdateNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer. + * Decodes an UpdateNoteRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest + * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOccurrenceRequest.decode = function decode(reader, length) { + UpdateNoteRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.GetOccurrenceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpdateNoteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -19370,110 +18882,137 @@ }; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateNoteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest + * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateNoteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOccurrenceRequest message. + * Verifies an UpdateNoteRequest message. * @function verify - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOccurrenceRequest.verify = function verify(message) { + UpdateNoteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.note != null && message.hasOwnProperty("note")) { + var error = $root.grafeas.v1.Note.verify(message.note); + if (error) + return "note." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a GetOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateNoteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest + * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest */ - GetOccurrenceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GetOccurrenceRequest) + UpdateNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpdateNoteRequest) return object; - var message = new $root.grafeas.v1.GetOccurrenceRequest(); + var message = new $root.grafeas.v1.UpdateNoteRequest(); if (object.name != null) message.name = String(object.name); + if (object.note != null) { + if (typeof object.note !== "object") + throw TypeError(".grafeas.v1.UpdateNoteRequest.note: object expected"); + message.note = $root.grafeas.v1.Note.fromObject(object.note); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".grafeas.v1.UpdateNoteRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a GetOccurrenceRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateNoteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.GetOccurrenceRequest} message GetOccurrenceRequest + * @param {grafeas.v1.UpdateNoteRequest} message UpdateNoteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOccurrenceRequest.toObject = function toObject(message, options) { + UpdateNoteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.note = null; + object.updateMask = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.note != null && message.hasOwnProperty("note")) + object.note = $root.grafeas.v1.Note.toObject(message.note, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this GetOccurrenceRequest to JSON. + * Converts this UpdateNoteRequest to JSON. * @function toJSON - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.UpdateNoteRequest * @instance * @returns {Object.} JSON object */ - GetOccurrenceRequest.prototype.toJSON = function toJSON() { + UpdateNoteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetOccurrenceRequest; + return UpdateNoteRequest; })(); - v1.ListOccurrencesRequest = (function() { + v1.ListNoteOccurrencesRequest = (function() { /** - * Properties of a ListOccurrencesRequest. + * Properties of a ListNoteOccurrencesRequest. * @memberof grafeas.v1 - * @interface IListOccurrencesRequest - * @property {string|null} [parent] ListOccurrencesRequest parent - * @property {string|null} [filter] ListOccurrencesRequest filter - * @property {number|null} [pageSize] ListOccurrencesRequest pageSize - * @property {string|null} [pageToken] ListOccurrencesRequest pageToken + * @interface IListNoteOccurrencesRequest + * @property {string|null} [name] ListNoteOccurrencesRequest name + * @property {string|null} [filter] ListNoteOccurrencesRequest filter + * @property {number|null} [pageSize] ListNoteOccurrencesRequest pageSize + * @property {string|null} [pageToken] ListNoteOccurrencesRequest pageToken */ /** - * Constructs a new ListOccurrencesRequest. + * Constructs a new ListNoteOccurrencesRequest. * @memberof grafeas.v1 - * @classdesc Represents a ListOccurrencesRequest. - * @implements IListOccurrencesRequest + * @classdesc Represents a ListNoteOccurrencesRequest. + * @implements IListNoteOccurrencesRequest * @constructor - * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set + * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set */ - function ListOccurrencesRequest(properties) { + function ListNoteOccurrencesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19481,63 +19020,63 @@ } /** - * ListOccurrencesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.ListOccurrencesRequest + * ListNoteOccurrencesRequest name. + * @member {string} name + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @instance */ - ListOccurrencesRequest.prototype.parent = ""; + ListNoteOccurrencesRequest.prototype.name = ""; /** - * ListOccurrencesRequest filter. + * ListNoteOccurrencesRequest filter. * @member {string} filter - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @instance */ - ListOccurrencesRequest.prototype.filter = ""; + ListNoteOccurrencesRequest.prototype.filter = ""; /** - * ListOccurrencesRequest pageSize. + * ListNoteOccurrencesRequest pageSize. * @member {number} pageSize - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @instance */ - ListOccurrencesRequest.prototype.pageSize = 0; + ListNoteOccurrencesRequest.prototype.pageSize = 0; /** - * ListOccurrencesRequest pageToken. + * ListNoteOccurrencesRequest pageToken. * @member {string} pageToken - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @instance */ - ListOccurrencesRequest.prototype.pageToken = ""; + ListNoteOccurrencesRequest.prototype.pageToken = ""; /** - * Creates a new ListOccurrencesRequest instance using the specified properties. + * Creates a new ListNoteOccurrencesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set - * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest instance + * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set + * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest instance */ - ListOccurrencesRequest.create = function create(properties) { - return new ListOccurrencesRequest(properties); + ListNoteOccurrencesRequest.create = function create(properties) { + return new ListNoteOccurrencesRequest(properties); }; /** - * Encodes the specified ListOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. + * Encodes the specified ListNoteOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.IListOccurrencesRequest} message ListOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IListNoteOccurrencesRequest} message ListNoteOccurrencesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesRequest.encode = function encode(message, writer) { + ListNoteOccurrencesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -19548,38 +19087,38 @@ }; /** - * Encodes the specified ListOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. + * Encodes the specified ListNoteOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.IListOccurrencesRequest} message ListOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IListNoteOccurrencesRequest} message ListNoteOccurrencesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListNoteOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOccurrencesRequest message from the specified reader or buffer. + * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest + * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOccurrencesRequest.decode = function decode(reader, length) { + ListNoteOccurrencesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListOccurrencesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNoteOccurrencesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: message.filter = reader.string(); @@ -19599,35 +19138,35 @@ }; /** - * Decodes a ListOccurrencesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest + * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { + ListNoteOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOccurrencesRequest message. + * Verifies a ListNoteOccurrencesRequest message. * @function verify - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOccurrencesRequest.verify = function verify(message) { + ListNoteOccurrencesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; @@ -19641,19 +19180,19 @@ }; /** - * Creates a ListOccurrencesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNoteOccurrencesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest + * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest */ - ListOccurrencesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListOccurrencesRequest) + ListNoteOccurrencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNoteOccurrencesRequest) return object; - var message = new $root.grafeas.v1.ListOccurrencesRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.grafeas.v1.ListNoteOccurrencesRequest(); + if (object.name != null) + message.name = String(object.name); if (object.filter != null) message.filter = String(object.filter); if (object.pageSize != null) @@ -19664,26 +19203,26 @@ }; /** - * Creates a plain object from a ListOccurrencesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListNoteOccurrencesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.ListOccurrencesRequest} message ListOccurrencesRequest + * @param {grafeas.v1.ListNoteOccurrencesRequest} message ListNoteOccurrencesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOccurrencesRequest.toObject = function toObject(message, options) { + ListNoteOccurrencesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; + object.name = ""; object.filter = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; if (message.pageSize != null && message.hasOwnProperty("pageSize")) @@ -19694,38 +19233,38 @@ }; /** - * Converts this ListOccurrencesRequest to JSON. + * Converts this ListNoteOccurrencesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @instance * @returns {Object.} JSON object */ - ListOccurrencesRequest.prototype.toJSON = function toJSON() { + ListNoteOccurrencesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListOccurrencesRequest; + return ListNoteOccurrencesRequest; })(); - v1.ListOccurrencesResponse = (function() { + v1.ListNoteOccurrencesResponse = (function() { /** - * Properties of a ListOccurrencesResponse. + * Properties of a ListNoteOccurrencesResponse. * @memberof grafeas.v1 - * @interface IListOccurrencesResponse - * @property {Array.|null} [occurrences] ListOccurrencesResponse occurrences - * @property {string|null} [nextPageToken] ListOccurrencesResponse nextPageToken + * @interface IListNoteOccurrencesResponse + * @property {Array.|null} [occurrences] ListNoteOccurrencesResponse occurrences + * @property {string|null} [nextPageToken] ListNoteOccurrencesResponse nextPageToken */ /** - * Constructs a new ListOccurrencesResponse. + * Constructs a new ListNoteOccurrencesResponse. * @memberof grafeas.v1 - * @classdesc Represents a ListOccurrencesResponse. - * @implements IListOccurrencesResponse + * @classdesc Represents a ListNoteOccurrencesResponse. + * @implements IListNoteOccurrencesResponse * @constructor - * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set + * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set */ - function ListOccurrencesResponse(properties) { + function ListNoteOccurrencesResponse(properties) { this.occurrences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -19734,43 +19273,43 @@ } /** - * ListOccurrencesResponse occurrences. + * ListNoteOccurrencesResponse occurrences. * @member {Array.} occurrences - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @instance */ - ListOccurrencesResponse.prototype.occurrences = $util.emptyArray; + ListNoteOccurrencesResponse.prototype.occurrences = $util.emptyArray; /** - * ListOccurrencesResponse nextPageToken. + * ListNoteOccurrencesResponse nextPageToken. * @member {string} nextPageToken - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @instance */ - ListOccurrencesResponse.prototype.nextPageToken = ""; + ListNoteOccurrencesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListOccurrencesResponse instance using the specified properties. + * Creates a new ListNoteOccurrencesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set - * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse instance + * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set + * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse instance */ - ListOccurrencesResponse.create = function create(properties) { - return new ListOccurrencesResponse(properties); + ListNoteOccurrencesResponse.create = function create(properties) { + return new ListNoteOccurrencesResponse(properties); }; /** - * Encodes the specified ListOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. + * Encodes the specified ListNoteOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.IListOccurrencesResponse} message ListOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IListNoteOccurrencesResponse} message ListNoteOccurrencesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesResponse.encode = function encode(message, writer) { + ListNoteOccurrencesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.occurrences != null && message.occurrences.length) @@ -19782,33 +19321,33 @@ }; /** - * Encodes the specified ListOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. + * Encodes the specified ListNoteOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.IListOccurrencesResponse} message ListOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IListNoteOccurrencesResponse} message ListNoteOccurrencesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListNoteOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOccurrencesResponse message from the specified reader or buffer. + * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse + * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOccurrencesResponse.decode = function decode(reader, length) { + ListNoteOccurrencesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListOccurrencesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNoteOccurrencesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -19829,30 +19368,30 @@ }; /** - * Decodes a ListOccurrencesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse + * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { + ListNoteOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOccurrencesResponse message. + * Verifies a ListNoteOccurrencesResponse message. * @function verify - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOccurrencesResponse.verify = function verify(message) { + ListNoteOccurrencesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.occurrences != null && message.hasOwnProperty("occurrences")) { @@ -19871,24 +19410,24 @@ }; /** - * Creates a ListOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListNoteOccurrencesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse + * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse */ - ListOccurrencesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListOccurrencesResponse) + ListNoteOccurrencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNoteOccurrencesResponse) return object; - var message = new $root.grafeas.v1.ListOccurrencesResponse(); + var message = new $root.grafeas.v1.ListNoteOccurrencesResponse(); if (object.occurrences) { if (!Array.isArray(object.occurrences)) - throw TypeError(".grafeas.v1.ListOccurrencesResponse.occurrences: array expected"); + throw TypeError(".grafeas.v1.ListNoteOccurrencesResponse.occurrences: array expected"); message.occurrences = []; for (var i = 0; i < object.occurrences.length; ++i) { if (typeof object.occurrences[i] !== "object") - throw TypeError(".grafeas.v1.ListOccurrencesResponse.occurrences: object expected"); + throw TypeError(".grafeas.v1.ListNoteOccurrencesResponse.occurrences: object expected"); message.occurrences[i] = $root.grafeas.v1.Occurrence.fromObject(object.occurrences[i]); } } @@ -19898,15 +19437,15 @@ }; /** - * Creates a plain object from a ListOccurrencesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListNoteOccurrencesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.ListOccurrencesResponse} message ListOccurrencesResponse + * @param {grafeas.v1.ListNoteOccurrencesResponse} message ListNoteOccurrencesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOccurrencesResponse.toObject = function toObject(message, options) { + ListNoteOccurrencesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -19925,37 +19464,39 @@ }; /** - * Converts this ListOccurrencesResponse to JSON. + * Converts this ListNoteOccurrencesResponse to JSON. * @function toJSON - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @instance * @returns {Object.} JSON object */ - ListOccurrencesResponse.prototype.toJSON = function toJSON() { + ListNoteOccurrencesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListOccurrencesResponse; + return ListNoteOccurrencesResponse; })(); - v1.DeleteOccurrenceRequest = (function() { + v1.BatchCreateNotesRequest = (function() { /** - * Properties of a DeleteOccurrenceRequest. + * Properties of a BatchCreateNotesRequest. * @memberof grafeas.v1 - * @interface IDeleteOccurrenceRequest - * @property {string|null} [name] DeleteOccurrenceRequest name + * @interface IBatchCreateNotesRequest + * @property {string|null} [parent] BatchCreateNotesRequest parent + * @property {Object.|null} [notes] BatchCreateNotesRequest notes */ /** - * Constructs a new DeleteOccurrenceRequest. + * Constructs a new BatchCreateNotesRequest. * @memberof grafeas.v1 - * @classdesc Represents a DeleteOccurrenceRequest. - * @implements IDeleteOccurrenceRequest + * @classdesc Represents a BatchCreateNotesRequest. + * @implements IBatchCreateNotesRequest * @constructor - * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set + * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set */ - function DeleteOccurrenceRequest(properties) { + function BatchCreateNotesRequest(properties) { + this.notes = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19963,75 +19504,110 @@ } /** - * DeleteOccurrenceRequest name. - * @member {string} name - * @memberof grafeas.v1.DeleteOccurrenceRequest + * BatchCreateNotesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.BatchCreateNotesRequest * @instance */ - DeleteOccurrenceRequest.prototype.name = ""; + BatchCreateNotesRequest.prototype.parent = ""; /** - * Creates a new DeleteOccurrenceRequest instance using the specified properties. + * BatchCreateNotesRequest notes. + * @member {Object.} notes + * @memberof grafeas.v1.BatchCreateNotesRequest + * @instance + */ + BatchCreateNotesRequest.prototype.notes = $util.emptyObject; + + /** + * Creates a new BatchCreateNotesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set - * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest instance + * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest instance */ - DeleteOccurrenceRequest.create = function create(properties) { - return new DeleteOccurrenceRequest(properties); + BatchCreateNotesRequest.create = function create(properties) { + return new BatchCreateNotesRequest(properties); }; /** - * Encodes the specified DeleteOccurrenceRequest message. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. + * Encodes the specified BatchCreateNotesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.IDeleteOccurrenceRequest} message DeleteOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateNotesRequest} message BatchCreateNotesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOccurrenceRequest.encode = function encode(message, writer) { + BatchCreateNotesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) + for (var keys = Object.keys(message.notes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.grafeas.v1.Note.encode(message.notes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified DeleteOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. + * Encodes the specified BatchCreateNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.IDeleteOccurrenceRequest} message DeleteOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateNotesRequest} message BatchCreateNotesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer. + * Decodes a BatchCreateNotesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest + * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOccurrenceRequest.decode = function decode(reader, length) { + BatchCreateNotesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeleteOccurrenceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateNotesRequest(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + if (message.notes === $util.emptyObject) + message.notes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.grafeas.v1.Note.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.notes[key] = value; break; default: reader.skipType(tag & 7); @@ -20042,108 +19618,136 @@ }; /** - * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateNotesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest + * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + BatchCreateNotesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteOccurrenceRequest message. + * Verifies a BatchCreateNotesRequest message. * @function verify - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteOccurrenceRequest.verify = function verify(message) { + BatchCreateNotesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.notes != null && message.hasOwnProperty("notes")) { + if (!$util.isObject(message.notes)) + return "notes: object expected"; + var key = Object.keys(message.notes); + for (var i = 0; i < key.length; ++i) { + var error = $root.grafeas.v1.Note.verify(message.notes[key[i]]); + if (error) + return "notes." + error; + } + } return null; }; /** - * Creates a DeleteOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateNotesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest + * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest */ - DeleteOccurrenceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeleteOccurrenceRequest) + BatchCreateNotesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateNotesRequest) return object; - var message = new $root.grafeas.v1.DeleteOccurrenceRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.grafeas.v1.BatchCreateNotesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.notes) { + if (typeof object.notes !== "object") + throw TypeError(".grafeas.v1.BatchCreateNotesRequest.notes: object expected"); + message.notes = {}; + for (var keys = Object.keys(object.notes), i = 0; i < keys.length; ++i) { + if (typeof object.notes[keys[i]] !== "object") + throw TypeError(".grafeas.v1.BatchCreateNotesRequest.notes: object expected"); + message.notes[keys[i]] = $root.grafeas.v1.Note.fromObject(object.notes[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a DeleteOccurrenceRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateNotesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.DeleteOccurrenceRequest} message DeleteOccurrenceRequest + * @param {grafeas.v1.BatchCreateNotesRequest} message BatchCreateNotesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOccurrenceRequest.toObject = function toObject(message, options) { + BatchCreateNotesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.notes = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + var keys2; + if (message.notes && (keys2 = Object.keys(message.notes)).length) { + object.notes = {}; + for (var j = 0; j < keys2.length; ++j) + object.notes[keys2[j]] = $root.grafeas.v1.Note.toObject(message.notes[keys2[j]], options); + } return object; }; /** - * Converts this DeleteOccurrenceRequest to JSON. + * Converts this BatchCreateNotesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesRequest * @instance * @returns {Object.} JSON object */ - DeleteOccurrenceRequest.prototype.toJSON = function toJSON() { + BatchCreateNotesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteOccurrenceRequest; + return BatchCreateNotesRequest; })(); - v1.CreateOccurrenceRequest = (function() { + v1.BatchCreateNotesResponse = (function() { /** - * Properties of a CreateOccurrenceRequest. + * Properties of a BatchCreateNotesResponse. * @memberof grafeas.v1 - * @interface ICreateOccurrenceRequest - * @property {string|null} [parent] CreateOccurrenceRequest parent - * @property {grafeas.v1.IOccurrence|null} [occurrence] CreateOccurrenceRequest occurrence + * @interface IBatchCreateNotesResponse + * @property {Array.|null} [notes] BatchCreateNotesResponse notes */ /** - * Constructs a new CreateOccurrenceRequest. + * Constructs a new BatchCreateNotesResponse. * @memberof grafeas.v1 - * @classdesc Represents a CreateOccurrenceRequest. - * @implements ICreateOccurrenceRequest + * @classdesc Represents a BatchCreateNotesResponse. + * @implements IBatchCreateNotesResponse * @constructor - * @param {grafeas.v1.ICreateOccurrenceRequest=} [properties] Properties to set + * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set */ - function CreateOccurrenceRequest(properties) { + function BatchCreateNotesResponse(properties) { + this.notes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20151,88 +19755,78 @@ } /** - * CreateOccurrenceRequest parent. - * @member {string} parent - * @memberof grafeas.v1.CreateOccurrenceRequest - * @instance - */ - CreateOccurrenceRequest.prototype.parent = ""; - - /** - * CreateOccurrenceRequest occurrence. - * @member {grafeas.v1.IOccurrence|null|undefined} occurrence - * @memberof grafeas.v1.CreateOccurrenceRequest + * BatchCreateNotesResponse notes. + * @member {Array.} notes + * @memberof grafeas.v1.BatchCreateNotesResponse * @instance */ - CreateOccurrenceRequest.prototype.occurrence = null; + BatchCreateNotesResponse.prototype.notes = $util.emptyArray; /** - * Creates a new CreateOccurrenceRequest instance using the specified properties. + * Creates a new BatchCreateNotesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.ICreateOccurrenceRequest=} [properties] Properties to set - * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest instance + * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse instance */ - CreateOccurrenceRequest.create = function create(properties) { - return new CreateOccurrenceRequest(properties); + BatchCreateNotesResponse.create = function create(properties) { + return new BatchCreateNotesResponse(properties); }; /** - * Encodes the specified CreateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. + * Encodes the specified BatchCreateNotesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.ICreateOccurrenceRequest} message CreateOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateNotesResponse} message BatchCreateNotesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateOccurrenceRequest.encode = function encode(message, writer) { + BatchCreateNotesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.occurrence != null && Object.hasOwnProperty.call(message, "occurrence")) - $root.grafeas.v1.Occurrence.encode(message.occurrence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notes != null && message.notes.length) + for (var i = 0; i < message.notes.length; ++i) + $root.grafeas.v1.Note.encode(message.notes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. + * Encodes the specified BatchCreateNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.ICreateOccurrenceRequest} message CreateOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateNotesResponse} message BatchCreateNotesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateOccurrenceRequest message from the specified reader or buffer. + * Decodes a BatchCreateNotesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest + * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateOccurrenceRequest.decode = function decode(reader, length) { + BatchCreateNotesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.CreateOccurrenceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateNotesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.occurrence = $root.grafeas.v1.Occurrence.decode(reader, reader.uint32()); + if (!(message.notes && message.notes.length)) + message.notes = []; + message.notes.push($root.grafeas.v1.Note.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -20243,123 +19837,126 @@ }; /** - * Decodes a CreateOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateNotesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest + * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + BatchCreateNotesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateOccurrenceRequest message. + * Verifies a BatchCreateNotesResponse message. * @function verify - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateOccurrenceRequest.verify = function verify(message) { + BatchCreateNotesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.occurrence != null && message.hasOwnProperty("occurrence")) { - var error = $root.grafeas.v1.Occurrence.verify(message.occurrence); - if (error) - return "occurrence." + error; + if (message.notes != null && message.hasOwnProperty("notes")) { + if (!Array.isArray(message.notes)) + return "notes: array expected"; + for (var i = 0; i < message.notes.length; ++i) { + var error = $root.grafeas.v1.Note.verify(message.notes[i]); + if (error) + return "notes." + error; + } } return null; }; /** - * Creates a CreateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateNotesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest + * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse */ - CreateOccurrenceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.CreateOccurrenceRequest) + BatchCreateNotesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateNotesResponse) return object; - var message = new $root.grafeas.v1.CreateOccurrenceRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.occurrence != null) { - if (typeof object.occurrence !== "object") - throw TypeError(".grafeas.v1.CreateOccurrenceRequest.occurrence: object expected"); - message.occurrence = $root.grafeas.v1.Occurrence.fromObject(object.occurrence); + var message = new $root.grafeas.v1.BatchCreateNotesResponse(); + if (object.notes) { + if (!Array.isArray(object.notes)) + throw TypeError(".grafeas.v1.BatchCreateNotesResponse.notes: array expected"); + message.notes = []; + for (var i = 0; i < object.notes.length; ++i) { + if (typeof object.notes[i] !== "object") + throw TypeError(".grafeas.v1.BatchCreateNotesResponse.notes: object expected"); + message.notes[i] = $root.grafeas.v1.Note.fromObject(object.notes[i]); + } } return message; }; /** - * Creates a plain object from a CreateOccurrenceRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateNotesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.CreateOccurrenceRequest} message CreateOccurrenceRequest + * @param {grafeas.v1.BatchCreateNotesResponse} message BatchCreateNotesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateOccurrenceRequest.toObject = function toObject(message, options) { + BatchCreateNotesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.occurrence = null; + if (options.arrays || options.defaults) + object.notes = []; + if (message.notes && message.notes.length) { + object.notes = []; + for (var j = 0; j < message.notes.length; ++j) + object.notes[j] = $root.grafeas.v1.Note.toObject(message.notes[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.occurrence != null && message.hasOwnProperty("occurrence")) - object.occurrence = $root.grafeas.v1.Occurrence.toObject(message.occurrence, options); return object; }; /** - * Converts this CreateOccurrenceRequest to JSON. + * Converts this BatchCreateNotesResponse to JSON. * @function toJSON - * @memberof grafeas.v1.CreateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateNotesResponse * @instance * @returns {Object.} JSON object */ - CreateOccurrenceRequest.prototype.toJSON = function toJSON() { + BatchCreateNotesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateOccurrenceRequest; + return BatchCreateNotesResponse; })(); - v1.UpdateOccurrenceRequest = (function() { + v1.BatchCreateOccurrencesRequest = (function() { /** - * Properties of an UpdateOccurrenceRequest. + * Properties of a BatchCreateOccurrencesRequest. * @memberof grafeas.v1 - * @interface IUpdateOccurrenceRequest - * @property {string|null} [name] UpdateOccurrenceRequest name - * @property {grafeas.v1.IOccurrence|null} [occurrence] UpdateOccurrenceRequest occurrence - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOccurrenceRequest updateMask + * @interface IBatchCreateOccurrencesRequest + * @property {string|null} [parent] BatchCreateOccurrencesRequest parent + * @property {Array.|null} [occurrences] BatchCreateOccurrencesRequest occurrences */ /** - * Constructs a new UpdateOccurrenceRequest. + * Constructs a new BatchCreateOccurrencesRequest. * @memberof grafeas.v1 - * @classdesc Represents an UpdateOccurrenceRequest. - * @implements IUpdateOccurrenceRequest + * @classdesc Represents a BatchCreateOccurrencesRequest. + * @implements IBatchCreateOccurrencesRequest * @constructor - * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set + * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set */ - function UpdateOccurrenceRequest(properties) { + function BatchCreateOccurrencesRequest(properties) { + this.occurrences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20367,101 +19964,91 @@ } /** - * UpdateOccurrenceRequest name. - * @member {string} name - * @memberof grafeas.v1.UpdateOccurrenceRequest - * @instance - */ - UpdateOccurrenceRequest.prototype.name = ""; - - /** - * UpdateOccurrenceRequest occurrence. - * @member {grafeas.v1.IOccurrence|null|undefined} occurrence - * @memberof grafeas.v1.UpdateOccurrenceRequest + * BatchCreateOccurrencesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @instance */ - UpdateOccurrenceRequest.prototype.occurrence = null; + BatchCreateOccurrencesRequest.prototype.parent = ""; /** - * UpdateOccurrenceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof grafeas.v1.UpdateOccurrenceRequest + * BatchCreateOccurrencesRequest occurrences. + * @member {Array.} occurrences + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @instance */ - UpdateOccurrenceRequest.prototype.updateMask = null; + BatchCreateOccurrencesRequest.prototype.occurrences = $util.emptyArray; /** - * Creates a new UpdateOccurrenceRequest instance using the specified properties. + * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set - * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest instance + * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest instance */ - UpdateOccurrenceRequest.create = function create(properties) { - return new UpdateOccurrenceRequest(properties); + BatchCreateOccurrencesRequest.create = function create(properties) { + return new BatchCreateOccurrencesRequest(properties); }; /** - * Encodes the specified UpdateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. + * Encodes the specified BatchCreateOccurrencesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOccurrenceRequest.encode = function encode(message, writer) { + BatchCreateOccurrencesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.occurrence != null && Object.hasOwnProperty.call(message, "occurrence")) - $root.grafeas.v1.Occurrence.encode(message.occurrence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.occurrences != null && message.occurrences.length) + for (var i = 0; i < message.occurrences.length; ++i) + $root.grafeas.v1.Occurrence.encode(message.occurrences[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. + * Encodes the specified BatchCreateOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer. + * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOccurrenceRequest.decode = function decode(reader, length) { + BatchCreateOccurrencesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpdateOccurrenceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateOccurrencesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.occurrence = $root.grafeas.v1.Occurrence.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.occurrences && message.occurrences.length)) + message.occurrences = []; + message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -20472,134 +20059,134 @@ }; /** - * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + BatchCreateOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateOccurrenceRequest message. + * Verifies a BatchCreateOccurrencesRequest message. * @function verify - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateOccurrenceRequest.verify = function verify(message) { + BatchCreateOccurrencesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.occurrence != null && message.hasOwnProperty("occurrence")) { - var error = $root.grafeas.v1.Occurrence.verify(message.occurrence); - if (error) - return "occurrence." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.occurrences != null && message.hasOwnProperty("occurrences")) { + if (!Array.isArray(message.occurrences)) + return "occurrences: array expected"; + for (var i = 0; i < message.occurrences.length; ++i) { + var error = $root.grafeas.v1.Occurrence.verify(message.occurrences[i]); + if (error) + return "occurrences." + error; + } } return null; }; /** - * Creates an UpdateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateOccurrencesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest */ - UpdateOccurrenceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpdateOccurrenceRequest) + BatchCreateOccurrencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesRequest) return object; - var message = new $root.grafeas.v1.UpdateOccurrenceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.occurrence != null) { - if (typeof object.occurrence !== "object") - throw TypeError(".grafeas.v1.UpdateOccurrenceRequest.occurrence: object expected"); - message.occurrence = $root.grafeas.v1.Occurrence.fromObject(object.occurrence); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".grafeas.v1.UpdateOccurrenceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.grafeas.v1.BatchCreateOccurrencesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.occurrences) { + if (!Array.isArray(object.occurrences)) + throw TypeError(".grafeas.v1.BatchCreateOccurrencesRequest.occurrences: array expected"); + message.occurrences = []; + for (var i = 0; i < object.occurrences.length; ++i) { + if (typeof object.occurrences[i] !== "object") + throw TypeError(".grafeas.v1.BatchCreateOccurrencesRequest.occurrences: object expected"); + message.occurrences[i] = $root.grafeas.v1.Occurrence.fromObject(object.occurrences[i]); + } } return message; }; /** - * Creates a plain object from an UpdateOccurrenceRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateOccurrencesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.UpdateOccurrenceRequest} message UpdateOccurrenceRequest + * @param {grafeas.v1.BatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateOccurrenceRequest.toObject = function toObject(message, options) { + BatchCreateOccurrencesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.occurrence = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.occurrences = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.occurrences && message.occurrences.length) { + object.occurrences = []; + for (var j = 0; j < message.occurrences.length; ++j) + object.occurrences[j] = $root.grafeas.v1.Occurrence.toObject(message.occurrences[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.occurrence != null && message.hasOwnProperty("occurrence")) - object.occurrence = $root.grafeas.v1.Occurrence.toObject(message.occurrence, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateOccurrenceRequest to JSON. + * Converts this BatchCreateOccurrencesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @instance * @returns {Object.} JSON object */ - UpdateOccurrenceRequest.prototype.toJSON = function toJSON() { + BatchCreateOccurrencesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateOccurrenceRequest; + return BatchCreateOccurrencesRequest; })(); - v1.GetNoteRequest = (function() { + v1.BatchCreateOccurrencesResponse = (function() { /** - * Properties of a GetNoteRequest. + * Properties of a BatchCreateOccurrencesResponse. * @memberof grafeas.v1 - * @interface IGetNoteRequest - * @property {string|null} [name] GetNoteRequest name + * @interface IBatchCreateOccurrencesResponse + * @property {Array.|null} [occurrences] BatchCreateOccurrencesResponse occurrences */ /** - * Constructs a new GetNoteRequest. + * Constructs a new BatchCreateOccurrencesResponse. * @memberof grafeas.v1 - * @classdesc Represents a GetNoteRequest. - * @implements IGetNoteRequest + * @classdesc Represents a BatchCreateOccurrencesResponse. + * @implements IBatchCreateOccurrencesResponse * @constructor - * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set */ - function GetNoteRequest(properties) { + function BatchCreateOccurrencesResponse(properties) { + this.occurrences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20607,75 +20194,78 @@ } /** - * GetNoteRequest name. - * @member {string} name - * @memberof grafeas.v1.GetNoteRequest + * BatchCreateOccurrencesResponse occurrences. + * @member {Array.} occurrences + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @instance */ - GetNoteRequest.prototype.name = ""; + BatchCreateOccurrencesResponse.prototype.occurrences = $util.emptyArray; /** - * Creates a new GetNoteRequest instance using the specified properties. + * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static - * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest instance + * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse instance */ - GetNoteRequest.create = function create(properties) { - return new GetNoteRequest(properties); + BatchCreateOccurrencesResponse.create = function create(properties) { + return new BatchCreateOccurrencesResponse(properties); }; /** - * Encodes the specified GetNoteRequest message. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. + * Encodes the specified BatchCreateOccurrencesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static - * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNoteRequest.encode = function encode(message, writer) { + BatchCreateOccurrencesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.occurrences != null && message.occurrences.length) + for (var i = 0; i < message.occurrences.length; ++i) + $root.grafeas.v1.Occurrence.encode(message.occurrences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. + * Encodes the specified BatchCreateOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static - * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest message or plain object to encode + * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetNoteRequest message from the specified reader or buffer. + * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest + * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNoteRequest.decode = function decode(reader, length) { + BatchCreateOccurrencesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.GetNoteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateOccurrencesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.occurrences && message.occurrences.length)) + message.occurrences = []; + message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -20686,107 +20276,125 @@ }; /** - * Decodes a GetNoteRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest + * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNoteRequest.decodeDelimited = function decodeDelimited(reader) { + BatchCreateOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetNoteRequest message. + * Verifies a BatchCreateOccurrencesResponse message. * @function verify - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetNoteRequest.verify = function verify(message) { + BatchCreateOccurrencesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.occurrences != null && message.hasOwnProperty("occurrences")) { + if (!Array.isArray(message.occurrences)) + return "occurrences: array expected"; + for (var i = 0; i < message.occurrences.length; ++i) { + var error = $root.grafeas.v1.Occurrence.verify(message.occurrences[i]); + if (error) + return "occurrences." + error; + } + } return null; }; /** - * Creates a GetNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateOccurrencesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest + * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse */ - GetNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GetNoteRequest) + BatchCreateOccurrencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesResponse) return object; - var message = new $root.grafeas.v1.GetNoteRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.grafeas.v1.BatchCreateOccurrencesResponse(); + if (object.occurrences) { + if (!Array.isArray(object.occurrences)) + throw TypeError(".grafeas.v1.BatchCreateOccurrencesResponse.occurrences: array expected"); + message.occurrences = []; + for (var i = 0; i < object.occurrences.length; ++i) { + if (typeof object.occurrences[i] !== "object") + throw TypeError(".grafeas.v1.BatchCreateOccurrencesResponse.occurrences: object expected"); + message.occurrences[i] = $root.grafeas.v1.Occurrence.fromObject(object.occurrences[i]); + } + } return message; }; /** - * Creates a plain object from a GetNoteRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateOccurrencesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @static - * @param {grafeas.v1.GetNoteRequest} message GetNoteRequest + * @param {grafeas.v1.BatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetNoteRequest.toObject = function toObject(message, options) { + BatchCreateOccurrencesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.arrays || options.defaults) + object.occurrences = []; + if (message.occurrences && message.occurrences.length) { + object.occurrences = []; + for (var j = 0; j < message.occurrences.length; ++j) + object.occurrences[j] = $root.grafeas.v1.Occurrence.toObject(message.occurrences[j], options); + } return object; }; /** - * Converts this GetNoteRequest to JSON. + * Converts this BatchCreateOccurrencesResponse to JSON. * @function toJSON - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.BatchCreateOccurrencesResponse * @instance * @returns {Object.} JSON object */ - GetNoteRequest.prototype.toJSON = function toJSON() { + BatchCreateOccurrencesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetNoteRequest; + return BatchCreateOccurrencesResponse; })(); - v1.GetOccurrenceNoteRequest = (function() { + v1.Layer = (function() { /** - * Properties of a GetOccurrenceNoteRequest. + * Properties of a Layer. * @memberof grafeas.v1 - * @interface IGetOccurrenceNoteRequest - * @property {string|null} [name] GetOccurrenceNoteRequest name + * @interface ILayer + * @property {string|null} [directive] Layer directive + * @property {string|null} ["arguments"] Layer arguments */ /** - * Constructs a new GetOccurrenceNoteRequest. + * Constructs a new Layer. * @memberof grafeas.v1 - * @classdesc Represents a GetOccurrenceNoteRequest. - * @implements IGetOccurrenceNoteRequest + * @classdesc Represents a Layer. + * @implements ILayer * @constructor - * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.ILayer=} [properties] Properties to set */ - function GetOccurrenceNoteRequest(properties) { + function Layer(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20794,75 +20402,88 @@ } /** - * GetOccurrenceNoteRequest name. - * @member {string} name - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * Layer directive. + * @member {string} directive + * @memberof grafeas.v1.Layer * @instance */ - GetOccurrenceNoteRequest.prototype.name = ""; + Layer.prototype.directive = ""; /** - * Creates a new GetOccurrenceNoteRequest instance using the specified properties. + * Layer arguments. + * @member {string} arguments + * @memberof grafeas.v1.Layer + * @instance + */ + Layer.prototype["arguments"] = ""; + + /** + * Creates a new Layer instance using the specified properties. * @function create - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest instance + * @param {grafeas.v1.ILayer=} [properties] Properties to set + * @returns {grafeas.v1.Layer} Layer instance */ - GetOccurrenceNoteRequest.create = function create(properties) { - return new GetOccurrenceNoteRequest(properties); + Layer.create = function create(properties) { + return new Layer(properties); }; /** - * Encodes the specified GetOccurrenceNoteRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. + * Encodes the specified Layer message. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. * @function encode - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest message or plain object to encode + * @param {grafeas.v1.ILayer} message Layer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOccurrenceNoteRequest.encode = function encode(message, writer) { + Layer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.directive != null && Object.hasOwnProperty.call(message, "directive")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.directive); + if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["arguments"]); return writer; }; /** - * Encodes the specified GetOccurrenceNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. + * Encodes the specified Layer message, length delimited. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest message or plain object to encode + * @param {grafeas.v1.ILayer} message Layer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOccurrenceNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Layer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer. + * Decodes a Layer message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @returns {grafeas.v1.Layer} Layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOccurrenceNoteRequest.decode = function decode(reader, length) { + Layer.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.GetOccurrenceNoteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Layer(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.directive = reader.string(); + break; + case 2: + message["arguments"] = reader.string(); break; default: reader.skipType(tag & 7); @@ -20873,110 +20494,119 @@ }; /** - * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer, length delimited. + * Decodes a Layer message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @returns {grafeas.v1.Layer} Layer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOccurrenceNoteRequest.decodeDelimited = function decodeDelimited(reader) { + Layer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOccurrenceNoteRequest message. + * Verifies a Layer message. * @function verify - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOccurrenceNoteRequest.verify = function verify(message) { + Layer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.directive != null && message.hasOwnProperty("directive")) + if (!$util.isString(message.directive)) + return "directive: string expected"; + if (message["arguments"] != null && message.hasOwnProperty("arguments")) + if (!$util.isString(message["arguments"])) + return "arguments: string expected"; return null; }; /** - * Creates a GetOccurrenceNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Layer message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @returns {grafeas.v1.Layer} Layer */ - GetOccurrenceNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GetOccurrenceNoteRequest) + Layer.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Layer) return object; - var message = new $root.grafeas.v1.GetOccurrenceNoteRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.grafeas.v1.Layer(); + if (object.directive != null) + message.directive = String(object.directive); + if (object["arguments"] != null) + message["arguments"] = String(object["arguments"]); return message; }; /** - * Creates a plain object from a GetOccurrenceNoteRequest message. Also converts values to other types if specified. + * Creates a plain object from a Layer message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.GetOccurrenceNoteRequest} message GetOccurrenceNoteRequest + * @param {grafeas.v1.Layer} message Layer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOccurrenceNoteRequest.toObject = function toObject(message, options) { + Layer.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.directive = ""; + object["arguments"] = ""; + } + if (message.directive != null && message.hasOwnProperty("directive")) + object.directive = message.directive; + if (message["arguments"] != null && message.hasOwnProperty("arguments")) + object["arguments"] = message["arguments"]; return object; }; /** - * Converts this GetOccurrenceNoteRequest to JSON. + * Converts this Layer to JSON. * @function toJSON - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Layer * @instance * @returns {Object.} JSON object */ - GetOccurrenceNoteRequest.prototype.toJSON = function toJSON() { + Layer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetOccurrenceNoteRequest; + return Layer; })(); - v1.ListNotesRequest = (function() { + v1.Fingerprint = (function() { /** - * Properties of a ListNotesRequest. + * Properties of a Fingerprint. * @memberof grafeas.v1 - * @interface IListNotesRequest - * @property {string|null} [parent] ListNotesRequest parent - * @property {string|null} [filter] ListNotesRequest filter - * @property {number|null} [pageSize] ListNotesRequest pageSize - * @property {string|null} [pageToken] ListNotesRequest pageToken + * @interface IFingerprint + * @property {string|null} [v1Name] Fingerprint v1Name + * @property {Array.|null} [v2Blob] Fingerprint v2Blob + * @property {string|null} [v2Name] Fingerprint v2Name */ /** - * Constructs a new ListNotesRequest. + * Constructs a new Fingerprint. * @memberof grafeas.v1 - * @classdesc Represents a ListNotesRequest. - * @implements IListNotesRequest + * @classdesc Represents a Fingerprint. + * @implements IFingerprint * @constructor - * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set + * @param {grafeas.v1.IFingerprint=} [properties] Properties to set */ - function ListNotesRequest(properties) { + function Fingerprint(properties) { + this.v2Blob = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20984,114 +20614,104 @@ } /** - * ListNotesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.ListNotesRequest - * @instance - */ - ListNotesRequest.prototype.parent = ""; - - /** - * ListNotesRequest filter. - * @member {string} filter - * @memberof grafeas.v1.ListNotesRequest + * Fingerprint v1Name. + * @member {string} v1Name + * @memberof grafeas.v1.Fingerprint * @instance */ - ListNotesRequest.prototype.filter = ""; + Fingerprint.prototype.v1Name = ""; /** - * ListNotesRequest pageSize. - * @member {number} pageSize - * @memberof grafeas.v1.ListNotesRequest + * Fingerprint v2Blob. + * @member {Array.} v2Blob + * @memberof grafeas.v1.Fingerprint * @instance */ - ListNotesRequest.prototype.pageSize = 0; + Fingerprint.prototype.v2Blob = $util.emptyArray; /** - * ListNotesRequest pageToken. - * @member {string} pageToken - * @memberof grafeas.v1.ListNotesRequest + * Fingerprint v2Name. + * @member {string} v2Name + * @memberof grafeas.v1.Fingerprint * @instance */ - ListNotesRequest.prototype.pageToken = ""; + Fingerprint.prototype.v2Name = ""; /** - * Creates a new ListNotesRequest instance using the specified properties. + * Creates a new Fingerprint instance using the specified properties. * @function create - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set - * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest instance + * @param {grafeas.v1.IFingerprint=} [properties] Properties to set + * @returns {grafeas.v1.Fingerprint} Fingerprint instance */ - ListNotesRequest.create = function create(properties) { - return new ListNotesRequest(properties); + Fingerprint.create = function create(properties) { + return new Fingerprint(properties); }; /** - * Encodes the specified ListNotesRequest message. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. + * Encodes the specified Fingerprint message. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.IListNotesRequest} message ListNotesRequest message or plain object to encode + * @param {grafeas.v1.IFingerprint} message Fingerprint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotesRequest.encode = function encode(message, writer) { + Fingerprint.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.v1Name != null && Object.hasOwnProperty.call(message, "v1Name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.v1Name); + if (message.v2Blob != null && message.v2Blob.length) + for (var i = 0; i < message.v2Blob.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.v2Blob[i]); + if (message.v2Name != null && Object.hasOwnProperty.call(message, "v2Name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.v2Name); return writer; }; /** - * Encodes the specified ListNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. + * Encodes the specified Fingerprint message, length delimited. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.IListNotesRequest} message ListNotesRequest message or plain object to encode + * @param {grafeas.v1.IFingerprint} message Fingerprint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Fingerprint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotesRequest message from the specified reader or buffer. + * Decodes a Fingerprint message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest + * @returns {grafeas.v1.Fingerprint} Fingerprint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotesRequest.decode = function decode(reader, length) { + Fingerprint.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNotesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Fingerprint(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.v1Name = reader.string(); break; case 2: - message.filter = reader.string(); + if (!(message.v2Blob && message.v2Blob.length)) + message.v2Blob = []; + message.v2Blob.push(reader.string()); break; case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + message.v2Name = reader.string(); break; default: reader.skipType(tag & 7); @@ -21102,134 +20722,138 @@ }; /** - * Decodes a ListNotesRequest message from the specified reader or buffer, length delimited. + * Decodes a Fingerprint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest + * @returns {grafeas.v1.Fingerprint} Fingerprint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotesRequest.decodeDelimited = function decodeDelimited(reader) { + Fingerprint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNotesRequest message. + * Verifies a Fingerprint message. * @function verify - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNotesRequest.verify = function verify(message) { + Fingerprint.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.v1Name != null && message.hasOwnProperty("v1Name")) + if (!$util.isString(message.v1Name)) + return "v1Name: string expected"; + if (message.v2Blob != null && message.hasOwnProperty("v2Blob")) { + if (!Array.isArray(message.v2Blob)) + return "v2Blob: array expected"; + for (var i = 0; i < message.v2Blob.length; ++i) + if (!$util.isString(message.v2Blob[i])) + return "v2Blob: string[] expected"; + } + if (message.v2Name != null && message.hasOwnProperty("v2Name")) + if (!$util.isString(message.v2Name)) + return "v2Name: string expected"; return null; }; /** - * Creates a ListNotesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Fingerprint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest + * @returns {grafeas.v1.Fingerprint} Fingerprint */ - ListNotesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNotesRequest) + Fingerprint.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Fingerprint) return object; - var message = new $root.grafeas.v1.ListNotesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.grafeas.v1.Fingerprint(); + if (object.v1Name != null) + message.v1Name = String(object.v1Name); + if (object.v2Blob) { + if (!Array.isArray(object.v2Blob)) + throw TypeError(".grafeas.v1.Fingerprint.v2Blob: array expected"); + message.v2Blob = []; + for (var i = 0; i < object.v2Blob.length; ++i) + message.v2Blob[i] = String(object.v2Blob[i]); + } + if (object.v2Name != null) + message.v2Name = String(object.v2Name); return message; }; /** - * Creates a plain object from a ListNotesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Fingerprint message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.ListNotesRequest} message ListNotesRequest + * @param {grafeas.v1.Fingerprint} message Fingerprint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotesRequest.toObject = function toObject(message, options) { + Fingerprint.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.v2Blob = []; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.v1Name = ""; + object.v2Name = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.v1Name != null && message.hasOwnProperty("v1Name")) + object.v1Name = message.v1Name; + if (message.v2Blob && message.v2Blob.length) { + object.v2Blob = []; + for (var j = 0; j < message.v2Blob.length; ++j) + object.v2Blob[j] = message.v2Blob[j]; + } + if (message.v2Name != null && message.hasOwnProperty("v2Name")) + object.v2Name = message.v2Name; return object; }; /** - * Converts this ListNotesRequest to JSON. + * Converts this Fingerprint to JSON. * @function toJSON - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.Fingerprint * @instance * @returns {Object.} JSON object */ - ListNotesRequest.prototype.toJSON = function toJSON() { + Fingerprint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotesRequest; + return Fingerprint; })(); - v1.ListNotesResponse = (function() { + v1.ImageNote = (function() { /** - * Properties of a ListNotesResponse. + * Properties of an ImageNote. * @memberof grafeas.v1 - * @interface IListNotesResponse - * @property {Array.|null} [notes] ListNotesResponse notes - * @property {string|null} [nextPageToken] ListNotesResponse nextPageToken + * @interface IImageNote + * @property {string|null} [resourceUrl] ImageNote resourceUrl + * @property {grafeas.v1.IFingerprint|null} [fingerprint] ImageNote fingerprint */ /** - * Constructs a new ListNotesResponse. + * Constructs a new ImageNote. * @memberof grafeas.v1 - * @classdesc Represents a ListNotesResponse. - * @implements IListNotesResponse + * @classdesc Represents an ImageNote. + * @implements IImageNote * @constructor - * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set + * @param {grafeas.v1.IImageNote=} [properties] Properties to set */ - function ListNotesResponse(properties) { - this.notes = []; + function ImageNote(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21237,91 +20861,88 @@ } /** - * ListNotesResponse notes. - * @member {Array.} notes - * @memberof grafeas.v1.ListNotesResponse + * ImageNote resourceUrl. + * @member {string} resourceUrl + * @memberof grafeas.v1.ImageNote * @instance */ - ListNotesResponse.prototype.notes = $util.emptyArray; + ImageNote.prototype.resourceUrl = ""; /** - * ListNotesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof grafeas.v1.ListNotesResponse + * ImageNote fingerprint. + * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint + * @memberof grafeas.v1.ImageNote * @instance */ - ListNotesResponse.prototype.nextPageToken = ""; + ImageNote.prototype.fingerprint = null; /** - * Creates a new ListNotesResponse instance using the specified properties. + * Creates a new ImageNote instance using the specified properties. * @function create - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set - * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse instance + * @param {grafeas.v1.IImageNote=} [properties] Properties to set + * @returns {grafeas.v1.ImageNote} ImageNote instance */ - ListNotesResponse.create = function create(properties) { - return new ListNotesResponse(properties); + ImageNote.create = function create(properties) { + return new ImageNote(properties); }; /** - * Encodes the specified ListNotesResponse message. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. + * Encodes the specified ImageNote message. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse message or plain object to encode + * @param {grafeas.v1.IImageNote} message ImageNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotesResponse.encode = function encode(message, writer) { + ImageNote.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notes != null && message.notes.length) - for (var i = 0; i < message.notes.length; ++i) - $root.grafeas.v1.Note.encode(message.notes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.resourceUrl != null && Object.hasOwnProperty.call(message, "resourceUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceUrl); + if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) + $root.grafeas.v1.Fingerprint.encode(message.fingerprint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. + * Encodes the specified ImageNote message, length delimited. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse message or plain object to encode + * @param {grafeas.v1.IImageNote} message ImageNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImageNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotesResponse message from the specified reader or buffer. + * Decodes an ImageNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse + * @returns {grafeas.v1.ImageNote} ImageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotesResponse.decode = function decode(reader, length) { + ImageNote.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNotesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ImageNote(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.notes && message.notes.length)) - message.notes = []; - message.notes.push($root.grafeas.v1.Note.decode(reader, reader.uint32())); + message.resourceUrl = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.fingerprint = $root.grafeas.v1.Fingerprint.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21332,133 +20953,125 @@ }; /** - * Decodes a ListNotesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImageNote message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse + * @returns {grafeas.v1.ImageNote} ImageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotesResponse.decodeDelimited = function decodeDelimited(reader) { + ImageNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNotesResponse message. + * Verifies an ImageNote message. * @function verify - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNotesResponse.verify = function verify(message) { + ImageNote.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notes != null && message.hasOwnProperty("notes")) { - if (!Array.isArray(message.notes)) - return "notes: array expected"; - for (var i = 0; i < message.notes.length; ++i) { - var error = $root.grafeas.v1.Note.verify(message.notes[i]); - if (error) - return "notes." + error; - } + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + if (!$util.isString(message.resourceUrl)) + return "resourceUrl: string expected"; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { + var error = $root.grafeas.v1.Fingerprint.verify(message.fingerprint); + if (error) + return "fingerprint." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListNotesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImageNote message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse + * @returns {grafeas.v1.ImageNote} ImageNote */ - ListNotesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNotesResponse) + ImageNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ImageNote) return object; - var message = new $root.grafeas.v1.ListNotesResponse(); - if (object.notes) { - if (!Array.isArray(object.notes)) - throw TypeError(".grafeas.v1.ListNotesResponse.notes: array expected"); - message.notes = []; - for (var i = 0; i < object.notes.length; ++i) { - if (typeof object.notes[i] !== "object") - throw TypeError(".grafeas.v1.ListNotesResponse.notes: object expected"); - message.notes[i] = $root.grafeas.v1.Note.fromObject(object.notes[i]); - } + var message = new $root.grafeas.v1.ImageNote(); + if (object.resourceUrl != null) + message.resourceUrl = String(object.resourceUrl); + if (object.fingerprint != null) { + if (typeof object.fingerprint !== "object") + throw TypeError(".grafeas.v1.ImageNote.fingerprint: object expected"); + message.fingerprint = $root.grafeas.v1.Fingerprint.fromObject(object.fingerprint); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListNotesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImageNote message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.ListNotesResponse} message ListNotesResponse + * @param {grafeas.v1.ImageNote} message ImageNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotesResponse.toObject = function toObject(message, options) { + ImageNote.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.notes = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.notes && message.notes.length) { - object.notes = []; - for (var j = 0; j < message.notes.length; ++j) - object.notes[j] = $root.grafeas.v1.Note.toObject(message.notes[j], options); + if (options.defaults) { + object.resourceUrl = ""; + object.fingerprint = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + object.resourceUrl = message.resourceUrl; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + object.fingerprint = $root.grafeas.v1.Fingerprint.toObject(message.fingerprint, options); return object; }; /** - * Converts this ListNotesResponse to JSON. + * Converts this ImageNote to JSON. * @function toJSON - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageNote * @instance * @returns {Object.} JSON object */ - ListNotesResponse.prototype.toJSON = function toJSON() { + ImageNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotesResponse; + return ImageNote; })(); - v1.DeleteNoteRequest = (function() { + v1.ImageOccurrence = (function() { /** - * Properties of a DeleteNoteRequest. + * Properties of an ImageOccurrence. * @memberof grafeas.v1 - * @interface IDeleteNoteRequest - * @property {string|null} [name] DeleteNoteRequest name + * @interface IImageOccurrence + * @property {grafeas.v1.IFingerprint|null} [fingerprint] ImageOccurrence fingerprint + * @property {number|null} [distance] ImageOccurrence distance + * @property {Array.|null} [layerInfo] ImageOccurrence layerInfo + * @property {string|null} [baseResourceUrl] ImageOccurrence baseResourceUrl */ /** - * Constructs a new DeleteNoteRequest. + * Constructs a new ImageOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a DeleteNoteRequest. - * @implements IDeleteNoteRequest + * @classdesc Represents an ImageOccurrence. + * @implements IImageOccurrence * @constructor - * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.IImageOccurrence=} [properties] Properties to set */ - function DeleteNoteRequest(properties) { + function ImageOccurrence(properties) { + this.layerInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21466,75 +21079,117 @@ } /** - * DeleteNoteRequest name. - * @member {string} name - * @memberof grafeas.v1.DeleteNoteRequest + * ImageOccurrence fingerprint. + * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint + * @memberof grafeas.v1.ImageOccurrence * @instance */ - DeleteNoteRequest.prototype.name = ""; + ImageOccurrence.prototype.fingerprint = null; /** - * Creates a new DeleteNoteRequest instance using the specified properties. + * ImageOccurrence distance. + * @member {number} distance + * @memberof grafeas.v1.ImageOccurrence + * @instance + */ + ImageOccurrence.prototype.distance = 0; + + /** + * ImageOccurrence layerInfo. + * @member {Array.} layerInfo + * @memberof grafeas.v1.ImageOccurrence + * @instance + */ + ImageOccurrence.prototype.layerInfo = $util.emptyArray; + + /** + * ImageOccurrence baseResourceUrl. + * @member {string} baseResourceUrl + * @memberof grafeas.v1.ImageOccurrence + * @instance + */ + ImageOccurrence.prototype.baseResourceUrl = ""; + + /** + * Creates a new ImageOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest instance + * @param {grafeas.v1.IImageOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence instance */ - DeleteNoteRequest.create = function create(properties) { - return new DeleteNoteRequest(properties); + ImageOccurrence.create = function create(properties) { + return new ImageOccurrence(properties); }; /** - * Encodes the specified DeleteNoteRequest message. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. + * Encodes the specified ImageOccurrence message. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.IDeleteNoteRequest} message DeleteNoteRequest message or plain object to encode + * @param {grafeas.v1.IImageOccurrence} message ImageOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteNoteRequest.encode = function encode(message, writer) { + ImageOccurrence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) + $root.grafeas.v1.Fingerprint.encode(message.fingerprint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.distance != null && Object.hasOwnProperty.call(message, "distance")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.distance); + if (message.layerInfo != null && message.layerInfo.length) + for (var i = 0; i < message.layerInfo.length; ++i) + $root.grafeas.v1.Layer.encode(message.layerInfo[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.baseResourceUrl != null && Object.hasOwnProperty.call(message, "baseResourceUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.baseResourceUrl); return writer; }; /** - * Encodes the specified DeleteNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. + * Encodes the specified ImageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.IDeleteNoteRequest} message DeleteNoteRequest message or plain object to encode + * @param {grafeas.v1.IImageOccurrence} message ImageOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImageOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteNoteRequest message from the specified reader or buffer. + * Decodes an ImageOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest + * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteNoteRequest.decode = function decode(reader, length) { + ImageOccurrence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.DeleteNoteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ImageOccurrence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.fingerprint = $root.grafeas.v1.Fingerprint.decode(reader, reader.uint32()); + break; + case 2: + message.distance = reader.int32(); + break; + case 3: + if (!(message.layerInfo && message.layerInfo.length)) + message.layerInfo = []; + message.layerInfo.push($root.grafeas.v1.Layer.decode(reader, reader.uint32())); + break; + case 4: + message.baseResourceUrl = reader.string(); break; default: reader.skipType(tag & 7); @@ -21545,109 +21200,176 @@ }; /** - * Decodes a DeleteNoteRequest message from the specified reader or buffer, length delimited. + * Decodes an ImageOccurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest + * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteNoteRequest.decodeDelimited = function decodeDelimited(reader) { + ImageOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteNoteRequest message. + * Verifies an ImageOccurrence message. * @function verify - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteNoteRequest.verify = function verify(message) { + ImageOccurrence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { + var error = $root.grafeas.v1.Fingerprint.verify(message.fingerprint); + if (error) + return "fingerprint." + error; + } + if (message.distance != null && message.hasOwnProperty("distance")) + if (!$util.isInteger(message.distance)) + return "distance: integer expected"; + if (message.layerInfo != null && message.hasOwnProperty("layerInfo")) { + if (!Array.isArray(message.layerInfo)) + return "layerInfo: array expected"; + for (var i = 0; i < message.layerInfo.length; ++i) { + var error = $root.grafeas.v1.Layer.verify(message.layerInfo[i]); + if (error) + return "layerInfo." + error; + } + } + if (message.baseResourceUrl != null && message.hasOwnProperty("baseResourceUrl")) + if (!$util.isString(message.baseResourceUrl)) + return "baseResourceUrl: string expected"; return null; }; /** - * Creates a DeleteNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImageOccurrence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest + * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence */ - DeleteNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeleteNoteRequest) + ImageOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ImageOccurrence) return object; - var message = new $root.grafeas.v1.DeleteNoteRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.grafeas.v1.ImageOccurrence(); + if (object.fingerprint != null) { + if (typeof object.fingerprint !== "object") + throw TypeError(".grafeas.v1.ImageOccurrence.fingerprint: object expected"); + message.fingerprint = $root.grafeas.v1.Fingerprint.fromObject(object.fingerprint); + } + if (object.distance != null) + message.distance = object.distance | 0; + if (object.layerInfo) { + if (!Array.isArray(object.layerInfo)) + throw TypeError(".grafeas.v1.ImageOccurrence.layerInfo: array expected"); + message.layerInfo = []; + for (var i = 0; i < object.layerInfo.length; ++i) { + if (typeof object.layerInfo[i] !== "object") + throw TypeError(".grafeas.v1.ImageOccurrence.layerInfo: object expected"); + message.layerInfo[i] = $root.grafeas.v1.Layer.fromObject(object.layerInfo[i]); + } + } + if (object.baseResourceUrl != null) + message.baseResourceUrl = String(object.baseResourceUrl); return message; }; /** - * Creates a plain object from a DeleteNoteRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImageOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.DeleteNoteRequest} message DeleteNoteRequest + * @param {grafeas.v1.ImageOccurrence} message ImageOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteNoteRequest.toObject = function toObject(message, options) { + ImageOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.arrays || options.defaults) + object.layerInfo = []; + if (options.defaults) { + object.fingerprint = null; + object.distance = 0; + object.baseResourceUrl = ""; + } + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + object.fingerprint = $root.grafeas.v1.Fingerprint.toObject(message.fingerprint, options); + if (message.distance != null && message.hasOwnProperty("distance")) + object.distance = message.distance; + if (message.layerInfo && message.layerInfo.length) { + object.layerInfo = []; + for (var j = 0; j < message.layerInfo.length; ++j) + object.layerInfo[j] = $root.grafeas.v1.Layer.toObject(message.layerInfo[j], options); + } + if (message.baseResourceUrl != null && message.hasOwnProperty("baseResourceUrl")) + object.baseResourceUrl = message.baseResourceUrl; return object; }; /** - * Converts this DeleteNoteRequest to JSON. + * Converts this ImageOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.ImageOccurrence * @instance * @returns {Object.} JSON object */ - DeleteNoteRequest.prototype.toJSON = function toJSON() { + ImageOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteNoteRequest; + return ImageOccurrence; })(); - v1.CreateNoteRequest = (function() { + /** + * Architecture enum. + * @name grafeas.v1.Architecture + * @enum {number} + * @property {number} ARCHITECTURE_UNSPECIFIED=0 ARCHITECTURE_UNSPECIFIED value + * @property {number} X86=1 X86 value + * @property {number} X64=2 X64 value + */ + v1.Architecture = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ARCHITECTURE_UNSPECIFIED"] = 0; + values[valuesById[1] = "X86"] = 1; + values[valuesById[2] = "X64"] = 2; + return values; + })(); + + v1.Distribution = (function() { /** - * Properties of a CreateNoteRequest. + * Properties of a Distribution. * @memberof grafeas.v1 - * @interface ICreateNoteRequest - * @property {string|null} [parent] CreateNoteRequest parent - * @property {string|null} [noteId] CreateNoteRequest noteId - * @property {grafeas.v1.INote|null} [note] CreateNoteRequest note + * @interface IDistribution + * @property {string|null} [cpeUri] Distribution cpeUri + * @property {grafeas.v1.Architecture|null} [architecture] Distribution architecture + * @property {grafeas.v1.IVersion|null} [latestVersion] Distribution latestVersion + * @property {string|null} [maintainer] Distribution maintainer + * @property {string|null} [url] Distribution url + * @property {string|null} [description] Distribution description */ /** - * Constructs a new CreateNoteRequest. + * Constructs a new Distribution. * @memberof grafeas.v1 - * @classdesc Represents a CreateNoteRequest. - * @implements ICreateNoteRequest + * @classdesc Represents a Distribution. + * @implements IDistribution * @constructor - * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.IDistribution=} [properties] Properties to set */ - function CreateNoteRequest(properties) { + function Distribution(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21655,101 +21377,140 @@ } /** - * CreateNoteRequest parent. - * @member {string} parent - * @memberof grafeas.v1.CreateNoteRequest + * Distribution cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.Distribution * @instance */ - CreateNoteRequest.prototype.parent = ""; + Distribution.prototype.cpeUri = ""; /** - * CreateNoteRequest noteId. - * @member {string} noteId - * @memberof grafeas.v1.CreateNoteRequest + * Distribution architecture. + * @member {grafeas.v1.Architecture} architecture + * @memberof grafeas.v1.Distribution * @instance */ - CreateNoteRequest.prototype.noteId = ""; + Distribution.prototype.architecture = 0; /** - * CreateNoteRequest note. - * @member {grafeas.v1.INote|null|undefined} note - * @memberof grafeas.v1.CreateNoteRequest + * Distribution latestVersion. + * @member {grafeas.v1.IVersion|null|undefined} latestVersion + * @memberof grafeas.v1.Distribution * @instance */ - CreateNoteRequest.prototype.note = null; + Distribution.prototype.latestVersion = null; /** - * Creates a new CreateNoteRequest instance using the specified properties. + * Distribution maintainer. + * @member {string} maintainer + * @memberof grafeas.v1.Distribution + * @instance + */ + Distribution.prototype.maintainer = ""; + + /** + * Distribution url. + * @member {string} url + * @memberof grafeas.v1.Distribution + * @instance + */ + Distribution.prototype.url = ""; + + /** + * Distribution description. + * @member {string} description + * @memberof grafeas.v1.Distribution + * @instance + */ + Distribution.prototype.description = ""; + + /** + * Creates a new Distribution instance using the specified properties. * @function create - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest instance + * @param {grafeas.v1.IDistribution=} [properties] Properties to set + * @returns {grafeas.v1.Distribution} Distribution instance */ - CreateNoteRequest.create = function create(properties) { - return new CreateNoteRequest(properties); + Distribution.create = function create(properties) { + return new Distribution(properties); }; /** - * Encodes the specified CreateNoteRequest message. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. + * Encodes the specified Distribution message. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. * @function encode - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest message or plain object to encode + * @param {grafeas.v1.IDistribution} message Distribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateNoteRequest.encode = function encode(message, writer) { + Distribution.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.noteId != null && Object.hasOwnProperty.call(message, "noteId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.noteId); - if (message.note != null && Object.hasOwnProperty.call(message, "note")) - $root.grafeas.v1.Note.encode(message.note, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.architecture); + if (message.latestVersion != null && Object.hasOwnProperty.call(message, "latestVersion")) + $root.grafeas.v1.Version.encode(message.latestVersion, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maintainer != null && Object.hasOwnProperty.call(message, "maintainer")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.maintainer); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.url); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); return writer; }; /** - * Encodes the specified CreateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest message or plain object to encode + * @param {grafeas.v1.IDistribution} message Distribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Distribution.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateNoteRequest message from the specified reader or buffer. + * Decodes a Distribution message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + * @returns {grafeas.v1.Distribution} Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateNoteRequest.decode = function decode(reader, length) { + Distribution.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.CreateNoteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Distribution(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.cpeUri = reader.string(); break; case 2: - message.noteId = reader.string(); + message.architecture = reader.int32(); break; case 3: - message.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); + message.latestVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 4: + message.maintainer = reader.string(); + break; + case 5: + message.url = reader.string(); + break; + case 6: + message.description = reader.string(); break; default: reader.skipType(tag & 7); @@ -21760,131 +21521,173 @@ }; /** - * Decodes a CreateNoteRequest message from the specified reader or buffer, length delimited. + * Decodes a Distribution message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + * @returns {grafeas.v1.Distribution} Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateNoteRequest.decodeDelimited = function decodeDelimited(reader) { + Distribution.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateNoteRequest message. + * Verifies a Distribution message. * @function verify - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateNoteRequest.verify = function verify(message) { + Distribution.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.noteId != null && message.hasOwnProperty("noteId")) - if (!$util.isString(message.noteId)) - return "noteId: string expected"; - if (message.note != null && message.hasOwnProperty("note")) { - var error = $root.grafeas.v1.Note.verify(message.note); + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + if (!$util.isString(message.cpeUri)) + return "cpeUri: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + switch (message.architecture) { + default: + return "architecture: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.latestVersion != null && message.hasOwnProperty("latestVersion")) { + var error = $root.grafeas.v1.Version.verify(message.latestVersion); if (error) - return "note." + error; + return "latestVersion." + error; } + if (message.maintainer != null && message.hasOwnProperty("maintainer")) + if (!$util.isString(message.maintainer)) + return "maintainer: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a CreateNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + * @returns {grafeas.v1.Distribution} Distribution */ - CreateNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.CreateNoteRequest) + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Distribution) return object; - var message = new $root.grafeas.v1.CreateNoteRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.noteId != null) - message.noteId = String(object.noteId); - if (object.note != null) { - if (typeof object.note !== "object") - throw TypeError(".grafeas.v1.CreateNoteRequest.note: object expected"); - message.note = $root.grafeas.v1.Note.fromObject(object.note); + var message = new $root.grafeas.v1.Distribution(); + if (object.cpeUri != null) + message.cpeUri = String(object.cpeUri); + switch (object.architecture) { + case "ARCHITECTURE_UNSPECIFIED": + case 0: + message.architecture = 0; + break; + case "X86": + case 1: + message.architecture = 1; + break; + case "X64": + case 2: + message.architecture = 2; + break; + } + if (object.latestVersion != null) { + if (typeof object.latestVersion !== "object") + throw TypeError(".grafeas.v1.Distribution.latestVersion: object expected"); + message.latestVersion = $root.grafeas.v1.Version.fromObject(object.latestVersion); } + if (object.maintainer != null) + message.maintainer = String(object.maintainer); + if (object.url != null) + message.url = String(object.url); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a CreateNoteRequest message. Also converts values to other types if specified. + * Creates a plain object from a Distribution message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.CreateNoteRequest} message CreateNoteRequest + * @param {grafeas.v1.Distribution} message Distribution * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateNoteRequest.toObject = function toObject(message, options) { + Distribution.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.noteId = ""; - object.note = null; + object.cpeUri = ""; + object.architecture = options.enums === String ? "ARCHITECTURE_UNSPECIFIED" : 0; + object.latestVersion = null; + object.maintainer = ""; + object.url = ""; + object.description = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.noteId != null && message.hasOwnProperty("noteId")) - object.noteId = message.noteId; - if (message.note != null && message.hasOwnProperty("note")) - object.note = $root.grafeas.v1.Note.toObject(message.note, options); + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + object.cpeUri = message.cpeUri; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = options.enums === String ? $root.grafeas.v1.Architecture[message.architecture] : message.architecture; + if (message.latestVersion != null && message.hasOwnProperty("latestVersion")) + object.latestVersion = $root.grafeas.v1.Version.toObject(message.latestVersion, options); + if (message.maintainer != null && message.hasOwnProperty("maintainer")) + object.maintainer = message.maintainer; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this CreateNoteRequest to JSON. + * Converts this Distribution to JSON. * @function toJSON - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Distribution * @instance * @returns {Object.} JSON object */ - CreateNoteRequest.prototype.toJSON = function toJSON() { + Distribution.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateNoteRequest; + return Distribution; })(); - v1.UpdateNoteRequest = (function() { + v1.Location = (function() { /** - * Properties of an UpdateNoteRequest. + * Properties of a Location. * @memberof grafeas.v1 - * @interface IUpdateNoteRequest - * @property {string|null} [name] UpdateNoteRequest name - * @property {grafeas.v1.INote|null} [note] UpdateNoteRequest note - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateNoteRequest updateMask + * @interface ILocation + * @property {string|null} [cpeUri] Location cpeUri + * @property {grafeas.v1.IVersion|null} [version] Location version + * @property {string|null} [path] Location path */ /** - * Constructs a new UpdateNoteRequest. + * Constructs a new Location. * @memberof grafeas.v1 - * @classdesc Represents an UpdateNoteRequest. - * @implements IUpdateNoteRequest + * @classdesc Represents a Location. + * @implements ILocation * @constructor - * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.ILocation=} [properties] Properties to set */ - function UpdateNoteRequest(properties) { + function Location(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21892,101 +21695,101 @@ } /** - * UpdateNoteRequest name. - * @member {string} name - * @memberof grafeas.v1.UpdateNoteRequest + * Location cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.Location * @instance */ - UpdateNoteRequest.prototype.name = ""; + Location.prototype.cpeUri = ""; /** - * UpdateNoteRequest note. - * @member {grafeas.v1.INote|null|undefined} note - * @memberof grafeas.v1.UpdateNoteRequest + * Location version. + * @member {grafeas.v1.IVersion|null|undefined} version + * @memberof grafeas.v1.Location * @instance */ - UpdateNoteRequest.prototype.note = null; + Location.prototype.version = null; /** - * UpdateNoteRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof grafeas.v1.UpdateNoteRequest + * Location path. + * @member {string} path + * @memberof grafeas.v1.Location * @instance */ - UpdateNoteRequest.prototype.updateMask = null; + Location.prototype.path = ""; /** - * Creates a new UpdateNoteRequest instance using the specified properties. + * Creates a new Location instance using the specified properties. * @function create - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest instance + * @param {grafeas.v1.ILocation=} [properties] Properties to set + * @returns {grafeas.v1.Location} Location instance */ - UpdateNoteRequest.create = function create(properties) { - return new UpdateNoteRequest(properties); + Location.create = function create(properties) { + return new Location(properties); }; /** - * Encodes the specified UpdateNoteRequest message. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. + * Encodes the specified Location message. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. * @function encode - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.IUpdateNoteRequest} message UpdateNoteRequest message or plain object to encode + * @param {grafeas.v1.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateNoteRequest.encode = function encode(message, writer) { + Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.note != null && Object.hasOwnProperty.call(message, "note")) - $root.grafeas.v1.Note.encode(message.note, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.grafeas.v1.Version.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); return writer; }; /** - * Encodes the specified UpdateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. + * Encodes the specified Location message, length delimited. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.IUpdateNoteRequest} message UpdateNoteRequest message or plain object to encode + * @param {grafeas.v1.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateNoteRequest message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest + * @returns {grafeas.v1.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateNoteRequest.decode = function decode(reader, length) { + Location.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpdateNoteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Location(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.cpeUri = reader.string(); break; case 2: - message.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); + message.version = $root.grafeas.v1.Version.decode(reader, reader.uint32()); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -21997,137 +21800,131 @@ }; /** - * Decodes an UpdateNoteRequest message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest + * @returns {grafeas.v1.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateNoteRequest.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateNoteRequest message. + * Verifies a Location message. * @function verify - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateNoteRequest.verify = function verify(message) { + Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.note != null && message.hasOwnProperty("note")) { - var error = $root.grafeas.v1.Note.verify(message.note); - if (error) - return "note." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + if (!$util.isString(message.cpeUri)) + return "cpeUri: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.grafeas.v1.Version.verify(message.version); if (error) - return "updateMask." + error; + return "version." + error; } + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates an UpdateNoteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest + * @returns {grafeas.v1.Location} Location */ - UpdateNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpdateNoteRequest) + Location.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Location) return object; - var message = new $root.grafeas.v1.UpdateNoteRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.note != null) { - if (typeof object.note !== "object") - throw TypeError(".grafeas.v1.UpdateNoteRequest.note: object expected"); - message.note = $root.grafeas.v1.Note.fromObject(object.note); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".grafeas.v1.UpdateNoteRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.grafeas.v1.Location(); + if (object.cpeUri != null) + message.cpeUri = String(object.cpeUri); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".grafeas.v1.Location.version: object expected"); + message.version = $root.grafeas.v1.Version.fromObject(object.version); } + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from an UpdateNoteRequest message. Also converts values to other types if specified. + * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.UpdateNoteRequest} message UpdateNoteRequest + * @param {grafeas.v1.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateNoteRequest.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.note = null; - object.updateMask = null; + object.cpeUri = ""; + object.version = null; + object.path = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.note != null && message.hasOwnProperty("note")) - object.note = $root.grafeas.v1.Note.toObject(message.note, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + object.cpeUri = message.cpeUri; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.grafeas.v1.Version.toObject(message.version, options); + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this UpdateNoteRequest to JSON. + * Converts this Location to JSON. * @function toJSON - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.Location * @instance * @returns {Object.} JSON object */ - UpdateNoteRequest.prototype.toJSON = function toJSON() { + Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateNoteRequest; + return Location; })(); - v1.ListNoteOccurrencesRequest = (function() { + v1.PackageNote = (function() { /** - * Properties of a ListNoteOccurrencesRequest. + * Properties of a PackageNote. * @memberof grafeas.v1 - * @interface IListNoteOccurrencesRequest - * @property {string|null} [name] ListNoteOccurrencesRequest name - * @property {string|null} [filter] ListNoteOccurrencesRequest filter - * @property {number|null} [pageSize] ListNoteOccurrencesRequest pageSize - * @property {string|null} [pageToken] ListNoteOccurrencesRequest pageToken + * @interface IPackageNote + * @property {string|null} [name] PackageNote name + * @property {Array.|null} [distribution] PackageNote distribution */ /** - * Constructs a new ListNoteOccurrencesRequest. + * Constructs a new PackageNote. * @memberof grafeas.v1 - * @classdesc Represents a ListNoteOccurrencesRequest. - * @implements IListNoteOccurrencesRequest + * @classdesc Represents a PackageNote. + * @implements IPackageNote * @constructor - * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set + * @param {grafeas.v1.IPackageNote=} [properties] Properties to set */ - function ListNoteOccurrencesRequest(properties) { + function PackageNote(properties) { + this.distribution = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22135,114 +21932,91 @@ } /** - * ListNoteOccurrencesRequest name. + * PackageNote name. * @member {string} name - * @memberof grafeas.v1.ListNoteOccurrencesRequest - * @instance - */ - ListNoteOccurrencesRequest.prototype.name = ""; - - /** - * ListNoteOccurrencesRequest filter. - * @member {string} filter - * @memberof grafeas.v1.ListNoteOccurrencesRequest - * @instance - */ - ListNoteOccurrencesRequest.prototype.filter = ""; - - /** - * ListNoteOccurrencesRequest pageSize. - * @member {number} pageSize - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @instance */ - ListNoteOccurrencesRequest.prototype.pageSize = 0; + PackageNote.prototype.name = ""; /** - * ListNoteOccurrencesRequest pageToken. - * @member {string} pageToken - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * PackageNote distribution. + * @member {Array.} distribution + * @memberof grafeas.v1.PackageNote * @instance */ - ListNoteOccurrencesRequest.prototype.pageToken = ""; + PackageNote.prototype.distribution = $util.emptyArray; /** - * Creates a new ListNoteOccurrencesRequest instance using the specified properties. + * Creates a new PackageNote instance using the specified properties. * @function create - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set - * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest instance + * @param {grafeas.v1.IPackageNote=} [properties] Properties to set + * @returns {grafeas.v1.PackageNote} PackageNote instance */ - ListNoteOccurrencesRequest.create = function create(properties) { - return new ListNoteOccurrencesRequest(properties); + PackageNote.create = function create(properties) { + return new PackageNote(properties); }; /** - * Encodes the specified ListNoteOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. + * Encodes the specified PackageNote message. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.IListNoteOccurrencesRequest} message ListNoteOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IPackageNote} message PackageNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNoteOccurrencesRequest.encode = function encode(message, writer) { + PackageNote.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.distribution != null && message.distribution.length) + for (var i = 0; i < message.distribution.length; ++i) + $root.grafeas.v1.Distribution.encode(message.distribution[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListNoteOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. + * Encodes the specified PackageNote message, length delimited. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.IListNoteOccurrencesRequest} message ListNoteOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IPackageNote} message PackageNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNoteOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + PackageNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer. + * Decodes a PackageNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest + * @returns {grafeas.v1.PackageNote} PackageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNoteOccurrencesRequest.decode = function decode(reader, length) { + PackageNote.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNoteOccurrencesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.PackageNote(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + case 10: + if (!(message.distribution && message.distribution.length)) + message.distribution = []; + message.distribution.push($root.grafeas.v1.Distribution.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -22253,134 +22027,135 @@ }; /** - * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer, length delimited. + * Decodes a PackageNote message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest + * @returns {grafeas.v1.PackageNote} PackageNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNoteOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { + PackageNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNoteOccurrencesRequest message. + * Verifies a PackageNote message. * @function verify - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNoteOccurrencesRequest.verify = function verify(message) { + PackageNote.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.distribution != null && message.hasOwnProperty("distribution")) { + if (!Array.isArray(message.distribution)) + return "distribution: array expected"; + for (var i = 0; i < message.distribution.length; ++i) { + var error = $root.grafeas.v1.Distribution.verify(message.distribution[i]); + if (error) + return "distribution." + error; + } + } return null; }; /** - * Creates a ListNoteOccurrencesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PackageNote message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest + * @returns {grafeas.v1.PackageNote} PackageNote */ - ListNoteOccurrencesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNoteOccurrencesRequest) + PackageNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.PackageNote) return object; - var message = new $root.grafeas.v1.ListNoteOccurrencesRequest(); + var message = new $root.grafeas.v1.PackageNote(); if (object.name != null) message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + if (object.distribution) { + if (!Array.isArray(object.distribution)) + throw TypeError(".grafeas.v1.PackageNote.distribution: array expected"); + message.distribution = []; + for (var i = 0; i < object.distribution.length; ++i) { + if (typeof object.distribution[i] !== "object") + throw TypeError(".grafeas.v1.PackageNote.distribution: object expected"); + message.distribution[i] = $root.grafeas.v1.Distribution.fromObject(object.distribution[i]); + } + } return message; }; /** - * Creates a plain object from a ListNoteOccurrencesRequest message. Also converts values to other types if specified. + * Creates a plain object from a PackageNote message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.ListNoteOccurrencesRequest} message ListNoteOccurrencesRequest + * @param {grafeas.v1.PackageNote} message PackageNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNoteOccurrencesRequest.toObject = function toObject(message, options) { + PackageNote.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.arrays || options.defaults) + object.distribution = []; + if (options.defaults) object.name = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.distribution && message.distribution.length) { + object.distribution = []; + for (var j = 0; j < message.distribution.length; ++j) + object.distribution[j] = $root.grafeas.v1.Distribution.toObject(message.distribution[j], options); + } return object; }; /** - * Converts this ListNoteOccurrencesRequest to JSON. + * Converts this PackageNote to JSON. * @function toJSON - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageNote * @instance * @returns {Object.} JSON object */ - ListNoteOccurrencesRequest.prototype.toJSON = function toJSON() { + PackageNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNoteOccurrencesRequest; + return PackageNote; })(); - v1.ListNoteOccurrencesResponse = (function() { + v1.PackageOccurrence = (function() { /** - * Properties of a ListNoteOccurrencesResponse. + * Properties of a PackageOccurrence. * @memberof grafeas.v1 - * @interface IListNoteOccurrencesResponse - * @property {Array.|null} [occurrences] ListNoteOccurrencesResponse occurrences - * @property {string|null} [nextPageToken] ListNoteOccurrencesResponse nextPageToken + * @interface IPackageOccurrence + * @property {string|null} [name] PackageOccurrence name + * @property {Array.|null} [location] PackageOccurrence location */ /** - * Constructs a new ListNoteOccurrencesResponse. + * Constructs a new PackageOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a ListNoteOccurrencesResponse. - * @implements IListNoteOccurrencesResponse + * @classdesc Represents a PackageOccurrence. + * @implements IPackageOccurrence * @constructor - * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set + * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set */ - function ListNoteOccurrencesResponse(properties) { - this.occurrences = []; + function PackageOccurrence(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22388,91 +22163,91 @@ } /** - * ListNoteOccurrencesResponse occurrences. - * @member {Array.} occurrences - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * PackageOccurrence name. + * @member {string} name + * @memberof grafeas.v1.PackageOccurrence * @instance */ - ListNoteOccurrencesResponse.prototype.occurrences = $util.emptyArray; + PackageOccurrence.prototype.name = ""; /** - * ListNoteOccurrencesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * PackageOccurrence location. + * @member {Array.} location + * @memberof grafeas.v1.PackageOccurrence * @instance */ - ListNoteOccurrencesResponse.prototype.nextPageToken = ""; + PackageOccurrence.prototype.location = $util.emptyArray; /** - * Creates a new ListNoteOccurrencesResponse instance using the specified properties. + * Creates a new PackageOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set - * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse instance + * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence instance */ - ListNoteOccurrencesResponse.create = function create(properties) { - return new ListNoteOccurrencesResponse(properties); + PackageOccurrence.create = function create(properties) { + return new PackageOccurrence(properties); }; /** - * Encodes the specified ListNoteOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. + * Encodes the specified PackageOccurrence message. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.IListNoteOccurrencesResponse} message ListNoteOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IPackageOccurrence} message PackageOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNoteOccurrencesResponse.encode = function encode(message, writer) { + PackageOccurrence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.occurrences != null && message.occurrences.length) - for (var i = 0; i < message.occurrences.length; ++i) - $root.grafeas.v1.Occurrence.encode(message.occurrences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.grafeas.v1.Location.encode(message.location[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListNoteOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. + * Encodes the specified PackageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.IListNoteOccurrencesResponse} message ListNoteOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IPackageOccurrence} message PackageOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNoteOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + PackageOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer. + * Decodes a PackageOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse + * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNoteOccurrencesResponse.decode = function decode(reader, length) { + PackageOccurrence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ListNoteOccurrencesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.PackageOccurrence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.occurrences && message.occurrences.length)) - message.occurrences = []; - message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + message.name = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.grafeas.v1.Location.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -22483,246 +22258,279 @@ }; /** - * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer, length delimited. + * Decodes a PackageOccurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse + * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNoteOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { + PackageOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNoteOccurrencesResponse message. + * Verifies a PackageOccurrence message. * @function verify - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNoteOccurrencesResponse.verify = function verify(message) { + PackageOccurrence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.occurrences != null && message.hasOwnProperty("occurrences")) { - if (!Array.isArray(message.occurrences)) - return "occurrences: array expected"; - for (var i = 0; i < message.occurrences.length; ++i) { - var error = $root.grafeas.v1.Occurrence.verify(message.occurrences[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.grafeas.v1.Location.verify(message.location[i]); if (error) - return "occurrences." + error; + return "location." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListNoteOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PackageOccurrence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse + * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence */ - ListNoteOccurrencesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNoteOccurrencesResponse) + PackageOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.PackageOccurrence) return object; - var message = new $root.grafeas.v1.ListNoteOccurrencesResponse(); - if (object.occurrences) { - if (!Array.isArray(object.occurrences)) - throw TypeError(".grafeas.v1.ListNoteOccurrencesResponse.occurrences: array expected"); - message.occurrences = []; - for (var i = 0; i < object.occurrences.length; ++i) { - if (typeof object.occurrences[i] !== "object") - throw TypeError(".grafeas.v1.ListNoteOccurrencesResponse.occurrences: object expected"); - message.occurrences[i] = $root.grafeas.v1.Occurrence.fromObject(object.occurrences[i]); + var message = new $root.grafeas.v1.PackageOccurrence(); + if (object.name != null) + message.name = String(object.name); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".grafeas.v1.PackageOccurrence.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".grafeas.v1.PackageOccurrence.location: object expected"); + message.location[i] = $root.grafeas.v1.Location.fromObject(object.location[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListNoteOccurrencesResponse message. Also converts values to other types if specified. + * Creates a plain object from a PackageOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.ListNoteOccurrencesResponse} message ListNoteOccurrencesResponse + * @param {grafeas.v1.PackageOccurrence} message PackageOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNoteOccurrencesResponse.toObject = function toObject(message, options) { + PackageOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.occurrences = []; + object.location = []; if (options.defaults) - object.nextPageToken = ""; - if (message.occurrences && message.occurrences.length) { - object.occurrences = []; - for (var j = 0; j < message.occurrences.length; ++j) - object.occurrences[j] = $root.grafeas.v1.Occurrence.toObject(message.occurrences[j], options); + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.grafeas.v1.Location.toObject(message.location[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListNoteOccurrencesResponse to JSON. + * Converts this PackageOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.PackageOccurrence * @instance * @returns {Object.} JSON object */ - ListNoteOccurrencesResponse.prototype.toJSON = function toJSON() { + PackageOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNoteOccurrencesResponse; + return PackageOccurrence; })(); - v1.BatchCreateNotesRequest = (function() { + v1.Version = (function() { /** - * Properties of a BatchCreateNotesRequest. + * Properties of a Version. * @memberof grafeas.v1 - * @interface IBatchCreateNotesRequest - * @property {string|null} [parent] BatchCreateNotesRequest parent - * @property {Object.|null} [notes] BatchCreateNotesRequest notes + * @interface IVersion + * @property {number|null} [epoch] Version epoch + * @property {string|null} [name] Version name + * @property {string|null} [revision] Version revision + * @property {boolean|null} [inclusive] Version inclusive + * @property {grafeas.v1.Version.VersionKind|null} [kind] Version kind + * @property {string|null} [fullName] Version fullName + */ + + /** + * Constructs a new Version. + * @memberof grafeas.v1 + * @classdesc Represents a Version. + * @implements IVersion + * @constructor + * @param {grafeas.v1.IVersion=} [properties] Properties to set + */ + function Version(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Version epoch. + * @member {number} epoch + * @memberof grafeas.v1.Version + * @instance + */ + Version.prototype.epoch = 0; + + /** + * Version name. + * @member {string} name + * @memberof grafeas.v1.Version + * @instance + */ + Version.prototype.name = ""; + + /** + * Version revision. + * @member {string} revision + * @memberof grafeas.v1.Version + * @instance */ + Version.prototype.revision = ""; /** - * Constructs a new BatchCreateNotesRequest. - * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateNotesRequest. - * @implements IBatchCreateNotesRequest - * @constructor - * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set + * Version inclusive. + * @member {boolean} inclusive + * @memberof grafeas.v1.Version + * @instance */ - function BatchCreateNotesRequest(properties) { - this.notes = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Version.prototype.inclusive = false; /** - * BatchCreateNotesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.BatchCreateNotesRequest + * Version kind. + * @member {grafeas.v1.Version.VersionKind} kind + * @memberof grafeas.v1.Version * @instance */ - BatchCreateNotesRequest.prototype.parent = ""; + Version.prototype.kind = 0; /** - * BatchCreateNotesRequest notes. - * @member {Object.} notes - * @memberof grafeas.v1.BatchCreateNotesRequest + * Version fullName. + * @member {string} fullName + * @memberof grafeas.v1.Version * @instance */ - BatchCreateNotesRequest.prototype.notes = $util.emptyObject; + Version.prototype.fullName = ""; /** - * Creates a new BatchCreateNotesRequest instance using the specified properties. + * Creates a new Version instance using the specified properties. * @function create - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest instance + * @param {grafeas.v1.IVersion=} [properties] Properties to set + * @returns {grafeas.v1.Version} Version instance */ - BatchCreateNotesRequest.create = function create(properties) { - return new BatchCreateNotesRequest(properties); + Version.create = function create(properties) { + return new Version(properties); }; /** - * Encodes the specified BatchCreateNotesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. + * Encodes the specified Version message. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.IBatchCreateNotesRequest} message BatchCreateNotesRequest message or plain object to encode + * @param {grafeas.v1.IVersion} message Version message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateNotesRequest.encode = function encode(message, writer) { + Version.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) - for (var keys = Object.keys(message.notes), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.grafeas.v1.Note.encode(message.notes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.epoch != null && Object.hasOwnProperty.call(message, "epoch")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.epoch); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.revision); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.kind); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fullName); + if (message.inclusive != null && Object.hasOwnProperty.call(message, "inclusive")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.inclusive); return writer; }; /** - * Encodes the specified BatchCreateNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. + * Encodes the specified Version message, length delimited. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.IBatchCreateNotesRequest} message BatchCreateNotesRequest message or plain object to encode + * @param {grafeas.v1.IVersion} message Version message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Version.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateNotesRequest message from the specified reader or buffer. + * Decodes a Version message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest + * @returns {grafeas.v1.Version} Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateNotesRequest.decode = function decode(reader, length) { + Version.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateNotesRequest(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Version(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.epoch = reader.int32(); break; case 2: - if (message.notes === $util.emptyObject) - message.notes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.grafeas.v1.Note.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.notes[key] = value; + message.name = reader.string(); + break; + case 3: + message.revision = reader.string(); + break; + case 6: + message.inclusive = reader.bool(); + break; + case 4: + message.kind = reader.int32(); + break; + case 5: + message.fullName = reader.string(); break; default: reader.skipType(tag & 7); @@ -22733,136 +22541,193 @@ }; /** - * Decodes a BatchCreateNotesRequest message from the specified reader or buffer, length delimited. + * Decodes a Version message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest + * @returns {grafeas.v1.Version} Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateNotesRequest.decodeDelimited = function decodeDelimited(reader) { + Version.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateNotesRequest message. + * Verifies a Version message. * @function verify - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateNotesRequest.verify = function verify(message) { + Version.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.notes != null && message.hasOwnProperty("notes")) { - if (!$util.isObject(message.notes)) - return "notes: object expected"; - var key = Object.keys(message.notes); - for (var i = 0; i < key.length; ++i) { - var error = $root.grafeas.v1.Note.verify(message.notes[key[i]]); - if (error) - return "notes." + error; + if (message.epoch != null && message.hasOwnProperty("epoch")) + if (!$util.isInteger(message.epoch)) + return "epoch: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.revision != null && message.hasOwnProperty("revision")) + if (!$util.isString(message.revision)) + return "revision: string expected"; + if (message.inclusive != null && message.hasOwnProperty("inclusive")) + if (typeof message.inclusive !== "boolean") + return "inclusive: boolean expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; return null; }; /** - * Creates a BatchCreateNotesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Version message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest + * @returns {grafeas.v1.Version} Version */ - BatchCreateNotesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateNotesRequest) + Version.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Version) return object; - var message = new $root.grafeas.v1.BatchCreateNotesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.notes) { - if (typeof object.notes !== "object") - throw TypeError(".grafeas.v1.BatchCreateNotesRequest.notes: object expected"); - message.notes = {}; - for (var keys = Object.keys(object.notes), i = 0; i < keys.length; ++i) { - if (typeof object.notes[keys[i]] !== "object") - throw TypeError(".grafeas.v1.BatchCreateNotesRequest.notes: object expected"); - message.notes[keys[i]] = $root.grafeas.v1.Note.fromObject(object.notes[keys[i]]); - } + var message = new $root.grafeas.v1.Version(); + if (object.epoch != null) + message.epoch = object.epoch | 0; + if (object.name != null) + message.name = String(object.name); + if (object.revision != null) + message.revision = String(object.revision); + if (object.inclusive != null) + message.inclusive = Boolean(object.inclusive); + switch (object.kind) { + case "VERSION_KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "NORMAL": + case 1: + message.kind = 1; + break; + case "MINIMUM": + case 2: + message.kind = 2; + break; + case "MAXIMUM": + case 3: + message.kind = 3; + break; } + if (object.fullName != null) + message.fullName = String(object.fullName); return message; }; /** - * Creates a plain object from a BatchCreateNotesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Version message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.BatchCreateNotesRequest} message BatchCreateNotesRequest + * @param {grafeas.v1.Version} message Version * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateNotesRequest.toObject = function toObject(message, options) { + Version.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.notes = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - var keys2; - if (message.notes && (keys2 = Object.keys(message.notes)).length) { - object.notes = {}; - for (var j = 0; j < keys2.length; ++j) - object.notes[keys2[j]] = $root.grafeas.v1.Note.toObject(message.notes[keys2[j]], options); + if (options.defaults) { + object.epoch = 0; + object.name = ""; + object.revision = ""; + object.kind = options.enums === String ? "VERSION_KIND_UNSPECIFIED" : 0; + object.fullName = ""; + object.inclusive = false; } + if (message.epoch != null && message.hasOwnProperty("epoch")) + object.epoch = message.epoch; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.revision != null && message.hasOwnProperty("revision")) + object.revision = message.revision; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.grafeas.v1.Version.VersionKind[message.kind] : message.kind; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.inclusive != null && message.hasOwnProperty("inclusive")) + object.inclusive = message.inclusive; return object; }; /** - * Converts this BatchCreateNotesRequest to JSON. + * Converts this Version to JSON. * @function toJSON - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.Version * @instance * @returns {Object.} JSON object */ - BatchCreateNotesRequest.prototype.toJSON = function toJSON() { + Version.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateNotesRequest; + /** + * VersionKind enum. + * @name grafeas.v1.Version.VersionKind + * @enum {number} + * @property {number} VERSION_KIND_UNSPECIFIED=0 VERSION_KIND_UNSPECIFIED value + * @property {number} NORMAL=1 NORMAL value + * @property {number} MINIMUM=2 MINIMUM value + * @property {number} MAXIMUM=3 MAXIMUM value + */ + Version.VersionKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "NORMAL"] = 1; + values[valuesById[2] = "MINIMUM"] = 2; + values[valuesById[3] = "MAXIMUM"] = 3; + return values; + })(); + + return Version; })(); - v1.BatchCreateNotesResponse = (function() { + v1.UpgradeNote = (function() { /** - * Properties of a BatchCreateNotesResponse. + * Properties of an UpgradeNote. * @memberof grafeas.v1 - * @interface IBatchCreateNotesResponse - * @property {Array.|null} [notes] BatchCreateNotesResponse notes + * @interface IUpgradeNote + * @property {string|null} ["package"] UpgradeNote package + * @property {grafeas.v1.IVersion|null} [version] UpgradeNote version + * @property {Array.|null} [distributions] UpgradeNote distributions + * @property {grafeas.v1.IWindowsUpdate|null} [windowsUpdate] UpgradeNote windowsUpdate */ /** - * Constructs a new BatchCreateNotesResponse. + * Constructs a new UpgradeNote. * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateNotesResponse. - * @implements IBatchCreateNotesResponse + * @classdesc Represents an UpgradeNote. + * @implements IUpgradeNote * @constructor - * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set + * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set */ - function BatchCreateNotesResponse(properties) { - this.notes = []; + function UpgradeNote(properties) { + this.distributions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22870,78 +22735,117 @@ } /** - * BatchCreateNotesResponse notes. - * @member {Array.} notes - * @memberof grafeas.v1.BatchCreateNotesResponse + * UpgradeNote package. + * @member {string} package + * @memberof grafeas.v1.UpgradeNote * @instance */ - BatchCreateNotesResponse.prototype.notes = $util.emptyArray; + UpgradeNote.prototype["package"] = ""; /** - * Creates a new BatchCreateNotesResponse instance using the specified properties. + * UpgradeNote version. + * @member {grafeas.v1.IVersion|null|undefined} version + * @memberof grafeas.v1.UpgradeNote + * @instance + */ + UpgradeNote.prototype.version = null; + + /** + * UpgradeNote distributions. + * @member {Array.} distributions + * @memberof grafeas.v1.UpgradeNote + * @instance + */ + UpgradeNote.prototype.distributions = $util.emptyArray; + + /** + * UpgradeNote windowsUpdate. + * @member {grafeas.v1.IWindowsUpdate|null|undefined} windowsUpdate + * @memberof grafeas.v1.UpgradeNote + * @instance + */ + UpgradeNote.prototype.windowsUpdate = null; + + /** + * Creates a new UpgradeNote instance using the specified properties. * @function create - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse instance + * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set + * @returns {grafeas.v1.UpgradeNote} UpgradeNote instance */ - BatchCreateNotesResponse.create = function create(properties) { - return new BatchCreateNotesResponse(properties); + UpgradeNote.create = function create(properties) { + return new UpgradeNote(properties); }; /** - * Encodes the specified BatchCreateNotesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. + * Encodes the specified UpgradeNote message. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.IBatchCreateNotesResponse} message BatchCreateNotesResponse message or plain object to encode + * @param {grafeas.v1.IUpgradeNote} message UpgradeNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateNotesResponse.encode = function encode(message, writer) { + UpgradeNote.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notes != null && message.notes.length) - for (var i = 0; i < message.notes.length; ++i) - $root.grafeas.v1.Note.encode(message.notes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message["package"]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.grafeas.v1.Version.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.distributions != null && message.distributions.length) + for (var i = 0; i < message.distributions.length; ++i) + $root.grafeas.v1.UpgradeDistribution.encode(message.distributions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) + $root.grafeas.v1.WindowsUpdate.encode(message.windowsUpdate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchCreateNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. + * Encodes the specified UpgradeNote message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.IBatchCreateNotesResponse} message BatchCreateNotesResponse message or plain object to encode + * @param {grafeas.v1.IUpgradeNote} message UpgradeNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpgradeNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateNotesResponse message from the specified reader or buffer. + * Decodes an UpgradeNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse + * @returns {grafeas.v1.UpgradeNote} UpgradeNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateNotesResponse.decode = function decode(reader, length) { + UpgradeNote.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateNotesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpgradeNote(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.notes && message.notes.length)) - message.notes = []; - message.notes.push($root.grafeas.v1.Note.decode(reader, reader.uint32())); + message["package"] = reader.string(); + break; + case 2: + message.version = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.distributions && message.distributions.length)) + message.distributions = []; + message.distributions.push($root.grafeas.v1.UpgradeDistribution.decode(reader, reader.uint32())); + break; + case 4: + message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -22952,126 +22856,164 @@ }; /** - * Decodes a BatchCreateNotesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpgradeNote message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse + * @returns {grafeas.v1.UpgradeNote} UpgradeNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateNotesResponse.decodeDelimited = function decodeDelimited(reader) { + UpgradeNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateNotesResponse message. + * Verifies an UpgradeNote message. * @function verify - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateNotesResponse.verify = function verify(message) { + UpgradeNote.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notes != null && message.hasOwnProperty("notes")) { - if (!Array.isArray(message.notes)) - return "notes: array expected"; - for (var i = 0; i < message.notes.length; ++i) { - var error = $root.grafeas.v1.Note.verify(message.notes[i]); + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.grafeas.v1.Version.verify(message.version); + if (error) + return "version." + error; + } + if (message.distributions != null && message.hasOwnProperty("distributions")) { + if (!Array.isArray(message.distributions)) + return "distributions: array expected"; + for (var i = 0; i < message.distributions.length; ++i) { + var error = $root.grafeas.v1.UpgradeDistribution.verify(message.distributions[i]); if (error) - return "notes." + error; + return "distributions." + error; } } + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { + var error = $root.grafeas.v1.WindowsUpdate.verify(message.windowsUpdate); + if (error) + return "windowsUpdate." + error; + } return null; }; /** - * Creates a BatchCreateNotesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpgradeNote message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse + * @returns {grafeas.v1.UpgradeNote} UpgradeNote */ - BatchCreateNotesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateNotesResponse) + UpgradeNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpgradeNote) return object; - var message = new $root.grafeas.v1.BatchCreateNotesResponse(); - if (object.notes) { - if (!Array.isArray(object.notes)) - throw TypeError(".grafeas.v1.BatchCreateNotesResponse.notes: array expected"); - message.notes = []; - for (var i = 0; i < object.notes.length; ++i) { - if (typeof object.notes[i] !== "object") - throw TypeError(".grafeas.v1.BatchCreateNotesResponse.notes: object expected"); - message.notes[i] = $root.grafeas.v1.Note.fromObject(object.notes[i]); + var message = new $root.grafeas.v1.UpgradeNote(); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".grafeas.v1.UpgradeNote.version: object expected"); + message.version = $root.grafeas.v1.Version.fromObject(object.version); + } + if (object.distributions) { + if (!Array.isArray(object.distributions)) + throw TypeError(".grafeas.v1.UpgradeNote.distributions: array expected"); + message.distributions = []; + for (var i = 0; i < object.distributions.length; ++i) { + if (typeof object.distributions[i] !== "object") + throw TypeError(".grafeas.v1.UpgradeNote.distributions: object expected"); + message.distributions[i] = $root.grafeas.v1.UpgradeDistribution.fromObject(object.distributions[i]); } } + if (object.windowsUpdate != null) { + if (typeof object.windowsUpdate !== "object") + throw TypeError(".grafeas.v1.UpgradeNote.windowsUpdate: object expected"); + message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.fromObject(object.windowsUpdate); + } return message; }; /** - * Creates a plain object from a BatchCreateNotesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpgradeNote message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.BatchCreateNotesResponse} message BatchCreateNotesResponse + * @param {grafeas.v1.UpgradeNote} message UpgradeNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateNotesResponse.toObject = function toObject(message, options) { + UpgradeNote.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.notes = []; - if (message.notes && message.notes.length) { - object.notes = []; - for (var j = 0; j < message.notes.length; ++j) - object.notes[j] = $root.grafeas.v1.Note.toObject(message.notes[j], options); + object.distributions = []; + if (options.defaults) { + object["package"] = ""; + object.version = null; + object.windowsUpdate = null; + } + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.grafeas.v1.Version.toObject(message.version, options); + if (message.distributions && message.distributions.length) { + object.distributions = []; + for (var j = 0; j < message.distributions.length; ++j) + object.distributions[j] = $root.grafeas.v1.UpgradeDistribution.toObject(message.distributions[j], options); } + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) + object.windowsUpdate = $root.grafeas.v1.WindowsUpdate.toObject(message.windowsUpdate, options); return object; }; /** - * Converts this BatchCreateNotesResponse to JSON. + * Converts this UpgradeNote to JSON. * @function toJSON - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeNote * @instance * @returns {Object.} JSON object */ - BatchCreateNotesResponse.prototype.toJSON = function toJSON() { + UpgradeNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateNotesResponse; + return UpgradeNote; })(); - v1.BatchCreateOccurrencesRequest = (function() { + v1.UpgradeDistribution = (function() { /** - * Properties of a BatchCreateOccurrencesRequest. + * Properties of an UpgradeDistribution. * @memberof grafeas.v1 - * @interface IBatchCreateOccurrencesRequest - * @property {string|null} [parent] BatchCreateOccurrencesRequest parent - * @property {Array.|null} [occurrences] BatchCreateOccurrencesRequest occurrences + * @interface IUpgradeDistribution + * @property {string|null} [cpeUri] UpgradeDistribution cpeUri + * @property {string|null} [classification] UpgradeDistribution classification + * @property {string|null} [severity] UpgradeDistribution severity + * @property {Array.|null} [cve] UpgradeDistribution cve */ /** - * Constructs a new BatchCreateOccurrencesRequest. + * Constructs a new UpgradeDistribution. * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateOccurrencesRequest. - * @implements IBatchCreateOccurrencesRequest + * @classdesc Represents an UpgradeDistribution. + * @implements IUpgradeDistribution * @constructor - * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set + * @param {grafeas.v1.IUpgradeDistribution=} [properties] Properties to set */ - function BatchCreateOccurrencesRequest(properties) { - this.occurrences = []; + function UpgradeDistribution(properties) { + this.cve = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23079,91 +23021,117 @@ } /** - * BatchCreateOccurrencesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * UpgradeDistribution cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.UpgradeDistribution * @instance */ - BatchCreateOccurrencesRequest.prototype.parent = ""; + UpgradeDistribution.prototype.cpeUri = ""; /** - * BatchCreateOccurrencesRequest occurrences. - * @member {Array.} occurrences - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * UpgradeDistribution classification. + * @member {string} classification + * @memberof grafeas.v1.UpgradeDistribution * @instance */ - BatchCreateOccurrencesRequest.prototype.occurrences = $util.emptyArray; + UpgradeDistribution.prototype.classification = ""; /** - * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. + * UpgradeDistribution severity. + * @member {string} severity + * @memberof grafeas.v1.UpgradeDistribution + * @instance + */ + UpgradeDistribution.prototype.severity = ""; + + /** + * UpgradeDistribution cve. + * @member {Array.} cve + * @memberof grafeas.v1.UpgradeDistribution + * @instance + */ + UpgradeDistribution.prototype.cve = $util.emptyArray; + + /** + * Creates a new UpgradeDistribution instance using the specified properties. * @function create - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest instance + * @param {grafeas.v1.IUpgradeDistribution=} [properties] Properties to set + * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution instance */ - BatchCreateOccurrencesRequest.create = function create(properties) { - return new BatchCreateOccurrencesRequest(properties); + UpgradeDistribution.create = function create(properties) { + return new UpgradeDistribution(properties); }; /** - * Encodes the specified BatchCreateOccurrencesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. + * Encodes the specified UpgradeDistribution message. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.IBatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IUpgradeDistribution} message UpgradeDistribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateOccurrencesRequest.encode = function encode(message, writer) { + UpgradeDistribution.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.occurrences != null && message.occurrences.length) - for (var i = 0; i < message.occurrences.length; ++i) - $root.grafeas.v1.Occurrence.encode(message.occurrences[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); + if (message.classification != null && Object.hasOwnProperty.call(message, "classification")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.classification); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); + if (message.cve != null && message.cve.length) + for (var i = 0; i < message.cve.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cve[i]); return writer; }; /** - * Encodes the specified BatchCreateOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. + * Encodes the specified UpgradeDistribution message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.IBatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IUpgradeDistribution} message UpgradeDistribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpgradeDistribution.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer. + * Decodes an UpgradeDistribution message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest + * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateOccurrencesRequest.decode = function decode(reader, length) { + UpgradeDistribution.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateOccurrencesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpgradeDistribution(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.cpeUri = reader.string(); break; case 2: - if (!(message.occurrences && message.occurrences.length)) - message.occurrences = []; - message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + message.classification = reader.string(); + break; + case 3: + message.severity = reader.string(); + break; + case 4: + if (!(message.cve && message.cve.length)) + message.cve = []; + message.cve.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -23174,134 +23142,153 @@ }; /** - * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpgradeDistribution message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest + * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { + UpgradeDistribution.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateOccurrencesRequest message. + * Verifies an UpgradeDistribution message. * @function verify - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateOccurrencesRequest.verify = function verify(message) { + UpgradeDistribution.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.occurrences != null && message.hasOwnProperty("occurrences")) { - if (!Array.isArray(message.occurrences)) - return "occurrences: array expected"; - for (var i = 0; i < message.occurrences.length; ++i) { - var error = $root.grafeas.v1.Occurrence.verify(message.occurrences[i]); - if (error) - return "occurrences." + error; - } + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + if (!$util.isString(message.cpeUri)) + return "cpeUri: string expected"; + if (message.classification != null && message.hasOwnProperty("classification")) + if (!$util.isString(message.classification)) + return "classification: string expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.cve != null && message.hasOwnProperty("cve")) { + if (!Array.isArray(message.cve)) + return "cve: array expected"; + for (var i = 0; i < message.cve.length; ++i) + if (!$util.isString(message.cve[i])) + return "cve: string[] expected"; } return null; }; /** - * Creates a BatchCreateOccurrencesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpgradeDistribution message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest + * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution */ - BatchCreateOccurrencesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesRequest) + UpgradeDistribution.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpgradeDistribution) return object; - var message = new $root.grafeas.v1.BatchCreateOccurrencesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.occurrences) { - if (!Array.isArray(object.occurrences)) - throw TypeError(".grafeas.v1.BatchCreateOccurrencesRequest.occurrences: array expected"); - message.occurrences = []; - for (var i = 0; i < object.occurrences.length; ++i) { - if (typeof object.occurrences[i] !== "object") - throw TypeError(".grafeas.v1.BatchCreateOccurrencesRequest.occurrences: object expected"); - message.occurrences[i] = $root.grafeas.v1.Occurrence.fromObject(object.occurrences[i]); - } + var message = new $root.grafeas.v1.UpgradeDistribution(); + if (object.cpeUri != null) + message.cpeUri = String(object.cpeUri); + if (object.classification != null) + message.classification = String(object.classification); + if (object.severity != null) + message.severity = String(object.severity); + if (object.cve) { + if (!Array.isArray(object.cve)) + throw TypeError(".grafeas.v1.UpgradeDistribution.cve: array expected"); + message.cve = []; + for (var i = 0; i < object.cve.length; ++i) + message.cve[i] = String(object.cve[i]); } return message; }; /** - * Creates a plain object from a BatchCreateOccurrencesRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpgradeDistribution message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.BatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest + * @param {grafeas.v1.UpgradeDistribution} message UpgradeDistribution * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateOccurrencesRequest.toObject = function toObject(message, options) { + UpgradeDistribution.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.occurrences = []; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.occurrences && message.occurrences.length) { - object.occurrences = []; - for (var j = 0; j < message.occurrences.length; ++j) - object.occurrences[j] = $root.grafeas.v1.Occurrence.toObject(message.occurrences[j], options); + object.cve = []; + if (options.defaults) { + object.cpeUri = ""; + object.classification = ""; + object.severity = ""; + } + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + object.cpeUri = message.cpeUri; + if (message.classification != null && message.hasOwnProperty("classification")) + object.classification = message.classification; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.cve && message.cve.length) { + object.cve = []; + for (var j = 0; j < message.cve.length; ++j) + object.cve[j] = message.cve[j]; } return object; }; /** - * Converts this BatchCreateOccurrencesRequest to JSON. + * Converts this UpgradeDistribution to JSON. * @function toJSON - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.UpgradeDistribution * @instance * @returns {Object.} JSON object */ - BatchCreateOccurrencesRequest.prototype.toJSON = function toJSON() { + UpgradeDistribution.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateOccurrencesRequest; + return UpgradeDistribution; })(); - v1.BatchCreateOccurrencesResponse = (function() { + v1.WindowsUpdate = (function() { /** - * Properties of a BatchCreateOccurrencesResponse. + * Properties of a WindowsUpdate. * @memberof grafeas.v1 - * @interface IBatchCreateOccurrencesResponse - * @property {Array.|null} [occurrences] BatchCreateOccurrencesResponse occurrences + * @interface IWindowsUpdate + * @property {grafeas.v1.WindowsUpdate.IIdentity|null} [identity] WindowsUpdate identity + * @property {string|null} [title] WindowsUpdate title + * @property {string|null} [description] WindowsUpdate description + * @property {Array.|null} [categories] WindowsUpdate categories + * @property {Array.|null} [kbArticleIds] WindowsUpdate kbArticleIds + * @property {string|null} [supportUrl] WindowsUpdate supportUrl + * @property {google.protobuf.ITimestamp|null} [lastPublishedTimestamp] WindowsUpdate lastPublishedTimestamp */ /** - * Constructs a new BatchCreateOccurrencesResponse. + * Constructs a new WindowsUpdate. * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateOccurrencesResponse. - * @implements IBatchCreateOccurrencesResponse + * @classdesc Represents a WindowsUpdate. + * @implements IWindowsUpdate * @constructor - * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set + * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set */ - function BatchCreateOccurrencesResponse(properties) { - this.occurrences = []; + function WindowsUpdate(properties) { + this.categories = []; + this.kbArticleIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23309,78 +23296,159 @@ } /** - * BatchCreateOccurrencesResponse occurrences. - * @member {Array.} occurrences - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * WindowsUpdate identity. + * @member {grafeas.v1.WindowsUpdate.IIdentity|null|undefined} identity + * @memberof grafeas.v1.WindowsUpdate * @instance */ - BatchCreateOccurrencesResponse.prototype.occurrences = $util.emptyArray; + WindowsUpdate.prototype.identity = null; /** - * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. + * WindowsUpdate title. + * @member {string} title + * @memberof grafeas.v1.WindowsUpdate + * @instance + */ + WindowsUpdate.prototype.title = ""; + + /** + * WindowsUpdate description. + * @member {string} description + * @memberof grafeas.v1.WindowsUpdate + * @instance + */ + WindowsUpdate.prototype.description = ""; + + /** + * WindowsUpdate categories. + * @member {Array.} categories + * @memberof grafeas.v1.WindowsUpdate + * @instance + */ + WindowsUpdate.prototype.categories = $util.emptyArray; + + /** + * WindowsUpdate kbArticleIds. + * @member {Array.} kbArticleIds + * @memberof grafeas.v1.WindowsUpdate + * @instance + */ + WindowsUpdate.prototype.kbArticleIds = $util.emptyArray; + + /** + * WindowsUpdate supportUrl. + * @member {string} supportUrl + * @memberof grafeas.v1.WindowsUpdate + * @instance + */ + WindowsUpdate.prototype.supportUrl = ""; + + /** + * WindowsUpdate lastPublishedTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastPublishedTimestamp + * @memberof grafeas.v1.WindowsUpdate + * @instance + */ + WindowsUpdate.prototype.lastPublishedTimestamp = null; + + /** + * Creates a new WindowsUpdate instance using the specified properties. * @function create - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse instance + * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set + * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate instance */ - BatchCreateOccurrencesResponse.create = function create(properties) { - return new BatchCreateOccurrencesResponse(properties); + WindowsUpdate.create = function create(properties) { + return new WindowsUpdate(properties); }; /** - * Encodes the specified BatchCreateOccurrencesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. + * Encodes the specified WindowsUpdate message. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IWindowsUpdate} message WindowsUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateOccurrencesResponse.encode = function encode(message, writer) { + WindowsUpdate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.occurrences != null && message.occurrences.length) - for (var i = 0; i < message.occurrences.length; ++i) - $root.grafeas.v1.Occurrence.encode(message.occurrences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) + $root.grafeas.v1.WindowsUpdate.Identity.encode(message.identity, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.grafeas.v1.WindowsUpdate.Category.encode(message.categories[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.kbArticleIds != null && message.kbArticleIds.length) + for (var i = 0; i < message.kbArticleIds.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.kbArticleIds[i]); + if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.supportUrl); + if (message.lastPublishedTimestamp != null && Object.hasOwnProperty.call(message, "lastPublishedTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastPublishedTimestamp, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchCreateOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. + * Encodes the specified WindowsUpdate message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IWindowsUpdate} message WindowsUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + WindowsUpdate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer. + * Decodes a WindowsUpdate message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateOccurrencesResponse.decode = function decode(reader, length) { + WindowsUpdate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BatchCreateOccurrencesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.WindowsUpdate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.occurrences && message.occurrences.length)) - message.occurrences = []; - message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + message.identity = $root.grafeas.v1.WindowsUpdate.Identity.decode(reader, reader.uint32()); + break; + case 2: + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.grafeas.v1.WindowsUpdate.Category.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.kbArticleIds && message.kbArticleIds.length)) + message.kbArticleIds = []; + message.kbArticleIds.push(reader.string()); + break; + case 6: + message.supportUrl = reader.string(); + break; + case 7: + message.lastPublishedTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -23391,337 +23459,620 @@ }; /** - * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer, length delimited. + * Decodes a WindowsUpdate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { + WindowsUpdate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateOccurrencesResponse message. + * Verifies a WindowsUpdate message. * @function verify - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateOccurrencesResponse.verify = function verify(message) { + WindowsUpdate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.occurrences != null && message.hasOwnProperty("occurrences")) { - if (!Array.isArray(message.occurrences)) - return "occurrences: array expected"; - for (var i = 0; i < message.occurrences.length; ++i) { - var error = $root.grafeas.v1.Occurrence.verify(message.occurrences[i]); + if (message.identity != null && message.hasOwnProperty("identity")) { + var error = $root.grafeas.v1.WindowsUpdate.Identity.verify(message.identity); + if (error) + return "identity." + error; + } + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.grafeas.v1.WindowsUpdate.Category.verify(message.categories[i]); if (error) - return "occurrences." + error; + return "categories." + error; } } + if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { + if (!Array.isArray(message.kbArticleIds)) + return "kbArticleIds: array expected"; + for (var i = 0; i < message.kbArticleIds.length; ++i) + if (!$util.isString(message.kbArticleIds[i])) + return "kbArticleIds: string[] expected"; + } + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + if (!$util.isString(message.supportUrl)) + return "supportUrl: string expected"; + if (message.lastPublishedTimestamp != null && message.hasOwnProperty("lastPublishedTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastPublishedTimestamp); + if (error) + return "lastPublishedTimestamp." + error; + } return null; }; /** - * Creates a BatchCreateOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WindowsUpdate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate */ - BatchCreateOccurrencesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesResponse) + WindowsUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.WindowsUpdate) return object; - var message = new $root.grafeas.v1.BatchCreateOccurrencesResponse(); - if (object.occurrences) { - if (!Array.isArray(object.occurrences)) - throw TypeError(".grafeas.v1.BatchCreateOccurrencesResponse.occurrences: array expected"); - message.occurrences = []; - for (var i = 0; i < object.occurrences.length; ++i) { - if (typeof object.occurrences[i] !== "object") - throw TypeError(".grafeas.v1.BatchCreateOccurrencesResponse.occurrences: object expected"); - message.occurrences[i] = $root.grafeas.v1.Occurrence.fromObject(object.occurrences[i]); + var message = new $root.grafeas.v1.WindowsUpdate(); + if (object.identity != null) { + if (typeof object.identity !== "object") + throw TypeError(".grafeas.v1.WindowsUpdate.identity: object expected"); + message.identity = $root.grafeas.v1.WindowsUpdate.Identity.fromObject(object.identity); + } + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".grafeas.v1.WindowsUpdate.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".grafeas.v1.WindowsUpdate.categories: object expected"); + message.categories[i] = $root.grafeas.v1.WindowsUpdate.Category.fromObject(object.categories[i]); } } + if (object.kbArticleIds) { + if (!Array.isArray(object.kbArticleIds)) + throw TypeError(".grafeas.v1.WindowsUpdate.kbArticleIds: array expected"); + message.kbArticleIds = []; + for (var i = 0; i < object.kbArticleIds.length; ++i) + message.kbArticleIds[i] = String(object.kbArticleIds[i]); + } + if (object.supportUrl != null) + message.supportUrl = String(object.supportUrl); + if (object.lastPublishedTimestamp != null) { + if (typeof object.lastPublishedTimestamp !== "object") + throw TypeError(".grafeas.v1.WindowsUpdate.lastPublishedTimestamp: object expected"); + message.lastPublishedTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastPublishedTimestamp); + } return message; }; /** - * Creates a plain object from a BatchCreateOccurrencesResponse message. Also converts values to other types if specified. + * Creates a plain object from a WindowsUpdate message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.BatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse + * @param {grafeas.v1.WindowsUpdate} message WindowsUpdate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateOccurrencesResponse.toObject = function toObject(message, options) { + WindowsUpdate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.occurrences = []; - if (message.occurrences && message.occurrences.length) { - object.occurrences = []; - for (var j = 0; j < message.occurrences.length; ++j) - object.occurrences[j] = $root.grafeas.v1.Occurrence.toObject(message.occurrences[j], options); + if (options.arrays || options.defaults) { + object.categories = []; + object.kbArticleIds = []; } + if (options.defaults) { + object.identity = null; + object.title = ""; + object.description = ""; + object.supportUrl = ""; + object.lastPublishedTimestamp = null; + } + if (message.identity != null && message.hasOwnProperty("identity")) + object.identity = $root.grafeas.v1.WindowsUpdate.Identity.toObject(message.identity, options); + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.grafeas.v1.WindowsUpdate.Category.toObject(message.categories[j], options); + } + if (message.kbArticleIds && message.kbArticleIds.length) { + object.kbArticleIds = []; + for (var j = 0; j < message.kbArticleIds.length; ++j) + object.kbArticleIds[j] = message.kbArticleIds[j]; + } + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + object.supportUrl = message.supportUrl; + if (message.lastPublishedTimestamp != null && message.hasOwnProperty("lastPublishedTimestamp")) + object.lastPublishedTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastPublishedTimestamp, options); return object; }; /** - * Converts this BatchCreateOccurrencesResponse to JSON. + * Converts this WindowsUpdate to JSON. * @function toJSON - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.WindowsUpdate * @instance * @returns {Object.} JSON object */ - BatchCreateOccurrencesResponse.prototype.toJSON = function toJSON() { + WindowsUpdate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateOccurrencesResponse; - })(); + WindowsUpdate.Identity = (function() { + + /** + * Properties of an Identity. + * @memberof grafeas.v1.WindowsUpdate + * @interface IIdentity + * @property {string|null} [updateId] Identity updateId + * @property {number|null} [revision] Identity revision + */ + + /** + * Constructs a new Identity. + * @memberof grafeas.v1.WindowsUpdate + * @classdesc Represents an Identity. + * @implements IIdentity + * @constructor + * @param {grafeas.v1.WindowsUpdate.IIdentity=} [properties] Properties to set + */ + function Identity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Identity updateId. + * @member {string} updateId + * @memberof grafeas.v1.WindowsUpdate.Identity + * @instance + */ + Identity.prototype.updateId = ""; + + /** + * Identity revision. + * @member {number} revision + * @memberof grafeas.v1.WindowsUpdate.Identity + * @instance + */ + Identity.prototype.revision = 0; + + /** + * Creates a new Identity instance using the specified properties. + * @function create + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {grafeas.v1.WindowsUpdate.IIdentity=} [properties] Properties to set + * @returns {grafeas.v1.WindowsUpdate.Identity} Identity instance + */ + Identity.create = function create(properties) { + return new Identity(properties); + }; + + /** + * Encodes the specified Identity message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {grafeas.v1.WindowsUpdate.IIdentity} message Identity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Identity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.updateId); + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.revision); + return writer; + }; + + /** + * Encodes the specified Identity message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {grafeas.v1.WindowsUpdate.IIdentity} message Identity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Identity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Identity message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.WindowsUpdate.Identity} Identity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Identity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.WindowsUpdate.Identity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateId = reader.string(); + break; + case 2: + message.revision = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Identity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.WindowsUpdate.Identity} Identity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Identity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Identity message. + * @function verify + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Identity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateId != null && message.hasOwnProperty("updateId")) + if (!$util.isString(message.updateId)) + return "updateId: string expected"; + if (message.revision != null && message.hasOwnProperty("revision")) + if (!$util.isInteger(message.revision)) + return "revision: integer expected"; + return null; + }; + + /** + * Creates an Identity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.WindowsUpdate.Identity} Identity + */ + Identity.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.WindowsUpdate.Identity) + return object; + var message = new $root.grafeas.v1.WindowsUpdate.Identity(); + if (object.updateId != null) + message.updateId = String(object.updateId); + if (object.revision != null) + message.revision = object.revision | 0; + return message; + }; + + /** + * Creates a plain object from an Identity message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.WindowsUpdate.Identity + * @static + * @param {grafeas.v1.WindowsUpdate.Identity} message Identity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Identity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateId = ""; + object.revision = 0; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + object.updateId = message.updateId; + if (message.revision != null && message.hasOwnProperty("revision")) + object.revision = message.revision; + return object; + }; + + /** + * Converts this Identity to JSON. + * @function toJSON + * @memberof grafeas.v1.WindowsUpdate.Identity + * @instance + * @returns {Object.} JSON object + */ + Identity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.Layer = (function() { + return Identity; + })(); - /** - * Properties of a Layer. - * @memberof grafeas.v1 - * @interface ILayer - * @property {string|null} [directive] Layer directive - * @property {string|null} ["arguments"] Layer arguments - */ + WindowsUpdate.Category = (function() { - /** - * Constructs a new Layer. - * @memberof grafeas.v1 - * @classdesc Represents a Layer. - * @implements ILayer - * @constructor - * @param {grafeas.v1.ILayer=} [properties] Properties to set - */ - function Layer(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Category. + * @memberof grafeas.v1.WindowsUpdate + * @interface ICategory + * @property {string|null} [categoryId] Category categoryId + * @property {string|null} [name] Category name + */ - /** - * Layer directive. - * @member {string} directive - * @memberof grafeas.v1.Layer - * @instance - */ - Layer.prototype.directive = ""; + /** + * Constructs a new Category. + * @memberof grafeas.v1.WindowsUpdate + * @classdesc Represents a Category. + * @implements ICategory + * @constructor + * @param {grafeas.v1.WindowsUpdate.ICategory=} [properties] Properties to set + */ + function Category(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Layer arguments. - * @member {string} arguments - * @memberof grafeas.v1.Layer - * @instance - */ - Layer.prototype["arguments"] = ""; + /** + * Category categoryId. + * @member {string} categoryId + * @memberof grafeas.v1.WindowsUpdate.Category + * @instance + */ + Category.prototype.categoryId = ""; - /** - * Creates a new Layer instance using the specified properties. - * @function create - * @memberof grafeas.v1.Layer - * @static - * @param {grafeas.v1.ILayer=} [properties] Properties to set - * @returns {grafeas.v1.Layer} Layer instance - */ - Layer.create = function create(properties) { - return new Layer(properties); - }; + /** + * Category name. + * @member {string} name + * @memberof grafeas.v1.WindowsUpdate.Category + * @instance + */ + Category.prototype.name = ""; - /** - * Encodes the specified Layer message. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.Layer - * @static - * @param {grafeas.v1.ILayer} message Layer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Layer.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.directive != null && Object.hasOwnProperty.call(message, "directive")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.directive); - if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["arguments"]); - return writer; - }; + /** + * Creates a new Category instance using the specified properties. + * @function create + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {grafeas.v1.WindowsUpdate.ICategory=} [properties] Properties to set + * @returns {grafeas.v1.WindowsUpdate.Category} Category instance + */ + Category.create = function create(properties) { + return new Category(properties); + }; - /** - * Encodes the specified Layer message, length delimited. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.Layer - * @static - * @param {grafeas.v1.ILayer} message Layer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Layer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Category message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {grafeas.v1.WindowsUpdate.ICategory} message Category message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Category.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.categoryId != null && Object.hasOwnProperty.call(message, "categoryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.categoryId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; - /** - * Decodes a Layer message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.Layer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Layer} Layer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Layer.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Layer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.directive = reader.string(); - break; - case 2: - message["arguments"] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified Category message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {grafeas.v1.WindowsUpdate.ICategory} message Category message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Category.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Category message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.WindowsUpdate.Category} Category + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Category.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.WindowsUpdate.Category(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.categoryId = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a Layer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.Layer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Layer} Layer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Layer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Category message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.WindowsUpdate.Category} Category + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Category.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Layer message. - * @function verify - * @memberof grafeas.v1.Layer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Layer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.directive != null && message.hasOwnProperty("directive")) - if (!$util.isString(message.directive)) - return "directive: string expected"; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - if (!$util.isString(message["arguments"])) - return "arguments: string expected"; - return null; - }; + /** + * Verifies a Category message. + * @function verify + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Category.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.categoryId != null && message.hasOwnProperty("categoryId")) + if (!$util.isString(message.categoryId)) + return "categoryId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a Layer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.Layer - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.Layer} Layer - */ - Layer.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Layer) + /** + * Creates a Category message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.WindowsUpdate.Category} Category + */ + Category.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.WindowsUpdate.Category) + return object; + var message = new $root.grafeas.v1.WindowsUpdate.Category(); + if (object.categoryId != null) + message.categoryId = String(object.categoryId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Category message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.WindowsUpdate.Category + * @static + * @param {grafeas.v1.WindowsUpdate.Category} message Category + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Category.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.categoryId = ""; + object.name = ""; + } + if (message.categoryId != null && message.hasOwnProperty("categoryId")) + object.categoryId = message.categoryId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; - var message = new $root.grafeas.v1.Layer(); - if (object.directive != null) - message.directive = String(object.directive); - if (object["arguments"] != null) - message["arguments"] = String(object["arguments"]); - return message; - }; + }; - /** - * Creates a plain object from a Layer message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.Layer - * @static - * @param {grafeas.v1.Layer} message Layer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Layer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.directive = ""; - object["arguments"] = ""; - } - if (message.directive != null && message.hasOwnProperty("directive")) - object.directive = message.directive; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - object["arguments"] = message["arguments"]; - return object; - }; + /** + * Converts this Category to JSON. + * @function toJSON + * @memberof grafeas.v1.WindowsUpdate.Category + * @instance + * @returns {Object.} JSON object + */ + Category.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Layer to JSON. - * @function toJSON - * @memberof grafeas.v1.Layer - * @instance - * @returns {Object.} JSON object - */ - Layer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Category; + })(); - return Layer; + return WindowsUpdate; })(); - v1.Fingerprint = (function() { + v1.UpgradeOccurrence = (function() { /** - * Properties of a Fingerprint. + * Properties of an UpgradeOccurrence. * @memberof grafeas.v1 - * @interface IFingerprint - * @property {string|null} [v1Name] Fingerprint v1Name - * @property {Array.|null} [v2Blob] Fingerprint v2Blob - * @property {string|null} [v2Name] Fingerprint v2Name + * @interface IUpgradeOccurrence + * @property {string|null} ["package"] UpgradeOccurrence package + * @property {grafeas.v1.IVersion|null} [parsedVersion] UpgradeOccurrence parsedVersion + * @property {grafeas.v1.IUpgradeDistribution|null} [distribution] UpgradeOccurrence distribution + * @property {grafeas.v1.IWindowsUpdate|null} [windowsUpdate] UpgradeOccurrence windowsUpdate */ /** - * Constructs a new Fingerprint. + * Constructs a new UpgradeOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a Fingerprint. - * @implements IFingerprint + * @classdesc Represents an UpgradeOccurrence. + * @implements IUpgradeOccurrence * @constructor - * @param {grafeas.v1.IFingerprint=} [properties] Properties to set + * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set */ - function Fingerprint(properties) { - this.v2Blob = []; + function UpgradeOccurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23729,104 +24080,114 @@ } /** - * Fingerprint v1Name. - * @member {string} v1Name - * @memberof grafeas.v1.Fingerprint + * UpgradeOccurrence package. + * @member {string} package + * @memberof grafeas.v1.UpgradeOccurrence * @instance */ - Fingerprint.prototype.v1Name = ""; + UpgradeOccurrence.prototype["package"] = ""; /** - * Fingerprint v2Blob. - * @member {Array.} v2Blob - * @memberof grafeas.v1.Fingerprint + * UpgradeOccurrence parsedVersion. + * @member {grafeas.v1.IVersion|null|undefined} parsedVersion + * @memberof grafeas.v1.UpgradeOccurrence * @instance */ - Fingerprint.prototype.v2Blob = $util.emptyArray; + UpgradeOccurrence.prototype.parsedVersion = null; /** - * Fingerprint v2Name. - * @member {string} v2Name - * @memberof grafeas.v1.Fingerprint + * UpgradeOccurrence distribution. + * @member {grafeas.v1.IUpgradeDistribution|null|undefined} distribution + * @memberof grafeas.v1.UpgradeOccurrence * @instance */ - Fingerprint.prototype.v2Name = ""; + UpgradeOccurrence.prototype.distribution = null; /** - * Creates a new Fingerprint instance using the specified properties. + * UpgradeOccurrence windowsUpdate. + * @member {grafeas.v1.IWindowsUpdate|null|undefined} windowsUpdate + * @memberof grafeas.v1.UpgradeOccurrence + * @instance + */ + UpgradeOccurrence.prototype.windowsUpdate = null; + + /** + * Creates a new UpgradeOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.IFingerprint=} [properties] Properties to set - * @returns {grafeas.v1.Fingerprint} Fingerprint instance + * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence instance */ - Fingerprint.create = function create(properties) { - return new Fingerprint(properties); + UpgradeOccurrence.create = function create(properties) { + return new UpgradeOccurrence(properties); }; /** - * Encodes the specified Fingerprint message. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. + * Encodes the specified UpgradeOccurrence message. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.IFingerprint} message Fingerprint message or plain object to encode + * @param {grafeas.v1.IUpgradeOccurrence} message UpgradeOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fingerprint.encode = function encode(message, writer) { + UpgradeOccurrence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.v1Name != null && Object.hasOwnProperty.call(message, "v1Name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.v1Name); - if (message.v2Blob != null && message.v2Blob.length) - for (var i = 0; i < message.v2Blob.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.v2Blob[i]); - if (message.v2Name != null && Object.hasOwnProperty.call(message, "v2Name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.v2Name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message["package"]); + if (message.parsedVersion != null && Object.hasOwnProperty.call(message, "parsedVersion")) + $root.grafeas.v1.Version.encode(message.parsedVersion, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) + $root.grafeas.v1.UpgradeDistribution.encode(message.distribution, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) + $root.grafeas.v1.WindowsUpdate.encode(message.windowsUpdate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Fingerprint message, length delimited. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. + * Encodes the specified UpgradeOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.IFingerprint} message Fingerprint message or plain object to encode + * @param {grafeas.v1.IUpgradeOccurrence} message UpgradeOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fingerprint.encodeDelimited = function encodeDelimited(message, writer) { + UpgradeOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Fingerprint message from the specified reader or buffer. + * Decodes an UpgradeOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Fingerprint} Fingerprint + * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fingerprint.decode = function decode(reader, length) { + UpgradeOccurrence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Fingerprint(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpgradeOccurrence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.v1Name = reader.string(); - break; - case 2: - if (!(message.v2Blob && message.v2Blob.length)) - message.v2Blob = []; - message.v2Blob.push(reader.string()); + message["package"] = reader.string(); break; case 3: - message.v2Name = reader.string(); + message.parsedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 4: + message.distribution = $root.grafeas.v1.UpgradeDistribution.decode(reader, reader.uint32()); + break; + case 5: + message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -23837,138 +24198,154 @@ }; /** - * Decodes a Fingerprint message from the specified reader or buffer, length delimited. + * Decodes an UpgradeOccurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Fingerprint} Fingerprint + * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fingerprint.decodeDelimited = function decodeDelimited(reader) { + UpgradeOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Fingerprint message. + * Verifies an UpgradeOccurrence message. * @function verify - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Fingerprint.verify = function verify(message) { + UpgradeOccurrence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.v1Name != null && message.hasOwnProperty("v1Name")) - if (!$util.isString(message.v1Name)) - return "v1Name: string expected"; - if (message.v2Blob != null && message.hasOwnProperty("v2Blob")) { - if (!Array.isArray(message.v2Blob)) - return "v2Blob: array expected"; - for (var i = 0; i < message.v2Blob.length; ++i) - if (!$util.isString(message.v2Blob[i])) - return "v2Blob: string[] expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.parsedVersion != null && message.hasOwnProperty("parsedVersion")) { + var error = $root.grafeas.v1.Version.verify(message.parsedVersion); + if (error) + return "parsedVersion." + error; + } + if (message.distribution != null && message.hasOwnProperty("distribution")) { + var error = $root.grafeas.v1.UpgradeDistribution.verify(message.distribution); + if (error) + return "distribution." + error; + } + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { + var error = $root.grafeas.v1.WindowsUpdate.verify(message.windowsUpdate); + if (error) + return "windowsUpdate." + error; } - if (message.v2Name != null && message.hasOwnProperty("v2Name")) - if (!$util.isString(message.v2Name)) - return "v2Name: string expected"; return null; }; /** - * Creates a Fingerprint message from a plain object. Also converts values to their respective internal types. + * Creates an UpgradeOccurrence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Fingerprint} Fingerprint + * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence */ - Fingerprint.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Fingerprint) + UpgradeOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpgradeOccurrence) return object; - var message = new $root.grafeas.v1.Fingerprint(); - if (object.v1Name != null) - message.v1Name = String(object.v1Name); - if (object.v2Blob) { - if (!Array.isArray(object.v2Blob)) - throw TypeError(".grafeas.v1.Fingerprint.v2Blob: array expected"); - message.v2Blob = []; - for (var i = 0; i < object.v2Blob.length; ++i) - message.v2Blob[i] = String(object.v2Blob[i]); + var message = new $root.grafeas.v1.UpgradeOccurrence(); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.parsedVersion != null) { + if (typeof object.parsedVersion !== "object") + throw TypeError(".grafeas.v1.UpgradeOccurrence.parsedVersion: object expected"); + message.parsedVersion = $root.grafeas.v1.Version.fromObject(object.parsedVersion); + } + if (object.distribution != null) { + if (typeof object.distribution !== "object") + throw TypeError(".grafeas.v1.UpgradeOccurrence.distribution: object expected"); + message.distribution = $root.grafeas.v1.UpgradeDistribution.fromObject(object.distribution); + } + if (object.windowsUpdate != null) { + if (typeof object.windowsUpdate !== "object") + throw TypeError(".grafeas.v1.UpgradeOccurrence.windowsUpdate: object expected"); + message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.fromObject(object.windowsUpdate); } - if (object.v2Name != null) - message.v2Name = String(object.v2Name); return message; }; /** - * Creates a plain object from a Fingerprint message. Also converts values to other types if specified. + * Creates a plain object from an UpgradeOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.Fingerprint} message Fingerprint + * @param {grafeas.v1.UpgradeOccurrence} message UpgradeOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Fingerprint.toObject = function toObject(message, options) { + UpgradeOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.v2Blob = []; if (options.defaults) { - object.v1Name = ""; - object.v2Name = ""; - } - if (message.v1Name != null && message.hasOwnProperty("v1Name")) - object.v1Name = message.v1Name; - if (message.v2Blob && message.v2Blob.length) { - object.v2Blob = []; - for (var j = 0; j < message.v2Blob.length; ++j) - object.v2Blob[j] = message.v2Blob[j]; + object["package"] = ""; + object.parsedVersion = null; + object.distribution = null; + object.windowsUpdate = null; } - if (message.v2Name != null && message.hasOwnProperty("v2Name")) - object.v2Name = message.v2Name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.parsedVersion != null && message.hasOwnProperty("parsedVersion")) + object.parsedVersion = $root.grafeas.v1.Version.toObject(message.parsedVersion, options); + if (message.distribution != null && message.hasOwnProperty("distribution")) + object.distribution = $root.grafeas.v1.UpgradeDistribution.toObject(message.distribution, options); + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) + object.windowsUpdate = $root.grafeas.v1.WindowsUpdate.toObject(message.windowsUpdate, options); return object; }; /** - * Converts this Fingerprint to JSON. + * Converts this UpgradeOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.Fingerprint + * @memberof grafeas.v1.UpgradeOccurrence * @instance * @returns {Object.} JSON object */ - Fingerprint.prototype.toJSON = function toJSON() { + UpgradeOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Fingerprint; + return UpgradeOccurrence; })(); - v1.ImageNote = (function() { + v1.VulnerabilityNote = (function() { /** - * Properties of an ImageNote. + * Properties of a VulnerabilityNote. * @memberof grafeas.v1 - * @interface IImageNote - * @property {string|null} [resourceUrl] ImageNote resourceUrl - * @property {grafeas.v1.IFingerprint|null} [fingerprint] ImageNote fingerprint + * @interface IVulnerabilityNote + * @property {number|null} [cvssScore] VulnerabilityNote cvssScore + * @property {grafeas.v1.Severity|null} [severity] VulnerabilityNote severity + * @property {Array.|null} [details] VulnerabilityNote details + * @property {grafeas.v1.ICVSSv3|null} [cvssV3] VulnerabilityNote cvssV3 + * @property {Array.|null} [windowsDetails] VulnerabilityNote windowsDetails + * @property {google.protobuf.ITimestamp|null} [sourceUpdateTime] VulnerabilityNote sourceUpdateTime */ /** - * Constructs a new ImageNote. + * Constructs a new VulnerabilityNote. * @memberof grafeas.v1 - * @classdesc Represents an ImageNote. - * @implements IImageNote + * @classdesc Represents a VulnerabilityNote. + * @implements IVulnerabilityNote * @constructor - * @param {grafeas.v1.IImageNote=} [properties] Properties to set + * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set */ - function ImageNote(properties) { + function VulnerabilityNote(properties) { + this.details = []; + this.windowsDetails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23976,88 +24353,146 @@ } /** - * ImageNote resourceUrl. - * @member {string} resourceUrl - * @memberof grafeas.v1.ImageNote + * VulnerabilityNote cvssScore. + * @member {number} cvssScore + * @memberof grafeas.v1.VulnerabilityNote * @instance */ - ImageNote.prototype.resourceUrl = ""; + VulnerabilityNote.prototype.cvssScore = 0; /** - * ImageNote fingerprint. - * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint - * @memberof grafeas.v1.ImageNote + * VulnerabilityNote severity. + * @member {grafeas.v1.Severity} severity + * @memberof grafeas.v1.VulnerabilityNote * @instance */ - ImageNote.prototype.fingerprint = null; + VulnerabilityNote.prototype.severity = 0; /** - * Creates a new ImageNote instance using the specified properties. + * VulnerabilityNote details. + * @member {Array.} details + * @memberof grafeas.v1.VulnerabilityNote + * @instance + */ + VulnerabilityNote.prototype.details = $util.emptyArray; + + /** + * VulnerabilityNote cvssV3. + * @member {grafeas.v1.ICVSSv3|null|undefined} cvssV3 + * @memberof grafeas.v1.VulnerabilityNote + * @instance + */ + VulnerabilityNote.prototype.cvssV3 = null; + + /** + * VulnerabilityNote windowsDetails. + * @member {Array.} windowsDetails + * @memberof grafeas.v1.VulnerabilityNote + * @instance + */ + VulnerabilityNote.prototype.windowsDetails = $util.emptyArray; + + /** + * VulnerabilityNote sourceUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} sourceUpdateTime + * @memberof grafeas.v1.VulnerabilityNote + * @instance + */ + VulnerabilityNote.prototype.sourceUpdateTime = null; + + /** + * Creates a new VulnerabilityNote instance using the specified properties. * @function create - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.IImageNote=} [properties] Properties to set - * @returns {grafeas.v1.ImageNote} ImageNote instance + * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote instance */ - ImageNote.create = function create(properties) { - return new ImageNote(properties); + VulnerabilityNote.create = function create(properties) { + return new VulnerabilityNote(properties); }; /** - * Encodes the specified ImageNote message. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. + * Encodes the specified VulnerabilityNote message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.IImageNote} message ImageNote message or plain object to encode + * @param {grafeas.v1.IVulnerabilityNote} message VulnerabilityNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageNote.encode = function encode(message, writer) { + VulnerabilityNote.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceUrl != null && Object.hasOwnProperty.call(message, "resourceUrl")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceUrl); - if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) - $root.grafeas.v1.Fingerprint.encode(message.fingerprint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cvssScore != null && Object.hasOwnProperty.call(message, "cvssScore")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cvssScore); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.grafeas.v1.VulnerabilityNote.Detail.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cvssV3 != null && Object.hasOwnProperty.call(message, "cvssV3")) + $root.grafeas.v1.CVSSv3.encode(message.cvssV3, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.windowsDetails != null && message.windowsDetails.length) + for (var i = 0; i < message.windowsDetails.length; ++i) + $root.grafeas.v1.VulnerabilityNote.WindowsDetail.encode(message.windowsDetails[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sourceUpdateTime != null && Object.hasOwnProperty.call(message, "sourceUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.sourceUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImageNote message, length delimited. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. + * Encodes the specified VulnerabilityNote message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.IImageNote} message ImageNote message or plain object to encode + * @param {grafeas.v1.IVulnerabilityNote} message VulnerabilityNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageNote.encodeDelimited = function encodeDelimited(message, writer) { + VulnerabilityNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageNote message from the specified reader or buffer. + * Decodes a VulnerabilityNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ImageNote} ImageNote + * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageNote.decode = function decode(reader, length) { + VulnerabilityNote.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ImageNote(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.resourceUrl = reader.string(); + message.cvssScore = reader.float(); break; case 2: - message.fingerprint = $root.grafeas.v1.Fingerprint.decode(reader, reader.uint32()); + message.severity = reader.int32(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.grafeas.v1.VulnerabilityNote.Detail.decode(reader, reader.uint32())); + break; + case 4: + message.cvssV3 = $root.grafeas.v1.CVSSv3.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.windowsDetails && message.windowsDetails.length)) + message.windowsDetails = []; + message.windowsDetails.push($root.grafeas.v1.VulnerabilityNote.WindowsDetail.decode(reader, reader.uint32())); + break; + case 6: + message.sourceUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -24068,967 +24503,1218 @@ }; /** - * Decodes an ImageNote message from the specified reader or buffer, length delimited. + * Decodes a VulnerabilityNote message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ImageNote} ImageNote + * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageNote.decodeDelimited = function decodeDelimited(reader) { + VulnerabilityNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageNote message. + * Verifies a VulnerabilityNote message. * @function verify - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageNote.verify = function verify(message) { + VulnerabilityNote.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - if (!$util.isString(message.resourceUrl)) - return "resourceUrl: string expected"; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { - var error = $root.grafeas.v1.Fingerprint.verify(message.fingerprint); + if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) + if (typeof message.cvssScore !== "number") + return "cvssScore: number expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.grafeas.v1.VulnerabilityNote.Detail.verify(message.details[i]); + if (error) + return "details." + error; + } + } + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) { + var error = $root.grafeas.v1.CVSSv3.verify(message.cvssV3); if (error) - return "fingerprint." + error; + return "cvssV3." + error; + } + if (message.windowsDetails != null && message.hasOwnProperty("windowsDetails")) { + if (!Array.isArray(message.windowsDetails)) + return "windowsDetails: array expected"; + for (var i = 0; i < message.windowsDetails.length; ++i) { + var error = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.verify(message.windowsDetails[i]); + if (error) + return "windowsDetails." + error; + } + } + if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.sourceUpdateTime); + if (error) + return "sourceUpdateTime." + error; } return null; }; /** - * Creates an ImageNote message from a plain object. Also converts values to their respective internal types. + * Creates a VulnerabilityNote message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ImageNote} ImageNote + * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote */ - ImageNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ImageNote) + VulnerabilityNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityNote) return object; - var message = new $root.grafeas.v1.ImageNote(); - if (object.resourceUrl != null) - message.resourceUrl = String(object.resourceUrl); - if (object.fingerprint != null) { - if (typeof object.fingerprint !== "object") - throw TypeError(".grafeas.v1.ImageNote.fingerprint: object expected"); - message.fingerprint = $root.grafeas.v1.Fingerprint.fromObject(object.fingerprint); + var message = new $root.grafeas.v1.VulnerabilityNote(); + if (object.cvssScore != null) + message.cvssScore = Number(object.cvssScore); + switch (object.severity) { + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "MINIMAL": + case 1: + message.severity = 1; + break; + case "LOW": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "HIGH": + case 4: + message.severity = 4; + break; + case "CRITICAL": + case 5: + message.severity = 5; + break; + } + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".grafeas.v1.VulnerabilityNote.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.details: object expected"); + message.details[i] = $root.grafeas.v1.VulnerabilityNote.Detail.fromObject(object.details[i]); + } + } + if (object.cvssV3 != null) { + if (typeof object.cvssV3 !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.cvssV3: object expected"); + message.cvssV3 = $root.grafeas.v1.CVSSv3.fromObject(object.cvssV3); + } + if (object.windowsDetails) { + if (!Array.isArray(object.windowsDetails)) + throw TypeError(".grafeas.v1.VulnerabilityNote.windowsDetails: array expected"); + message.windowsDetails = []; + for (var i = 0; i < object.windowsDetails.length; ++i) { + if (typeof object.windowsDetails[i] !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.windowsDetails: object expected"); + message.windowsDetails[i] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.fromObject(object.windowsDetails[i]); + } + } + if (object.sourceUpdateTime != null) { + if (typeof object.sourceUpdateTime !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.sourceUpdateTime: object expected"); + message.sourceUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.sourceUpdateTime); } return message; }; /** - * Creates a plain object from an ImageNote message. Also converts values to other types if specified. + * Creates a plain object from a VulnerabilityNote message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ImageNote + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.ImageNote} message ImageNote + * @param {grafeas.v1.VulnerabilityNote} message VulnerabilityNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageNote.toObject = function toObject(message, options) { + VulnerabilityNote.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.details = []; + object.windowsDetails = []; + } if (options.defaults) { - object.resourceUrl = ""; - object.fingerprint = null; + object.cvssScore = 0; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.cvssV3 = null; + object.sourceUpdateTime = null; + } + if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) + object.cvssScore = options.json && !isFinite(message.cvssScore) ? String(message.cvssScore) : message.cvssScore; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.grafeas.v1.Severity[message.severity] : message.severity; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.grafeas.v1.VulnerabilityNote.Detail.toObject(message.details[j], options); + } + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) + object.cvssV3 = $root.grafeas.v1.CVSSv3.toObject(message.cvssV3, options); + if (message.windowsDetails && message.windowsDetails.length) { + object.windowsDetails = []; + for (var j = 0; j < message.windowsDetails.length; ++j) + object.windowsDetails[j] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.toObject(message.windowsDetails[j], options); + } + if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) + object.sourceUpdateTime = $root.google.protobuf.Timestamp.toObject(message.sourceUpdateTime, options); + return object; + }; + + /** + * Converts this VulnerabilityNote to JSON. + * @function toJSON + * @memberof grafeas.v1.VulnerabilityNote + * @instance + * @returns {Object.} JSON object + */ + VulnerabilityNote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + VulnerabilityNote.Detail = (function() { + + /** + * Properties of a Detail. + * @memberof grafeas.v1.VulnerabilityNote + * @interface IDetail + * @property {string|null} [severityName] Detail severityName + * @property {string|null} [description] Detail description + * @property {string|null} [packageType] Detail packageType + * @property {string|null} [affectedCpeUri] Detail affectedCpeUri + * @property {string|null} [affectedPackage] Detail affectedPackage + * @property {grafeas.v1.IVersion|null} [affectedVersionStart] Detail affectedVersionStart + * @property {grafeas.v1.IVersion|null} [affectedVersionEnd] Detail affectedVersionEnd + * @property {string|null} [fixedCpeUri] Detail fixedCpeUri + * @property {string|null} [fixedPackage] Detail fixedPackage + * @property {grafeas.v1.IVersion|null} [fixedVersion] Detail fixedVersion + * @property {boolean|null} [isObsolete] Detail isObsolete + * @property {google.protobuf.ITimestamp|null} [sourceUpdateTime] Detail sourceUpdateTime + * @property {string|null} [source] Detail source + * @property {string|null} [vendor] Detail vendor + */ + + /** + * Constructs a new Detail. + * @memberof grafeas.v1.VulnerabilityNote + * @classdesc Represents a Detail. + * @implements IDetail + * @constructor + * @param {grafeas.v1.VulnerabilityNote.IDetail=} [properties] Properties to set + */ + function Detail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - object.resourceUrl = message.resourceUrl; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) - object.fingerprint = $root.grafeas.v1.Fingerprint.toObject(message.fingerprint, options); - return object; - }; - /** - * Converts this ImageNote to JSON. - * @function toJSON - * @memberof grafeas.v1.ImageNote - * @instance - * @returns {Object.} JSON object - */ - ImageNote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Detail severityName. + * @member {string} severityName + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.severityName = ""; - return ImageNote; - })(); + /** + * Detail description. + * @member {string} description + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.description = ""; - v1.ImageOccurrence = (function() { + /** + * Detail packageType. + * @member {string} packageType + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.packageType = ""; - /** - * Properties of an ImageOccurrence. - * @memberof grafeas.v1 - * @interface IImageOccurrence - * @property {grafeas.v1.IFingerprint|null} [fingerprint] ImageOccurrence fingerprint - * @property {number|null} [distance] ImageOccurrence distance - * @property {Array.|null} [layerInfo] ImageOccurrence layerInfo - * @property {string|null} [baseResourceUrl] ImageOccurrence baseResourceUrl - */ + /** + * Detail affectedCpeUri. + * @member {string} affectedCpeUri + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedCpeUri = ""; - /** - * Constructs a new ImageOccurrence. - * @memberof grafeas.v1 - * @classdesc Represents an ImageOccurrence. - * @implements IImageOccurrence - * @constructor - * @param {grafeas.v1.IImageOccurrence=} [properties] Properties to set - */ - function ImageOccurrence(properties) { - this.layerInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Detail affectedPackage. + * @member {string} affectedPackage + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedPackage = ""; - /** - * ImageOccurrence fingerprint. - * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.fingerprint = null; + /** + * Detail affectedVersionStart. + * @member {grafeas.v1.IVersion|null|undefined} affectedVersionStart + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedVersionStart = null; - /** - * ImageOccurrence distance. - * @member {number} distance - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.distance = 0; + /** + * Detail affectedVersionEnd. + * @member {grafeas.v1.IVersion|null|undefined} affectedVersionEnd + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedVersionEnd = null; - /** - * ImageOccurrence layerInfo. - * @member {Array.} layerInfo - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.layerInfo = $util.emptyArray; + /** + * Detail fixedCpeUri. + * @member {string} fixedCpeUri + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.fixedCpeUri = ""; - /** - * ImageOccurrence baseResourceUrl. - * @member {string} baseResourceUrl - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.baseResourceUrl = ""; + /** + * Detail fixedPackage. + * @member {string} fixedPackage + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.fixedPackage = ""; - /** - * Creates a new ImageOccurrence instance using the specified properties. - * @function create - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {grafeas.v1.IImageOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence instance - */ - ImageOccurrence.create = function create(properties) { - return new ImageOccurrence(properties); - }; + /** + * Detail fixedVersion. + * @member {grafeas.v1.IVersion|null|undefined} fixedVersion + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.fixedVersion = null; - /** - * Encodes the specified ImageOccurrence message. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {grafeas.v1.IImageOccurrence} message ImageOccurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageOccurrence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) - $root.grafeas.v1.Fingerprint.encode(message.fingerprint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.distance != null && Object.hasOwnProperty.call(message, "distance")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.distance); - if (message.layerInfo != null && message.layerInfo.length) - for (var i = 0; i < message.layerInfo.length; ++i) - $root.grafeas.v1.Layer.encode(message.layerInfo[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.baseResourceUrl != null && Object.hasOwnProperty.call(message, "baseResourceUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.baseResourceUrl); - return writer; - }; + /** + * Detail isObsolete. + * @member {boolean} isObsolete + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.isObsolete = false; - /** - * Encodes the specified ImageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {grafeas.v1.IImageOccurrence} message ImageOccurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageOccurrence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Detail sourceUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} sourceUpdateTime + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.sourceUpdateTime = null; - /** - * Decodes an ImageOccurrence message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageOccurrence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.ImageOccurrence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fingerprint = $root.grafeas.v1.Fingerprint.decode(reader, reader.uint32()); - break; - case 2: - message.distance = reader.int32(); - break; - case 3: - if (!(message.layerInfo && message.layerInfo.length)) - message.layerInfo = []; - message.layerInfo.push($root.grafeas.v1.Layer.decode(reader, reader.uint32())); - break; - case 4: - message.baseResourceUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Detail source. + * @member {string} source + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.source = ""; + + /** + * Detail vendor. + * @member {string} vendor + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.vendor = ""; - /** - * Decodes an ImageOccurrence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageOccurrence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new Detail instance using the specified properties. + * @function create + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {grafeas.v1.VulnerabilityNote.IDetail=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail instance + */ + Detail.create = function create(properties) { + return new Detail(properties); + }; - /** - * Verifies an ImageOccurrence message. - * @function verify - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImageOccurrence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { - var error = $root.grafeas.v1.Fingerprint.verify(message.fingerprint); - if (error) - return "fingerprint." + error; - } - if (message.distance != null && message.hasOwnProperty("distance")) - if (!$util.isInteger(message.distance)) - return "distance: integer expected"; - if (message.layerInfo != null && message.hasOwnProperty("layerInfo")) { - if (!Array.isArray(message.layerInfo)) - return "layerInfo: array expected"; - for (var i = 0; i < message.layerInfo.length; ++i) { - var error = $root.grafeas.v1.Layer.verify(message.layerInfo[i]); - if (error) - return "layerInfo." + error; - } - } - if (message.baseResourceUrl != null && message.hasOwnProperty("baseResourceUrl")) - if (!$util.isString(message.baseResourceUrl)) - return "baseResourceUrl: string expected"; - return null; - }; + /** + * Encodes the specified Detail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {grafeas.v1.VulnerabilityNote.IDetail} message Detail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Detail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.severityName != null && Object.hasOwnProperty.call(message, "severityName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.severityName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageType); + if (message.affectedCpeUri != null && Object.hasOwnProperty.call(message, "affectedCpeUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.affectedCpeUri); + if (message.affectedPackage != null && Object.hasOwnProperty.call(message, "affectedPackage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.affectedPackage); + if (message.affectedVersionStart != null && Object.hasOwnProperty.call(message, "affectedVersionStart")) + $root.grafeas.v1.Version.encode(message.affectedVersionStart, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.affectedVersionEnd != null && Object.hasOwnProperty.call(message, "affectedVersionEnd")) + $root.grafeas.v1.Version.encode(message.affectedVersionEnd, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.fixedCpeUri != null && Object.hasOwnProperty.call(message, "fixedCpeUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.fixedCpeUri); + if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.fixedPackage); + if (message.fixedVersion != null && Object.hasOwnProperty.call(message, "fixedVersion")) + $root.grafeas.v1.Version.encode(message.fixedVersion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.isObsolete != null && Object.hasOwnProperty.call(message, "isObsolete")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isObsolete); + if (message.sourceUpdateTime != null && Object.hasOwnProperty.call(message, "sourceUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.sourceUpdateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.source); + if (message.vendor != null && Object.hasOwnProperty.call(message, "vendor")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.vendor); + return writer; + }; - /** - * Creates an ImageOccurrence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence - */ - ImageOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ImageOccurrence) - return object; - var message = new $root.grafeas.v1.ImageOccurrence(); - if (object.fingerprint != null) { - if (typeof object.fingerprint !== "object") - throw TypeError(".grafeas.v1.ImageOccurrence.fingerprint: object expected"); - message.fingerprint = $root.grafeas.v1.Fingerprint.fromObject(object.fingerprint); - } - if (object.distance != null) - message.distance = object.distance | 0; - if (object.layerInfo) { - if (!Array.isArray(object.layerInfo)) - throw TypeError(".grafeas.v1.ImageOccurrence.layerInfo: array expected"); - message.layerInfo = []; - for (var i = 0; i < object.layerInfo.length; ++i) { - if (typeof object.layerInfo[i] !== "object") - throw TypeError(".grafeas.v1.ImageOccurrence.layerInfo: object expected"); - message.layerInfo[i] = $root.grafeas.v1.Layer.fromObject(object.layerInfo[i]); - } - } - if (object.baseResourceUrl != null) - message.baseResourceUrl = String(object.baseResourceUrl); - return message; - }; + /** + * Encodes the specified Detail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.Detail.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {grafeas.v1.VulnerabilityNote.IDetail} message Detail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Detail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an ImageOccurrence message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.ImageOccurrence - * @static - * @param {grafeas.v1.ImageOccurrence} message ImageOccurrence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImageOccurrence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.layerInfo = []; - if (options.defaults) { - object.fingerprint = null; - object.distance = 0; - object.baseResourceUrl = ""; - } - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) - object.fingerprint = $root.grafeas.v1.Fingerprint.toObject(message.fingerprint, options); - if (message.distance != null && message.hasOwnProperty("distance")) - object.distance = message.distance; - if (message.layerInfo && message.layerInfo.length) { - object.layerInfo = []; - for (var j = 0; j < message.layerInfo.length; ++j) - object.layerInfo[j] = $root.grafeas.v1.Layer.toObject(message.layerInfo[j], options); - } - if (message.baseResourceUrl != null && message.hasOwnProperty("baseResourceUrl")) - object.baseResourceUrl = message.baseResourceUrl; - return object; - }; + /** + * Decodes a Detail message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Detail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote.Detail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.severityName = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.packageType = reader.string(); + break; + case 4: + message.affectedCpeUri = reader.string(); + break; + case 5: + message.affectedPackage = reader.string(); + break; + case 6: + message.affectedVersionStart = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 7: + message.affectedVersionEnd = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 8: + message.fixedCpeUri = reader.string(); + break; + case 9: + message.fixedPackage = reader.string(); + break; + case 10: + message.fixedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 11: + message.isObsolete = reader.bool(); + break; + case 12: + message.sourceUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 13: + message.source = reader.string(); + break; + case 14: + message.vendor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this ImageOccurrence to JSON. - * @function toJSON - * @memberof grafeas.v1.ImageOccurrence - * @instance - * @returns {Object.} JSON object - */ - ImageOccurrence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Detail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Detail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return ImageOccurrence; - })(); + /** + * Verifies a Detail message. + * @function verify + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Detail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.severityName != null && message.hasOwnProperty("severityName")) + if (!$util.isString(message.severityName)) + return "severityName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + if (!$util.isString(message.packageType)) + return "packageType: string expected"; + if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) + if (!$util.isString(message.affectedCpeUri)) + return "affectedCpeUri: string expected"; + if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) + if (!$util.isString(message.affectedPackage)) + return "affectedPackage: string expected"; + if (message.affectedVersionStart != null && message.hasOwnProperty("affectedVersionStart")) { + var error = $root.grafeas.v1.Version.verify(message.affectedVersionStart); + if (error) + return "affectedVersionStart." + error; + } + if (message.affectedVersionEnd != null && message.hasOwnProperty("affectedVersionEnd")) { + var error = $root.grafeas.v1.Version.verify(message.affectedVersionEnd); + if (error) + return "affectedVersionEnd." + error; + } + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + if (!$util.isString(message.fixedCpeUri)) + return "fixedCpeUri: string expected"; + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) + if (!$util.isString(message.fixedPackage)) + return "fixedPackage: string expected"; + if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) { + var error = $root.grafeas.v1.Version.verify(message.fixedVersion); + if (error) + return "fixedVersion." + error; + } + if (message.isObsolete != null && message.hasOwnProperty("isObsolete")) + if (typeof message.isObsolete !== "boolean") + return "isObsolete: boolean expected"; + if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.sourceUpdateTime); + if (error) + return "sourceUpdateTime." + error; + } + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.vendor != null && message.hasOwnProperty("vendor")) + if (!$util.isString(message.vendor)) + return "vendor: string expected"; + return null; + }; - v1.UpgradeNote = (function() { + /** + * Creates a Detail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.VulnerabilityNote.Detail} Detail + */ + Detail.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityNote.Detail) + return object; + var message = new $root.grafeas.v1.VulnerabilityNote.Detail(); + if (object.severityName != null) + message.severityName = String(object.severityName); + if (object.description != null) + message.description = String(object.description); + if (object.packageType != null) + message.packageType = String(object.packageType); + if (object.affectedCpeUri != null) + message.affectedCpeUri = String(object.affectedCpeUri); + if (object.affectedPackage != null) + message.affectedPackage = String(object.affectedPackage); + if (object.affectedVersionStart != null) { + if (typeof object.affectedVersionStart !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.affectedVersionStart: object expected"); + message.affectedVersionStart = $root.grafeas.v1.Version.fromObject(object.affectedVersionStart); + } + if (object.affectedVersionEnd != null) { + if (typeof object.affectedVersionEnd !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.affectedVersionEnd: object expected"); + message.affectedVersionEnd = $root.grafeas.v1.Version.fromObject(object.affectedVersionEnd); + } + if (object.fixedCpeUri != null) + message.fixedCpeUri = String(object.fixedCpeUri); + if (object.fixedPackage != null) + message.fixedPackage = String(object.fixedPackage); + if (object.fixedVersion != null) { + if (typeof object.fixedVersion !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.fixedVersion: object expected"); + message.fixedVersion = $root.grafeas.v1.Version.fromObject(object.fixedVersion); + } + if (object.isObsolete != null) + message.isObsolete = Boolean(object.isObsolete); + if (object.sourceUpdateTime != null) { + if (typeof object.sourceUpdateTime !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.Detail.sourceUpdateTime: object expected"); + message.sourceUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.sourceUpdateTime); + } + if (object.source != null) + message.source = String(object.source); + if (object.vendor != null) + message.vendor = String(object.vendor); + return message; + }; - /** - * Properties of an UpgradeNote. - * @memberof grafeas.v1 - * @interface IUpgradeNote - * @property {string|null} ["package"] UpgradeNote package - * @property {grafeas.v1.IVersion|null} [version] UpgradeNote version - * @property {Array.|null} [distributions] UpgradeNote distributions - * @property {grafeas.v1.IWindowsUpdate|null} [windowsUpdate] UpgradeNote windowsUpdate - */ + /** + * Creates a plain object from a Detail message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @static + * @param {grafeas.v1.VulnerabilityNote.Detail} message Detail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Detail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.severityName = ""; + object.description = ""; + object.packageType = ""; + object.affectedCpeUri = ""; + object.affectedPackage = ""; + object.affectedVersionStart = null; + object.affectedVersionEnd = null; + object.fixedCpeUri = ""; + object.fixedPackage = ""; + object.fixedVersion = null; + object.isObsolete = false; + object.sourceUpdateTime = null; + object.source = ""; + object.vendor = ""; + } + if (message.severityName != null && message.hasOwnProperty("severityName")) + object.severityName = message.severityName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = message.packageType; + if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) + object.affectedCpeUri = message.affectedCpeUri; + if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) + object.affectedPackage = message.affectedPackage; + if (message.affectedVersionStart != null && message.hasOwnProperty("affectedVersionStart")) + object.affectedVersionStart = $root.grafeas.v1.Version.toObject(message.affectedVersionStart, options); + if (message.affectedVersionEnd != null && message.hasOwnProperty("affectedVersionEnd")) + object.affectedVersionEnd = $root.grafeas.v1.Version.toObject(message.affectedVersionEnd, options); + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + object.fixedCpeUri = message.fixedCpeUri; + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) + object.fixedPackage = message.fixedPackage; + if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) + object.fixedVersion = $root.grafeas.v1.Version.toObject(message.fixedVersion, options); + if (message.isObsolete != null && message.hasOwnProperty("isObsolete")) + object.isObsolete = message.isObsolete; + if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) + object.sourceUpdateTime = $root.google.protobuf.Timestamp.toObject(message.sourceUpdateTime, options); + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.vendor != null && message.hasOwnProperty("vendor")) + object.vendor = message.vendor; + return object; + }; - /** - * Constructs a new UpgradeNote. - * @memberof grafeas.v1 - * @classdesc Represents an UpgradeNote. - * @implements IUpgradeNote - * @constructor - * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set - */ - function UpgradeNote(properties) { - this.distributions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this Detail to JSON. + * @function toJSON + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + * @returns {Object.} JSON object + */ + Detail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * UpgradeNote package. - * @member {string} package - * @memberof grafeas.v1.UpgradeNote - * @instance - */ - UpgradeNote.prototype["package"] = ""; + return Detail; + })(); - /** - * UpgradeNote version. - * @member {grafeas.v1.IVersion|null|undefined} version - * @memberof grafeas.v1.UpgradeNote - * @instance - */ - UpgradeNote.prototype.version = null; + VulnerabilityNote.WindowsDetail = (function() { - /** - * UpgradeNote distributions. - * @member {Array.} distributions - * @memberof grafeas.v1.UpgradeNote - * @instance - */ - UpgradeNote.prototype.distributions = $util.emptyArray; + /** + * Properties of a WindowsDetail. + * @memberof grafeas.v1.VulnerabilityNote + * @interface IWindowsDetail + * @property {string|null} [cpeUri] WindowsDetail cpeUri + * @property {string|null} [name] WindowsDetail name + * @property {string|null} [description] WindowsDetail description + * @property {Array.|null} [fixingKbs] WindowsDetail fixingKbs + */ - /** - * UpgradeNote windowsUpdate. - * @member {grafeas.v1.IWindowsUpdate|null|undefined} windowsUpdate - * @memberof grafeas.v1.UpgradeNote - * @instance - */ - UpgradeNote.prototype.windowsUpdate = null; + /** + * Constructs a new WindowsDetail. + * @memberof grafeas.v1.VulnerabilityNote + * @classdesc Represents a WindowsDetail. + * @implements IWindowsDetail + * @constructor + * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail=} [properties] Properties to set + */ + function WindowsDetail(properties) { + this.fixingKbs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new UpgradeNote instance using the specified properties. - * @function create - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set - * @returns {grafeas.v1.UpgradeNote} UpgradeNote instance - */ - UpgradeNote.create = function create(properties) { - return new UpgradeNote(properties); - }; + /** + * WindowsDetail cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.cpeUri = ""; - /** - * Encodes the specified UpgradeNote message. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {grafeas.v1.IUpgradeNote} message UpgradeNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeNote.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message["package"]); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.grafeas.v1.Version.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.distributions != null && message.distributions.length) - for (var i = 0; i < message.distributions.length; ++i) - $root.grafeas.v1.UpgradeDistribution.encode(message.distributions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) - $root.grafeas.v1.WindowsUpdate.encode(message.windowsUpdate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * WindowsDetail name. + * @member {string} name + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.name = ""; - /** - * Encodes the specified UpgradeNote message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {grafeas.v1.IUpgradeNote} message UpgradeNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeNote.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * WindowsDetail description. + * @member {string} description + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.description = ""; - /** - * Decodes an UpgradeNote message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.UpgradeNote} UpgradeNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeNote.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpgradeNote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message["package"] = reader.string(); - break; - case 2: - message.version = $root.grafeas.v1.Version.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.distributions && message.distributions.length)) - message.distributions = []; - message.distributions.push($root.grafeas.v1.UpgradeDistribution.decode(reader, reader.uint32())); - break; - case 4: - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * WindowsDetail fixingKbs. + * @member {Array.} fixingKbs + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.fixingKbs = $util.emptyArray; - /** - * Decodes an UpgradeNote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpgradeNote} UpgradeNote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeNote.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new WindowsDetail instance using the specified properties. + * @function create + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail instance + */ + WindowsDetail.create = function create(properties) { + return new WindowsDetail(properties); + }; - /** - * Verifies an UpgradeNote message. - * @function verify - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeNote.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.grafeas.v1.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.distributions != null && message.hasOwnProperty("distributions")) { - if (!Array.isArray(message.distributions)) - return "distributions: array expected"; - for (var i = 0; i < message.distributions.length; ++i) { - var error = $root.grafeas.v1.UpgradeDistribution.verify(message.distributions[i]); - if (error) - return "distributions." + error; - } - } - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { - var error = $root.grafeas.v1.WindowsUpdate.verify(message.windowsUpdate); - if (error) - return "windowsUpdate." + error; - } - return null; - }; + /** + * Encodes the specified WindowsDetail message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail} message WindowsDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.fixingKbs != null && message.fixingKbs.length) + for (var i = 0; i < message.fixingKbs.length; ++i) + $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.encode(message.fixingKbs[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Creates an UpgradeNote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.UpgradeNote} UpgradeNote - */ - UpgradeNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpgradeNote) - return object; - var message = new $root.grafeas.v1.UpgradeNote(); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".grafeas.v1.UpgradeNote.version: object expected"); - message.version = $root.grafeas.v1.Version.fromObject(object.version); - } - if (object.distributions) { - if (!Array.isArray(object.distributions)) - throw TypeError(".grafeas.v1.UpgradeNote.distributions: array expected"); - message.distributions = []; - for (var i = 0; i < object.distributions.length; ++i) { - if (typeof object.distributions[i] !== "object") - throw TypeError(".grafeas.v1.UpgradeNote.distributions: object expected"); - message.distributions[i] = $root.grafeas.v1.UpgradeDistribution.fromObject(object.distributions[i]); + /** + * Encodes the specified WindowsDetail message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {grafeas.v1.VulnerabilityNote.IWindowsDetail} message WindowsDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsDetail message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cpeUri = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.fixingKbs && message.fixingKbs.length)) + message.fixingKbs = []; + message.fixingKbs.push($root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (object.windowsUpdate != null) { - if (typeof object.windowsUpdate !== "object") - throw TypeError(".grafeas.v1.UpgradeNote.windowsUpdate: object expected"); - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.fromObject(object.windowsUpdate); - } - return message; - }; + return message; + }; - /** - * Creates a plain object from an UpgradeNote message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.UpgradeNote - * @static - * @param {grafeas.v1.UpgradeNote} message UpgradeNote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeNote.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.distributions = []; - if (options.defaults) { - object["package"] = ""; - object.version = null; - object.windowsUpdate = null; - } - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.grafeas.v1.Version.toObject(message.version, options); - if (message.distributions && message.distributions.length) { - object.distributions = []; - for (var j = 0; j < message.distributions.length; ++j) - object.distributions[j] = $root.grafeas.v1.UpgradeDistribution.toObject(message.distributions[j], options); - } - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) - object.windowsUpdate = $root.grafeas.v1.WindowsUpdate.toObject(message.windowsUpdate, options); - return object; - }; + /** + * Decodes a WindowsDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this UpgradeNote to JSON. - * @function toJSON - * @memberof grafeas.v1.UpgradeNote - * @instance - * @returns {Object.} JSON object - */ - UpgradeNote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a WindowsDetail message. + * @function verify + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + if (!$util.isString(message.cpeUri)) + return "cpeUri: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.fixingKbs != null && message.hasOwnProperty("fixingKbs")) { + if (!Array.isArray(message.fixingKbs)) + return "fixingKbs: array expected"; + for (var i = 0; i < message.fixingKbs.length; ++i) { + var error = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify(message.fixingKbs[i]); + if (error) + return "fixingKbs." + error; + } + } + return null; + }; - return UpgradeNote; - })(); + /** + * Creates a WindowsDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail} WindowsDetail + */ + WindowsDetail.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityNote.WindowsDetail) + return object; + var message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail(); + if (object.cpeUri != null) + message.cpeUri = String(object.cpeUri); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.fixingKbs) { + if (!Array.isArray(object.fixingKbs)) + throw TypeError(".grafeas.v1.VulnerabilityNote.WindowsDetail.fixingKbs: array expected"); + message.fixingKbs = []; + for (var i = 0; i < object.fixingKbs.length; ++i) { + if (typeof object.fixingKbs[i] !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.WindowsDetail.fixingKbs: object expected"); + message.fixingKbs[i] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.fromObject(object.fixingKbs[i]); + } + } + return message; + }; - v1.UpgradeDistribution = (function() { + /** + * Creates a plain object from a WindowsDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @static + * @param {grafeas.v1.VulnerabilityNote.WindowsDetail} message WindowsDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fixingKbs = []; + if (options.defaults) { + object.cpeUri = ""; + object.name = ""; + object.description = ""; + } + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + object.cpeUri = message.cpeUri; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.fixingKbs && message.fixingKbs.length) { + object.fixingKbs = []; + for (var j = 0; j < message.fixingKbs.length; ++j) + object.fixingKbs[j] = $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.toObject(message.fixingKbs[j], options); + } + return object; + }; - /** - * Properties of an UpgradeDistribution. - * @memberof grafeas.v1 - * @interface IUpgradeDistribution - * @property {string|null} [cpeUri] UpgradeDistribution cpeUri - * @property {string|null} [classification] UpgradeDistribution classification - * @property {string|null} [severity] UpgradeDistribution severity - * @property {Array.|null} [cve] UpgradeDistribution cve - */ + /** + * Converts this WindowsDetail to JSON. + * @function toJSON + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + * @returns {Object.} JSON object + */ + WindowsDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new UpgradeDistribution. - * @memberof grafeas.v1 - * @classdesc Represents an UpgradeDistribution. - * @implements IUpgradeDistribution - * @constructor - * @param {grafeas.v1.IUpgradeDistribution=} [properties] Properties to set - */ - function UpgradeDistribution(properties) { - this.cve = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + WindowsDetail.KnowledgeBase = (function() { - /** - * UpgradeDistribution cpeUri. - * @member {string} cpeUri - * @memberof grafeas.v1.UpgradeDistribution - * @instance - */ - UpgradeDistribution.prototype.cpeUri = ""; + /** + * Properties of a KnowledgeBase. + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @interface IKnowledgeBase + * @property {string|null} [name] KnowledgeBase name + * @property {string|null} [url] KnowledgeBase url + */ - /** - * UpgradeDistribution classification. - * @member {string} classification - * @memberof grafeas.v1.UpgradeDistribution - * @instance - */ - UpgradeDistribution.prototype.classification = ""; + /** + * Constructs a new KnowledgeBase. + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @classdesc Represents a KnowledgeBase. + * @implements IKnowledgeBase + * @constructor + * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase=} [properties] Properties to set + */ + function KnowledgeBase(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * UpgradeDistribution severity. - * @member {string} severity - * @memberof grafeas.v1.UpgradeDistribution - * @instance - */ - UpgradeDistribution.prototype.severity = ""; + /** + * KnowledgeBase name. + * @member {string} name + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @instance + */ + KnowledgeBase.prototype.name = ""; - /** - * UpgradeDistribution cve. - * @member {Array.} cve - * @memberof grafeas.v1.UpgradeDistribution - * @instance - */ - UpgradeDistribution.prototype.cve = $util.emptyArray; + /** + * KnowledgeBase url. + * @member {string} url + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @instance + */ + KnowledgeBase.prototype.url = ""; - /** - * Creates a new UpgradeDistribution instance using the specified properties. - * @function create - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {grafeas.v1.IUpgradeDistribution=} [properties] Properties to set - * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution instance - */ - UpgradeDistribution.create = function create(properties) { - return new UpgradeDistribution(properties); - }; + /** + * Creates a new KnowledgeBase instance using the specified properties. + * @function create + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase instance + */ + KnowledgeBase.create = function create(properties) { + return new KnowledgeBase(properties); + }; - /** - * Encodes the specified UpgradeDistribution message. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {grafeas.v1.IUpgradeDistribution} message UpgradeDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeDistribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpeUri); - if (message.classification != null && Object.hasOwnProperty.call(message, "classification")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.classification); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); - if (message.cve != null && message.cve.length) - for (var i = 0; i < message.cve.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cve[i]); - return writer; - }; + /** + * Encodes the specified KnowledgeBase message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase} message KnowledgeBase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeBase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + return writer; + }; - /** - * Encodes the specified UpgradeDistribution message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {grafeas.v1.IUpgradeDistribution} message UpgradeDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeDistribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified KnowledgeBase message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase} message KnowledgeBase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeBase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an UpgradeDistribution message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeDistribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpgradeDistribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cpeUri = reader.string(); - break; - case 2: - message.classification = reader.string(); - break; - case 3: - message.severity = reader.string(); - break; - case 4: - if (!(message.cve && message.cve.length)) - message.cve = []; - message.cve.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a KnowledgeBase message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeBase.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes an UpgradeDistribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeDistribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a KnowledgeBase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeBase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KnowledgeBase message. + * @function verify + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KnowledgeBase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; - /** - * Verifies an UpgradeDistribution message. - * @function verify - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeDistribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - if (!$util.isString(message.cpeUri)) - return "cpeUri: string expected"; - if (message.classification != null && message.hasOwnProperty("classification")) - if (!$util.isString(message.classification)) - return "classification: string expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - if (!$util.isString(message.severity)) - return "severity: string expected"; - if (message.cve != null && message.hasOwnProperty("cve")) { - if (!Array.isArray(message.cve)) - return "cve: array expected"; - for (var i = 0; i < message.cve.length; ++i) - if (!$util.isString(message.cve[i])) - return "cve: string[] expected"; - } - return null; - }; + /** + * Creates a KnowledgeBase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} KnowledgeBase + */ + KnowledgeBase.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase) + return object; + var message = new $root.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase(); + if (object.name != null) + message.name = String(object.name); + if (object.url != null) + message.url = String(object.url); + return message; + }; - /** - * Creates an UpgradeDistribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution - */ - UpgradeDistribution.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpgradeDistribution) - return object; - var message = new $root.grafeas.v1.UpgradeDistribution(); - if (object.cpeUri != null) - message.cpeUri = String(object.cpeUri); - if (object.classification != null) - message.classification = String(object.classification); - if (object.severity != null) - message.severity = String(object.severity); - if (object.cve) { - if (!Array.isArray(object.cve)) - throw TypeError(".grafeas.v1.UpgradeDistribution.cve: array expected"); - message.cve = []; - for (var i = 0; i < object.cve.length; ++i) - message.cve[i] = String(object.cve[i]); - } - return message; - }; + /** + * Creates a plain object from a KnowledgeBase message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @static + * @param {grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase} message KnowledgeBase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KnowledgeBase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.url = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; - /** - * Creates a plain object from an UpgradeDistribution message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.UpgradeDistribution - * @static - * @param {grafeas.v1.UpgradeDistribution} message UpgradeDistribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeDistribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cve = []; - if (options.defaults) { - object.cpeUri = ""; - object.classification = ""; - object.severity = ""; - } - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - object.cpeUri = message.cpeUri; - if (message.classification != null && message.hasOwnProperty("classification")) - object.classification = message.classification; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = message.severity; - if (message.cve && message.cve.length) { - object.cve = []; - for (var j = 0; j < message.cve.length; ++j) - object.cve[j] = message.cve[j]; - } - return object; - }; + /** + * Converts this KnowledgeBase to JSON. + * @function toJSON + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @instance + * @returns {Object.} JSON object + */ + KnowledgeBase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpgradeDistribution to JSON. - * @function toJSON - * @memberof grafeas.v1.UpgradeDistribution - * @instance - * @returns {Object.} JSON object - */ - UpgradeDistribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return KnowledgeBase; + })(); - return UpgradeDistribution; + return WindowsDetail; + })(); + + return VulnerabilityNote; })(); - v1.WindowsUpdate = (function() { + v1.VulnerabilityOccurrence = (function() { /** - * Properties of a WindowsUpdate. + * Properties of a VulnerabilityOccurrence. * @memberof grafeas.v1 - * @interface IWindowsUpdate - * @property {grafeas.v1.WindowsUpdate.IIdentity|null} [identity] WindowsUpdate identity - * @property {string|null} [title] WindowsUpdate title - * @property {string|null} [description] WindowsUpdate description - * @property {Array.|null} [categories] WindowsUpdate categories - * @property {Array.|null} [kbArticleIds] WindowsUpdate kbArticleIds - * @property {string|null} [supportUrl] WindowsUpdate supportUrl - * @property {google.protobuf.ITimestamp|null} [lastPublishedTimestamp] WindowsUpdate lastPublishedTimestamp + * @interface IVulnerabilityOccurrence + * @property {string|null} [type] VulnerabilityOccurrence type + * @property {grafeas.v1.Severity|null} [severity] VulnerabilityOccurrence severity + * @property {number|null} [cvssScore] VulnerabilityOccurrence cvssScore + * @property {grafeas.v1.ICVSS|null} [cvssv3] VulnerabilityOccurrence cvssv3 + * @property {Array.|null} [packageIssue] VulnerabilityOccurrence packageIssue + * @property {string|null} [shortDescription] VulnerabilityOccurrence shortDescription + * @property {string|null} [longDescription] VulnerabilityOccurrence longDescription + * @property {Array.|null} [relatedUrls] VulnerabilityOccurrence relatedUrls + * @property {grafeas.v1.Severity|null} [effectiveSeverity] VulnerabilityOccurrence effectiveSeverity + * @property {boolean|null} [fixAvailable] VulnerabilityOccurrence fixAvailable */ /** - * Constructs a new WindowsUpdate. + * Constructs a new VulnerabilityOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a WindowsUpdate. - * @implements IWindowsUpdate + * @classdesc Represents a VulnerabilityOccurrence. + * @implements IVulnerabilityOccurrence * @constructor - * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set + * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set */ - function WindowsUpdate(properties) { - this.categories = []; - this.kbArticleIds = []; + function VulnerabilityOccurrence(properties) { + this.packageIssue = []; + this.relatedUrls = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25036,159 +25722,198 @@ } /** - * WindowsUpdate identity. - * @member {grafeas.v1.WindowsUpdate.IIdentity|null|undefined} identity - * @memberof grafeas.v1.WindowsUpdate + * VulnerabilityOccurrence type. + * @member {string} type + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - WindowsUpdate.prototype.identity = null; + VulnerabilityOccurrence.prototype.type = ""; /** - * WindowsUpdate title. - * @member {string} title - * @memberof grafeas.v1.WindowsUpdate + * VulnerabilityOccurrence severity. + * @member {grafeas.v1.Severity} severity + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - WindowsUpdate.prototype.title = ""; + VulnerabilityOccurrence.prototype.severity = 0; /** - * WindowsUpdate description. - * @member {string} description - * @memberof grafeas.v1.WindowsUpdate + * VulnerabilityOccurrence cvssScore. + * @member {number} cvssScore + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - WindowsUpdate.prototype.description = ""; + VulnerabilityOccurrence.prototype.cvssScore = 0; /** - * WindowsUpdate categories. - * @member {Array.} categories - * @memberof grafeas.v1.WindowsUpdate + * VulnerabilityOccurrence cvssv3. + * @member {grafeas.v1.ICVSS|null|undefined} cvssv3 + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - WindowsUpdate.prototype.categories = $util.emptyArray; + VulnerabilityOccurrence.prototype.cvssv3 = null; /** - * WindowsUpdate kbArticleIds. - * @member {Array.} kbArticleIds - * @memberof grafeas.v1.WindowsUpdate + * VulnerabilityOccurrence packageIssue. + * @member {Array.} packageIssue + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance + */ + VulnerabilityOccurrence.prototype.packageIssue = $util.emptyArray; + + /** + * VulnerabilityOccurrence shortDescription. + * @member {string} shortDescription + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance + */ + VulnerabilityOccurrence.prototype.shortDescription = ""; + + /** + * VulnerabilityOccurrence longDescription. + * @member {string} longDescription + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance + */ + VulnerabilityOccurrence.prototype.longDescription = ""; + + /** + * VulnerabilityOccurrence relatedUrls. + * @member {Array.} relatedUrls + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - WindowsUpdate.prototype.kbArticleIds = $util.emptyArray; + VulnerabilityOccurrence.prototype.relatedUrls = $util.emptyArray; /** - * WindowsUpdate supportUrl. - * @member {string} supportUrl - * @memberof grafeas.v1.WindowsUpdate + * VulnerabilityOccurrence effectiveSeverity. + * @member {grafeas.v1.Severity} effectiveSeverity + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - WindowsUpdate.prototype.supportUrl = ""; + VulnerabilityOccurrence.prototype.effectiveSeverity = 0; /** - * WindowsUpdate lastPublishedTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastPublishedTimestamp - * @memberof grafeas.v1.WindowsUpdate + * VulnerabilityOccurrence fixAvailable. + * @member {boolean} fixAvailable + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - WindowsUpdate.prototype.lastPublishedTimestamp = null; + VulnerabilityOccurrence.prototype.fixAvailable = false; /** - * Creates a new WindowsUpdate instance using the specified properties. + * Creates a new VulnerabilityOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set - * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate instance + * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence instance */ - WindowsUpdate.create = function create(properties) { - return new WindowsUpdate(properties); + VulnerabilityOccurrence.create = function create(properties) { + return new VulnerabilityOccurrence(properties); }; /** - * Encodes the specified WindowsUpdate message. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. + * Encodes the specified VulnerabilityOccurrence message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.IWindowsUpdate} message WindowsUpdate message or plain object to encode + * @param {grafeas.v1.IVulnerabilityOccurrence} message VulnerabilityOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsUpdate.encode = function encode(message, writer) { + VulnerabilityOccurrence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) - $root.grafeas.v1.WindowsUpdate.Identity.encode(message.identity, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - $root.grafeas.v1.WindowsUpdate.Category.encode(message.categories[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.kbArticleIds != null && message.kbArticleIds.length) - for (var i = 0; i < message.kbArticleIds.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.kbArticleIds[i]); - if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.supportUrl); - if (message.lastPublishedTimestamp != null && Object.hasOwnProperty.call(message, "lastPublishedTimestamp")) - $root.google.protobuf.Timestamp.encode(message.lastPublishedTimestamp, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); + if (message.cvssScore != null && Object.hasOwnProperty.call(message, "cvssScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.cvssScore); + if (message.packageIssue != null && message.packageIssue.length) + for (var i = 0; i < message.packageIssue.length; ++i) + $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.encode(message.packageIssue[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.shortDescription != null && Object.hasOwnProperty.call(message, "shortDescription")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.shortDescription); + if (message.longDescription != null && Object.hasOwnProperty.call(message, "longDescription")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.longDescription); + if (message.relatedUrls != null && message.relatedUrls.length) + for (var i = 0; i < message.relatedUrls.length; ++i) + $root.grafeas.v1.RelatedUrl.encode(message.relatedUrls[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.effectiveSeverity != null && Object.hasOwnProperty.call(message, "effectiveSeverity")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.effectiveSeverity); + if (message.fixAvailable != null && Object.hasOwnProperty.call(message, "fixAvailable")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.fixAvailable); + if (message.cvssv3 != null && Object.hasOwnProperty.call(message, "cvssv3")) + $root.grafeas.v1.CVSS.encode(message.cvssv3, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified WindowsUpdate message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. + * Encodes the specified VulnerabilityOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.IWindowsUpdate} message WindowsUpdate message or plain object to encode + * @param {grafeas.v1.IVulnerabilityOccurrence} message VulnerabilityOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsUpdate.encodeDelimited = function encodeDelimited(message, writer) { + VulnerabilityOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WindowsUpdate message from the specified reader or buffer. + * Decodes a VulnerabilityOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate + * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsUpdate.decode = function decode(reader, length) { + VulnerabilityOccurrence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.WindowsUpdate(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityOccurrence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.identity = $root.grafeas.v1.WindowsUpdate.Identity.decode(reader, reader.uint32()); + message.type = reader.string(); break; case 2: - message.title = reader.string(); + message.severity = reader.int32(); break; case 3: - message.description = reader.string(); + message.cvssScore = reader.float(); + break; + case 10: + message.cvssv3 = $root.grafeas.v1.CVSS.decode(reader, reader.uint32()); break; case 4: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.grafeas.v1.WindowsUpdate.Category.decode(reader, reader.uint32())); + if (!(message.packageIssue && message.packageIssue.length)) + message.packageIssue = []; + message.packageIssue.push($root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.decode(reader, reader.uint32())); break; case 5: - if (!(message.kbArticleIds && message.kbArticleIds.length)) - message.kbArticleIds = []; - message.kbArticleIds.push(reader.string()); + message.shortDescription = reader.string(); break; case 6: - message.supportUrl = reader.string(); + message.longDescription = reader.string(); break; case 7: - message.lastPublishedTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.relatedUrls && message.relatedUrls.length)) + message.relatedUrls = []; + message.relatedUrls.push($root.grafeas.v1.RelatedUrl.decode(reader, reader.uint32())); + break; + case 8: + message.effectiveSeverity = reader.int32(); + break; + case 9: + message.fixAvailable = reader.bool(); break; default: reader.skipType(tag & 7); @@ -25199,494 +25924,472 @@ }; /** - * Decodes a WindowsUpdate message from the specified reader or buffer, length delimited. + * Decodes a VulnerabilityOccurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate + * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsUpdate.decodeDelimited = function decodeDelimited(reader) { + VulnerabilityOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WindowsUpdate message. + * Verifies a VulnerabilityOccurrence message. * @function verify - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WindowsUpdate.verify = function verify(message) { + VulnerabilityOccurrence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.identity != null && message.hasOwnProperty("identity")) { - var error = $root.grafeas.v1.WindowsUpdate.Identity.verify(message.identity); + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) + if (typeof message.cvssScore !== "number") + return "cvssScore: number expected"; + if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) { + var error = $root.grafeas.v1.CVSS.verify(message.cvssv3); if (error) - return "identity." + error; + return "cvssv3." + error; } - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) { - var error = $root.grafeas.v1.WindowsUpdate.Category.verify(message.categories[i]); + if (message.packageIssue != null && message.hasOwnProperty("packageIssue")) { + if (!Array.isArray(message.packageIssue)) + return "packageIssue: array expected"; + for (var i = 0; i < message.packageIssue.length; ++i) { + var error = $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify(message.packageIssue[i]); if (error) - return "categories." + error; + return "packageIssue." + error; } } - if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { - if (!Array.isArray(message.kbArticleIds)) - return "kbArticleIds: array expected"; - for (var i = 0; i < message.kbArticleIds.length; ++i) - if (!$util.isString(message.kbArticleIds[i])) - return "kbArticleIds: string[] expected"; + if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) + if (!$util.isString(message.shortDescription)) + return "shortDescription: string expected"; + if (message.longDescription != null && message.hasOwnProperty("longDescription")) + if (!$util.isString(message.longDescription)) + return "longDescription: string expected"; + if (message.relatedUrls != null && message.hasOwnProperty("relatedUrls")) { + if (!Array.isArray(message.relatedUrls)) + return "relatedUrls: array expected"; + for (var i = 0; i < message.relatedUrls.length; ++i) { + var error = $root.grafeas.v1.RelatedUrl.verify(message.relatedUrls[i]); + if (error) + return "relatedUrls." + error; + } } - if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) - if (!$util.isString(message.supportUrl)) - return "supportUrl: string expected"; - if (message.lastPublishedTimestamp != null && message.hasOwnProperty("lastPublishedTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastPublishedTimestamp); - if (error) - return "lastPublishedTimestamp." + error; + if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) + switch (message.effectiveSeverity) { + default: + return "effectiveSeverity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) + if (typeof message.fixAvailable !== "boolean") + return "fixAvailable: boolean expected"; + return null; + }; + + /** + * Creates a VulnerabilityOccurrence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.VulnerabilityOccurrence + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence + */ + VulnerabilityOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityOccurrence) + return object; + var message = new $root.grafeas.v1.VulnerabilityOccurrence(); + if (object.type != null) + message.type = String(object.type); + switch (object.severity) { + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "MINIMAL": + case 1: + message.severity = 1; + break; + case "LOW": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "HIGH": + case 4: + message.severity = 4; + break; + case "CRITICAL": + case 5: + message.severity = 5; + break; } - return null; - }; - - /** - * Creates a WindowsUpdate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.WindowsUpdate - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate - */ - WindowsUpdate.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.WindowsUpdate) - return object; - var message = new $root.grafeas.v1.WindowsUpdate(); - if (object.identity != null) { - if (typeof object.identity !== "object") - throw TypeError(".grafeas.v1.WindowsUpdate.identity: object expected"); - message.identity = $root.grafeas.v1.WindowsUpdate.Identity.fromObject(object.identity); + if (object.cvssScore != null) + message.cvssScore = Number(object.cvssScore); + if (object.cvssv3 != null) { + if (typeof object.cvssv3 !== "object") + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.cvssv3: object expected"); + message.cvssv3 = $root.grafeas.v1.CVSS.fromObject(object.cvssv3); } - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".grafeas.v1.WindowsUpdate.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) { - if (typeof object.categories[i] !== "object") - throw TypeError(".grafeas.v1.WindowsUpdate.categories: object expected"); - message.categories[i] = $root.grafeas.v1.WindowsUpdate.Category.fromObject(object.categories[i]); + if (object.packageIssue) { + if (!Array.isArray(object.packageIssue)) + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.packageIssue: array expected"); + message.packageIssue = []; + for (var i = 0; i < object.packageIssue.length; ++i) { + if (typeof object.packageIssue[i] !== "object") + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.packageIssue: object expected"); + message.packageIssue[i] = $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.fromObject(object.packageIssue[i]); } } - if (object.kbArticleIds) { - if (!Array.isArray(object.kbArticleIds)) - throw TypeError(".grafeas.v1.WindowsUpdate.kbArticleIds: array expected"); - message.kbArticleIds = []; - for (var i = 0; i < object.kbArticleIds.length; ++i) - message.kbArticleIds[i] = String(object.kbArticleIds[i]); + if (object.shortDescription != null) + message.shortDescription = String(object.shortDescription); + if (object.longDescription != null) + message.longDescription = String(object.longDescription); + if (object.relatedUrls) { + if (!Array.isArray(object.relatedUrls)) + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.relatedUrls: array expected"); + message.relatedUrls = []; + for (var i = 0; i < object.relatedUrls.length; ++i) { + if (typeof object.relatedUrls[i] !== "object") + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.relatedUrls: object expected"); + message.relatedUrls[i] = $root.grafeas.v1.RelatedUrl.fromObject(object.relatedUrls[i]); + } } - if (object.supportUrl != null) - message.supportUrl = String(object.supportUrl); - if (object.lastPublishedTimestamp != null) { - if (typeof object.lastPublishedTimestamp !== "object") - throw TypeError(".grafeas.v1.WindowsUpdate.lastPublishedTimestamp: object expected"); - message.lastPublishedTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastPublishedTimestamp); + switch (object.effectiveSeverity) { + case "SEVERITY_UNSPECIFIED": + case 0: + message.effectiveSeverity = 0; + break; + case "MINIMAL": + case 1: + message.effectiveSeverity = 1; + break; + case "LOW": + case 2: + message.effectiveSeverity = 2; + break; + case "MEDIUM": + case 3: + message.effectiveSeverity = 3; + break; + case "HIGH": + case 4: + message.effectiveSeverity = 4; + break; + case "CRITICAL": + case 5: + message.effectiveSeverity = 5; + break; } + if (object.fixAvailable != null) + message.fixAvailable = Boolean(object.fixAvailable); return message; }; /** - * Creates a plain object from a WindowsUpdate message. Also converts values to other types if specified. + * Creates a plain object from a VulnerabilityOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.WindowsUpdate} message WindowsUpdate + * @param {grafeas.v1.VulnerabilityOccurrence} message VulnerabilityOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WindowsUpdate.toObject = function toObject(message, options) { + VulnerabilityOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.categories = []; - object.kbArticleIds = []; + object.packageIssue = []; + object.relatedUrls = []; } if (options.defaults) { - object.identity = null; - object.title = ""; - object.description = ""; - object.supportUrl = ""; - object.lastPublishedTimestamp = null; + object.type = ""; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.cvssScore = 0; + object.shortDescription = ""; + object.longDescription = ""; + object.effectiveSeverity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.fixAvailable = false; + object.cvssv3 = null; } - if (message.identity != null && message.hasOwnProperty("identity")) - object.identity = $root.grafeas.v1.WindowsUpdate.Identity.toObject(message.identity, options); - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = $root.grafeas.v1.WindowsUpdate.Category.toObject(message.categories[j], options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.grafeas.v1.Severity[message.severity] : message.severity; + if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) + object.cvssScore = options.json && !isFinite(message.cvssScore) ? String(message.cvssScore) : message.cvssScore; + if (message.packageIssue && message.packageIssue.length) { + object.packageIssue = []; + for (var j = 0; j < message.packageIssue.length; ++j) + object.packageIssue[j] = $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue.toObject(message.packageIssue[j], options); } - if (message.kbArticleIds && message.kbArticleIds.length) { - object.kbArticleIds = []; - for (var j = 0; j < message.kbArticleIds.length; ++j) - object.kbArticleIds[j] = message.kbArticleIds[j]; + if (message.shortDescription != null && message.hasOwnProperty("shortDescription")) + object.shortDescription = message.shortDescription; + if (message.longDescription != null && message.hasOwnProperty("longDescription")) + object.longDescription = message.longDescription; + if (message.relatedUrls && message.relatedUrls.length) { + object.relatedUrls = []; + for (var j = 0; j < message.relatedUrls.length; ++j) + object.relatedUrls[j] = $root.grafeas.v1.RelatedUrl.toObject(message.relatedUrls[j], options); } - if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) - object.supportUrl = message.supportUrl; - if (message.lastPublishedTimestamp != null && message.hasOwnProperty("lastPublishedTimestamp")) - object.lastPublishedTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastPublishedTimestamp, options); + if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) + object.effectiveSeverity = options.enums === String ? $root.grafeas.v1.Severity[message.effectiveSeverity] : message.effectiveSeverity; + if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) + object.fixAvailable = message.fixAvailable; + if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) + object.cvssv3 = $root.grafeas.v1.CVSS.toObject(message.cvssv3, options); return object; }; /** - * Converts this WindowsUpdate to JSON. + * Converts this VulnerabilityOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance * @returns {Object.} JSON object */ - WindowsUpdate.prototype.toJSON = function toJSON() { + VulnerabilityOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - WindowsUpdate.Identity = (function() { - - /** - * Properties of an Identity. - * @memberof grafeas.v1.WindowsUpdate - * @interface IIdentity - * @property {string|null} [updateId] Identity updateId - * @property {number|null} [revision] Identity revision - */ - - /** - * Constructs a new Identity. - * @memberof grafeas.v1.WindowsUpdate - * @classdesc Represents an Identity. - * @implements IIdentity - * @constructor - * @param {grafeas.v1.WindowsUpdate.IIdentity=} [properties] Properties to set - */ - function Identity(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Identity updateId. - * @member {string} updateId - * @memberof grafeas.v1.WindowsUpdate.Identity - * @instance - */ - Identity.prototype.updateId = ""; - - /** - * Identity revision. - * @member {number} revision - * @memberof grafeas.v1.WindowsUpdate.Identity - * @instance - */ - Identity.prototype.revision = 0; - - /** - * Creates a new Identity instance using the specified properties. - * @function create - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {grafeas.v1.WindowsUpdate.IIdentity=} [properties] Properties to set - * @returns {grafeas.v1.WindowsUpdate.Identity} Identity instance - */ - Identity.create = function create(properties) { - return new Identity(properties); - }; - - /** - * Encodes the specified Identity message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {grafeas.v1.WindowsUpdate.IIdentity} message Identity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Identity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.updateId); - if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.revision); - return writer; - }; + VulnerabilityOccurrence.PackageIssue = (function() { /** - * Encodes the specified Identity message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Identity.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {grafeas.v1.WindowsUpdate.IIdentity} message Identity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Properties of a PackageIssue. + * @memberof grafeas.v1.VulnerabilityOccurrence + * @interface IPackageIssue + * @property {string|null} [affectedCpeUri] PackageIssue affectedCpeUri + * @property {string|null} [affectedPackage] PackageIssue affectedPackage + * @property {grafeas.v1.IVersion|null} [affectedVersion] PackageIssue affectedVersion + * @property {string|null} [fixedCpeUri] PackageIssue fixedCpeUri + * @property {string|null} [fixedPackage] PackageIssue fixedPackage + * @property {grafeas.v1.IVersion|null} [fixedVersion] PackageIssue fixedVersion + * @property {boolean|null} [fixAvailable] PackageIssue fixAvailable + * @property {string|null} [packageType] PackageIssue packageType + * @property {grafeas.v1.Severity|null} [effectiveSeverity] PackageIssue effectiveSeverity */ - Identity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an Identity message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.WindowsUpdate.Identity} Identity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new PackageIssue. + * @memberof grafeas.v1.VulnerabilityOccurrence + * @classdesc Represents a PackageIssue. + * @implements IPackageIssue + * @constructor + * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue=} [properties] Properties to set */ - Identity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.WindowsUpdate.Identity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.updateId = reader.string(); - break; - case 2: - message.revision = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + function PackageIssue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Decodes an Identity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.WindowsUpdate.Identity} Identity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * PackageIssue affectedCpeUri. + * @member {string} affectedCpeUri + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance */ - Identity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + PackageIssue.prototype.affectedCpeUri = ""; /** - * Verifies an Identity message. - * @function verify - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * PackageIssue affectedPackage. + * @member {string} affectedPackage + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance */ - Identity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateId != null && message.hasOwnProperty("updateId")) - if (!$util.isString(message.updateId)) - return "updateId: string expected"; - if (message.revision != null && message.hasOwnProperty("revision")) - if (!$util.isInteger(message.revision)) - return "revision: integer expected"; - return null; - }; + PackageIssue.prototype.affectedPackage = ""; /** - * Creates an Identity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.WindowsUpdate.Identity} Identity + * PackageIssue affectedVersion. + * @member {grafeas.v1.IVersion|null|undefined} affectedVersion + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance */ - Identity.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.WindowsUpdate.Identity) - return object; - var message = new $root.grafeas.v1.WindowsUpdate.Identity(); - if (object.updateId != null) - message.updateId = String(object.updateId); - if (object.revision != null) - message.revision = object.revision | 0; - return message; - }; + PackageIssue.prototype.affectedVersion = null; /** - * Creates a plain object from an Identity message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.WindowsUpdate.Identity - * @static - * @param {grafeas.v1.WindowsUpdate.Identity} message Identity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * PackageIssue fixedCpeUri. + * @member {string} fixedCpeUri + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance */ - Identity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateId = ""; - object.revision = 0; - } - if (message.updateId != null && message.hasOwnProperty("updateId")) - object.updateId = message.updateId; - if (message.revision != null && message.hasOwnProperty("revision")) - object.revision = message.revision; - return object; - }; + PackageIssue.prototype.fixedCpeUri = ""; /** - * Converts this Identity to JSON. - * @function toJSON - * @memberof grafeas.v1.WindowsUpdate.Identity + * PackageIssue fixedPackage. + * @member {string} fixedPackage + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @instance - * @returns {Object.} JSON object */ - Identity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Identity; - })(); - - WindowsUpdate.Category = (function() { + PackageIssue.prototype.fixedPackage = ""; /** - * Properties of a Category. - * @memberof grafeas.v1.WindowsUpdate - * @interface ICategory - * @property {string|null} [categoryId] Category categoryId - * @property {string|null} [name] Category name + * PackageIssue fixedVersion. + * @member {grafeas.v1.IVersion|null|undefined} fixedVersion + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance */ + PackageIssue.prototype.fixedVersion = null; /** - * Constructs a new Category. - * @memberof grafeas.v1.WindowsUpdate - * @classdesc Represents a Category. - * @implements ICategory - * @constructor - * @param {grafeas.v1.WindowsUpdate.ICategory=} [properties] Properties to set + * PackageIssue fixAvailable. + * @member {boolean} fixAvailable + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance */ - function Category(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + PackageIssue.prototype.fixAvailable = false; /** - * Category categoryId. - * @member {string} categoryId - * @memberof grafeas.v1.WindowsUpdate.Category + * PackageIssue packageType. + * @member {string} packageType + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @instance */ - Category.prototype.categoryId = ""; + PackageIssue.prototype.packageType = ""; /** - * Category name. - * @member {string} name - * @memberof grafeas.v1.WindowsUpdate.Category + * PackageIssue effectiveSeverity. + * @member {grafeas.v1.Severity} effectiveSeverity + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @instance */ - Category.prototype.name = ""; + PackageIssue.prototype.effectiveSeverity = 0; /** - * Creates a new Category instance using the specified properties. + * Creates a new PackageIssue instance using the specified properties. * @function create - * @memberof grafeas.v1.WindowsUpdate.Category + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @static - * @param {grafeas.v1.WindowsUpdate.ICategory=} [properties] Properties to set - * @returns {grafeas.v1.WindowsUpdate.Category} Category instance + * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue instance */ - Category.create = function create(properties) { - return new Category(properties); + PackageIssue.create = function create(properties) { + return new PackageIssue(properties); }; /** - * Encodes the specified Category message. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. + * Encodes the specified PackageIssue message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. * @function encode - * @memberof grafeas.v1.WindowsUpdate.Category + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @static - * @param {grafeas.v1.WindowsUpdate.ICategory} message Category message or plain object to encode + * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue} message PackageIssue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Category.encode = function encode(message, writer) { + PackageIssue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.categoryId != null && Object.hasOwnProperty.call(message, "categoryId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.categoryId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.affectedCpeUri != null && Object.hasOwnProperty.call(message, "affectedCpeUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.affectedCpeUri); + if (message.affectedPackage != null && Object.hasOwnProperty.call(message, "affectedPackage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.affectedPackage); + if (message.affectedVersion != null && Object.hasOwnProperty.call(message, "affectedVersion")) + $root.grafeas.v1.Version.encode(message.affectedVersion, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.fixedCpeUri != null && Object.hasOwnProperty.call(message, "fixedCpeUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.fixedCpeUri); + if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fixedPackage); + if (message.fixedVersion != null && Object.hasOwnProperty.call(message, "fixedVersion")) + $root.grafeas.v1.Version.encode(message.fixedVersion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.fixAvailable != null && Object.hasOwnProperty.call(message, "fixAvailable")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fixAvailable); + if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.packageType); + if (message.effectiveSeverity != null && Object.hasOwnProperty.call(message, "effectiveSeverity")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.effectiveSeverity); return writer; }; /** - * Encodes the specified Category message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.Category.verify|verify} messages. + * Encodes the specified PackageIssue message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.PackageIssue.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.WindowsUpdate.Category + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @static - * @param {grafeas.v1.WindowsUpdate.ICategory} message Category message or plain object to encode + * @param {grafeas.v1.VulnerabilityOccurrence.IPackageIssue} message PackageIssue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Category.encodeDelimited = function encodeDelimited(message, writer) { + PackageIssue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Category message from the specified reader or buffer. + * Decodes a PackageIssue message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.WindowsUpdate.Category + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.WindowsUpdate.Category} Category + * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Category.decode = function decode(reader, length) { + PackageIssue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.WindowsUpdate.Category(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.categoryId = reader.string(); + message.affectedCpeUri = reader.string(); break; case 2: - message.name = reader.string(); + message.affectedPackage = reader.string(); + break; + case 3: + message.affectedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 4: + message.fixedCpeUri = reader.string(); + break; + case 5: + message.fixedPackage = reader.string(); + break; + case 6: + message.fixedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + break; + case 7: + message.fixAvailable = reader.bool(); + break; + case 8: + message.packageType = reader.string(); + break; + case 9: + message.effectiveSeverity = reader.int32(); break; default: reader.skipType(tag & 7); @@ -25697,368 +26400,198 @@ }; /** - * Decodes a Category message from the specified reader or buffer, length delimited. + * Decodes a PackageIssue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.WindowsUpdate.Category + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.WindowsUpdate.Category} Category + * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Category.decodeDelimited = function decodeDelimited(reader) { + PackageIssue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Category message. + * Verifies a PackageIssue message. * @function verify - * @memberof grafeas.v1.WindowsUpdate.Category + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Category.verify = function verify(message) { + PackageIssue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.categoryId != null && message.hasOwnProperty("categoryId")) - if (!$util.isString(message.categoryId)) - return "categoryId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a Category message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.WindowsUpdate.Category - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.WindowsUpdate.Category} Category - */ - Category.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.WindowsUpdate.Category) - return object; - var message = new $root.grafeas.v1.WindowsUpdate.Category(); - if (object.categoryId != null) - message.categoryId = String(object.categoryId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a Category message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.WindowsUpdate.Category - * @static - * @param {grafeas.v1.WindowsUpdate.Category} message Category - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Category.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.categoryId = ""; - object.name = ""; + if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) + if (!$util.isString(message.affectedCpeUri)) + return "affectedCpeUri: string expected"; + if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) + if (!$util.isString(message.affectedPackage)) + return "affectedPackage: string expected"; + if (message.affectedVersion != null && message.hasOwnProperty("affectedVersion")) { + var error = $root.grafeas.v1.Version.verify(message.affectedVersion); + if (error) + return "affectedVersion." + error; } - if (message.categoryId != null && message.hasOwnProperty("categoryId")) - object.categoryId = message.categoryId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this Category to JSON. - * @function toJSON - * @memberof grafeas.v1.WindowsUpdate.Category - * @instance - * @returns {Object.} JSON object - */ - Category.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Category; - })(); - - return WindowsUpdate; - })(); - - v1.UpgradeOccurrence = (function() { - - /** - * Properties of an UpgradeOccurrence. - * @memberof grafeas.v1 - * @interface IUpgradeOccurrence - * @property {string|null} ["package"] UpgradeOccurrence package - * @property {grafeas.v1.IVersion|null} [parsedVersion] UpgradeOccurrence parsedVersion - * @property {grafeas.v1.IUpgradeDistribution|null} [distribution] UpgradeOccurrence distribution - * @property {grafeas.v1.IWindowsUpdate|null} [windowsUpdate] UpgradeOccurrence windowsUpdate - */ - - /** - * Constructs a new UpgradeOccurrence. - * @memberof grafeas.v1 - * @classdesc Represents an UpgradeOccurrence. - * @implements IUpgradeOccurrence - * @constructor - * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set - */ - function UpgradeOccurrence(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeOccurrence package. - * @member {string} package - * @memberof grafeas.v1.UpgradeOccurrence - * @instance - */ - UpgradeOccurrence.prototype["package"] = ""; - - /** - * UpgradeOccurrence parsedVersion. - * @member {grafeas.v1.IVersion|null|undefined} parsedVersion - * @memberof grafeas.v1.UpgradeOccurrence - * @instance - */ - UpgradeOccurrence.prototype.parsedVersion = null; - - /** - * UpgradeOccurrence distribution. - * @member {grafeas.v1.IUpgradeDistribution|null|undefined} distribution - * @memberof grafeas.v1.UpgradeOccurrence - * @instance - */ - UpgradeOccurrence.prototype.distribution = null; - - /** - * UpgradeOccurrence windowsUpdate. - * @member {grafeas.v1.IWindowsUpdate|null|undefined} windowsUpdate - * @memberof grafeas.v1.UpgradeOccurrence - * @instance - */ - UpgradeOccurrence.prototype.windowsUpdate = null; - - /** - * Creates a new UpgradeOccurrence instance using the specified properties. - * @function create - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence instance - */ - UpgradeOccurrence.create = function create(properties) { - return new UpgradeOccurrence(properties); - }; - - /** - * Encodes the specified UpgradeOccurrence message. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {grafeas.v1.IUpgradeOccurrence} message UpgradeOccurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeOccurrence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message["package"]); - if (message.parsedVersion != null && Object.hasOwnProperty.call(message, "parsedVersion")) - $root.grafeas.v1.Version.encode(message.parsedVersion, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) - $root.grafeas.v1.UpgradeDistribution.encode(message.distribution, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) - $root.grafeas.v1.WindowsUpdate.encode(message.windowsUpdate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpgradeOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {grafeas.v1.IUpgradeOccurrence} message UpgradeOccurrence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeOccurrence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + if (!$util.isString(message.fixedCpeUri)) + return "fixedCpeUri: string expected"; + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) + if (!$util.isString(message.fixedPackage)) + return "fixedPackage: string expected"; + if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) { + var error = $root.grafeas.v1.Version.verify(message.fixedVersion); + if (error) + return "fixedVersion." + error; + } + if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) + if (typeof message.fixAvailable !== "boolean") + return "fixAvailable: boolean expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + if (!$util.isString(message.packageType)) + return "packageType: string expected"; + if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) + switch (message.effectiveSeverity) { + default: + return "effectiveSeverity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; - /** - * Decodes an UpgradeOccurrence message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeOccurrence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.UpgradeOccurrence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates a PackageIssue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.VulnerabilityOccurrence.PackageIssue} PackageIssue + */ + PackageIssue.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue) + return object; + var message = new $root.grafeas.v1.VulnerabilityOccurrence.PackageIssue(); + if (object.affectedCpeUri != null) + message.affectedCpeUri = String(object.affectedCpeUri); + if (object.affectedPackage != null) + message.affectedPackage = String(object.affectedPackage); + if (object.affectedVersion != null) { + if (typeof object.affectedVersion !== "object") + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.PackageIssue.affectedVersion: object expected"); + message.affectedVersion = $root.grafeas.v1.Version.fromObject(object.affectedVersion); + } + if (object.fixedCpeUri != null) + message.fixedCpeUri = String(object.fixedCpeUri); + if (object.fixedPackage != null) + message.fixedPackage = String(object.fixedPackage); + if (object.fixedVersion != null) { + if (typeof object.fixedVersion !== "object") + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.PackageIssue.fixedVersion: object expected"); + message.fixedVersion = $root.grafeas.v1.Version.fromObject(object.fixedVersion); + } + if (object.fixAvailable != null) + message.fixAvailable = Boolean(object.fixAvailable); + if (object.packageType != null) + message.packageType = String(object.packageType); + switch (object.effectiveSeverity) { + case "SEVERITY_UNSPECIFIED": + case 0: + message.effectiveSeverity = 0; + break; + case "MINIMAL": case 1: - message["package"] = reader.string(); + message.effectiveSeverity = 1; + break; + case "LOW": + case 2: + message.effectiveSeverity = 2; break; + case "MEDIUM": case 3: - message.parsedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + message.effectiveSeverity = 3; break; + case "HIGH": case 4: - message.distribution = $root.grafeas.v1.UpgradeDistribution.decode(reader, reader.uint32()); + message.effectiveSeverity = 4; break; + case "CRITICAL": case 5: - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + message.effectiveSeverity = 5; break; } - } - return message; - }; - - /** - * Decodes an UpgradeOccurrence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeOccurrence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeOccurrence message. - * @function verify - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeOccurrence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.parsedVersion != null && message.hasOwnProperty("parsedVersion")) { - var error = $root.grafeas.v1.Version.verify(message.parsedVersion); - if (error) - return "parsedVersion." + error; - } - if (message.distribution != null && message.hasOwnProperty("distribution")) { - var error = $root.grafeas.v1.UpgradeDistribution.verify(message.distribution); - if (error) - return "distribution." + error; - } - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { - var error = $root.grafeas.v1.WindowsUpdate.verify(message.windowsUpdate); - if (error) - return "windowsUpdate." + error; - } - return null; - }; + return message; + }; - /** - * Creates an UpgradeOccurrence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence - */ - UpgradeOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpgradeOccurrence) + /** + * Creates a plain object from a PackageIssue message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @static + * @param {grafeas.v1.VulnerabilityOccurrence.PackageIssue} message PackageIssue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PackageIssue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.affectedCpeUri = ""; + object.affectedPackage = ""; + object.affectedVersion = null; + object.fixedCpeUri = ""; + object.fixedPackage = ""; + object.fixedVersion = null; + object.fixAvailable = false; + object.packageType = ""; + object.effectiveSeverity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + } + if (message.affectedCpeUri != null && message.hasOwnProperty("affectedCpeUri")) + object.affectedCpeUri = message.affectedCpeUri; + if (message.affectedPackage != null && message.hasOwnProperty("affectedPackage")) + object.affectedPackage = message.affectedPackage; + if (message.affectedVersion != null && message.hasOwnProperty("affectedVersion")) + object.affectedVersion = $root.grafeas.v1.Version.toObject(message.affectedVersion, options); + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + object.fixedCpeUri = message.fixedCpeUri; + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) + object.fixedPackage = message.fixedPackage; + if (message.fixedVersion != null && message.hasOwnProperty("fixedVersion")) + object.fixedVersion = $root.grafeas.v1.Version.toObject(message.fixedVersion, options); + if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) + object.fixAvailable = message.fixAvailable; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = message.packageType; + if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) + object.effectiveSeverity = options.enums === String ? $root.grafeas.v1.Severity[message.effectiveSeverity] : message.effectiveSeverity; return object; - var message = new $root.grafeas.v1.UpgradeOccurrence(); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.parsedVersion != null) { - if (typeof object.parsedVersion !== "object") - throw TypeError(".grafeas.v1.UpgradeOccurrence.parsedVersion: object expected"); - message.parsedVersion = $root.grafeas.v1.Version.fromObject(object.parsedVersion); - } - if (object.distribution != null) { - if (typeof object.distribution !== "object") - throw TypeError(".grafeas.v1.UpgradeOccurrence.distribution: object expected"); - message.distribution = $root.grafeas.v1.UpgradeDistribution.fromObject(object.distribution); - } - if (object.windowsUpdate != null) { - if (typeof object.windowsUpdate !== "object") - throw TypeError(".grafeas.v1.UpgradeOccurrence.windowsUpdate: object expected"); - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.fromObject(object.windowsUpdate); - } - return message; - }; + }; - /** - * Creates a plain object from an UpgradeOccurrence message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.UpgradeOccurrence - * @static - * @param {grafeas.v1.UpgradeOccurrence} message UpgradeOccurrence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeOccurrence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object["package"] = ""; - object.parsedVersion = null; - object.distribution = null; - object.windowsUpdate = null; - } - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.parsedVersion != null && message.hasOwnProperty("parsedVersion")) - object.parsedVersion = $root.grafeas.v1.Version.toObject(message.parsedVersion, options); - if (message.distribution != null && message.hasOwnProperty("distribution")) - object.distribution = $root.grafeas.v1.UpgradeDistribution.toObject(message.distribution, options); - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) - object.windowsUpdate = $root.grafeas.v1.WindowsUpdate.toObject(message.windowsUpdate, options); - return object; - }; + /** + * Converts this PackageIssue to JSON. + * @function toJSON + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance + * @returns {Object.} JSON object + */ + PackageIssue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpgradeOccurrence to JSON. - * @function toJSON - * @memberof grafeas.v1.UpgradeOccurrence - * @instance - * @returns {Object.} JSON object - */ - UpgradeOccurrence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return PackageIssue; + })(); - return UpgradeOccurrence; + return VulnerabilityOccurrence; })(); return v1; diff --git a/packages/grafeas/protos/protos.json b/packages/grafeas/protos/protos.json index 8baeca4cfd2..beb64287d1d 100644 --- a/packages/grafeas/protos/protos.json +++ b/packages/grafeas/protos/protos.json @@ -808,236 +808,6 @@ "CRITICAL": 5 } }, - "VulnerabilityNote": { - "fields": { - "cvssScore": { - "type": "float", - "id": 1 - }, - "severity": { - "type": "Severity", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "Detail", - "id": 3 - }, - "cvssV3": { - "type": "CVSSv3", - "id": 4 - }, - "windowsDetails": { - "rule": "repeated", - "type": "WindowsDetail", - "id": 5 - }, - "sourceUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - }, - "nested": { - "Detail": { - "fields": { - "severityName": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "packageType": { - "type": "string", - "id": 3 - }, - "affectedCpeUri": { - "type": "string", - "id": 4 - }, - "affectedPackage": { - "type": "string", - "id": 5 - }, - "affectedVersionStart": { - "type": "grafeas.v1.Version", - "id": 6 - }, - "affectedVersionEnd": { - "type": "grafeas.v1.Version", - "id": 7 - }, - "fixedCpeUri": { - "type": "string", - "id": 8 - }, - "fixedPackage": { - "type": "string", - "id": 9 - }, - "fixedVersion": { - "type": "grafeas.v1.Version", - "id": 10 - }, - "isObsolete": { - "type": "bool", - "id": 11 - }, - "sourceUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 12 - }, - "source": { - "type": "string", - "id": 13 - }, - "vendor": { - "type": "string", - "id": 14 - } - } - }, - "WindowsDetail": { - "fields": { - "cpeUri": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "fixingKbs": { - "rule": "repeated", - "type": "KnowledgeBase", - "id": 4 - } - }, - "nested": { - "KnowledgeBase": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "url": { - "type": "string", - "id": 2 - } - } - } - } - } - } - }, - "VulnerabilityOccurrence": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "severity": { - "type": "Severity", - "id": 2 - }, - "cvssScore": { - "type": "float", - "id": 3 - }, - "cvssv3": { - "type": "CVSSV3", - "id": 10 - }, - "packageIssue": { - "rule": "repeated", - "type": "PackageIssue", - "id": 4 - }, - "shortDescription": { - "type": "string", - "id": 5 - }, - "longDescription": { - "type": "string", - "id": 6 - }, - "relatedUrls": { - "rule": "repeated", - "type": "grafeas.v1.RelatedUrl", - "id": 7 - }, - "effectiveSeverity": { - "type": "Severity", - "id": 8 - }, - "fixAvailable": { - "type": "bool", - "id": 9 - } - }, - "nested": { - "CVSSV3": { - "fields": { - "baseScore": { - "type": "float", - "id": 1 - }, - "severity": { - "type": "Severity", - "id": 2 - } - } - }, - "PackageIssue": { - "fields": { - "affectedCpeUri": { - "type": "string", - "id": 1 - }, - "affectedPackage": { - "type": "string", - "id": 2 - }, - "affectedVersion": { - "type": "grafeas.v1.Version", - "id": 3 - }, - "fixedCpeUri": { - "type": "string", - "id": 4 - }, - "fixedPackage": { - "type": "string", - "id": 5 - }, - "fixedVersion": { - "type": "grafeas.v1.Version", - "id": 6 - }, - "fixAvailable": { - "type": "bool", - "id": 7 - }, - "packageType": { - "type": "string", - "id": 8 - }, - "effectiveSeverity": { - "type": "Severity", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - } - } - }, "CVSSv3": { "fields": { "baseScore": { @@ -1134,117 +904,110 @@ } } }, - "Architecture": { - "values": { - "ARCHITECTURE_UNSPECIFIED": 0, - "X86": 1, - "X64": 2 - } - }, - "Distribution": { + "CVSS": { "fields": { - "cpeUri": { - "type": "string", + "baseScore": { + "type": "float", "id": 1 }, - "architecture": { - "type": "Architecture", + "exploitabilityScore": { + "type": "float", "id": 2 }, - "latestVersion": { - "type": "Version", + "impactScore": { + "type": "float", "id": 3 }, - "maintainer": { - "type": "string", + "attackVector": { + "type": "AttackVector", "id": 4 }, - "url": { - "type": "string", + "attackComplexity": { + "type": "AttackComplexity", "id": 5 }, - "description": { - "type": "string", + "authentication": { + "type": "Authentication", "id": 6 - } - } - }, - "Location": { - "fields": { - "cpeUri": { - "type": "string", - "id": 1 }, - "version": { - "type": "Version", - "id": 2 + "privilegesRequired": { + "type": "PrivilegesRequired", + "id": 7 }, - "path": { - "type": "string", - "id": 3 - } - } - }, - "PackageNote": { - "fields": { - "name": { - "type": "string", - "id": 1 + "userInteraction": { + "type": "UserInteraction", + "id": 8 }, - "distribution": { - "rule": "repeated", - "type": "Distribution", + "scope": { + "type": "Scope", + "id": 9 + }, + "confidentialityImpact": { + "type": "Impact", "id": 10 - } - } - }, - "PackageOccurrence": { - "fields": { - "name": { - "type": "string", - "id": 1 }, - "location": { - "rule": "repeated", - "type": "Location", - "id": 2 + "integrityImpact": { + "type": "Impact", + "id": 11 + }, + "availabilityImpact": { + "type": "Impact", + "id": 12 } - } - }, - "Version": { - "fields": { - "epoch": { - "type": "int32", - "id": 1 + }, + "nested": { + "AttackVector": { + "values": { + "ATTACK_VECTOR_UNSPECIFIED": 0, + "ATTACK_VECTOR_NETWORK": 1, + "ATTACK_VECTOR_ADJACENT": 2, + "ATTACK_VECTOR_LOCAL": 3, + "ATTACK_VECTOR_PHYSICAL": 4 + } }, - "name": { - "type": "string", - "id": 2 + "AttackComplexity": { + "values": { + "ATTACK_COMPLEXITY_UNSPECIFIED": 0, + "ATTACK_COMPLEXITY_LOW": 1, + "ATTACK_COMPLEXITY_HIGH": 2 + } }, - "revision": { - "type": "string", - "id": 3 + "Authentication": { + "values": { + "AUTHENTICATION_UNSPECIFIED": 0, + "AUTHENTICATION_MULTIPLE": 1, + "AUTHENTICATION_SINGLE": 2, + "AUTHENTICATION_NONE": 3 + } }, - "inclusive": { - "type": "bool", - "id": 6 + "PrivilegesRequired": { + "values": { + "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, + "PRIVILEGES_REQUIRED_NONE": 1, + "PRIVILEGES_REQUIRED_LOW": 2, + "PRIVILEGES_REQUIRED_HIGH": 3 + } }, - "kind": { - "type": "VersionKind", - "id": 4 + "UserInteraction": { + "values": { + "USER_INTERACTION_UNSPECIFIED": 0, + "USER_INTERACTION_NONE": 1, + "USER_INTERACTION_REQUIRED": 2 + } }, - "fullName": { - "type": "string", - "id": 5 - } - }, - "nested": { - "VersionKind": { + "Scope": { "values": { - "VERSION_KIND_UNSPECIFIED": 0, - "NORMAL": 1, - "MINIMUM": 2, - "MAXIMUM": 3 + "SCOPE_UNSPECIFIED": 0, + "SCOPE_UNCHANGED": 1, + "SCOPE_CHANGED": 2 + } + }, + "Impact": { + "values": { + "IMPACT_UNSPECIFIED": 0, + "IMPACT_HIGH": 1, + "IMPACT_LOW": 2, + "IMPACT_NONE": 3 } } } @@ -1330,6 +1093,13 @@ "lastScanTime": { "type": "google.protobuf.Timestamp", "id": 5 + }, + "archiveTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2213,30 +1983,145 @@ "type": "string", "id": 1 }, - "fingerprint": { - "type": "Fingerprint", + "fingerprint": { + "type": "Fingerprint", + "id": 2 + } + } + }, + "ImageOccurrence": { + "fields": { + "fingerprint": { + "type": "Fingerprint", + "id": 1 + }, + "distance": { + "type": "int32", + "id": 2 + }, + "layerInfo": { + "rule": "repeated", + "type": "Layer", + "id": 3 + }, + "baseResourceUrl": { + "type": "string", + "id": 4 + } + } + }, + "Architecture": { + "values": { + "ARCHITECTURE_UNSPECIFIED": 0, + "X86": 1, + "X64": 2 + } + }, + "Distribution": { + "fields": { + "cpeUri": { + "type": "string", + "id": 1 + }, + "architecture": { + "type": "Architecture", + "id": 2 + }, + "latestVersion": { + "type": "Version", + "id": 3 + }, + "maintainer": { + "type": "string", + "id": 4 + }, + "url": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + } + } + }, + "Location": { + "fields": { + "cpeUri": { + "type": "string", + "id": 1 + }, + "version": { + "type": "Version", + "id": 2 + }, + "path": { + "type": "string", + "id": 3 + } + } + }, + "PackageNote": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "distribution": { + "rule": "repeated", + "type": "Distribution", + "id": 10 + } + } + }, + "PackageOccurrence": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "location": { + "rule": "repeated", + "type": "Location", "id": 2 } } }, - "ImageOccurrence": { + "Version": { "fields": { - "fingerprint": { - "type": "Fingerprint", + "epoch": { + "type": "int32", "id": 1 }, - "distance": { - "type": "int32", + "name": { + "type": "string", "id": 2 }, - "layerInfo": { - "rule": "repeated", - "type": "Layer", + "revision": { + "type": "string", "id": 3 }, - "baseResourceUrl": { - "type": "string", + "inclusive": { + "type": "bool", + "id": 6 + }, + "kind": { + "type": "VersionKind", "id": 4 + }, + "fullName": { + "type": "string", + "id": 5 + } + }, + "nested": { + "VersionKind": { + "values": { + "VERSION_KIND_UNSPECIFIED": 0, + "NORMAL": 1, + "MINIMUM": 2, + "MAXIMUM": 3 + } } } }, @@ -2361,6 +2246,224 @@ "id": 5 } } + }, + "VulnerabilityNote": { + "fields": { + "cvssScore": { + "type": "float", + "id": 1 + }, + "severity": { + "type": "grafeas.v1.Severity", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "Detail", + "id": 3 + }, + "cvssV3": { + "type": "CVSSv3", + "id": 4 + }, + "windowsDetails": { + "rule": "repeated", + "type": "WindowsDetail", + "id": 5 + }, + "sourceUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + }, + "nested": { + "Detail": { + "fields": { + "severityName": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "packageType": { + "type": "string", + "id": 3 + }, + "affectedCpeUri": { + "type": "string", + "id": 4 + }, + "affectedPackage": { + "type": "string", + "id": 5 + }, + "affectedVersionStart": { + "type": "grafeas.v1.Version", + "id": 6 + }, + "affectedVersionEnd": { + "type": "grafeas.v1.Version", + "id": 7 + }, + "fixedCpeUri": { + "type": "string", + "id": 8 + }, + "fixedPackage": { + "type": "string", + "id": 9 + }, + "fixedVersion": { + "type": "grafeas.v1.Version", + "id": 10 + }, + "isObsolete": { + "type": "bool", + "id": 11 + }, + "sourceUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 12 + }, + "source": { + "type": "string", + "id": 13 + }, + "vendor": { + "type": "string", + "id": 14 + } + } + }, + "WindowsDetail": { + "fields": { + "cpeUri": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "fixingKbs": { + "rule": "repeated", + "type": "KnowledgeBase", + "id": 4 + } + }, + "nested": { + "KnowledgeBase": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "url": { + "type": "string", + "id": 2 + } + } + } + } + } + } + }, + "VulnerabilityOccurrence": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "severity": { + "type": "grafeas.v1.Severity", + "id": 2 + }, + "cvssScore": { + "type": "float", + "id": 3 + }, + "cvssv3": { + "type": "CVSS", + "id": 10 + }, + "packageIssue": { + "rule": "repeated", + "type": "PackageIssue", + "id": 4 + }, + "shortDescription": { + "type": "string", + "id": 5 + }, + "longDescription": { + "type": "string", + "id": 6 + }, + "relatedUrls": { + "rule": "repeated", + "type": "grafeas.v1.RelatedUrl", + "id": 7 + }, + "effectiveSeverity": { + "type": "grafeas.v1.Severity", + "id": 8 + }, + "fixAvailable": { + "type": "bool", + "id": 9 + } + }, + "nested": { + "PackageIssue": { + "fields": { + "affectedCpeUri": { + "type": "string", + "id": 1 + }, + "affectedPackage": { + "type": "string", + "id": 2 + }, + "affectedVersion": { + "type": "grafeas.v1.Version", + "id": 3 + }, + "fixedCpeUri": { + "type": "string", + "id": 4 + }, + "fixedPackage": { + "type": "string", + "id": 5 + }, + "fixedVersion": { + "type": "grafeas.v1.Version", + "id": 6 + }, + "fixAvailable": { + "type": "bool", + "id": 7 + }, + "packageType": { + "type": "string", + "id": 8 + }, + "effectiveSeverity": { + "type": "grafeas.v1.Severity", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } } } } diff --git a/packages/grafeas/samples/generated/v1/grafeas.batch_create_notes.js b/packages/grafeas/samples/generated/v1/grafeas.batch_create_notes.js index 8ee994ada16..f9dff20caf7 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.batch_create_notes.js +++ b/packages/grafeas/samples/generated/v1/grafeas.batch_create_notes.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, notes) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.batch_create_occurrences.js b/packages/grafeas/samples/generated/v1/grafeas.batch_create_occurrences.js index 62f5cabfd41..5343c031167 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.batch_create_occurrences.js +++ b/packages/grafeas/samples/generated/v1/grafeas.batch_create_occurrences.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, occurrences) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.create_note.js b/packages/grafeas/samples/generated/v1/grafeas.create_note.js index 75ee8eb7f6e..654f154baa0 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.create_note.js +++ b/packages/grafeas/samples/generated/v1/grafeas.create_note.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, noteId, note) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.create_occurrence.js b/packages/grafeas/samples/generated/v1/grafeas.create_occurrence.js index 395eb0e6bf7..1d219fc73be 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.create_occurrence.js +++ b/packages/grafeas/samples/generated/v1/grafeas.create_occurrence.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, occurrence) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.delete_note.js b/packages/grafeas/samples/generated/v1/grafeas.delete_note.js index af697ad4703..b7a646b6dfe 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.delete_note.js +++ b/packages/grafeas/samples/generated/v1/grafeas.delete_note.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.delete_occurrence.js b/packages/grafeas/samples/generated/v1/grafeas.delete_occurrence.js index 503deee42b8..2df7ae4dfcd 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.delete_occurrence.js +++ b/packages/grafeas/samples/generated/v1/grafeas.delete_occurrence.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.get_note.js b/packages/grafeas/samples/generated/v1/grafeas.get_note.js index 0f105670157..ec8527ca56c 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.get_note.js +++ b/packages/grafeas/samples/generated/v1/grafeas.get_note.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.get_occurrence.js b/packages/grafeas/samples/generated/v1/grafeas.get_occurrence.js index 7c2c0bc4106..3af8a0cdd92 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.get_occurrence.js +++ b/packages/grafeas/samples/generated/v1/grafeas.get_occurrence.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.get_occurrence_note.js b/packages/grafeas/samples/generated/v1/grafeas.get_occurrence_note.js index 626f0b4a94b..eb7b80a2b39 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.get_occurrence_note.js +++ b/packages/grafeas/samples/generated/v1/grafeas.get_occurrence_note.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.list_note_occurrences.js b/packages/grafeas/samples/generated/v1/grafeas.list_note_occurrences.js index 450707e40b7..e2e0e877a1d 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.list_note_occurrences.js +++ b/packages/grafeas/samples/generated/v1/grafeas.list_note_occurrences.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -52,7 +53,7 @@ function main(name) { // Run request const iterable = await grafeasClient.listNoteOccurrencesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/grafeas/samples/generated/v1/grafeas.list_notes.js b/packages/grafeas/samples/generated/v1/grafeas.list_notes.js index 7df57ba9a62..9cfbcb3c5e4 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.list_notes.js +++ b/packages/grafeas/samples/generated/v1/grafeas.list_notes.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -53,7 +54,7 @@ function main(parent) { // Run request const iterable = await grafeasClient.listNotesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/grafeas/samples/generated/v1/grafeas.list_occurrences.js b/packages/grafeas/samples/generated/v1/grafeas.list_occurrences.js index 7e34d6a7c4a..78c2032ad84 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.list_occurrences.js +++ b/packages/grafeas/samples/generated/v1/grafeas.list_occurrences.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -53,7 +54,7 @@ function main(parent) { // Run request const iterable = await grafeasClient.listOccurrencesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/grafeas/samples/generated/v1/grafeas.update_note.js b/packages/grafeas/samples/generated/v1/grafeas.update_note.js index 8e70d5de08d..8a6da73dc9b 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.update_note.js +++ b/packages/grafeas/samples/generated/v1/grafeas.update_note.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, note) { diff --git a/packages/grafeas/samples/generated/v1/grafeas.update_occurrence.js b/packages/grafeas/samples/generated/v1/grafeas.update_occurrence.js index 0812191d219..15412988130 100644 --- a/packages/grafeas/samples/generated/v1/grafeas.update_occurrence.js +++ b/packages/grafeas/samples/generated/v1/grafeas.update_occurrence.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, occurrence) { diff --git a/packages/grafeas/src/v1/grafeas_client.ts b/packages/grafeas/src/v1/grafeas_client.ts index f64b4f94c72..ab24c99d933 100644 --- a/packages/grafeas/src/v1/grafeas_client.ts +++ b/packages/grafeas/src/v1/grafeas_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/grafeas/src/v1/grafeas_proto_list.json b/packages/grafeas/src/v1/grafeas_proto_list.json index 82e2a29a819..6b458ba8c02 100644 --- a/packages/grafeas/src/v1/grafeas_proto_list.json +++ b/packages/grafeas/src/v1/grafeas_proto_list.json @@ -13,6 +13,7 @@ "../../protos/grafeas/v1/intoto_statement.proto", "../../protos/grafeas/v1/package.proto", "../../protos/grafeas/v1/provenance.proto", + "../../protos/grafeas/v1/severity.proto", "../../protos/grafeas/v1/slsa_provenance.proto", "../../protos/grafeas/v1/upgrade.proto", "../../protos/grafeas/v1/vulnerability.proto" diff --git a/packages/grafeas/src/v1/index.ts b/packages/grafeas/src/v1/index.ts index 6776423196a..f7e65e482ca 100644 --- a/packages/grafeas/src/v1/index.ts +++ b/packages/grafeas/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/grafeas/system-test/fixtures/sample/src/index.js b/packages/grafeas/system-test/fixtures/sample/src/index.js index 11689b9d712..46726d30750 100644 --- a/packages/grafeas/system-test/fixtures/sample/src/index.js +++ b/packages/grafeas/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/grafeas/system-test/fixtures/sample/src/index.ts b/packages/grafeas/system-test/fixtures/sample/src/index.ts index 56cc9f7f84a..b667eb02e97 100644 --- a/packages/grafeas/system-test/fixtures/sample/src/index.ts +++ b/packages/grafeas/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/grafeas/system-test/install.ts b/packages/grafeas/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/grafeas/system-test/install.ts +++ b/packages/grafeas/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/grafeas/test/gapic_grafeas_v1.ts b/packages/grafeas/test/gapic_grafeas_v1.ts index 4031a10dc06..068283c6e87 100644 --- a/packages/grafeas/test/gapic_grafeas_v1.ts +++ b/packages/grafeas/test/gapic_grafeas_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.