diff --git a/packages/google-devtools-containeranalysis/.jsdoc.js b/packages/google-devtools-containeranalysis/.jsdoc.js index cb937ac7f53..17b0124cca8 100644 --- a/packages/google-devtools-containeranalysis/.jsdoc.js +++ b/packages/google-devtools-containeranalysis/.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/containeranalysis', diff --git a/packages/google-devtools-containeranalysis/linkinator.config.json b/packages/google-devtools-containeranalysis/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-devtools-containeranalysis/linkinator.config.json +++ b/packages/google-devtools-containeranalysis/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto b/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto index 2bd968c0ca3..2bfd52ccf00 100644 --- a/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto +++ b/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,9 @@ import "google/api/resource.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/timestamp.proto"; -import "grafeas/v1/vulnerability.proto"; +import "grafeas/v1/common.proto"; +import "grafeas/v1/grafeas.proto"; +import "grafeas/v1/severity.proto"; option csharp_namespace = "Google.Cloud.DevTools.ContainerAnalysis.V1"; option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1;containeranalysis"; @@ -48,8 +50,7 @@ option php_namespace = "Google\\Cloud\\ContainerAnalysis\\V1"; // image with the vulnerability referring to that note. service ContainerAnalysis { option (google.api.default_host) = "containeranalysis.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Sets the access control policy on the specified note or occurrence. // Requires `containeranalysis.notes.setIamPolicy` or @@ -59,8 +60,7 @@ service ContainerAnalysis { // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for // occurrences. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/notes/*}:setIamPolicy" body: "*" @@ -80,8 +80,7 @@ service ContainerAnalysis { // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for // occurrences. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/notes/*}:getIamPolicy" body: "*" @@ -100,8 +99,7 @@ service ContainerAnalysis { // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for // occurrences. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/notes/*}:testIamPermissions" body: "*" @@ -114,9 +112,7 @@ service ContainerAnalysis { } // Gets a summary of the number and severity of occurrences. - rpc GetVulnerabilityOccurrencesSummary( - GetVulnerabilityOccurrencesSummaryRequest) - returns (VulnerabilityOccurrencesSummary) { + rpc GetVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest) returns (VulnerabilityOccurrencesSummary) { option (google.api.http) = { get: "/v1/{parent=projects/*}/occurrences:vulnerabilitySummary" }; @@ -126,12 +122,13 @@ service ContainerAnalysis { // Request to get a vulnerability summary for some set of occurrences. message GetVulnerabilityOccurrencesSummaryRequest { - // The name of the project to get a vulnerability summary for in the form of + // Required. The name of the project to get a vulnerability summary for in the form of // `projects/[PROJECT_ID]`. string parent = 1 [ - (google.api.resource_reference).type = - "cloudresourcemanager.googleapis.com/Project", - (google.api.field_behavior) = REQUIRED + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } ]; // The filter expression. diff --git a/packages/google-devtools-containeranalysis/protos/grafeas/v1/compliance.proto b/packages/google-devtools-containeranalysis/protos/grafeas/v1/compliance.proto index 1d41db2c476..7913151eb2c 100644 --- a/packages/google-devtools-containeranalysis/protos/grafeas/v1/compliance.proto +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/protos/grafeas/v1/cvss.proto b/packages/google-devtools-containeranalysis/protos/grafeas/v1/cvss.proto index b41cd633d2a..bc2ed5209d8 100644 --- a/packages/google-devtools-containeranalysis/protos/grafeas/v1/cvss.proto +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/protos/grafeas/v1/discovery.proto b/packages/google-devtools-containeranalysis/protos/grafeas/v1/discovery.proto index e07992557de..13939b25c59 100644 --- a/packages/google-devtools-containeranalysis/protos/grafeas/v1/discovery.proto +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/protos/grafeas/v1/severity.proto b/packages/google-devtools-containeranalysis/protos/grafeas/v1/severity.proto new file mode 100644 index 00000000000..cc9cc384535 --- /dev/null +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/protos/grafeas/v1/vulnerability.proto b/packages/google-devtools-containeranalysis/protos/grafeas/v1/vulnerability.proto index 476d320292e..434e14983c4 100644 --- a/packages/google-devtools-containeranalysis/protos/grafeas/v1/vulnerability.proto +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/protos/protos.d.ts b/packages/google-devtools-containeranalysis/protos/protos.d.ts index 7f00ce23c71..18e415c7afa 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.d.ts +++ b/packages/google-devtools-containeranalysis/protos/protos.d.ts @@ -20,10246 +20,10369 @@ export namespace grafeas { /** Namespace v1. */ namespace v1 { - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - MINIMAL = 1, - LOW = 2, - MEDIUM = 3, - HIGH = 4, - CRITICAL = 5 + /** NoteKind enum. */ + enum NoteKind { + NOTE_KIND_UNSPECIFIED = 0, + VULNERABILITY = 1, + BUILD = 2, + IMAGE = 3, + PACKAGE = 4, + DEPLOYMENT = 5, + DISCOVERY = 6, + ATTESTATION = 7, + UPGRADE = 8, + COMPLIANCE = 9, + DSSE_ATTESTATION = 10 } - /** Properties of a VulnerabilityNote. */ - interface IVulnerabilityNote { - - /** VulnerabilityNote cvssScore */ - cvssScore?: (number|null); - - /** VulnerabilityNote severity */ - severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - - /** VulnerabilityNote details */ - details?: (grafeas.v1.VulnerabilityNote.IDetail[]|null); - - /** VulnerabilityNote cvssV3 */ - cvssV3?: (grafeas.v1.ICVSSv3|null); + /** Properties of a RelatedUrl. */ + interface IRelatedUrl { - /** VulnerabilityNote windowsDetails */ - windowsDetails?: (grafeas.v1.VulnerabilityNote.IWindowsDetail[]|null); + /** RelatedUrl url */ + url?: (string|null); - /** VulnerabilityNote sourceUpdateTime */ - sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** RelatedUrl label */ + label?: (string|null); } - /** Represents a VulnerabilityNote. */ - class VulnerabilityNote implements IVulnerabilityNote { + /** Represents a RelatedUrl. */ + class RelatedUrl implements IRelatedUrl { /** - * Constructs a new VulnerabilityNote. + * Constructs a new RelatedUrl. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IVulnerabilityNote); - - /** VulnerabilityNote cvssScore. */ - public cvssScore: number; - - /** VulnerabilityNote severity. */ - public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - - /** VulnerabilityNote details. */ - public details: grafeas.v1.VulnerabilityNote.IDetail[]; - - /** VulnerabilityNote cvssV3. */ - public cvssV3?: (grafeas.v1.ICVSSv3|null); + constructor(properties?: grafeas.v1.IRelatedUrl); - /** VulnerabilityNote windowsDetails. */ - public windowsDetails: grafeas.v1.VulnerabilityNote.IWindowsDetail[]; + /** RelatedUrl url. */ + public url: string; - /** VulnerabilityNote sourceUpdateTime. */ - public sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** RelatedUrl label. */ + public label: string; /** - * Creates a new VulnerabilityNote instance using the specified properties. + * Creates a new RelatedUrl instance using the specified properties. * @param [properties] Properties to set - * @returns VulnerabilityNote instance + * @returns RelatedUrl instance */ - public static create(properties?: grafeas.v1.IVulnerabilityNote): grafeas.v1.VulnerabilityNote; + public static create(properties?: grafeas.v1.IRelatedUrl): grafeas.v1.RelatedUrl; /** - * 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 RelatedUrl message. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. + * @param message RelatedUrl 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.IRelatedUrl, 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 RelatedUrl message, length delimited. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. + * @param message RelatedUrl 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.IRelatedUrl, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer. + * Decodes a RelatedUrl 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 RelatedUrl * @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.RelatedUrl; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer, length delimited. + * Decodes a RelatedUrl message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VulnerabilityNote + * @returns RelatedUrl * @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.RelatedUrl; /** - * Verifies a VulnerabilityNote message. + * Verifies a RelatedUrl 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 RelatedUrl message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VulnerabilityNote + * @returns RelatedUrl */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.RelatedUrl; /** - * 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 RelatedUrl message. Also converts values to other types if specified. + * @param message RelatedUrl * @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.RelatedUrl, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VulnerabilityNote to JSON. + * Converts this RelatedUrl to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace VulnerabilityNote { + /** Properties of a Signature. */ + interface ISignature { - /** Properties of a Detail. */ - interface IDetail { + /** Signature signature */ + signature?: (Uint8Array|string|null); - /** Detail severityName */ - severityName?: (string|null); + /** Signature publicKeyId */ + publicKeyId?: (string|null); + } - /** Detail description */ - description?: (string|null); + /** Represents a Signature. */ + class Signature implements ISignature { - /** Detail packageType */ - packageType?: (string|null); + /** + * Constructs a new Signature. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.ISignature); - /** Detail affectedCpeUri */ - affectedCpeUri?: (string|null); + /** Signature signature. */ + public signature: (Uint8Array|string); - /** Detail affectedPackage */ - affectedPackage?: (string|null); + /** Signature publicKeyId. */ + public publicKeyId: string; - /** Detail affectedVersionStart */ - affectedVersionStart?: (grafeas.v1.IVersion|null); + /** + * Creates a new Signature instance using the specified properties. + * @param [properties] Properties to set + * @returns Signature instance + */ + public static create(properties?: grafeas.v1.ISignature): grafeas.v1.Signature; - /** Detail affectedVersionEnd */ - affectedVersionEnd?: (grafeas.v1.IVersion|null); + /** + * Encodes the specified Signature message. Does not implicitly {@link grafeas.v1.Signature.verify|verify} messages. + * @param message Signature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** Detail fixedCpeUri */ - fixedCpeUri?: (string|null); + /** + * Encodes the specified Signature message, length delimited. Does not implicitly {@link grafeas.v1.Signature.verify|verify} messages. + * @param message Signature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** Detail fixedPackage */ - fixedPackage?: (string|null); + /** + * Decodes a Signature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Signature + * @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.Signature; - /** Detail fixedVersion */ - fixedVersion?: (grafeas.v1.IVersion|null); + /** + * Decodes a Signature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Signature + * @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.Signature; - /** Detail isObsolete */ - isObsolete?: (boolean|null); + /** + * Verifies a Signature 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); - /** Detail sourceUpdateTime */ - sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a Signature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Signature + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.Signature; - /** Detail source */ - source?: (string|null); + /** + * Creates a plain object from a Signature message. Also converts values to other types if specified. + * @param message Signature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.Signature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Detail vendor */ - vendor?: (string|null); - } + /** + * Converts this Signature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a Detail. */ - class Detail implements IDetail { + /** Properties of an Envelope. */ + interface IEnvelope { - /** - * Constructs a new Detail. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityNote.IDetail); + /** Envelope payload */ + payload?: (Uint8Array|string|null); - /** Detail severityName. */ - public severityName: string; + /** Envelope payloadType */ + payloadType?: (string|null); - /** Detail description. */ - public description: string; + /** Envelope signatures */ + signatures?: (grafeas.v1.IEnvelopeSignature[]|null); + } - /** Detail packageType. */ - public packageType: string; + /** Represents an Envelope. */ + class Envelope implements IEnvelope { - /** Detail affectedCpeUri. */ - public affectedCpeUri: string; - - /** Detail affectedPackage. */ - public affectedPackage: string; - - /** Detail affectedVersionStart. */ - public affectedVersionStart?: (grafeas.v1.IVersion|null); + /** + * Constructs a new Envelope. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IEnvelope); - /** Detail affectedVersionEnd. */ - public affectedVersionEnd?: (grafeas.v1.IVersion|null); + /** Envelope payload. */ + public payload: (Uint8Array|string); - /** Detail fixedCpeUri. */ - public fixedCpeUri: string; + /** Envelope payloadType. */ + public payloadType: string; - /** Detail fixedPackage. */ - public fixedPackage: string; + /** Envelope signatures. */ + public signatures: grafeas.v1.IEnvelopeSignature[]; - /** Detail fixedVersion. */ - public fixedVersion?: (grafeas.v1.IVersion|null); + /** + * Creates a new Envelope instance using the specified properties. + * @param [properties] Properties to set + * @returns Envelope instance + */ + public static create(properties?: grafeas.v1.IEnvelope): grafeas.v1.Envelope; - /** Detail isObsolete. */ - public isObsolete: boolean; + /** + * Encodes the specified Envelope message. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. + * @param message Envelope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; - /** Detail sourceUpdateTime. */ - public sourceUpdateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified Envelope message, length delimited. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. + * @param message Envelope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; - /** Detail source. */ - public source: string; + /** + * Decodes an Envelope message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Envelope + * @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.Envelope; - /** Detail vendor. */ - public vendor: string; + /** + * Decodes an Envelope message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Envelope + * @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.Envelope; - /** - * 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; + /** + * Verifies an Envelope 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); - /** - * 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; + /** + * Creates an Envelope message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Envelope + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.Envelope; - /** - * 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; + /** + * Creates a plain object from an Envelope message. Also converts values to other types if specified. + * @param message Envelope + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.Envelope, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this Envelope to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of an EnvelopeSignature. */ + interface IEnvelopeSignature { - /** - * 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); + /** EnvelopeSignature sig */ + sig?: (Uint8Array|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; + /** EnvelopeSignature keyid */ + keyid?: (string|null); + } - /** - * 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 }; + /** Represents an EnvelopeSignature. */ + class EnvelopeSignature implements IEnvelopeSignature { - /** - * Converts this Detail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new EnvelopeSignature. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IEnvelopeSignature); - /** Properties of a WindowsDetail. */ - interface IWindowsDetail { + /** EnvelopeSignature sig. */ + public sig: (Uint8Array|string); - /** WindowsDetail cpeUri */ - cpeUri?: (string|null); + /** EnvelopeSignature keyid. */ + public keyid: string; - /** WindowsDetail name */ - name?: (string|null); + /** + * Creates a new EnvelopeSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns EnvelopeSignature instance + */ + public static create(properties?: grafeas.v1.IEnvelopeSignature): grafeas.v1.EnvelopeSignature; - /** WindowsDetail description */ - description?: (string|null); + /** + * Encodes the specified EnvelopeSignature message. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. + * @param message EnvelopeSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IEnvelopeSignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsDetail fixingKbs */ - fixingKbs?: (grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase[]|null); - } + /** + * Encodes the specified EnvelopeSignature message, length delimited. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. + * @param message EnvelopeSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IEnvelopeSignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a WindowsDetail. */ - class WindowsDetail implements IWindowsDetail { + /** + * Decodes an EnvelopeSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnvelopeSignature + * @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.EnvelopeSignature; - /** - * Constructs a new WindowsDetail. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityNote.IWindowsDetail); + /** + * Decodes an EnvelopeSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnvelopeSignature + * @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.EnvelopeSignature; - /** WindowsDetail cpeUri. */ - public cpeUri: string; + /** + * Verifies an EnvelopeSignature 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); - /** WindowsDetail name. */ - public name: string; + /** + * Creates an EnvelopeSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnvelopeSignature + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.EnvelopeSignature; - /** WindowsDetail description. */ - public description: string; + /** + * Creates a plain object from an EnvelopeSignature message. Also converts values to other types if specified. + * @param message EnvelopeSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.EnvelopeSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** 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 }; - } - } + /** + * Converts this EnvelopeSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a VulnerabilityOccurrence. */ - interface IVulnerabilityOccurrence { - - /** VulnerabilityOccurrence type */ - type?: (string|null); + /** Represents a Grafeas */ + class Grafeas extends $protobuf.rpc.Service { - /** VulnerabilityOccurrence severity */ - severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); + /** + * 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); - /** VulnerabilityOccurrence cvssScore */ - cvssScore?: (number|null); + /** + * 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. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Grafeas; - /** VulnerabilityOccurrence cvssv3 */ - cvssv3?: (grafeas.v1.VulnerabilityOccurrence.ICVSSV3|null); + /** + * 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; - /** VulnerabilityOccurrence packageIssue */ - packageIssue?: (grafeas.v1.VulnerabilityOccurrence.IPackageIssue[]|null); + /** + * Calls GetOccurrence. + * @param request GetOccurrenceRequest message or plain object + * @returns Promise + */ + public getOccurrence(request: grafeas.v1.IGetOccurrenceRequest): Promise; - /** VulnerabilityOccurrence shortDescription */ - shortDescription?: (string|null); + /** + * Calls ListOccurrences. + * @param request ListOccurrencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOccurrencesResponse + */ + public listOccurrences(request: grafeas.v1.IListOccurrencesRequest, callback: grafeas.v1.Grafeas.ListOccurrencesCallback): void; - /** VulnerabilityOccurrence longDescription */ - longDescription?: (string|null); + /** + * Calls ListOccurrences. + * @param request ListOccurrencesRequest message or plain object + * @returns Promise + */ + public listOccurrences(request: grafeas.v1.IListOccurrencesRequest): Promise; - /** VulnerabilityOccurrence relatedUrls */ - relatedUrls?: (grafeas.v1.IRelatedUrl[]|null); + /** + * Calls DeleteOccurrence. + * @param request DeleteOccurrenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest, callback: grafeas.v1.Grafeas.DeleteOccurrenceCallback): void; - /** VulnerabilityOccurrence effectiveSeverity */ - effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); + /** + * Calls DeleteOccurrence. + * @param request DeleteOccurrenceRequest message or plain object + * @returns Promise + */ + public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest): Promise; - /** VulnerabilityOccurrence fixAvailable */ - fixAvailable?: (boolean|null); - } + /** + * Calls CreateOccurrence. + * @param request CreateOccurrenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Occurrence + */ + public createOccurrence(request: grafeas.v1.ICreateOccurrenceRequest, callback: grafeas.v1.Grafeas.CreateOccurrenceCallback): void; - /** Represents a VulnerabilityOccurrence. */ - class VulnerabilityOccurrence implements IVulnerabilityOccurrence { + /** + * Calls CreateOccurrence. + * @param request CreateOccurrenceRequest message or plain object + * @returns Promise + */ + public createOccurrence(request: grafeas.v1.ICreateOccurrenceRequest): Promise; /** - * Constructs a new VulnerabilityOccurrence. - * @param [properties] Properties to set + * Calls BatchCreateOccurrences. + * @param request BatchCreateOccurrencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateOccurrencesResponse */ - constructor(properties?: grafeas.v1.IVulnerabilityOccurrence); + public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest, callback: grafeas.v1.Grafeas.BatchCreateOccurrencesCallback): void; - /** VulnerabilityOccurrence type. */ - public type: string; + /** + * Calls BatchCreateOccurrences. + * @param request BatchCreateOccurrencesRequest message or plain object + * @returns Promise + */ + public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest): Promise; - /** VulnerabilityOccurrence severity. */ - public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + /** + * Calls UpdateOccurrence. + * @param request UpdateOccurrenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Occurrence + */ + public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest, callback: grafeas.v1.Grafeas.UpdateOccurrenceCallback): void; - /** VulnerabilityOccurrence cvssScore. */ - public cvssScore: number; + /** + * Calls UpdateOccurrence. + * @param request UpdateOccurrenceRequest message or plain object + * @returns Promise + */ + public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest): Promise; - /** VulnerabilityOccurrence cvssv3. */ - public cvssv3?: (grafeas.v1.VulnerabilityOccurrence.ICVSSV3|null); + /** + * 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; - /** VulnerabilityOccurrence packageIssue. */ - public packageIssue: grafeas.v1.VulnerabilityOccurrence.IPackageIssue[]; + /** + * Calls GetOccurrenceNote. + * @param request GetOccurrenceNoteRequest message or plain object + * @returns Promise + */ + public getOccurrenceNote(request: grafeas.v1.IGetOccurrenceNoteRequest): Promise; - /** VulnerabilityOccurrence shortDescription. */ - public shortDescription: string; + /** + * 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; - /** VulnerabilityOccurrence longDescription. */ - public longDescription: string; + /** + * Calls GetNote. + * @param request GetNoteRequest message or plain object + * @returns Promise + */ + public getNote(request: grafeas.v1.IGetNoteRequest): Promise; - /** VulnerabilityOccurrence relatedUrls. */ - public relatedUrls: grafeas.v1.IRelatedUrl[]; + /** + * 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; - /** VulnerabilityOccurrence effectiveSeverity. */ - public effectiveSeverity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + /** + * Calls ListNotes. + * @param request ListNotesRequest message or plain object + * @returns Promise + */ + public listNotes(request: grafeas.v1.IListNotesRequest): Promise; - /** VulnerabilityOccurrence fixAvailable. */ - public fixAvailable: boolean; + /** + * Calls DeleteNote. + * @param request DeleteNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteNote(request: grafeas.v1.IDeleteNoteRequest, callback: grafeas.v1.Grafeas.DeleteNoteCallback): void; /** - * Creates a new VulnerabilityOccurrence instance using the specified properties. - * @param [properties] Properties to set - * @returns VulnerabilityOccurrence instance + * Calls DeleteNote. + * @param request DeleteNoteRequest message or plain object + * @returns Promise */ - public static create(properties?: grafeas.v1.IVulnerabilityOccurrence): grafeas.v1.VulnerabilityOccurrence; + public deleteNote(request: grafeas.v1.IDeleteNoteRequest): Promise; /** - * 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 + * Calls CreateNote. + * @param request CreateNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Note */ - public static encode(message: grafeas.v1.IVulnerabilityOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public createNote(request: grafeas.v1.ICreateNoteRequest, callback: grafeas.v1.Grafeas.CreateNoteCallback): void; /** - * 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 + * Calls CreateNote. + * @param request CreateNoteRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: grafeas.v1.IVulnerabilityOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public createNote(request: grafeas.v1.ICreateNoteRequest): Promise; /** - * 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 VulnerabilityOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchCreateNotes. + * @param request BatchCreateNotesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateNotesResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityOccurrence; + public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest, callback: grafeas.v1.Grafeas.BatchCreateNotesCallback): void; /** - * Decodes a VulnerabilityOccurrence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VulnerabilityOccurrence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchCreateNotes. + * @param request BatchCreateNotesRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityOccurrence; + public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest): Promise; /** - * Verifies a VulnerabilityOccurrence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateNote. + * @param request UpdateNoteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Note */ - public static verify(message: { [k: string]: any }): (string|null); + public updateNote(request: grafeas.v1.IUpdateNoteRequest, callback: grafeas.v1.Grafeas.UpdateNoteCallback): void; /** - * Creates a VulnerabilityOccurrence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VulnerabilityOccurrence + * Calls UpdateNote. + * @param request UpdateNoteRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityOccurrence; + public updateNote(request: grafeas.v1.IUpdateNoteRequest): Promise; /** - * 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 + * Calls ListNoteOccurrences. + * @param request ListNoteOccurrencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNoteOccurrencesResponse */ - public static toObject(message: grafeas.v1.VulnerabilityOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listNoteOccurrences(request: grafeas.v1.IListNoteOccurrencesRequest, callback: grafeas.v1.Grafeas.ListNoteOccurrencesCallback): void; /** - * Converts this VulnerabilityOccurrence to JSON. - * @returns JSON object + * Calls ListNoteOccurrences. + * @param request ListNoteOccurrencesRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public listNoteOccurrences(request: grafeas.v1.IListNoteOccurrencesRequest): Promise; } - namespace VulnerabilityOccurrence { - - /** Properties of a CVSSV3. */ - interface ICVSSV3 { - - /** CVSSV3 baseScore */ - baseScore?: (number|null); - - /** CVSSV3 severity */ - severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - } - - /** Represents a CVSSV3. */ - class CVSSV3 implements ICVSSV3 { - - /** - * Constructs a new CVSSV3. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityOccurrence.ICVSSV3); + namespace Grafeas { - /** CVSSV3 baseScore. */ - public baseScore: number; + /** + * 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; - /** CVSSV3 severity. */ - public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + /** + * 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; - /** - * 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; + /** + * Callback as used by {@link grafeas.v1.Grafeas#deleteOccurrence}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOccurrenceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * Callback as used by {@link grafeas.v1.Grafeas#batchCreateOccurrences}. + * @param error Error, if any + * @param [response] BatchCreateOccurrencesResponse + */ + type BatchCreateOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateOccurrencesResponse) => void; - /** - * 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; + /** + * Callback as used by {@link grafeas.v1.Grafeas#updateOccurrence}. + * @param error Error, if any + * @param [response] Occurrence + */ + type UpdateOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; - /** - * 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; + /** + * Callback as used by {@link grafeas.v1.Grafeas#getOccurrenceNote}. + * @param error Error, if any + * @param [response] Note + */ + type GetOccurrenceNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; - /** - * 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); + /** + * Callback as used by {@link grafeas.v1.Grafeas#getNote}. + * @param error Error, if any + * @param [response] Note + */ + type GetNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; - /** - * 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; + /** + * Callback as used by {@link grafeas.v1.Grafeas#listNotes}. + * @param error Error, if any + * @param [response] ListNotesResponse + */ + type ListNotesCallback = (error: (Error|null), response?: grafeas.v1.ListNotesResponse) => void; - /** - * 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 }; + /** + * Callback as used by {@link grafeas.v1.Grafeas#deleteNote}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteNoteCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * Converts this CVSSV3 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Callback as used by {@link grafeas.v1.Grafeas#createNote}. + * @param error Error, if any + * @param [response] Note + */ + type CreateNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; - /** Properties of a PackageIssue. */ - interface IPackageIssue { + /** + * Callback as used by {@link grafeas.v1.Grafeas#batchCreateNotes}. + * @param error Error, if any + * @param [response] BatchCreateNotesResponse + */ + type BatchCreateNotesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateNotesResponse) => void; - /** PackageIssue affectedCpeUri */ - affectedCpeUri?: (string|null); + /** + * Callback as used by {@link grafeas.v1.Grafeas#updateNote}. + * @param error Error, if any + * @param [response] Note + */ + type UpdateNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; - /** PackageIssue affectedPackage */ - affectedPackage?: (string|null); + /** + * 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; + } - /** PackageIssue affectedVersion */ - affectedVersion?: (grafeas.v1.IVersion|null); + /** Properties of an Occurrence. */ + interface IOccurrence { - /** PackageIssue fixedCpeUri */ - fixedCpeUri?: (string|null); + /** Occurrence name */ + name?: (string|null); - /** PackageIssue fixedPackage */ - fixedPackage?: (string|null); + /** Occurrence resourceUri */ + resourceUri?: (string|null); - /** PackageIssue fixedVersion */ - fixedVersion?: (grafeas.v1.IVersion|null); + /** Occurrence noteName */ + noteName?: (string|null); - /** PackageIssue fixAvailable */ - fixAvailable?: (boolean|null); + /** Occurrence kind */ + kind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); - /** PackageIssue packageType */ - packageType?: (string|null); + /** Occurrence remediation */ + remediation?: (string|null); - /** PackageIssue effectiveSeverity */ - effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - } + /** Occurrence createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Represents a PackageIssue. */ - class PackageIssue implements IPackageIssue { + /** Occurrence updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new PackageIssue. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.VulnerabilityOccurrence.IPackageIssue); + /** Occurrence vulnerability */ + vulnerability?: (grafeas.v1.IVulnerabilityOccurrence|null); - /** PackageIssue affectedCpeUri. */ - public affectedCpeUri: string; + /** Occurrence build */ + build?: (grafeas.v1.IBuildOccurrence|null); - /** PackageIssue affectedPackage. */ - public affectedPackage: string; + /** Occurrence image */ + image?: (grafeas.v1.IImageOccurrence|null); - /** PackageIssue affectedVersion. */ - public affectedVersion?: (grafeas.v1.IVersion|null); + /** Occurrence package */ + "package"?: (grafeas.v1.IPackageOccurrence|null); - /** PackageIssue fixedCpeUri. */ - public fixedCpeUri: string; + /** Occurrence deployment */ + deployment?: (grafeas.v1.IDeploymentOccurrence|null); - /** PackageIssue fixedPackage. */ - public fixedPackage: string; + /** Occurrence discovery */ + discovery?: (grafeas.v1.IDiscoveryOccurrence|null); - /** PackageIssue fixedVersion. */ - public fixedVersion?: (grafeas.v1.IVersion|null); + /** Occurrence attestation */ + attestation?: (grafeas.v1.IAttestationOccurrence|null); - /** PackageIssue fixAvailable. */ - public fixAvailable: boolean; + /** Occurrence upgrade */ + upgrade?: (grafeas.v1.IUpgradeOccurrence|null); - /** PackageIssue packageType. */ - public packageType: string; + /** Occurrence compliance */ + compliance?: (grafeas.v1.IComplianceOccurrence|null); - /** PackageIssue effectiveSeverity. */ - public effectiveSeverity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + /** Occurrence dsseAttestation */ + dsseAttestation?: (grafeas.v1.IDSSEAttestationOccurrence|null); - /** - * 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; + /** Occurrence envelope */ + envelope?: (grafeas.v1.IEnvelope|null); + } - /** - * 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; + /** Represents an Occurrence. */ + class Occurrence implements IOccurrence { - /** - * 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; + /** + * Constructs a new Occurrence. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IOccurrence); - /** - * 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; + /** Occurrence name. */ + public name: string; - /** - * 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; + /** Occurrence resourceUri. */ + public resourceUri: string; - /** - * 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); + /** Occurrence noteName. */ + public noteName: string; - /** - * 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; + /** Occurrence kind. */ + public kind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); - /** - * 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 }; + /** Occurrence remediation. */ + public remediation: string; - /** - * Converts this PackageIssue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Occurrence createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** NoteKind enum. */ - enum NoteKind { - NOTE_KIND_UNSPECIFIED = 0, - VULNERABILITY = 1, - BUILD = 2, - IMAGE = 3, - PACKAGE = 4, - DEPLOYMENT = 5, - DISCOVERY = 6, - ATTESTATION = 7, - UPGRADE = 8, - COMPLIANCE = 9, - DSSE_ATTESTATION = 10 - } + /** Occurrence updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Properties of a RelatedUrl. */ - interface IRelatedUrl { + /** Occurrence vulnerability. */ + public vulnerability?: (grafeas.v1.IVulnerabilityOccurrence|null); - /** RelatedUrl url */ - url?: (string|null); + /** Occurrence build. */ + public build?: (grafeas.v1.IBuildOccurrence|null); - /** RelatedUrl label */ - label?: (string|null); - } + /** Occurrence image. */ + public image?: (grafeas.v1.IImageOccurrence|null); - /** Represents a RelatedUrl. */ - class RelatedUrl implements IRelatedUrl { + /** Occurrence package. */ + public package?: (grafeas.v1.IPackageOccurrence|null); - /** - * Constructs a new RelatedUrl. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IRelatedUrl); + /** Occurrence deployment. */ + public deployment?: (grafeas.v1.IDeploymentOccurrence|null); - /** RelatedUrl url. */ - public url: string; + /** Occurrence discovery. */ + public discovery?: (grafeas.v1.IDiscoveryOccurrence|null); - /** RelatedUrl label. */ - public label: string; + /** 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 RelatedUrl instance using the specified properties. + * Creates a new Occurrence instance using the specified properties. * @param [properties] Properties to set - * @returns RelatedUrl instance + * @returns Occurrence instance */ - public static create(properties?: grafeas.v1.IRelatedUrl): grafeas.v1.RelatedUrl; + public static create(properties?: grafeas.v1.IOccurrence): grafeas.v1.Occurrence; /** - * Encodes the specified RelatedUrl message. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. - * @param message RelatedUrl 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.IRelatedUrl, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RelatedUrl message, length delimited. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. - * @param message RelatedUrl 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.IRelatedUrl, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RelatedUrl 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 RelatedUrl + * @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.RelatedUrl; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Occurrence; /** - * Decodes a RelatedUrl 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 RelatedUrl + * @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.RelatedUrl; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Occurrence; /** - * Verifies a RelatedUrl 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 RelatedUrl 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 RelatedUrl + * @returns Occurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.RelatedUrl; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Occurrence; /** - * Creates a plain object from a RelatedUrl message. Also converts values to other types if specified. - * @param message RelatedUrl + * 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.RelatedUrl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Occurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RelatedUrl to JSON. + * Converts this Occurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Signature. */ - interface ISignature { + /** Properties of a Note. */ + interface INote { - /** Signature signature */ - signature?: (Uint8Array|string|null); + /** Note name */ + name?: (string|null); - /** Signature publicKeyId */ - publicKeyId?: (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 Signature. */ - class Signature implements ISignature { + /** Represents a Note. */ + class Note implements INote { /** - * Constructs a new Signature. + * Constructs a new Note. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ISignature); + constructor(properties?: grafeas.v1.INote); - /** Signature signature. */ - public signature: (Uint8Array|string); + /** Note name. */ + public name: string; - /** Signature publicKeyId. */ - public publicKeyId: 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 Signature instance using the specified properties. + * Creates a new Note instance using the specified properties. * @param [properties] Properties to set - * @returns Signature instance + * @returns Note instance */ - public static create(properties?: grafeas.v1.ISignature): grafeas.v1.Signature; + public static create(properties?: grafeas.v1.INote): grafeas.v1.Note; /** - * Encodes the specified Signature message. Does not implicitly {@link grafeas.v1.Signature.verify|verify} messages. - * @param message Signature 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.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.INote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Signature message, length delimited. Does not implicitly {@link grafeas.v1.Signature.verify|verify} messages. - * @param message Signature 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.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.INote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Signature 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 Signature + * @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.Signature; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Note; /** - * Decodes a Signature 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 Signature + * @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.Signature; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Note; /** - * Verifies a Signature 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 Signature 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 Signature + * @returns Note */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Signature; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Note; /** - * Creates a plain object from a Signature message. Also converts values to other types if specified. - * @param message Signature + * 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.Signature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Note, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Signature to JSON. + * Converts this Note to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Envelope. */ - interface IEnvelope { - - /** Envelope payload */ - payload?: (Uint8Array|string|null); - - /** Envelope payloadType */ - payloadType?: (string|null); + /** Properties of a GetOccurrenceRequest. */ + interface IGetOccurrenceRequest { - /** Envelope signatures */ - signatures?: (grafeas.v1.IEnvelopeSignature[]|null); + /** GetOccurrenceRequest name */ + name?: (string|null); } - /** Represents an Envelope. */ - class Envelope implements IEnvelope { + /** Represents a GetOccurrenceRequest. */ + class GetOccurrenceRequest implements IGetOccurrenceRequest { /** - * Constructs a new Envelope. + * Constructs a new GetOccurrenceRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IEnvelope); - - /** Envelope payload. */ - public payload: (Uint8Array|string); - - /** Envelope payloadType. */ - public payloadType: string; + constructor(properties?: grafeas.v1.IGetOccurrenceRequest); - /** Envelope signatures. */ - public signatures: grafeas.v1.IEnvelopeSignature[]; + /** GetOccurrenceRequest name. */ + public name: string; /** - * Creates a new Envelope instance using the specified properties. + * Creates a new GetOccurrenceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Envelope instance + * @returns GetOccurrenceRequest instance */ - public static create(properties?: grafeas.v1.IEnvelope): grafeas.v1.Envelope; + public static create(properties?: grafeas.v1.IGetOccurrenceRequest): grafeas.v1.GetOccurrenceRequest; /** - * Encodes the specified Envelope message. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. - * @param message Envelope 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.IEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Envelope message, length delimited. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. - * @param message Envelope 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.IEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Envelope 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 Envelope + * @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.Envelope; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetOccurrenceRequest; /** - * Decodes an Envelope 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 Envelope + * @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.Envelope; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetOccurrenceRequest; /** - * Verifies an Envelope 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 an Envelope 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 Envelope + * @returns GetOccurrenceRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Envelope; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceRequest; /** - * Creates a plain object from an Envelope message. Also converts values to other types if specified. - * @param message Envelope + * 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.Envelope, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.GetOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Envelope to JSON. + * Converts this GetOccurrenceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EnvelopeSignature. */ - interface IEnvelopeSignature { + /** Properties of a ListOccurrencesRequest. */ + interface IListOccurrencesRequest { - /** EnvelopeSignature sig */ - sig?: (Uint8Array|string|null); + /** ListOccurrencesRequest parent */ + parent?: (string|null); - /** EnvelopeSignature keyid */ - keyid?: (string|null); + /** ListOccurrencesRequest filter */ + filter?: (string|null); + + /** ListOccurrencesRequest pageSize */ + pageSize?: (number|null); + + /** ListOccurrencesRequest pageToken */ + pageToken?: (string|null); } - /** Represents an EnvelopeSignature. */ - class EnvelopeSignature implements IEnvelopeSignature { + /** Represents a ListOccurrencesRequest. */ + class ListOccurrencesRequest implements IListOccurrencesRequest { /** - * Constructs a new EnvelopeSignature. + * Constructs a new ListOccurrencesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IEnvelopeSignature); + constructor(properties?: grafeas.v1.IListOccurrencesRequest); - /** EnvelopeSignature sig. */ - public sig: (Uint8Array|string); + /** ListOccurrencesRequest parent. */ + public parent: string; - /** EnvelopeSignature keyid. */ - public keyid: string; + /** ListOccurrencesRequest filter. */ + public filter: string; + + /** ListOccurrencesRequest pageSize. */ + public pageSize: number; + + /** ListOccurrencesRequest pageToken. */ + public pageToken: string; /** - * Creates a new EnvelopeSignature instance using the specified properties. + * Creates a new ListOccurrencesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EnvelopeSignature instance + * @returns ListOccurrencesRequest instance */ - public static create(properties?: grafeas.v1.IEnvelopeSignature): grafeas.v1.EnvelopeSignature; + public static create(properties?: grafeas.v1.IListOccurrencesRequest): grafeas.v1.ListOccurrencesRequest; /** - * Encodes the specified EnvelopeSignature message. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. - * @param message EnvelopeSignature 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.IEnvelopeSignature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnvelopeSignature message, length delimited. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. - * @param message EnvelopeSignature 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.IEnvelopeSignature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnvelopeSignature 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 EnvelopeSignature + * @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.EnvelopeSignature; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListOccurrencesRequest; /** - * Decodes an EnvelopeSignature 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 EnvelopeSignature + * @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.EnvelopeSignature; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListOccurrencesRequest; /** - * Verifies an EnvelopeSignature 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 an EnvelopeSignature 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 EnvelopeSignature + * @returns ListOccurrencesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.EnvelopeSignature; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesRequest; /** - * Creates a plain object from an EnvelopeSignature message. Also converts values to other types if specified. - * @param message EnvelopeSignature + * 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.EnvelopeSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnvelopeSignature to JSON. + * Converts this ListOccurrencesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CVSSv3. */ - interface ICVSSv3 { - - /** CVSSv3 baseScore */ - baseScore?: (number|null); - - /** CVSSv3 exploitabilityScore */ - exploitabilityScore?: (number|null); - - /** CVSSv3 impactScore */ - impactScore?: (number|null); - - /** CVSSv3 attackVector */ - attackVector?: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector|null); - - /** CVSSv3 attackComplexity */ - attackComplexity?: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity|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); + /** Properties of a ListOccurrencesResponse. */ + interface IListOccurrencesResponse { - /** CVSSv3 integrityImpact */ - integrityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); + /** ListOccurrencesResponse occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); - /** CVSSv3 availabilityImpact */ - availabilityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); + /** ListOccurrencesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CVSSv3. */ - class CVSSv3 implements ICVSSv3 { + /** Represents a ListOccurrencesResponse. */ + class ListOccurrencesResponse implements IListOccurrencesResponse { /** - * Constructs a new CVSSv3. + * Constructs a new ListOccurrencesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ICVSSv3); - - /** CVSSv3 baseScore. */ - public baseScore: number; - - /** CVSSv3 exploitabilityScore. */ - public exploitabilityScore: number; - - /** CVSSv3 impactScore. */ - public impactScore: number; - - /** CVSSv3 attackVector. */ - public attackVector: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector); - - /** CVSSv3 attackComplexity. */ - public attackComplexity: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity); - - /** 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); + constructor(properties?: grafeas.v1.IListOccurrencesResponse); - /** CVSSv3 integrityImpact. */ - public integrityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); + /** ListOccurrencesResponse occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; - /** CVSSv3 availabilityImpact. */ - public availabilityImpact: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact); + /** ListOccurrencesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CVSSv3 instance using the specified properties. + * Creates a new ListOccurrencesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CVSSv3 instance + * @returns ListOccurrencesResponse instance */ - public static create(properties?: grafeas.v1.ICVSSv3): grafeas.v1.CVSSv3; + public static create(properties?: grafeas.v1.IListOccurrencesResponse): grafeas.v1.ListOccurrencesResponse; /** - * 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 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.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListOccurrencesResponse, 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 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.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CVSSv3 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 CVSSv3 + * @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.CVSSv3; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListOccurrencesResponse; /** - * Decodes a CVSSv3 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 CVSSv3 + * @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.CVSSv3; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListOccurrencesResponse; /** - * Verifies a CVSSv3 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 CVSSv3 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 CVSSv3 + * @returns ListOccurrencesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.CVSSv3; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesResponse; /** - * 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 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.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CVSSv3 to JSON. + * Converts this ListOccurrencesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CVSSv3 { + /** Properties of a DeleteOccurrenceRequest. */ + interface IDeleteOccurrenceRequest { - /** AttackVector enum. */ - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0, - ATTACK_VECTOR_NETWORK = 1, - ATTACK_VECTOR_ADJACENT = 2, - ATTACK_VECTOR_LOCAL = 3, - ATTACK_VECTOR_PHYSICAL = 4 - } + /** DeleteOccurrenceRequest name */ + name?: (string|null); + } - /** AttackComplexity enum. */ - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0, - ATTACK_COMPLEXITY_LOW = 1, - ATTACK_COMPLEXITY_HIGH = 2 - } + /** Represents a DeleteOccurrenceRequest. */ + class DeleteOccurrenceRequest implements IDeleteOccurrenceRequest { - /** PrivilegesRequired enum. */ - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0, - PRIVILEGES_REQUIRED_NONE = 1, - PRIVILEGES_REQUIRED_LOW = 2, - PRIVILEGES_REQUIRED_HIGH = 3 - } + /** + * Constructs a new DeleteOccurrenceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IDeleteOccurrenceRequest); - /** UserInteraction enum. */ - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0, - USER_INTERACTION_NONE = 1, - USER_INTERACTION_REQUIRED = 2 - } + /** DeleteOccurrenceRequest name. */ + public name: string; - /** Scope enum. */ - enum Scope { - SCOPE_UNSPECIFIED = 0, - SCOPE_UNCHANGED = 1, - SCOPE_CHANGED = 2 - } + /** + * Creates a new DeleteOccurrenceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOccurrenceRequest instance + */ + public static create(properties?: grafeas.v1.IDeleteOccurrenceRequest): grafeas.v1.DeleteOccurrenceRequest; - /** Impact enum. */ - enum Impact { - IMPACT_UNSPECIFIED = 0, - IMPACT_HIGH = 1, - IMPACT_LOW = 2, - IMPACT_NONE = 3 - } - } + /** + * 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 static encode(message: grafeas.v1.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Architecture enum. */ - enum Architecture { - ARCHITECTURE_UNSPECIFIED = 0, - X86 = 1, - X64 = 2 - } + /** + * 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 static encodeDelimited(message: grafeas.v1.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Distribution. */ - interface IDistribution { + /** + * 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 static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeleteOccurrenceRequest; - /** Distribution cpeUri */ - cpeUri?: (string|null); + /** + * 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 static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeleteOccurrenceRequest; - /** Distribution architecture */ - architecture?: (grafeas.v1.Architecture|keyof typeof grafeas.v1.Architecture|null); + /** + * Verifies a DeleteOccurrenceRequest 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); - /** Distribution latestVersion */ - latestVersion?: (grafeas.v1.IVersion|null); + /** + * Creates a DeleteOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOccurrenceRequest + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteOccurrenceRequest; - /** Distribution maintainer */ - maintainer?: (string|null); + /** + * 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 }; - /** Distribution url */ - url?: (string|null); + /** + * Converts this DeleteOccurrenceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Distribution description */ - description?: (string|null); + /** Properties of a CreateOccurrenceRequest. */ + interface ICreateOccurrenceRequest { + + /** CreateOccurrenceRequest parent */ + parent?: (string|null); + + /** CreateOccurrenceRequest occurrence */ + occurrence?: (grafeas.v1.IOccurrence|null); } - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** Represents a CreateOccurrenceRequest. */ + class CreateOccurrenceRequest implements ICreateOccurrenceRequest { /** - * Constructs a new Distribution. + * Constructs a new CreateOccurrenceRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDistribution); - - /** Distribution cpeUri. */ - public cpeUri: string; - - /** Distribution architecture. */ - public architecture: (grafeas.v1.Architecture|keyof typeof grafeas.v1.Architecture); - - /** Distribution latestVersion. */ - public latestVersion?: (grafeas.v1.IVersion|null); - - /** Distribution maintainer. */ - public maintainer: string; + constructor(properties?: grafeas.v1.ICreateOccurrenceRequest); - /** Distribution url. */ - public url: string; + /** CreateOccurrenceRequest parent. */ + public parent: string; - /** Distribution description. */ - public description: string; + /** CreateOccurrenceRequest occurrence. */ + public occurrence?: (grafeas.v1.IOccurrence|null); /** - * Creates a new Distribution instance using the specified properties. + * Creates a new CreateOccurrenceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Distribution instance + * @returns CreateOccurrenceRequest instance */ - public static create(properties?: grafeas.v1.IDistribution): grafeas.v1.Distribution; + public static create(properties?: grafeas.v1.ICreateOccurrenceRequest): grafeas.v1.CreateOccurrenceRequest; /** - * 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 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.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICreateOccurrenceRequest, 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 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.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICreateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Distribution message from the specified reader or buffer. + * 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 Distribution + * @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.Distribution; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CreateOccurrenceRequest; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a CreateOccurrenceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Distribution + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Distribution; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CreateOccurrenceRequest; /** - * Verifies a Distribution message. + * Verifies a CreateOccurrenceRequest 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 CreateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Distribution + * @returns CreateOccurrenceRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Distribution; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateOccurrenceRequest; /** - * 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 CreateOccurrenceRequest message. Also converts values to other types if specified. + * @param message CreateOccurrenceRequest * @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.CreateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Distribution to JSON. + * Converts this CreateOccurrenceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Location. */ - interface ILocation { + /** Properties of an UpdateOccurrenceRequest. */ + interface IUpdateOccurrenceRequest { - /** Location cpeUri */ - cpeUri?: (string|null); + /** UpdateOccurrenceRequest name */ + name?: (string|null); - /** Location version */ - version?: (grafeas.v1.IVersion|null); + /** UpdateOccurrenceRequest occurrence */ + occurrence?: (grafeas.v1.IOccurrence|null); - /** Location path */ - path?: (string|null); + /** UpdateOccurrenceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a Location. */ - class Location implements ILocation { + /** Represents an UpdateOccurrenceRequest. */ + class UpdateOccurrenceRequest implements IUpdateOccurrenceRequest { /** - * Constructs a new Location. + * Constructs a new UpdateOccurrenceRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ILocation); + constructor(properties?: grafeas.v1.IUpdateOccurrenceRequest); - /** Location cpeUri. */ - public cpeUri: string; + /** UpdateOccurrenceRequest name. */ + public name: string; - /** Location version. */ - public version?: (grafeas.v1.IVersion|null); + /** UpdateOccurrenceRequest occurrence. */ + public occurrence?: (grafeas.v1.IOccurrence|null); - /** Location path. */ - public path: string; + /** UpdateOccurrenceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Location instance using the specified properties. + * Creates a new UpdateOccurrenceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Location instance + * @returns UpdateOccurrenceRequest instance */ - public static create(properties?: grafeas.v1.ILocation): grafeas.v1.Location; + public static create(properties?: grafeas.v1.IUpdateOccurrenceRequest): grafeas.v1.UpdateOccurrenceRequest; /** - * 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 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 static encode(message: grafeas.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpdateOccurrenceRequest, 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 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 static encodeDelimited(message: grafeas.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpdateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Location message from the specified reader or buffer. + * 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 Location + * @returns UpdateOccurrenceRequest * @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.UpdateOccurrenceRequest; /** - * Decodes a Location message from the specified reader or buffer, length delimited. + * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Location + * @returns UpdateOccurrenceRequest * @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.UpdateOccurrenceRequest; /** - * Verifies a Location message. + * Verifies an UpdateOccurrenceRequest 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 an UpdateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Location + * @returns UpdateOccurrenceRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Location; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateOccurrenceRequest; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location + * 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 static toObject(message: grafeas.v1.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpdateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Location to JSON. + * Converts this UpdateOccurrenceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PackageNote. */ - interface IPackageNote { + /** Properties of a GetNoteRequest. */ + interface IGetNoteRequest { - /** PackageNote name */ + /** GetNoteRequest name */ name?: (string|null); - - /** PackageNote distribution */ - distribution?: (grafeas.v1.IDistribution[]|null); } - /** Represents a PackageNote. */ - class PackageNote implements IPackageNote { + /** Represents a GetNoteRequest. */ + class GetNoteRequest implements IGetNoteRequest { /** - * Constructs a new PackageNote. + * Constructs a new GetNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IPackageNote); + constructor(properties?: grafeas.v1.IGetNoteRequest); - /** PackageNote name. */ + /** GetNoteRequest name. */ public name: string; - /** PackageNote distribution. */ - public distribution: grafeas.v1.IDistribution[]; - /** - * Creates a new PackageNote instance using the specified properties. + * Creates a new GetNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PackageNote instance + * @returns GetNoteRequest instance */ - public static create(properties?: grafeas.v1.IPackageNote): grafeas.v1.PackageNote; + public static create(properties?: grafeas.v1.IGetNoteRequest): grafeas.v1.GetNoteRequest; /** - * 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 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 static encode(message: grafeas.v1.IPackageNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IGetNoteRequest, 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 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 static encodeDelimited(message: grafeas.v1.IPackageNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IGetNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PackageNote message from the specified reader or buffer. + * 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 PackageNote + * @returns GetNoteRequest * @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.GetNoteRequest; /** - * Decodes a PackageNote message from the specified reader or buffer, length delimited. + * Decodes a GetNoteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PackageNote + * @returns GetNoteRequest * @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.GetNoteRequest; /** - * Verifies a PackageNote message. + * Verifies a GetNoteRequest 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 GetNoteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PackageNote + * @returns GetNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GetNoteRequest; /** - * 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 GetNoteRequest message. Also converts values to other types if specified. + * @param message GetNoteRequest * @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.GetNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PackageNote to JSON. + * Converts this GetNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PackageOccurrence. */ - interface IPackageOccurrence { + /** Properties of a GetOccurrenceNoteRequest. */ + interface IGetOccurrenceNoteRequest { - /** PackageOccurrence name */ + /** GetOccurrenceNoteRequest name */ name?: (string|null); - - /** PackageOccurrence location */ - location?: (grafeas.v1.ILocation[]|null); } - /** Represents a PackageOccurrence. */ - class PackageOccurrence implements IPackageOccurrence { + /** Represents a GetOccurrenceNoteRequest. */ + class GetOccurrenceNoteRequest implements IGetOccurrenceNoteRequest { /** - * Constructs a new PackageOccurrence. + * Constructs a new GetOccurrenceNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IPackageOccurrence); + constructor(properties?: grafeas.v1.IGetOccurrenceNoteRequest); - /** PackageOccurrence name. */ + /** GetOccurrenceNoteRequest name. */ public name: string; - /** PackageOccurrence location. */ - public location: grafeas.v1.ILocation[]; - /** - * Creates a new PackageOccurrence instance using the specified properties. + * Creates a new GetOccurrenceNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PackageOccurrence instance + * @returns GetOccurrenceNoteRequest instance */ - public static create(properties?: grafeas.v1.IPackageOccurrence): grafeas.v1.PackageOccurrence; + public static create(properties?: grafeas.v1.IGetOccurrenceNoteRequest): grafeas.v1.GetOccurrenceNoteRequest; /** - * Encodes the specified PackageOccurrence message. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. - * @param message PackageOccurrence message or plain object to encode + * 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 */ - public static encode(message: grafeas.v1.IPackageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * 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 + * 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 */ - public static encodeDelimited(message: grafeas.v1.IPackageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PackageOccurrence message from the specified reader or buffer. + * 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 PackageOccurrence + * @returns GetOccurrenceNoteRequest * @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.PackageOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.GetOccurrenceNoteRequest; /** - * Decodes a PackageOccurrence message from the specified reader or buffer, length delimited. + * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PackageOccurrence + * @returns GetOccurrenceNoteRequest * @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.PackageOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetOccurrenceNoteRequest; /** - * Verifies a PackageOccurrence message. + * Verifies a GetOccurrenceNoteRequest 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 PackageOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a GetOccurrenceNoteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PackageOccurrence + * @returns GetOccurrenceNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceNoteRequest; /** - * Creates a plain object from a PackageOccurrence message. Also converts values to other types if specified. - * @param message PackageOccurrence + * 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 */ - public static toObject(message: grafeas.v1.PackageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.GetOccurrenceNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PackageOccurrence to JSON. + * Converts this GetOccurrenceNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Version. */ - interface IVersion { - - /** Version epoch */ - epoch?: (number|null); - - /** Version name */ - name?: (string|null); + /** Properties of a ListNotesRequest. */ + interface IListNotesRequest { - /** Version revision */ - revision?: (string|null); + /** ListNotesRequest parent */ + parent?: (string|null); - /** Version inclusive */ - inclusive?: (boolean|null); + /** ListNotesRequest filter */ + filter?: (string|null); - /** Version kind */ - kind?: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind|null); + /** ListNotesRequest pageSize */ + pageSize?: (number|null); - /** Version fullName */ - fullName?: (string|null); + /** ListNotesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a Version. */ - class Version implements IVersion { + /** Represents a ListNotesRequest. */ + class ListNotesRequest implements IListNotesRequest { /** - * Constructs a new Version. + * Constructs a new ListNotesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IVersion); - - /** Version epoch. */ - public epoch: number; - - /** Version name. */ - public name: string; + constructor(properties?: grafeas.v1.IListNotesRequest); - /** Version revision. */ - public revision: string; + /** ListNotesRequest parent. */ + public parent: string; - /** Version inclusive. */ - public inclusive: boolean; + /** ListNotesRequest filter. */ + public filter: string; - /** Version kind. */ - public kind: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind); + /** ListNotesRequest pageSize. */ + public pageSize: number; - /** Version fullName. */ - public fullName: string; + /** ListNotesRequest pageToken. */ + public pageToken: string; /** - * Creates a new Version instance using the specified properties. + * Creates a new ListNotesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Version instance + * @returns ListNotesRequest instance */ - public static create(properties?: grafeas.v1.IVersion): grafeas.v1.Version; + public static create(properties?: grafeas.v1.IListNotesRequest): grafeas.v1.ListNotesRequest; /** - * Encodes the specified Version message. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. - * @param message Version message or plain object to encode + * 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.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * 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 + * 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.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Version message from the specified reader or buffer. + * 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 Version + * @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.Version; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNotesRequest; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes a ListNotesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Version + * @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.Version; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNotesRequest; /** - * Verifies a Version message. + * 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); /** - * Creates a Version 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. * @param object Plain object - * @returns Version + * @returns ListNotesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Version; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesRequest; /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version + * 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.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Version to JSON. + * Converts this ListNotesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Version { - - /** VersionKind enum. */ - enum VersionKind { - VERSION_KIND_UNSPECIFIED = 0, - NORMAL = 1, - MINIMUM = 2, - MAXIMUM = 3 - } - } + /** Properties of a ListNotesResponse. */ + interface IListNotesResponse { - /** Properties of an AttestationNote. */ - interface IAttestationNote { + /** ListNotesResponse notes */ + notes?: (grafeas.v1.INote[]|null); - /** AttestationNote hint */ - hint?: (grafeas.v1.AttestationNote.IHint|null); + /** ListNotesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an AttestationNote. */ - class AttestationNote implements IAttestationNote { + /** Represents a ListNotesResponse. */ + class ListNotesResponse implements IListNotesResponse { /** - * Constructs a new AttestationNote. + * Constructs a new ListNotesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IAttestationNote); + constructor(properties?: grafeas.v1.IListNotesResponse); - /** AttestationNote hint. */ - public hint?: (grafeas.v1.AttestationNote.IHint|null); + /** ListNotesResponse notes. */ + public notes: grafeas.v1.INote[]; + + /** ListNotesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new AttestationNote instance using the specified properties. + * Creates a new ListNotesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AttestationNote instance + * @returns ListNotesResponse instance */ - public static create(properties?: grafeas.v1.IAttestationNote): grafeas.v1.AttestationNote; + public static create(properties?: grafeas.v1.IListNotesResponse): grafeas.v1.ListNotesResponse; /** - * Encodes the specified AttestationNote message. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. - * @param message AttestationNote 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.IAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. - * @param message AttestationNote 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.IAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AttestationNote 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 AttestationNote + * @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.AttestationNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNotesResponse; /** - * Decodes an AttestationNote 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 AttestationNote + * @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.AttestationNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNotesResponse; /** - * Verifies an AttestationNote 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 AttestationNote 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 AttestationNote + * @returns ListNotesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.AttestationNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesResponse; /** - * Creates a plain object from an AttestationNote message. Also converts values to other types if specified. - * @param message AttestationNote + * 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.AttestationNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AttestationNote to JSON. + * Converts this ListNotesResponse to JSON. * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace AttestationNote { - - /** Properties of a Hint. */ - interface IHint { - - /** Hint humanReadableName */ - humanReadableName?: (string|null); - } - - /** Represents a Hint. */ - class Hint implements IHint { - - /** - * Constructs a new Hint. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.AttestationNote.IHint); - - /** Hint humanReadableName. */ - public humanReadableName: string; - - /** - * Creates a new Hint instance using the specified properties. - * @param [properties] Properties to set - * @returns Hint instance - */ - public static create(properties?: grafeas.v1.AttestationNote.IHint): grafeas.v1.AttestationNote.Hint; - - /** - * Encodes the specified Hint message. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. - * @param message Hint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.AttestationNote.IHint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Hint message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. - * @param message Hint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.AttestationNote.IHint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Hint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Hint - * @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.AttestationNote.Hint; - - /** - * Decodes a Hint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Hint - * @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.AttestationNote.Hint; - - /** - * Verifies a Hint 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 Hint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Hint - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.AttestationNote.Hint; - - /** - * Creates a plain object from a Hint message. Also converts values to other types if specified. - * @param message Hint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.AttestationNote.Hint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Hint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a Jwt. */ - interface IJwt { + /** Properties of a DeleteNoteRequest. */ + interface IDeleteNoteRequest { - /** Jwt compactJwt */ - compactJwt?: (string|null); + /** DeleteNoteRequest name */ + name?: (string|null); } - /** Represents a Jwt. */ - class Jwt implements IJwt { + /** Represents a DeleteNoteRequest. */ + class DeleteNoteRequest implements IDeleteNoteRequest { /** - * Constructs a new Jwt. + * Constructs a new DeleteNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IJwt); + constructor(properties?: grafeas.v1.IDeleteNoteRequest); - /** Jwt compactJwt. */ - public compactJwt: string; + /** DeleteNoteRequest name. */ + public name: string; /** - * Creates a new Jwt instance using the specified properties. + * Creates a new DeleteNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Jwt instance + * @returns DeleteNoteRequest instance */ - public static create(properties?: grafeas.v1.IJwt): grafeas.v1.Jwt; + public static create(properties?: grafeas.v1.IDeleteNoteRequest): grafeas.v1.DeleteNoteRequest; /** - * Encodes the specified Jwt message. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. - * @param message Jwt 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.IJwt, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Jwt message, length delimited. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. - * @param message Jwt 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.IJwt, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Jwt 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 Jwt + * @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.Jwt; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeleteNoteRequest; /** - * Decodes a Jwt 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 Jwt + * @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.Jwt; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeleteNoteRequest; /** - * Verifies a Jwt 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 Jwt 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 Jwt + * @returns DeleteNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Jwt; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteNoteRequest; /** - * Creates a plain object from a Jwt message. Also converts values to other types if specified. - * @param message Jwt + * 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.Jwt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DeleteNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Jwt to JSON. + * Converts this DeleteNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AttestationOccurrence. */ - interface IAttestationOccurrence { + /** Properties of a CreateNoteRequest. */ + interface ICreateNoteRequest { - /** AttestationOccurrence serializedPayload */ - serializedPayload?: (Uint8Array|string|null); + /** CreateNoteRequest parent */ + parent?: (string|null); - /** AttestationOccurrence signatures */ - signatures?: (grafeas.v1.ISignature[]|null); + /** CreateNoteRequest noteId */ + noteId?: (string|null); - /** AttestationOccurrence jwts */ - jwts?: (grafeas.v1.IJwt[]|null); + /** CreateNoteRequest note */ + note?: (grafeas.v1.INote|null); } - /** Represents an AttestationOccurrence. */ - class AttestationOccurrence implements IAttestationOccurrence { + /** Represents a CreateNoteRequest. */ + class CreateNoteRequest implements ICreateNoteRequest { /** - * Constructs a new AttestationOccurrence. + * Constructs a new CreateNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IAttestationOccurrence); + constructor(properties?: grafeas.v1.ICreateNoteRequest); - /** AttestationOccurrence serializedPayload. */ - public serializedPayload: (Uint8Array|string); + /** CreateNoteRequest parent. */ + public parent: string; - /** AttestationOccurrence signatures. */ - public signatures: grafeas.v1.ISignature[]; + /** CreateNoteRequest noteId. */ + public noteId: string; - /** AttestationOccurrence jwts. */ - public jwts: grafeas.v1.IJwt[]; + /** CreateNoteRequest note. */ + public note?: (grafeas.v1.INote|null); /** - * Creates a new AttestationOccurrence instance using the specified properties. + * Creates a new CreateNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AttestationOccurrence instance + * @returns CreateNoteRequest instance */ - public static create(properties?: grafeas.v1.IAttestationOccurrence): grafeas.v1.AttestationOccurrence; + public static create(properties?: grafeas.v1.ICreateNoteRequest): grafeas.v1.CreateNoteRequest; /** - * Encodes the specified AttestationOccurrence message. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. - * @param message AttestationOccurrence 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.IAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. - * @param message AttestationOccurrence 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.IAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AttestationOccurrence 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 AttestationOccurrence + * @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.AttestationOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CreateNoteRequest; /** - * Decodes an AttestationOccurrence 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 AttestationOccurrence + * @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.AttestationOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CreateNoteRequest; /** - * Verifies an AttestationOccurrence 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 an AttestationOccurrence 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 AttestationOccurrence + * @returns CreateNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.AttestationOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateNoteRequest; /** - * Creates a plain object from an AttestationOccurrence message. Also converts values to other types if specified. - * @param message AttestationOccurrence + * 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.AttestationOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.CreateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AttestationOccurrence to JSON. + * Converts this CreateNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BuildNote. */ - interface IBuildNote { + /** Properties of an UpdateNoteRequest. */ + interface IUpdateNoteRequest { - /** BuildNote builderVersion */ - builderVersion?: (string|null); + /** UpdateNoteRequest name */ + name?: (string|null); + + /** UpdateNoteRequest note */ + note?: (grafeas.v1.INote|null); + + /** UpdateNoteRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a BuildNote. */ - class BuildNote implements IBuildNote { + /** Represents an UpdateNoteRequest. */ + class UpdateNoteRequest implements IUpdateNoteRequest { /** - * Constructs a new BuildNote. + * Constructs a new UpdateNoteRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBuildNote); + constructor(properties?: grafeas.v1.IUpdateNoteRequest); - /** BuildNote builderVersion. */ - public builderVersion: string; + /** UpdateNoteRequest name. */ + public name: string; + + /** UpdateNoteRequest note. */ + public note?: (grafeas.v1.INote|null); + + /** UpdateNoteRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new BuildNote instance using the specified properties. + * Creates a new UpdateNoteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BuildNote instance + * @returns UpdateNoteRequest instance */ - public static create(properties?: grafeas.v1.IBuildNote): grafeas.v1.BuildNote; + public static create(properties?: grafeas.v1.IUpdateNoteRequest): grafeas.v1.UpdateNoteRequest; /** - * Encodes the specified BuildNote message. Does not implicitly {@link grafeas.v1.BuildNote.verify|verify} messages. - * @param message BuildNote 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.IBuildNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BuildNote message, length delimited. Does not implicitly {@link grafeas.v1.BuildNote.verify|verify} messages. - * @param message BuildNote 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.IBuildNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BuildNote 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 BuildNote + * @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.BuildNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpdateNoteRequest; /** - * Decodes a BuildNote 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 BuildNote + * @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.BuildNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpdateNoteRequest; /** - * Verifies a BuildNote 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 BuildNote 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 BuildNote + * @returns UpdateNoteRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BuildNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateNoteRequest; /** - * Creates a plain object from a BuildNote message. Also converts values to other types if specified. - * @param message BuildNote + * 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.BuildNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpdateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BuildNote to JSON. + * Converts this UpdateNoteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BuildOccurrence. */ - interface IBuildOccurrence { + /** Properties of a ListNoteOccurrencesRequest. */ + interface IListNoteOccurrencesRequest { - /** BuildOccurrence provenance */ - provenance?: (grafeas.v1.IBuildProvenance|null); + /** ListNoteOccurrencesRequest name */ + name?: (string|null); - /** BuildOccurrence provenanceBytes */ - provenanceBytes?: (string|null); + /** ListNoteOccurrencesRequest filter */ + filter?: (string|null); - /** BuildOccurrence intotoProvenance */ - intotoProvenance?: (grafeas.v1.IInTotoProvenance|null); + /** ListNoteOccurrencesRequest pageSize */ + pageSize?: (number|null); - /** BuildOccurrence intotoStatement */ - intotoStatement?: (grafeas.v1.IInTotoStatement|null); + /** ListNoteOccurrencesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a BuildOccurrence. */ - class BuildOccurrence implements IBuildOccurrence { + /** Represents a ListNoteOccurrencesRequest. */ + class ListNoteOccurrencesRequest implements IListNoteOccurrencesRequest { /** - * Constructs a new BuildOccurrence. + * Constructs a new ListNoteOccurrencesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBuildOccurrence); + constructor(properties?: grafeas.v1.IListNoteOccurrencesRequest); - /** BuildOccurrence provenance. */ - public provenance?: (grafeas.v1.IBuildProvenance|null); + /** ListNoteOccurrencesRequest name. */ + public name: string; - /** BuildOccurrence provenanceBytes. */ - public provenanceBytes: string; + /** ListNoteOccurrencesRequest filter. */ + public filter: string; - /** BuildOccurrence intotoProvenance. */ - public intotoProvenance?: (grafeas.v1.IInTotoProvenance|null); + /** ListNoteOccurrencesRequest pageSize. */ + public pageSize: number; - /** BuildOccurrence intotoStatement. */ - public intotoStatement?: (grafeas.v1.IInTotoStatement|null); + /** ListNoteOccurrencesRequest pageToken. */ + public pageToken: string; /** - * Creates a new BuildOccurrence instance using the specified properties. + * Creates a new ListNoteOccurrencesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BuildOccurrence instance + * @returns ListNoteOccurrencesRequest instance */ - public static create(properties?: grafeas.v1.IBuildOccurrence): grafeas.v1.BuildOccurrence; + public static create(properties?: grafeas.v1.IListNoteOccurrencesRequest): grafeas.v1.ListNoteOccurrencesRequest; /** - * Encodes the specified BuildOccurrence message. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. - * @param message BuildOccurrence 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.IBuildOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BuildOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. - * @param message BuildOccurrence 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.IBuildOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BuildOccurrence 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 BuildOccurrence + * @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.BuildOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNoteOccurrencesRequest; /** - * Decodes a BuildOccurrence 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 BuildOccurrence + * @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.BuildOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNoteOccurrencesRequest; /** - * Verifies a BuildOccurrence 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 BuildOccurrence 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 BuildOccurrence + * @returns ListNoteOccurrencesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BuildOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesRequest; /** - * Creates a plain object from a BuildOccurrence message. Also converts values to other types if specified. - * @param message BuildOccurrence + * 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.BuildOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListNoteOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BuildOccurrence to JSON. + * Converts this ListNoteOccurrencesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Recipe. */ - interface IRecipe { - - /** Recipe type */ - type?: (string|null); - - /** Recipe definedInMaterial */ - definedInMaterial?: (number|Long|string|null); - - /** Recipe entryPoint */ - entryPoint?: (string|null); + /** Properties of a ListNoteOccurrencesResponse. */ + interface IListNoteOccurrencesResponse { - /** Recipe arguments */ - "arguments"?: (google.protobuf.IAny[]|null); + /** ListNoteOccurrencesResponse occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); - /** Recipe environment */ - environment?: (google.protobuf.IAny[]|null); + /** ListNoteOccurrencesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a Recipe. */ - class Recipe implements IRecipe { + /** Represents a ListNoteOccurrencesResponse. */ + class ListNoteOccurrencesResponse implements IListNoteOccurrencesResponse { /** - * Constructs a new Recipe. + * Constructs a new ListNoteOccurrencesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IRecipe); - - /** Recipe type. */ - public type: string; - - /** Recipe definedInMaterial. */ - public definedInMaterial: (number|Long|string); - - /** Recipe entryPoint. */ - public entryPoint: string; + constructor(properties?: grafeas.v1.IListNoteOccurrencesResponse); - /** Recipe arguments. */ - public arguments: google.protobuf.IAny[]; + /** ListNoteOccurrencesResponse occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; - /** Recipe environment. */ - public environment: google.protobuf.IAny[]; + /** ListNoteOccurrencesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Recipe instance using the specified properties. + * Creates a new ListNoteOccurrencesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Recipe instance + * @returns ListNoteOccurrencesResponse instance */ - public static create(properties?: grafeas.v1.IRecipe): grafeas.v1.Recipe; + public static create(properties?: grafeas.v1.IListNoteOccurrencesResponse): grafeas.v1.ListNoteOccurrencesResponse; /** - * Encodes the specified Recipe message. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. - * @param message Recipe 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.IRecipe, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Recipe message, length delimited. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. - * @param message Recipe 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.IRecipe, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Recipe 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 Recipe + * @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.Recipe; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ListNoteOccurrencesResponse; /** - * Decodes a Recipe 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 Recipe + * @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.Recipe; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ListNoteOccurrencesResponse; /** - * Verifies a Recipe 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 Recipe 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 Recipe + * @returns ListNoteOccurrencesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Recipe; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesResponse; /** - * Creates a plain object from a Recipe message. Also converts values to other types if specified. - * @param message Recipe + * 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.Recipe, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ListNoteOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Recipe to JSON. + * Converts this ListNoteOccurrencesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Completeness. */ - interface ICompleteness { - - /** Completeness arguments */ - "arguments"?: (boolean|null); + /** Properties of a BatchCreateNotesRequest. */ + interface IBatchCreateNotesRequest { - /** Completeness environment */ - environment?: (boolean|null); + /** BatchCreateNotesRequest parent */ + parent?: (string|null); - /** Completeness materials */ - materials?: (boolean|null); + /** BatchCreateNotesRequest notes */ + notes?: ({ [k: string]: grafeas.v1.INote }|null); } - /** Represents a Completeness. */ - class Completeness implements ICompleteness { + /** Represents a BatchCreateNotesRequest. */ + class BatchCreateNotesRequest implements IBatchCreateNotesRequest { /** - * Constructs a new Completeness. + * Constructs a new BatchCreateNotesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ICompleteness); - - /** Completeness arguments. */ - public arguments: boolean; + constructor(properties?: grafeas.v1.IBatchCreateNotesRequest); - /** Completeness environment. */ - public environment: boolean; + /** BatchCreateNotesRequest parent. */ + public parent: string; - /** Completeness materials. */ - public materials: boolean; + /** BatchCreateNotesRequest notes. */ + public notes: { [k: string]: grafeas.v1.INote }; /** - * Creates a new Completeness instance using the specified properties. + * Creates a new BatchCreateNotesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Completeness instance + * @returns BatchCreateNotesRequest instance */ - public static create(properties?: grafeas.v1.ICompleteness): grafeas.v1.Completeness; + public static create(properties?: grafeas.v1.IBatchCreateNotesRequest): grafeas.v1.BatchCreateNotesRequest; /** - * Encodes the specified Completeness message. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. - * @param message Completeness 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.ICompleteness, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Completeness message, length delimited. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. - * @param message Completeness 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.ICompleteness, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Completeness 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 Completeness + * @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.Completeness; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateNotesRequest; /** - * Decodes a Completeness 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 Completeness + * @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.Completeness; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateNotesRequest; /** - * Verifies a Completeness 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 Completeness 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 Completeness + * @returns BatchCreateNotesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Completeness; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesRequest; /** - * Creates a plain object from a Completeness message. Also converts values to other types if specified. - * @param message Completeness + * 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.Completeness, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Completeness to JSON. + * Converts this BatchCreateNotesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata buildInvocationId */ - buildInvocationId?: (string|null); - - /** Metadata buildStartedOn */ - buildStartedOn?: (google.protobuf.ITimestamp|null); - - /** Metadata buildFinishedOn */ - buildFinishedOn?: (google.protobuf.ITimestamp|null); - - /** Metadata completeness */ - completeness?: (grafeas.v1.ICompleteness|null); + /** Properties of a BatchCreateNotesResponse. */ + interface IBatchCreateNotesResponse { - /** Metadata reproducible */ - reproducible?: (boolean|null); + /** BatchCreateNotesResponse notes */ + notes?: (grafeas.v1.INote[]|null); } - /** Represents a Metadata. */ - class Metadata implements IMetadata { + /** Represents a BatchCreateNotesResponse. */ + class BatchCreateNotesResponse implements IBatchCreateNotesResponse { /** - * Constructs a new Metadata. + * Constructs a new BatchCreateNotesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IMetadata); - - /** Metadata buildInvocationId. */ - public buildInvocationId: string; - - /** Metadata buildStartedOn. */ - public buildStartedOn?: (google.protobuf.ITimestamp|null); - - /** Metadata buildFinishedOn. */ - public buildFinishedOn?: (google.protobuf.ITimestamp|null); - - /** Metadata completeness. */ - public completeness?: (grafeas.v1.ICompleteness|null); + constructor(properties?: grafeas.v1.IBatchCreateNotesResponse); - /** Metadata reproducible. */ - public reproducible: boolean; + /** BatchCreateNotesResponse notes. */ + public notes: grafeas.v1.INote[]; /** - * Creates a new Metadata instance using the specified properties. + * Creates a new BatchCreateNotesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Metadata instance + * @returns BatchCreateNotesResponse instance */ - public static create(properties?: grafeas.v1.IMetadata): grafeas.v1.Metadata; + public static create(properties?: grafeas.v1.IBatchCreateNotesResponse): grafeas.v1.BatchCreateNotesResponse; /** - * Encodes the specified Metadata message. Does not implicitly {@link grafeas.v1.Metadata.verify|verify} messages. - * @param message Metadata 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.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link grafeas.v1.Metadata.verify|verify} messages. - * @param message Metadata 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.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metadata 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 Metadata + * @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.Metadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateNotesResponse; /** - * Decodes a Metadata 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 Metadata + * @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.Metadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateNotesResponse; /** - * Verifies a Metadata 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 a Metadata 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 Metadata + * @returns BatchCreateNotesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Metadata; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesResponse; /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata + * 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.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metadata to JSON. + * Converts this BatchCreateNotesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BuilderConfig. */ - interface IBuilderConfig { + /** Properties of a BatchCreateOccurrencesRequest. */ + interface IBatchCreateOccurrencesRequest { - /** BuilderConfig id */ - id?: (string|null); + /** BatchCreateOccurrencesRequest parent */ + parent?: (string|null); + + /** BatchCreateOccurrencesRequest occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); } - /** Represents a BuilderConfig. */ - class BuilderConfig implements IBuilderConfig { + /** Represents a BatchCreateOccurrencesRequest. */ + class BatchCreateOccurrencesRequest implements IBatchCreateOccurrencesRequest { /** - * Constructs a new BuilderConfig. + * Constructs a new BatchCreateOccurrencesRequest. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBuilderConfig); + constructor(properties?: grafeas.v1.IBatchCreateOccurrencesRequest); - /** BuilderConfig id. */ - public id: string; + /** BatchCreateOccurrencesRequest parent. */ + public parent: string; + + /** BatchCreateOccurrencesRequest occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; /** - * Creates a new BuilderConfig instance using the specified properties. + * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BuilderConfig instance + * @returns BatchCreateOccurrencesRequest instance */ - public static create(properties?: grafeas.v1.IBuilderConfig): grafeas.v1.BuilderConfig; + public static create(properties?: grafeas.v1.IBatchCreateOccurrencesRequest): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Encodes the specified BuilderConfig message. Does not implicitly {@link grafeas.v1.BuilderConfig.verify|verify} messages. - * @param message BuilderConfig 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.IBuilderConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BuilderConfig message, length delimited. Does not implicitly {@link grafeas.v1.BuilderConfig.verify|verify} messages. - * @param message BuilderConfig 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.IBuilderConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BuilderConfig 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 BuilderConfig + * @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.BuilderConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Decodes a BuilderConfig 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 BuilderConfig + * @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.BuilderConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Verifies a BuilderConfig 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 BuilderConfig 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 BuilderConfig + * @returns BatchCreateOccurrencesRequest */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BuilderConfig; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesRequest; /** - * Creates a plain object from a BuilderConfig message. Also converts values to other types if specified. - * @param message BuilderConfig + * 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.BuilderConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BuilderConfig to JSON. + * Converts this BatchCreateOccurrencesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an InTotoProvenance. */ - interface IInTotoProvenance { - - /** InTotoProvenance builderConfig */ - builderConfig?: (grafeas.v1.IBuilderConfig|null); - - /** InTotoProvenance recipe */ - recipe?: (grafeas.v1.IRecipe|null); - - /** InTotoProvenance metadata */ - metadata?: (grafeas.v1.IMetadata|null); + /** Properties of a BatchCreateOccurrencesResponse. */ + interface IBatchCreateOccurrencesResponse { - /** InTotoProvenance materials */ - materials?: (string[]|null); + /** BatchCreateOccurrencesResponse occurrences */ + occurrences?: (grafeas.v1.IOccurrence[]|null); } - /** Represents an InTotoProvenance. */ - class InTotoProvenance implements IInTotoProvenance { + /** Represents a BatchCreateOccurrencesResponse. */ + class BatchCreateOccurrencesResponse implements IBatchCreateOccurrencesResponse { /** - * Constructs a new InTotoProvenance. + * Constructs a new BatchCreateOccurrencesResponse. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IInTotoProvenance); - - /** InTotoProvenance builderConfig. */ - public builderConfig?: (grafeas.v1.IBuilderConfig|null); - - /** InTotoProvenance recipe. */ - public recipe?: (grafeas.v1.IRecipe|null); - - /** InTotoProvenance metadata. */ - public metadata?: (grafeas.v1.IMetadata|null); + constructor(properties?: grafeas.v1.IBatchCreateOccurrencesResponse); - /** InTotoProvenance materials. */ - public materials: string[]; + /** BatchCreateOccurrencesResponse occurrences. */ + public occurrences: grafeas.v1.IOccurrence[]; /** - * Creates a new InTotoProvenance instance using the specified properties. + * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns InTotoProvenance instance + * @returns BatchCreateOccurrencesResponse instance */ - public static create(properties?: grafeas.v1.IInTotoProvenance): grafeas.v1.InTotoProvenance; + public static create(properties?: grafeas.v1.IBatchCreateOccurrencesResponse): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Encodes the specified InTotoProvenance message. Does not implicitly {@link grafeas.v1.InTotoProvenance.verify|verify} messages. - * @param message InTotoProvenance 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.IInTotoProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InTotoProvenance message, length delimited. Does not implicitly {@link grafeas.v1.InTotoProvenance.verify|verify} messages. - * @param message InTotoProvenance 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.IInTotoProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InTotoProvenance 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 InTotoProvenance + * @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.InTotoProvenance; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Decodes an InTotoProvenance 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 InTotoProvenance + * @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.InTotoProvenance; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Verifies an InTotoProvenance 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 an InTotoProvenance 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 InTotoProvenance + * @returns BatchCreateOccurrencesResponse */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.InTotoProvenance; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesResponse; /** - * Creates a plain object from an InTotoProvenance message. Also converts values to other types if specified. - * @param message InTotoProvenance + * 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.InTotoProvenance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BatchCreateOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InTotoProvenance to JSON. + * Converts this BatchCreateOccurrencesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of an InTotoStatement. */ - interface IInTotoStatement { - - /** InTotoStatement type */ - type?: (string|null); - - /** InTotoStatement subject */ - subject?: (grafeas.v1.ISubject[]|null); - - /** InTotoStatement predicateType */ - predicateType?: (string|null); - - /** InTotoStatement provenance */ - provenance?: (grafeas.v1.IInTotoProvenance|null); - - /** InTotoStatement slsaProvenance */ - slsaProvenance?: (grafeas.v1.ISlsaProvenance|null); - } - - /** Represents an InTotoStatement. */ - class InTotoStatement implements IInTotoStatement { - - /** - * Constructs a new InTotoStatement. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IInTotoStatement); - - /** InTotoStatement type. */ - public type: string; + } - /** InTotoStatement subject. */ - public subject: grafeas.v1.ISubject[]; + /** Properties of an AttestationNote. */ + interface IAttestationNote { - /** InTotoStatement predicateType. */ - public predicateType: string; + /** AttestationNote hint */ + hint?: (grafeas.v1.AttestationNote.IHint|null); + } - /** InTotoStatement provenance. */ - public provenance?: (grafeas.v1.IInTotoProvenance|null); + /** Represents an AttestationNote. */ + class AttestationNote implements IAttestationNote { - /** InTotoStatement slsaProvenance. */ - public slsaProvenance?: (grafeas.v1.ISlsaProvenance|null); + /** + * Constructs a new AttestationNote. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IAttestationNote); - /** InTotoStatement predicate. */ - public predicate?: ("provenance"|"slsaProvenance"); + /** AttestationNote hint. */ + public hint?: (grafeas.v1.AttestationNote.IHint|null); /** - * Creates a new InTotoStatement instance using the specified properties. + * Creates a new AttestationNote instance using the specified properties. * @param [properties] Properties to set - * @returns InTotoStatement instance + * @returns AttestationNote instance */ - public static create(properties?: grafeas.v1.IInTotoStatement): grafeas.v1.InTotoStatement; + public static create(properties?: grafeas.v1.IAttestationNote): grafeas.v1.AttestationNote; /** - * Encodes the specified InTotoStatement message. Does not implicitly {@link grafeas.v1.InTotoStatement.verify|verify} messages. - * @param message InTotoStatement message or plain object to encode + * Encodes the specified AttestationNote message. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. + * @param message AttestationNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IInTotoStatement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InTotoStatement message, length delimited. Does not implicitly {@link grafeas.v1.InTotoStatement.verify|verify} messages. - * @param message InTotoStatement message or plain object to encode + * Encodes the specified AttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. + * @param message AttestationNote message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IInTotoStatement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InTotoStatement message from the specified reader or buffer. + * Decodes an AttestationNote message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InTotoStatement + * @returns AttestationNote * @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.InTotoStatement; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.AttestationNote; /** - * Decodes an InTotoStatement message from the specified reader or buffer, length delimited. + * Decodes an AttestationNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InTotoStatement + * @returns AttestationNote * @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.InTotoStatement; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.AttestationNote; /** - * Verifies an InTotoStatement message. + * Verifies an AttestationNote 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 InTotoStatement message from a plain object. Also converts values to their respective internal types. + * Creates an AttestationNote message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InTotoStatement + * @returns AttestationNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.InTotoStatement; + public static fromObject(object: { [k: string]: any }): grafeas.v1.AttestationNote; /** - * Creates a plain object from an InTotoStatement message. Also converts values to other types if specified. - * @param message InTotoStatement + * Creates a plain object from an AttestationNote message. Also converts values to other types if specified. + * @param message AttestationNote * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.InTotoStatement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.AttestationNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InTotoStatement to JSON. + * Converts this AttestationNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Subject. */ - interface ISubject { + namespace AttestationNote { - /** Subject name */ - name?: (string|null); + /** Properties of a Hint. */ + interface IHint { - /** Subject digest */ - digest?: ({ [k: string]: string }|null); + /** Hint humanReadableName */ + humanReadableName?: (string|null); + } + + /** Represents a Hint. */ + class Hint implements IHint { + + /** + * Constructs a new Hint. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.AttestationNote.IHint); + + /** Hint humanReadableName. */ + public humanReadableName: string; + + /** + * Creates a new Hint instance using the specified properties. + * @param [properties] Properties to set + * @returns Hint instance + */ + public static create(properties?: grafeas.v1.AttestationNote.IHint): grafeas.v1.AttestationNote.Hint; + + /** + * Encodes the specified Hint message. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. + * @param message Hint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.AttestationNote.IHint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Hint message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. + * @param message Hint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.AttestationNote.IHint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Hint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Hint + * @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.AttestationNote.Hint; + + /** + * Decodes a Hint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Hint + * @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.AttestationNote.Hint; + + /** + * Verifies a Hint 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 Hint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Hint + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.AttestationNote.Hint; + + /** + * Creates a plain object from a Hint message. Also converts values to other types if specified. + * @param message Hint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.AttestationNote.Hint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Hint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a Subject. */ - class Subject implements ISubject { + /** Properties of a Jwt. */ + interface IJwt { + + /** Jwt compactJwt */ + compactJwt?: (string|null); + } + + /** Represents a Jwt. */ + class Jwt implements IJwt { /** - * Constructs a new Subject. + * Constructs a new Jwt. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ISubject); - - /** Subject name. */ - public name: string; + constructor(properties?: grafeas.v1.IJwt); - /** Subject digest. */ - public digest: { [k: string]: string }; + /** Jwt compactJwt. */ + public compactJwt: string; /** - * Creates a new Subject instance using the specified properties. + * Creates a new Jwt instance using the specified properties. * @param [properties] Properties to set - * @returns Subject instance + * @returns Jwt instance */ - public static create(properties?: grafeas.v1.ISubject): grafeas.v1.Subject; + public static create(properties?: grafeas.v1.IJwt): grafeas.v1.Jwt; /** - * Encodes the specified Subject message. Does not implicitly {@link grafeas.v1.Subject.verify|verify} messages. - * @param message Subject message or plain object to encode + * Encodes the specified Jwt message. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. + * @param message Jwt message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IJwt, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Subject message, length delimited. Does not implicitly {@link grafeas.v1.Subject.verify|verify} messages. - * @param message Subject message or plain object to encode + * Encodes the specified Jwt message, length delimited. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. + * @param message Jwt message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IJwt, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Subject message from the specified reader or buffer. + * Decodes a Jwt message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Subject + * @returns Jwt * @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.Subject; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Jwt; /** - * Decodes a Subject message from the specified reader or buffer, length delimited. + * Decodes a Jwt message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Subject + * @returns Jwt * @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.Subject; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Jwt; /** - * Verifies a Subject message. + * Verifies a Jwt 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 Subject message from a plain object. Also converts values to their respective internal types. + * Creates a Jwt message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Subject + * @returns Jwt */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Subject; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Jwt; /** - * Creates a plain object from a Subject message. Also converts values to other types if specified. - * @param message Subject + * Creates a plain object from a Jwt message. Also converts values to other types if specified. + * @param message Jwt * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Jwt, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Subject to JSON. + * Converts this Jwt to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SlsaProvenance. */ - interface ISlsaProvenance { - - /** SlsaProvenance builder */ - builder?: (grafeas.v1.SlsaProvenance.ISlsaBuilder|null); + /** Properties of an AttestationOccurrence. */ + interface IAttestationOccurrence { - /** SlsaProvenance recipe */ - recipe?: (grafeas.v1.SlsaProvenance.ISlsaRecipe|null); + /** AttestationOccurrence serializedPayload */ + serializedPayload?: (Uint8Array|string|null); - /** SlsaProvenance metadata */ - metadata?: (grafeas.v1.SlsaProvenance.ISlsaMetadata|null); + /** AttestationOccurrence signatures */ + signatures?: (grafeas.v1.ISignature[]|null); - /** SlsaProvenance materials */ - materials?: (grafeas.v1.SlsaProvenance.IMaterial[]|null); + /** AttestationOccurrence jwts */ + jwts?: (grafeas.v1.IJwt[]|null); } - /** Represents a SlsaProvenance. */ - class SlsaProvenance implements ISlsaProvenance { + /** Represents an AttestationOccurrence. */ + class AttestationOccurrence implements IAttestationOccurrence { /** - * Constructs a new SlsaProvenance. + * Constructs a new AttestationOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ISlsaProvenance); - - /** SlsaProvenance builder. */ - public builder?: (grafeas.v1.SlsaProvenance.ISlsaBuilder|null); + constructor(properties?: grafeas.v1.IAttestationOccurrence); - /** SlsaProvenance recipe. */ - public recipe?: (grafeas.v1.SlsaProvenance.ISlsaRecipe|null); + /** AttestationOccurrence serializedPayload. */ + public serializedPayload: (Uint8Array|string); - /** SlsaProvenance metadata. */ - public metadata?: (grafeas.v1.SlsaProvenance.ISlsaMetadata|null); + /** AttestationOccurrence signatures. */ + public signatures: grafeas.v1.ISignature[]; - /** SlsaProvenance materials. */ - public materials: grafeas.v1.SlsaProvenance.IMaterial[]; + /** AttestationOccurrence jwts. */ + public jwts: grafeas.v1.IJwt[]; /** - * Creates a new SlsaProvenance instance using the specified properties. + * Creates a new AttestationOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns SlsaProvenance instance + * @returns AttestationOccurrence instance */ - public static create(properties?: grafeas.v1.ISlsaProvenance): grafeas.v1.SlsaProvenance; + public static create(properties?: grafeas.v1.IAttestationOccurrence): grafeas.v1.AttestationOccurrence; /** - * Encodes the specified SlsaProvenance message. Does not implicitly {@link grafeas.v1.SlsaProvenance.verify|verify} messages. - * @param message SlsaProvenance message or plain object to encode + * Encodes the specified AttestationOccurrence message. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. + * @param message AttestationOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ISlsaProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SlsaProvenance message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.verify|verify} messages. - * @param message SlsaProvenance message or plain object to encode + * Encodes the specified AttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. + * @param message AttestationOccurrence message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ISlsaProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SlsaProvenance message from the specified reader or buffer. + * Decodes an AttestationOccurrence message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SlsaProvenance + * @returns AttestationOccurrence * @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.SlsaProvenance; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.AttestationOccurrence; /** - * Decodes a SlsaProvenance message from the specified reader or buffer, length delimited. + * Decodes an AttestationOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SlsaProvenance + * @returns AttestationOccurrence * @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.SlsaProvenance; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.AttestationOccurrence; /** - * Verifies a SlsaProvenance message. + * Verifies an AttestationOccurrence 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 SlsaProvenance message from a plain object. Also converts values to their respective internal types. + * Creates an AttestationOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SlsaProvenance + * @returns AttestationOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance; + public static fromObject(object: { [k: string]: any }): grafeas.v1.AttestationOccurrence; /** - * Creates a plain object from a SlsaProvenance message. Also converts values to other types if specified. - * @param message SlsaProvenance + * Creates a plain object from an AttestationOccurrence message. Also converts values to other types if specified. + * @param message AttestationOccurrence * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.SlsaProvenance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.AttestationOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SlsaProvenance to JSON. + * Converts this AttestationOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - namespace SlsaProvenance { - - /** Properties of a SlsaRecipe. */ - interface ISlsaRecipe { - - /** SlsaRecipe type */ - type?: (string|null); - - /** SlsaRecipe definedInMaterial */ - definedInMaterial?: (number|Long|string|null); - - /** SlsaRecipe entryPoint */ - entryPoint?: (string|null); - - /** SlsaRecipe arguments */ - "arguments"?: (google.protobuf.IAny|null); - - /** SlsaRecipe environment */ - environment?: (google.protobuf.IAny|null); - } - - /** Represents a SlsaRecipe. */ - class SlsaRecipe implements ISlsaRecipe { - - /** - * Constructs a new SlsaRecipe. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaRecipe); - - /** SlsaRecipe type. */ - public type: string; - - /** SlsaRecipe definedInMaterial. */ - public definedInMaterial: (number|Long|string); - - /** SlsaRecipe entryPoint. */ - public entryPoint: string; - - /** SlsaRecipe arguments. */ - public arguments?: (google.protobuf.IAny|null); - - /** SlsaRecipe environment. */ - public environment?: (google.protobuf.IAny|null); - - /** - * Creates a new SlsaRecipe instance using the specified properties. - * @param [properties] Properties to set - * @returns SlsaRecipe instance - */ - public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaRecipe): grafeas.v1.SlsaProvenance.SlsaRecipe; - - /** - * Encodes the specified SlsaRecipe message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. - * @param message SlsaRecipe message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.SlsaProvenance.ISlsaRecipe, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SlsaRecipe message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. - * @param message SlsaRecipe message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaRecipe, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SlsaRecipe message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SlsaRecipe - * @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.SlsaProvenance.SlsaRecipe; - - /** - * Decodes a SlsaRecipe message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SlsaRecipe - * @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.SlsaProvenance.SlsaRecipe; - - /** - * Verifies a SlsaRecipe 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 SlsaRecipe message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SlsaRecipe - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaRecipe; - - /** - * Creates a plain object from a SlsaRecipe message. Also converts values to other types if specified. - * @param message SlsaRecipe - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.SlsaProvenance.SlsaRecipe, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SlsaRecipe to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SlsaCompleteness. */ - interface ISlsaCompleteness { - - /** SlsaCompleteness arguments */ - "arguments"?: (boolean|null); - - /** SlsaCompleteness environment */ - environment?: (boolean|null); - - /** SlsaCompleteness materials */ - materials?: (boolean|null); - } - - /** Represents a SlsaCompleteness. */ - class SlsaCompleteness implements ISlsaCompleteness { - - /** - * Constructs a new SlsaCompleteness. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaCompleteness); - - /** SlsaCompleteness arguments. */ - public arguments: boolean; - - /** SlsaCompleteness environment. */ - public environment: boolean; - - /** SlsaCompleteness materials. */ - public materials: boolean; - - /** - * Creates a new SlsaCompleteness instance using the specified properties. - * @param [properties] Properties to set - * @returns SlsaCompleteness instance - */ - public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaCompleteness): grafeas.v1.SlsaProvenance.SlsaCompleteness; - - /** - * Encodes the specified SlsaCompleteness message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. - * @param message SlsaCompleteness message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.SlsaProvenance.ISlsaCompleteness, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SlsaCompleteness message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. - * @param message SlsaCompleteness message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaCompleteness, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SlsaCompleteness message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SlsaCompleteness - * @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.SlsaProvenance.SlsaCompleteness; - - /** - * Decodes a SlsaCompleteness message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SlsaCompleteness - * @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.SlsaProvenance.SlsaCompleteness; + } - /** - * Verifies a SlsaCompleteness 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 BuildNote. */ + interface IBuildNote { - /** - * Creates a SlsaCompleteness message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SlsaCompleteness - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaCompleteness; + /** BuildNote builderVersion */ + builderVersion?: (string|null); + } - /** - * Creates a plain object from a SlsaCompleteness message. Also converts values to other types if specified. - * @param message SlsaCompleteness - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.SlsaProvenance.SlsaCompleteness, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a BuildNote. */ + class BuildNote implements IBuildNote { - /** - * Converts this SlsaCompleteness to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new BuildNote. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IBuildNote); - /** Properties of a SlsaMetadata. */ - interface ISlsaMetadata { + /** BuildNote builderVersion. */ + public builderVersion: string; - /** SlsaMetadata buildInvocationId */ - buildInvocationId?: (string|null); + /** + * Creates a new BuildNote instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildNote instance + */ + public static create(properties?: grafeas.v1.IBuildNote): grafeas.v1.BuildNote; - /** SlsaMetadata buildStartedOn */ - buildStartedOn?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified BuildNote message. Does not implicitly {@link grafeas.v1.BuildNote.verify|verify} messages. + * @param message BuildNote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IBuildNote, writer?: $protobuf.Writer): $protobuf.Writer; - /** SlsaMetadata buildFinishedOn */ - buildFinishedOn?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified BuildNote message, length delimited. Does not implicitly {@link grafeas.v1.BuildNote.verify|verify} messages. + * @param message BuildNote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IBuildNote, writer?: $protobuf.Writer): $protobuf.Writer; - /** SlsaMetadata completeness */ - completeness?: (grafeas.v1.SlsaProvenance.ISlsaCompleteness|null); + /** + * Decodes a BuildNote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildNote + * @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.BuildNote; - /** SlsaMetadata reproducible */ - reproducible?: (boolean|null); - } + /** + * Decodes a BuildNote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildNote + * @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.BuildNote; - /** Represents a SlsaMetadata. */ - class SlsaMetadata implements ISlsaMetadata { + /** + * Verifies a BuildNote 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); - /** - * Constructs a new SlsaMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaMetadata); + /** + * Creates a BuildNote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildNote + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.BuildNote; - /** SlsaMetadata buildInvocationId. */ - public buildInvocationId: string; + /** + * Creates a plain object from a BuildNote message. Also converts values to other types if specified. + * @param message BuildNote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.BuildNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SlsaMetadata buildStartedOn. */ - public buildStartedOn?: (google.protobuf.ITimestamp|null); + /** + * Converts this BuildNote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** SlsaMetadata buildFinishedOn. */ - public buildFinishedOn?: (google.protobuf.ITimestamp|null); + /** Properties of a BuildOccurrence. */ + interface IBuildOccurrence { - /** SlsaMetadata completeness. */ - public completeness?: (grafeas.v1.SlsaProvenance.ISlsaCompleteness|null); + /** BuildOccurrence provenance */ + provenance?: (grafeas.v1.IBuildProvenance|null); - /** SlsaMetadata reproducible. */ - public reproducible: boolean; + /** BuildOccurrence provenanceBytes */ + provenanceBytes?: (string|null); - /** - * Creates a new SlsaMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns SlsaMetadata instance - */ - public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaMetadata): grafeas.v1.SlsaProvenance.SlsaMetadata; + /** BuildOccurrence intotoProvenance */ + intotoProvenance?: (grafeas.v1.IInTotoProvenance|null); - /** - * Encodes the specified SlsaMetadata message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. - * @param message SlsaMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.SlsaProvenance.ISlsaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** BuildOccurrence intotoStatement */ + intotoStatement?: (grafeas.v1.IInTotoStatement|null); + } - /** - * Encodes the specified SlsaMetadata message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. - * @param message SlsaMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a BuildOccurrence. */ + class BuildOccurrence implements IBuildOccurrence { - /** - * Decodes a SlsaMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SlsaMetadata - * @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.SlsaProvenance.SlsaMetadata; + /** + * Constructs a new BuildOccurrence. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IBuildOccurrence); - /** - * Decodes a SlsaMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SlsaMetadata - * @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.SlsaProvenance.SlsaMetadata; + /** BuildOccurrence provenance. */ + public provenance?: (grafeas.v1.IBuildProvenance|null); - /** - * Verifies a SlsaMetadata 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); + /** BuildOccurrence provenanceBytes. */ + public provenanceBytes: string; - /** - * Creates a SlsaMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SlsaMetadata - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaMetadata; + /** BuildOccurrence intotoProvenance. */ + public intotoProvenance?: (grafeas.v1.IInTotoProvenance|null); - /** - * Creates a plain object from a SlsaMetadata message. Also converts values to other types if specified. - * @param message SlsaMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.SlsaProvenance.SlsaMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** BuildOccurrence intotoStatement. */ + public intotoStatement?: (grafeas.v1.IInTotoStatement|null); - /** - * Converts this SlsaMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new BuildOccurrence instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildOccurrence instance + */ + public static create(properties?: grafeas.v1.IBuildOccurrence): grafeas.v1.BuildOccurrence; - /** Properties of a SlsaBuilder. */ - interface ISlsaBuilder { + /** + * Encodes the specified BuildOccurrence message. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. + * @param message BuildOccurrence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IBuildOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; - /** SlsaBuilder id */ - id?: (string|null); - } + /** + * Encodes the specified BuildOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. + * @param message BuildOccurrence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IBuildOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a SlsaBuilder. */ - class SlsaBuilder implements ISlsaBuilder { + /** + * Decodes a BuildOccurrence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildOccurrence + * @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.BuildOccurrence; - /** - * Constructs a new SlsaBuilder. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaBuilder); + /** + * Decodes a BuildOccurrence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildOccurrence + * @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.BuildOccurrence; - /** SlsaBuilder id. */ - public id: string; + /** + * Verifies a BuildOccurrence 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 new SlsaBuilder instance using the specified properties. - * @param [properties] Properties to set - * @returns SlsaBuilder instance - */ - public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaBuilder): grafeas.v1.SlsaProvenance.SlsaBuilder; + /** + * Creates a BuildOccurrence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildOccurrence + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.BuildOccurrence; - /** - * Encodes the specified SlsaBuilder message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. - * @param message SlsaBuilder message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.SlsaProvenance.ISlsaBuilder, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a BuildOccurrence message. Also converts values to other types if specified. + * @param message BuildOccurrence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.BuildOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified SlsaBuilder message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. - * @param message SlsaBuilder message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaBuilder, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this BuildOccurrence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a SlsaBuilder message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SlsaBuilder - * @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.SlsaProvenance.SlsaBuilder; + /** Properties of a Recipe. */ + interface IRecipe { - /** - * Decodes a SlsaBuilder message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SlsaBuilder - * @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.SlsaProvenance.SlsaBuilder; + /** Recipe type */ + type?: (string|null); - /** - * Verifies a SlsaBuilder 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); + /** Recipe definedInMaterial */ + definedInMaterial?: (number|Long|string|null); - /** - * Creates a SlsaBuilder message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SlsaBuilder - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaBuilder; + /** Recipe entryPoint */ + entryPoint?: (string|null); - /** - * Creates a plain object from a SlsaBuilder message. Also converts values to other types if specified. - * @param message SlsaBuilder - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.SlsaProvenance.SlsaBuilder, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Recipe arguments */ + "arguments"?: (google.protobuf.IAny[]|null); - /** - * Converts this SlsaBuilder to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Recipe environment */ + environment?: (google.protobuf.IAny[]|null); + } - /** Properties of a Material. */ - interface IMaterial { + /** Represents a Recipe. */ + class Recipe implements IRecipe { - /** Material uri */ - uri?: (string|null); + /** + * Constructs a new Recipe. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IRecipe); - /** Material digest */ - digest?: ({ [k: string]: string }|null); - } + /** Recipe type. */ + public type: string; - /** Represents a Material. */ - class Material implements IMaterial { + /** Recipe definedInMaterial. */ + public definedInMaterial: (number|Long|string); - /** - * Constructs a new Material. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.SlsaProvenance.IMaterial); + /** Recipe entryPoint. */ + public entryPoint: string; - /** Material uri. */ - public uri: string; + /** Recipe arguments. */ + public arguments: google.protobuf.IAny[]; - /** Material digest. */ - public digest: { [k: string]: string }; + /** Recipe environment. */ + public environment: google.protobuf.IAny[]; - /** - * Creates a new Material instance using the specified properties. - * @param [properties] Properties to set - * @returns Material instance - */ - public static create(properties?: grafeas.v1.SlsaProvenance.IMaterial): grafeas.v1.SlsaProvenance.Material; + /** + * Creates a new Recipe instance using the specified properties. + * @param [properties] Properties to set + * @returns Recipe instance + */ + public static create(properties?: grafeas.v1.IRecipe): grafeas.v1.Recipe; - /** - * Encodes the specified Material message. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. - * @param message Material message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.SlsaProvenance.IMaterial, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Recipe message. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. + * @param message Recipe message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.IRecipe, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Material message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. - * @param message Material message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.SlsaProvenance.IMaterial, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Recipe message, length delimited. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. + * @param message Recipe message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.IRecipe, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Material message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Material - * @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.SlsaProvenance.Material; + /** + * Decodes a Recipe message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Recipe + * @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.Recipe; - /** - * Decodes a Material message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Material - * @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.SlsaProvenance.Material; + /** + * Decodes a Recipe message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Recipe + * @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.Recipe; - /** - * Verifies a Material 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 Recipe 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 Material message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Material - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.Material; + /** + * Creates a Recipe message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Recipe + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.Recipe; - /** - * Creates a plain object from a Material message. Also converts values to other types if specified. - * @param message Material - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.SlsaProvenance.Material, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Recipe message. Also converts values to other types if specified. + * @param message Recipe + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.Recipe, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Material to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this Recipe to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a BuildProvenance. */ - interface IBuildProvenance { + /** Properties of a Completeness. */ + interface ICompleteness { - /** BuildProvenance id */ - id?: (string|null); + /** Completeness arguments */ + "arguments"?: (boolean|null); - /** BuildProvenance projectId */ - projectId?: (string|null); + /** Completeness environment */ + environment?: (boolean|null); - /** BuildProvenance commands */ - commands?: (grafeas.v1.ICommand[]|null); + /** Completeness materials */ + materials?: (boolean|null); + } - /** BuildProvenance builtArtifacts */ - builtArtifacts?: (grafeas.v1.IArtifact[]|null); + /** Represents a Completeness. */ + class Completeness implements ICompleteness { - /** BuildProvenance createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new Completeness. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.ICompleteness); - /** BuildProvenance startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** Completeness arguments. */ + public arguments: boolean; - /** BuildProvenance endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Completeness environment. */ + public environment: boolean; - /** BuildProvenance creator */ - creator?: (string|null); + /** Completeness materials. */ + public materials: boolean; - /** BuildProvenance logsUri */ - logsUri?: (string|null); + /** + * Creates a new Completeness instance using the specified properties. + * @param [properties] Properties to set + * @returns Completeness instance + */ + public static create(properties?: grafeas.v1.ICompleteness): grafeas.v1.Completeness; - /** BuildProvenance sourceProvenance */ - sourceProvenance?: (grafeas.v1.ISource|null); + /** + * Encodes the specified Completeness message. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. + * @param message Completeness message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.ICompleteness, writer?: $protobuf.Writer): $protobuf.Writer; - /** BuildProvenance triggerId */ - triggerId?: (string|null); + /** + * Encodes the specified Completeness message, length delimited. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. + * @param message Completeness message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.ICompleteness, writer?: $protobuf.Writer): $protobuf.Writer; - /** BuildProvenance buildOptions */ - buildOptions?: ({ [k: string]: string }|null); + /** + * Decodes a Completeness message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Completeness + * @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.Completeness; - /** BuildProvenance builderVersion */ - builderVersion?: (string|null); - } + /** + * Decodes a Completeness message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Completeness + * @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.Completeness; - /** Represents a BuildProvenance. */ - class BuildProvenance implements IBuildProvenance { + /** + * Verifies a Completeness 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); /** - * Constructs a new BuildProvenance. - * @param [properties] Properties to set + * Creates a Completeness message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Completeness */ - constructor(properties?: grafeas.v1.IBuildProvenance); + public static fromObject(object: { [k: string]: any }): grafeas.v1.Completeness; - /** BuildProvenance id. */ - public id: string; + /** + * Creates a plain object from a Completeness message. Also converts values to other types if specified. + * @param message Completeness + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.Completeness, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** BuildProvenance projectId. */ - public projectId: string; + /** + * Converts this Completeness to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** BuildProvenance commands. */ - public commands: grafeas.v1.ICommand[]; + /** Properties of a Metadata. */ + interface IMetadata { - /** BuildProvenance builtArtifacts. */ - public builtArtifacts: grafeas.v1.IArtifact[]; + /** Metadata buildInvocationId */ + buildInvocationId?: (string|null); - /** BuildProvenance createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Metadata buildStartedOn */ + buildStartedOn?: (google.protobuf.ITimestamp|null); - /** BuildProvenance startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** Metadata buildFinishedOn */ + buildFinishedOn?: (google.protobuf.ITimestamp|null); - /** BuildProvenance endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** Metadata completeness */ + completeness?: (grafeas.v1.ICompleteness|null); - /** BuildProvenance creator. */ - public creator: string; + /** Metadata reproducible */ + reproducible?: (boolean|null); + } - /** BuildProvenance logsUri. */ - public logsUri: string; + /** Represents a Metadata. */ + class Metadata implements IMetadata { - /** BuildProvenance sourceProvenance. */ - public sourceProvenance?: (grafeas.v1.ISource|null); + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.IMetadata); - /** BuildProvenance triggerId. */ - public triggerId: string; + /** Metadata buildInvocationId. */ + public buildInvocationId: string; - /** BuildProvenance buildOptions. */ - public buildOptions: { [k: string]: string }; + /** Metadata buildStartedOn. */ + public buildStartedOn?: (google.protobuf.ITimestamp|null); - /** BuildProvenance builderVersion. */ - public builderVersion: string; + /** Metadata buildFinishedOn. */ + public buildFinishedOn?: (google.protobuf.ITimestamp|null); + + /** Metadata completeness. */ + public completeness?: (grafeas.v1.ICompleteness|null); + + /** Metadata reproducible. */ + public reproducible: boolean; /** - * Creates a new BuildProvenance instance using the specified properties. + * Creates a new Metadata instance using the specified properties. * @param [properties] Properties to set - * @returns BuildProvenance instance + * @returns Metadata instance */ - public static create(properties?: grafeas.v1.IBuildProvenance): grafeas.v1.BuildProvenance; + public static create(properties?: grafeas.v1.IMetadata): grafeas.v1.Metadata; /** - * Encodes the specified BuildProvenance message. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. - * @param message BuildProvenance message or plain object to encode + * Encodes the specified Metadata message. Does not implicitly {@link grafeas.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IBuildProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BuildProvenance message, length delimited. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. - * @param message BuildProvenance message or plain object to encode + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link grafeas.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IBuildProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BuildProvenance message from the specified reader or buffer. + * Decodes a Metadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BuildProvenance + * @returns Metadata * @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.BuildProvenance; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Metadata; /** - * Decodes a BuildProvenance message from the specified reader or buffer, length delimited. + * Decodes a Metadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BuildProvenance + * @returns Metadata * @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.BuildProvenance; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Metadata; /** - * Verifies a BuildProvenance message. + * Verifies a Metadata 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 BuildProvenance message from a plain object. Also converts values to their respective internal types. + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BuildProvenance + * @returns Metadata */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BuildProvenance; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Metadata; /** - * Creates a plain object from a BuildProvenance message. Also converts values to other types if specified. - * @param message BuildProvenance + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.BuildProvenance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BuildProvenance to JSON. + * Converts this Metadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Source. */ - interface ISource { - - /** Source artifactStorageSourceUri */ - artifactStorageSourceUri?: (string|null); - - /** Source fileHashes */ - fileHashes?: ({ [k: string]: grafeas.v1.IFileHashes }|null); - - /** Source context */ - context?: (grafeas.v1.ISourceContext|null); + /** Properties of a BuilderConfig. */ + interface IBuilderConfig { - /** Source additionalContexts */ - additionalContexts?: (grafeas.v1.ISourceContext[]|null); + /** BuilderConfig id */ + id?: (string|null); } - /** Represents a Source. */ - class Source implements ISource { + /** Represents a BuilderConfig. */ + class BuilderConfig implements IBuilderConfig { /** - * Constructs a new Source. + * Constructs a new BuilderConfig. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ISource); - - /** Source artifactStorageSourceUri. */ - public artifactStorageSourceUri: string; - - /** Source fileHashes. */ - public fileHashes: { [k: string]: grafeas.v1.IFileHashes }; - - /** Source context. */ - public context?: (grafeas.v1.ISourceContext|null); + constructor(properties?: grafeas.v1.IBuilderConfig); - /** Source additionalContexts. */ - public additionalContexts: grafeas.v1.ISourceContext[]; + /** BuilderConfig id. */ + public id: string; /** - * Creates a new Source instance using the specified properties. + * Creates a new BuilderConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Source instance + * @returns BuilderConfig instance */ - public static create(properties?: grafeas.v1.ISource): grafeas.v1.Source; + public static create(properties?: grafeas.v1.IBuilderConfig): grafeas.v1.BuilderConfig; /** - * Encodes the specified Source message. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. - * @param message Source message or plain object to encode + * Encodes the specified BuilderConfig message. Does not implicitly {@link grafeas.v1.BuilderConfig.verify|verify} messages. + * @param message BuilderConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBuilderConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Source message, length delimited. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. - * @param message Source message or plain object to encode + * Encodes the specified BuilderConfig message, length delimited. Does not implicitly {@link grafeas.v1.BuilderConfig.verify|verify} messages. + * @param message BuilderConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBuilderConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Source message from the specified reader or buffer. + * Decodes a BuilderConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Source + * @returns BuilderConfig * @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.Source; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BuilderConfig; /** - * Decodes a Source message from the specified reader or buffer, length delimited. + * Decodes a BuilderConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Source + * @returns BuilderConfig * @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.Source; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BuilderConfig; /** - * Verifies a Source message. + * Verifies a BuilderConfig 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 Source message from a plain object. Also converts values to their respective internal types. + * Creates a BuilderConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Source + * @returns BuilderConfig */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Source; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BuilderConfig; /** - * Creates a plain object from a Source message. Also converts values to other types if specified. - * @param message Source + * Creates a plain object from a BuilderConfig message. Also converts values to other types if specified. + * @param message BuilderConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Source, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BuilderConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Source to JSON. + * Converts this BuilderConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FileHashes. */ - interface IFileHashes { + /** Properties of an InTotoProvenance. */ + interface IInTotoProvenance { - /** FileHashes fileHash */ - fileHash?: (grafeas.v1.IHash[]|null); + /** InTotoProvenance builderConfig */ + builderConfig?: (grafeas.v1.IBuilderConfig|null); + + /** InTotoProvenance recipe */ + recipe?: (grafeas.v1.IRecipe|null); + + /** InTotoProvenance metadata */ + metadata?: (grafeas.v1.IMetadata|null); + + /** InTotoProvenance materials */ + materials?: (string[]|null); } - /** Represents a FileHashes. */ - class FileHashes implements IFileHashes { + /** Represents an InTotoProvenance. */ + class InTotoProvenance implements IInTotoProvenance { /** - * Constructs a new FileHashes. + * Constructs a new InTotoProvenance. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IFileHashes); + constructor(properties?: grafeas.v1.IInTotoProvenance); - /** FileHashes fileHash. */ - public fileHash: grafeas.v1.IHash[]; + /** InTotoProvenance builderConfig. */ + public builderConfig?: (grafeas.v1.IBuilderConfig|null); + + /** InTotoProvenance recipe. */ + public recipe?: (grafeas.v1.IRecipe|null); + + /** InTotoProvenance metadata. */ + public metadata?: (grafeas.v1.IMetadata|null); + + /** InTotoProvenance materials. */ + public materials: string[]; /** - * Creates a new FileHashes instance using the specified properties. + * Creates a new InTotoProvenance instance using the specified properties. * @param [properties] Properties to set - * @returns FileHashes instance + * @returns InTotoProvenance instance */ - public static create(properties?: grafeas.v1.IFileHashes): grafeas.v1.FileHashes; + public static create(properties?: grafeas.v1.IInTotoProvenance): grafeas.v1.InTotoProvenance; /** - * Encodes the specified FileHashes message. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. - * @param message FileHashes message or plain object to encode + * Encodes the specified InTotoProvenance message. Does not implicitly {@link grafeas.v1.InTotoProvenance.verify|verify} messages. + * @param message InTotoProvenance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IFileHashes, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IInTotoProvenance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileHashes message, length delimited. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. - * @param message FileHashes message or plain object to encode + * Encodes the specified InTotoProvenance message, length delimited. Does not implicitly {@link grafeas.v1.InTotoProvenance.verify|verify} messages. + * @param message InTotoProvenance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IFileHashes, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IInTotoProvenance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileHashes message from the specified reader or buffer. + * Decodes an InTotoProvenance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileHashes + * @returns InTotoProvenance * @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.FileHashes; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.InTotoProvenance; /** - * Decodes a FileHashes message from the specified reader or buffer, length delimited. + * Decodes an InTotoProvenance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileHashes + * @returns InTotoProvenance * @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.FileHashes; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.InTotoProvenance; /** - * Verifies a FileHashes message. + * Verifies an InTotoProvenance 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 FileHashes message from a plain object. Also converts values to their respective internal types. + * Creates an InTotoProvenance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileHashes + * @returns InTotoProvenance */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.FileHashes; + public static fromObject(object: { [k: string]: any }): grafeas.v1.InTotoProvenance; /** - * Creates a plain object from a FileHashes message. Also converts values to other types if specified. - * @param message FileHashes + * Creates a plain object from an InTotoProvenance message. Also converts values to other types if specified. + * @param message InTotoProvenance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.FileHashes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.InTotoProvenance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileHashes to JSON. + * Converts this InTotoProvenance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Hash. */ - interface IHash { + /** Properties of an InTotoStatement. */ + interface IInTotoStatement { - /** Hash type */ + /** InTotoStatement type */ type?: (string|null); - /** Hash value */ - value?: (Uint8Array|string|null); + /** InTotoStatement subject */ + subject?: (grafeas.v1.ISubject[]|null); + + /** InTotoStatement predicateType */ + predicateType?: (string|null); + + /** InTotoStatement provenance */ + provenance?: (grafeas.v1.IInTotoProvenance|null); + + /** InTotoStatement slsaProvenance */ + slsaProvenance?: (grafeas.v1.ISlsaProvenance|null); } - /** Represents a Hash. */ - class Hash implements IHash { + /** Represents an InTotoStatement. */ + class InTotoStatement implements IInTotoStatement { /** - * Constructs a new Hash. + * Constructs a new InTotoStatement. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IHash); + constructor(properties?: grafeas.v1.IInTotoStatement); - /** Hash type. */ + /** InTotoStatement type. */ public type: string; - /** Hash value. */ - public value: (Uint8Array|string); + /** InTotoStatement subject. */ + public subject: grafeas.v1.ISubject[]; + + /** InTotoStatement predicateType. */ + public predicateType: string; + + /** InTotoStatement provenance. */ + public provenance?: (grafeas.v1.IInTotoProvenance|null); + + /** InTotoStatement slsaProvenance. */ + public slsaProvenance?: (grafeas.v1.ISlsaProvenance|null); + + /** InTotoStatement predicate. */ + public predicate?: ("provenance"|"slsaProvenance"); /** - * Creates a new Hash instance using the specified properties. + * Creates a new InTotoStatement instance using the specified properties. * @param [properties] Properties to set - * @returns Hash instance + * @returns InTotoStatement instance */ - public static create(properties?: grafeas.v1.IHash): grafeas.v1.Hash; + public static create(properties?: grafeas.v1.IInTotoStatement): grafeas.v1.InTotoStatement; /** - * Encodes the specified Hash message. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. - * @param message Hash message or plain object to encode + * Encodes the specified InTotoStatement message. Does not implicitly {@link grafeas.v1.InTotoStatement.verify|verify} messages. + * @param message InTotoStatement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IInTotoStatement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Hash message, length delimited. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. - * @param message Hash message or plain object to encode + * Encodes the specified InTotoStatement message, length delimited. Does not implicitly {@link grafeas.v1.InTotoStatement.verify|verify} messages. + * @param message InTotoStatement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IInTotoStatement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Hash message from the specified reader or buffer. + * Decodes an InTotoStatement message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Hash + * @returns InTotoStatement * @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.Hash; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.InTotoStatement; /** - * Decodes a Hash message from the specified reader or buffer, length delimited. + * Decodes an InTotoStatement message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Hash + * @returns InTotoStatement * @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.Hash; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.InTotoStatement; /** - * Verifies a Hash message. + * Verifies an InTotoStatement 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 Hash message from a plain object. Also converts values to their respective internal types. + * Creates an InTotoStatement message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Hash + * @returns InTotoStatement */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Hash; + public static fromObject(object: { [k: string]: any }): grafeas.v1.InTotoStatement; /** - * Creates a plain object from a Hash message. Also converts values to other types if specified. - * @param message Hash + * Creates a plain object from an InTotoStatement message. Also converts values to other types if specified. + * @param message InTotoStatement * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.InTotoStatement, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Hash to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Command. */ - interface ICommand { - - /** Command name */ - name?: (string|null); - - /** Command env */ - env?: (string[]|null); - - /** Command args */ - args?: (string[]|null); + * Converts this InTotoStatement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Command dir */ - dir?: (string|null); + /** Properties of a Subject. */ + interface ISubject { - /** Command id */ - id?: (string|null); + /** Subject name */ + name?: (string|null); - /** Command waitFor */ - waitFor?: (string[]|null); + /** Subject digest */ + digest?: ({ [k: string]: string }|null); } - /** Represents a Command. */ - class Command implements ICommand { + /** Represents a Subject. */ + class Subject implements ISubject { /** - * Constructs a new Command. + * Constructs a new Subject. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ICommand); + constructor(properties?: grafeas.v1.ISubject); - /** Command name. */ + /** Subject name. */ public name: string; - /** Command env. */ - public env: string[]; - - /** Command args. */ - public args: string[]; - - /** Command dir. */ - public dir: string; - - /** Command id. */ - public id: string; - - /** Command waitFor. */ - public waitFor: string[]; + /** Subject digest. */ + public digest: { [k: string]: string }; /** - * Creates a new Command instance using the specified properties. + * Creates a new Subject instance using the specified properties. * @param [properties] Properties to set - * @returns Command instance + * @returns Subject instance */ - public static create(properties?: grafeas.v1.ICommand): grafeas.v1.Command; + public static create(properties?: grafeas.v1.ISubject): grafeas.v1.Subject; /** - * Encodes the specified Command message. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. - * @param message Command message or plain object to encode + * Encodes the specified Subject message. Does not implicitly {@link grafeas.v1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Command message, length delimited. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. - * @param message Command message or plain object to encode + * Encodes the specified Subject message, length delimited. Does not implicitly {@link grafeas.v1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Command message from the specified reader or buffer. + * Decodes a Subject message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Command + * @returns Subject * @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.Command; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Subject; /** - * Decodes a Command message from the specified reader or buffer, length delimited. + * Decodes a Subject message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Command + * @returns Subject * @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.Command; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Subject; /** - * Verifies a Command message. + * Verifies a Subject 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 Command message from a plain object. Also converts values to their respective internal types. + * Creates a Subject message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Command + * @returns Subject */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Command; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Subject; /** - * Creates a plain object from a Command message. Also converts values to other types if specified. - * @param message Command + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @param message Subject * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Command, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Command to JSON. + * Converts this Subject to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Artifact. */ - interface IArtifact { + /** Properties of a SlsaProvenance. */ + interface ISlsaProvenance { - /** Artifact checksum */ - checksum?: (string|null); + /** SlsaProvenance builder */ + builder?: (grafeas.v1.SlsaProvenance.ISlsaBuilder|null); - /** Artifact id */ - id?: (string|null); + /** SlsaProvenance recipe */ + recipe?: (grafeas.v1.SlsaProvenance.ISlsaRecipe|null); - /** Artifact names */ - names?: (string[]|null); + /** SlsaProvenance metadata */ + metadata?: (grafeas.v1.SlsaProvenance.ISlsaMetadata|null); + + /** SlsaProvenance materials */ + materials?: (grafeas.v1.SlsaProvenance.IMaterial[]|null); } - /** Represents an Artifact. */ - class Artifact implements IArtifact { + /** Represents a SlsaProvenance. */ + class SlsaProvenance implements ISlsaProvenance { /** - * Constructs a new Artifact. + * Constructs a new SlsaProvenance. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IArtifact); + constructor(properties?: grafeas.v1.ISlsaProvenance); - /** Artifact checksum. */ - public checksum: string; + /** SlsaProvenance builder. */ + public builder?: (grafeas.v1.SlsaProvenance.ISlsaBuilder|null); - /** Artifact id. */ - public id: string; + /** SlsaProvenance recipe. */ + public recipe?: (grafeas.v1.SlsaProvenance.ISlsaRecipe|null); - /** Artifact names. */ - public names: string[]; + /** SlsaProvenance metadata. */ + public metadata?: (grafeas.v1.SlsaProvenance.ISlsaMetadata|null); + + /** SlsaProvenance materials. */ + public materials: grafeas.v1.SlsaProvenance.IMaterial[]; /** - * Creates a new Artifact instance using the specified properties. + * Creates a new SlsaProvenance instance using the specified properties. * @param [properties] Properties to set - * @returns Artifact instance + * @returns SlsaProvenance instance */ - public static create(properties?: grafeas.v1.IArtifact): grafeas.v1.Artifact; + public static create(properties?: grafeas.v1.ISlsaProvenance): grafeas.v1.SlsaProvenance; /** - * Encodes the specified Artifact message. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. - * @param message Artifact message or plain object to encode + * Encodes the specified SlsaProvenance message. Does not implicitly {@link grafeas.v1.SlsaProvenance.verify|verify} messages. + * @param message SlsaProvenance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ISlsaProvenance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Artifact message, length delimited. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. - * @param message Artifact message or plain object to encode + * Encodes the specified SlsaProvenance message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.verify|verify} messages. + * @param message SlsaProvenance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ISlsaProvenance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Artifact message from the specified reader or buffer. + * Decodes a SlsaProvenance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Artifact + * @returns SlsaProvenance * @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.Artifact; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.SlsaProvenance; /** - * Decodes an Artifact message from the specified reader or buffer, length delimited. + * Decodes a SlsaProvenance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Artifact + * @returns SlsaProvenance * @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.Artifact; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.SlsaProvenance; /** - * Verifies an Artifact message. + * Verifies a SlsaProvenance 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 Artifact message from a plain object. Also converts values to their respective internal types. + * Creates a SlsaProvenance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Artifact + * @returns SlsaProvenance */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Artifact; + public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance; /** - * Creates a plain object from an Artifact message. Also converts values to other types if specified. - * @param message Artifact + * Creates a plain object from a SlsaProvenance message. Also converts values to other types if specified. + * @param message SlsaProvenance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.Artifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.SlsaProvenance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Artifact to JSON. + * Converts this SlsaProvenance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SourceContext. */ - interface ISourceContext { + namespace SlsaProvenance { - /** SourceContext cloudRepo */ - cloudRepo?: (grafeas.v1.ICloudRepoSourceContext|null); + /** Properties of a SlsaRecipe. */ + interface ISlsaRecipe { - /** SourceContext gerrit */ - gerrit?: (grafeas.v1.IGerritSourceContext|null); + /** SlsaRecipe type */ + type?: (string|null); - /** SourceContext git */ - git?: (grafeas.v1.IGitSourceContext|null); + /** SlsaRecipe definedInMaterial */ + definedInMaterial?: (number|Long|string|null); - /** SourceContext labels */ - labels?: ({ [k: string]: string }|null); - } + /** SlsaRecipe entryPoint */ + entryPoint?: (string|null); - /** Represents a SourceContext. */ - class SourceContext implements ISourceContext { + /** SlsaRecipe arguments */ + "arguments"?: (google.protobuf.IAny|null); - /** - * Constructs a new SourceContext. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.ISourceContext); + /** SlsaRecipe environment */ + environment?: (google.protobuf.IAny|null); + } - /** SourceContext cloudRepo. */ - public cloudRepo?: (grafeas.v1.ICloudRepoSourceContext|null); + /** Represents a SlsaRecipe. */ + class SlsaRecipe implements ISlsaRecipe { - /** SourceContext gerrit. */ - public gerrit?: (grafeas.v1.IGerritSourceContext|null); + /** + * Constructs a new SlsaRecipe. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaRecipe); + + /** SlsaRecipe type. */ + public type: string; + + /** SlsaRecipe definedInMaterial. */ + public definedInMaterial: (number|Long|string); + + /** SlsaRecipe entryPoint. */ + public entryPoint: string; + + /** SlsaRecipe arguments. */ + public arguments?: (google.protobuf.IAny|null); + + /** SlsaRecipe environment. */ + public environment?: (google.protobuf.IAny|null); + + /** + * Creates a new SlsaRecipe instance using the specified properties. + * @param [properties] Properties to set + * @returns SlsaRecipe instance + */ + public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaRecipe): grafeas.v1.SlsaProvenance.SlsaRecipe; + + /** + * Encodes the specified SlsaRecipe message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. + * @param message SlsaRecipe message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.SlsaProvenance.ISlsaRecipe, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SlsaRecipe message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. + * @param message SlsaRecipe message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaRecipe, writer?: $protobuf.Writer): $protobuf.Writer; - /** SourceContext git. */ - public git?: (grafeas.v1.IGitSourceContext|null); + /** + * Decodes a SlsaRecipe message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SlsaRecipe + * @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.SlsaProvenance.SlsaRecipe; - /** SourceContext labels. */ - public labels: { [k: string]: string }; + /** + * Decodes a SlsaRecipe message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SlsaRecipe + * @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.SlsaProvenance.SlsaRecipe; - /** SourceContext context. */ - public context?: ("cloudRepo"|"gerrit"|"git"); + /** + * Verifies a SlsaRecipe 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 new SourceContext instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceContext instance - */ - public static create(properties?: grafeas.v1.ISourceContext): grafeas.v1.SourceContext; + /** + * Creates a SlsaRecipe message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SlsaRecipe + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaRecipe; - /** - * Encodes the specified SourceContext message. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. - * @param message SourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.ISourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a SlsaRecipe message. Also converts values to other types if specified. + * @param message SlsaRecipe + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.SlsaProvenance.SlsaRecipe, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified SourceContext message, length delimited. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. - * @param message SourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.ISourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this SlsaRecipe to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a SourceContext message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceContext - * @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.SourceContext; + /** Properties of a SlsaCompleteness. */ + interface ISlsaCompleteness { - /** - * Decodes a SourceContext message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceContext - * @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.SourceContext; + /** SlsaCompleteness arguments */ + "arguments"?: (boolean|null); - /** - * Verifies a SourceContext 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); + /** SlsaCompleteness environment */ + environment?: (boolean|null); - /** - * Creates a SourceContext message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceContext - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.SourceContext; + /** SlsaCompleteness materials */ + materials?: (boolean|null); + } - /** - * Creates a plain object from a SourceContext message. Also converts values to other types if specified. - * @param message SourceContext - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.SourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a SlsaCompleteness. */ + class SlsaCompleteness implements ISlsaCompleteness { - /** - * Converts this SourceContext to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new SlsaCompleteness. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaCompleteness); - /** Properties of an AliasContext. */ - interface IAliasContext { + /** SlsaCompleteness arguments. */ + public arguments: boolean; - /** AliasContext kind */ - kind?: (grafeas.v1.AliasContext.Kind|keyof typeof grafeas.v1.AliasContext.Kind|null); + /** SlsaCompleteness environment. */ + public environment: boolean; - /** AliasContext name */ - name?: (string|null); - } + /** SlsaCompleteness materials. */ + public materials: boolean; - /** Represents an AliasContext. */ - class AliasContext implements IAliasContext { + /** + * Creates a new SlsaCompleteness instance using the specified properties. + * @param [properties] Properties to set + * @returns SlsaCompleteness instance + */ + public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaCompleteness): grafeas.v1.SlsaProvenance.SlsaCompleteness; - /** - * Constructs a new AliasContext. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IAliasContext); + /** + * Encodes the specified SlsaCompleteness message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. + * @param message SlsaCompleteness message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.SlsaProvenance.ISlsaCompleteness, writer?: $protobuf.Writer): $protobuf.Writer; - /** AliasContext kind. */ - public kind: (grafeas.v1.AliasContext.Kind|keyof typeof grafeas.v1.AliasContext.Kind); + /** + * Encodes the specified SlsaCompleteness message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. + * @param message SlsaCompleteness message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaCompleteness, writer?: $protobuf.Writer): $protobuf.Writer; - /** AliasContext name. */ - public name: string; + /** + * Decodes a SlsaCompleteness message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SlsaCompleteness + * @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.SlsaProvenance.SlsaCompleteness; - /** - * Creates a new AliasContext instance using the specified properties. - * @param [properties] Properties to set - * @returns AliasContext instance - */ - public static create(properties?: grafeas.v1.IAliasContext): grafeas.v1.AliasContext; + /** + * Decodes a SlsaCompleteness message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SlsaCompleteness + * @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.SlsaProvenance.SlsaCompleteness; - /** - * Encodes the specified AliasContext message. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. - * @param message AliasContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.IAliasContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a SlsaCompleteness 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); - /** - * Encodes the specified AliasContext message, length delimited. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. - * @param message AliasContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.IAliasContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a SlsaCompleteness message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SlsaCompleteness + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaCompleteness; - /** - * Decodes an AliasContext message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AliasContext - * @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.AliasContext; + /** + * Creates a plain object from a SlsaCompleteness message. Also converts values to other types if specified. + * @param message SlsaCompleteness + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.SlsaProvenance.SlsaCompleteness, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an AliasContext message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AliasContext - * @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.AliasContext; + /** + * Converts this SlsaCompleteness to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies an AliasContext 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 SlsaMetadata. */ + interface ISlsaMetadata { - /** - * Creates an AliasContext message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AliasContext - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.AliasContext; + /** SlsaMetadata buildInvocationId */ + buildInvocationId?: (string|null); - /** - * Creates a plain object from an AliasContext message. Also converts values to other types if specified. - * @param message AliasContext - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.AliasContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SlsaMetadata buildStartedOn */ + buildStartedOn?: (google.protobuf.ITimestamp|null); - /** - * Converts this AliasContext to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** SlsaMetadata buildFinishedOn */ + buildFinishedOn?: (google.protobuf.ITimestamp|null); - namespace AliasContext { + /** SlsaMetadata completeness */ + completeness?: (grafeas.v1.SlsaProvenance.ISlsaCompleteness|null); - /** Kind enum. */ - enum Kind { - KIND_UNSPECIFIED = 0, - FIXED = 1, - MOVABLE = 2, - OTHER = 4 + /** SlsaMetadata reproducible */ + reproducible?: (boolean|null); } - } - /** Properties of a CloudRepoSourceContext. */ - interface ICloudRepoSourceContext { + /** Represents a SlsaMetadata. */ + class SlsaMetadata implements ISlsaMetadata { - /** CloudRepoSourceContext repoId */ - repoId?: (grafeas.v1.IRepoId|null); + /** + * Constructs a new SlsaMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaMetadata); - /** CloudRepoSourceContext revisionId */ - revisionId?: (string|null); + /** SlsaMetadata buildInvocationId. */ + public buildInvocationId: string; - /** CloudRepoSourceContext aliasContext */ - aliasContext?: (grafeas.v1.IAliasContext|null); - } + /** SlsaMetadata buildStartedOn. */ + public buildStartedOn?: (google.protobuf.ITimestamp|null); - /** Represents a CloudRepoSourceContext. */ - class CloudRepoSourceContext implements ICloudRepoSourceContext { + /** SlsaMetadata buildFinishedOn. */ + public buildFinishedOn?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new CloudRepoSourceContext. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.ICloudRepoSourceContext); + /** SlsaMetadata completeness. */ + public completeness?: (grafeas.v1.SlsaProvenance.ISlsaCompleteness|null); - /** CloudRepoSourceContext repoId. */ - public repoId?: (grafeas.v1.IRepoId|null); + /** SlsaMetadata reproducible. */ + public reproducible: boolean; - /** CloudRepoSourceContext revisionId. */ - public revisionId?: (string|null); + /** + * Creates a new SlsaMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SlsaMetadata instance + */ + public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaMetadata): grafeas.v1.SlsaProvenance.SlsaMetadata; - /** CloudRepoSourceContext aliasContext. */ - public aliasContext?: (grafeas.v1.IAliasContext|null); + /** + * Encodes the specified SlsaMetadata message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. + * @param message SlsaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.SlsaProvenance.ISlsaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** CloudRepoSourceContext revision. */ - public revision?: ("revisionId"|"aliasContext"); + /** + * Encodes the specified SlsaMetadata message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. + * @param message SlsaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new CloudRepoSourceContext instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRepoSourceContext instance - */ - public static create(properties?: grafeas.v1.ICloudRepoSourceContext): grafeas.v1.CloudRepoSourceContext; + /** + * Decodes a SlsaMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SlsaMetadata + * @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.SlsaProvenance.SlsaMetadata; - /** - * Encodes the specified CloudRepoSourceContext message. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. - * @param message CloudRepoSourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.ICloudRepoSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a SlsaMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SlsaMetadata + * @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.SlsaProvenance.SlsaMetadata; - /** - * Encodes the specified CloudRepoSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. - * @param message CloudRepoSourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.ICloudRepoSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a SlsaMetadata 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 CloudRepoSourceContext message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRepoSourceContext - * @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.CloudRepoSourceContext; + /** + * Creates a SlsaMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SlsaMetadata + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaMetadata; - /** - * Decodes a CloudRepoSourceContext message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRepoSourceContext - * @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.CloudRepoSourceContext; + /** + * Creates a plain object from a SlsaMetadata message. Also converts values to other types if specified. + * @param message SlsaMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.SlsaProvenance.SlsaMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a CloudRepoSourceContext 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 SlsaMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a CloudRepoSourceContext message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRepoSourceContext - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.CloudRepoSourceContext; + /** Properties of a SlsaBuilder. */ + interface ISlsaBuilder { - /** - * Creates a plain object from a CloudRepoSourceContext message. Also converts values to other types if specified. - * @param message CloudRepoSourceContext - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.CloudRepoSourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SlsaBuilder id */ + id?: (string|null); + } - /** - * Converts this CloudRepoSourceContext to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a SlsaBuilder. */ + class SlsaBuilder implements ISlsaBuilder { - /** Properties of a GerritSourceContext. */ - interface IGerritSourceContext { + /** + * Constructs a new SlsaBuilder. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.SlsaProvenance.ISlsaBuilder); - /** GerritSourceContext hostUri */ - hostUri?: (string|null); + /** SlsaBuilder id. */ + public id: string; - /** GerritSourceContext gerritProject */ - gerritProject?: (string|null); + /** + * Creates a new SlsaBuilder instance using the specified properties. + * @param [properties] Properties to set + * @returns SlsaBuilder instance + */ + public static create(properties?: grafeas.v1.SlsaProvenance.ISlsaBuilder): grafeas.v1.SlsaProvenance.SlsaBuilder; + + /** + * Encodes the specified SlsaBuilder message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. + * @param message SlsaBuilder message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.SlsaProvenance.ISlsaBuilder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SlsaBuilder message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. + * @param message SlsaBuilder message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.SlsaProvenance.ISlsaBuilder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SlsaBuilder message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SlsaBuilder + * @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.SlsaProvenance.SlsaBuilder; - /** GerritSourceContext revisionId */ - revisionId?: (string|null); + /** + * Decodes a SlsaBuilder message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SlsaBuilder + * @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.SlsaProvenance.SlsaBuilder; - /** GerritSourceContext aliasContext */ - aliasContext?: (grafeas.v1.IAliasContext|null); - } + /** + * Verifies a SlsaBuilder 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); - /** Represents a GerritSourceContext. */ - class GerritSourceContext implements IGerritSourceContext { + /** + * Creates a SlsaBuilder message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SlsaBuilder + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.SlsaBuilder; - /** - * Constructs a new GerritSourceContext. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IGerritSourceContext); + /** + * Creates a plain object from a SlsaBuilder message. Also converts values to other types if specified. + * @param message SlsaBuilder + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.SlsaProvenance.SlsaBuilder, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** GerritSourceContext hostUri. */ - public hostUri: string; + /** + * Converts this SlsaBuilder to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** GerritSourceContext gerritProject. */ - public gerritProject: string; + /** Properties of a Material. */ + interface IMaterial { - /** GerritSourceContext revisionId. */ - public revisionId?: (string|null); + /** Material uri */ + uri?: (string|null); - /** GerritSourceContext aliasContext. */ - public aliasContext?: (grafeas.v1.IAliasContext|null); + /** Material digest */ + digest?: ({ [k: string]: string }|null); + } - /** GerritSourceContext revision. */ - public revision?: ("revisionId"|"aliasContext"); + /** Represents a Material. */ + class Material implements IMaterial { - /** - * Creates a new GerritSourceContext instance using the specified properties. - * @param [properties] Properties to set - * @returns GerritSourceContext instance - */ - public static create(properties?: grafeas.v1.IGerritSourceContext): grafeas.v1.GerritSourceContext; + /** + * Constructs a new Material. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.SlsaProvenance.IMaterial); - /** - * Encodes the specified GerritSourceContext message. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. - * @param message GerritSourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.IGerritSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** Material uri. */ + public uri: string; - /** - * Encodes the specified GerritSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. - * @param message GerritSourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.IGerritSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** Material digest. */ + public digest: { [k: string]: string }; - /** - * Decodes a GerritSourceContext message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GerritSourceContext - * @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.GerritSourceContext; + /** + * Creates a new Material instance using the specified properties. + * @param [properties] Properties to set + * @returns Material instance + */ + public static create(properties?: grafeas.v1.SlsaProvenance.IMaterial): grafeas.v1.SlsaProvenance.Material; - /** - * Decodes a GerritSourceContext message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GerritSourceContext - * @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.GerritSourceContext; + /** + * Encodes the specified Material message. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. + * @param message Material message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.SlsaProvenance.IMaterial, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a GerritSourceContext 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); + /** + * Encodes the specified Material message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. + * @param message Material message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.SlsaProvenance.IMaterial, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a GerritSourceContext message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GerritSourceContext - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GerritSourceContext; + /** + * Decodes a Material message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Material + * @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.SlsaProvenance.Material; - /** - * Creates a plain object from a GerritSourceContext message. Also converts values to other types if specified. - * @param message GerritSourceContext - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.GerritSourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Material message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Material + * @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.SlsaProvenance.Material; - /** - * Converts this GerritSourceContext to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a Material 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 GitSourceContext. */ - interface IGitSourceContext { + /** + * Creates a Material message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Material + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.SlsaProvenance.Material; - /** GitSourceContext url */ - url?: (string|null); + /** + * Creates a plain object from a Material message. Also converts values to other types if specified. + * @param message Material + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.SlsaProvenance.Material, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** GitSourceContext revisionId */ - revisionId?: (string|null); + /** + * Converts this Material to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a GitSourceContext. */ - class GitSourceContext implements IGitSourceContext { - - /** - * Constructs a new GitSourceContext. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IGitSourceContext); - - /** GitSourceContext url. */ - public url: string; + /** Properties of a BuildProvenance. */ + interface IBuildProvenance { - /** GitSourceContext revisionId. */ - public revisionId: string; + /** BuildProvenance id */ + id?: (string|null); - /** - * Creates a new GitSourceContext instance using the specified properties. - * @param [properties] Properties to set - * @returns GitSourceContext instance - */ - public static create(properties?: grafeas.v1.IGitSourceContext): grafeas.v1.GitSourceContext; + /** BuildProvenance projectId */ + projectId?: (string|null); - /** - * Encodes the specified GitSourceContext message. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. - * @param message GitSourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.IGitSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** BuildProvenance commands */ + commands?: (grafeas.v1.ICommand[]|null); - /** - * Encodes the specified GitSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. - * @param message GitSourceContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.IGitSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** BuildProvenance builtArtifacts */ + builtArtifacts?: (grafeas.v1.IArtifact[]|null); - /** - * Decodes a GitSourceContext message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GitSourceContext - * @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.GitSourceContext; + /** BuildProvenance createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a GitSourceContext message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GitSourceContext - * @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.GitSourceContext; + /** BuildProvenance startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a GitSourceContext 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); + /** BuildProvenance endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a GitSourceContext message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GitSourceContext - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GitSourceContext; + /** BuildProvenance creator */ + creator?: (string|null); - /** - * Creates a plain object from a GitSourceContext message. Also converts values to other types if specified. - * @param message GitSourceContext - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.GitSourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** BuildProvenance logsUri */ + logsUri?: (string|null); - /** - * Converts this GitSourceContext to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** BuildProvenance sourceProvenance */ + sourceProvenance?: (grafeas.v1.ISource|null); - /** Properties of a RepoId. */ - interface IRepoId { + /** BuildProvenance triggerId */ + triggerId?: (string|null); - /** RepoId projectRepoId */ - projectRepoId?: (grafeas.v1.IProjectRepoId|null); + /** BuildProvenance buildOptions */ + buildOptions?: ({ [k: string]: string }|null); - /** RepoId uid */ - uid?: (string|null); + /** BuildProvenance builderVersion */ + builderVersion?: (string|null); } - /** Represents a RepoId. */ - class RepoId implements IRepoId { + /** Represents a BuildProvenance. */ + class BuildProvenance implements IBuildProvenance { /** - * Constructs a new RepoId. + * Constructs a new BuildProvenance. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IRepoId); + constructor(properties?: grafeas.v1.IBuildProvenance); - /** RepoId projectRepoId. */ - public projectRepoId?: (grafeas.v1.IProjectRepoId|null); + /** BuildProvenance id. */ + public id: string; - /** RepoId uid. */ - public uid?: (string|null); + /** BuildProvenance projectId. */ + public projectId: string; - /** RepoId id. */ - public id?: ("projectRepoId"|"uid"); + /** BuildProvenance commands. */ + public commands: grafeas.v1.ICommand[]; + + /** BuildProvenance builtArtifacts. */ + public builtArtifacts: grafeas.v1.IArtifact[]; + + /** BuildProvenance createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BuildProvenance startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** BuildProvenance endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BuildProvenance creator. */ + public creator: string; + + /** BuildProvenance logsUri. */ + public logsUri: string; + + /** BuildProvenance sourceProvenance. */ + public sourceProvenance?: (grafeas.v1.ISource|null); + + /** BuildProvenance triggerId. */ + public triggerId: string; + + /** BuildProvenance buildOptions. */ + public buildOptions: { [k: string]: string }; + + /** BuildProvenance builderVersion. */ + public builderVersion: string; /** - * Creates a new RepoId instance using the specified properties. + * Creates a new BuildProvenance instance using the specified properties. * @param [properties] Properties to set - * @returns RepoId instance + * @returns BuildProvenance instance */ - public static create(properties?: grafeas.v1.IRepoId): grafeas.v1.RepoId; + public static create(properties?: grafeas.v1.IBuildProvenance): grafeas.v1.BuildProvenance; /** - * Encodes the specified RepoId message. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. - * @param message RepoId message or plain object to encode + * Encodes the specified BuildProvenance message. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. + * @param message BuildProvenance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IRepoId, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IBuildProvenance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RepoId message, length delimited. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. - * @param message RepoId message or plain object to encode + * Encodes the specified BuildProvenance message, length delimited. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. + * @param message BuildProvenance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IRepoId, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IBuildProvenance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RepoId message from the specified reader or buffer. + * Decodes a BuildProvenance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RepoId + * @returns BuildProvenance * @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.RepoId; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.BuildProvenance; /** - * Decodes a RepoId message from the specified reader or buffer, length delimited. + * Decodes a BuildProvenance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RepoId + * @returns BuildProvenance * @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.RepoId; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.BuildProvenance; /** - * Verifies a RepoId message. + * Verifies a BuildProvenance 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 RepoId message from a plain object. Also converts values to their respective internal types. + * Creates a BuildProvenance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RepoId + * @returns BuildProvenance */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.RepoId; + public static fromObject(object: { [k: string]: any }): grafeas.v1.BuildProvenance; /** - * Creates a plain object from a RepoId message. Also converts values to other types if specified. - * @param message RepoId + * Creates a plain object from a BuildProvenance message. Also converts values to other types if specified. + * @param message BuildProvenance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.RepoId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.BuildProvenance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RepoId to JSON. + * Converts this BuildProvenance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ProjectRepoId. */ - interface IProjectRepoId { + /** Properties of a Source. */ + interface ISource { - /** ProjectRepoId projectId */ - projectId?: (string|null); + /** Source artifactStorageSourceUri */ + artifactStorageSourceUri?: (string|null); - /** ProjectRepoId repoName */ - repoName?: (string|null); + /** Source fileHashes */ + fileHashes?: ({ [k: string]: grafeas.v1.IFileHashes }|null); + + /** Source context */ + context?: (grafeas.v1.ISourceContext|null); + + /** Source additionalContexts */ + additionalContexts?: (grafeas.v1.ISourceContext[]|null); } - /** Represents a ProjectRepoId. */ - class ProjectRepoId implements IProjectRepoId { + /** Represents a Source. */ + class Source implements ISource { /** - * Constructs a new ProjectRepoId. + * Constructs a new Source. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IProjectRepoId); + constructor(properties?: grafeas.v1.ISource); - /** ProjectRepoId projectId. */ - public projectId: string; + /** Source artifactStorageSourceUri. */ + public artifactStorageSourceUri: string; - /** ProjectRepoId repoName. */ - public repoName: string; + /** Source fileHashes. */ + public fileHashes: { [k: string]: grafeas.v1.IFileHashes }; + + /** Source context. */ + public context?: (grafeas.v1.ISourceContext|null); + + /** Source additionalContexts. */ + public additionalContexts: grafeas.v1.ISourceContext[]; /** - * Creates a new ProjectRepoId instance using the specified properties. + * Creates a new Source instance using the specified properties. * @param [properties] Properties to set - * @returns ProjectRepoId instance + * @returns Source instance */ - public static create(properties?: grafeas.v1.IProjectRepoId): grafeas.v1.ProjectRepoId; + public static create(properties?: grafeas.v1.ISource): grafeas.v1.Source; /** - * Encodes the specified ProjectRepoId message. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. - * @param message ProjectRepoId message or plain object to encode + * Encodes the specified Source message. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. + * @param message Source message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IProjectRepoId, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ProjectRepoId message, length delimited. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. - * @param message ProjectRepoId message or plain object to encode + * Encodes the specified Source message, length delimited. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. + * @param message Source message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IProjectRepoId, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ProjectRepoId message from the specified reader or buffer. + * Decodes a Source message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ProjectRepoId + * @returns Source * @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.ProjectRepoId; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Source; /** - * Decodes a ProjectRepoId message from the specified reader or buffer, length delimited. + * Decodes a Source message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ProjectRepoId + * @returns Source * @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.ProjectRepoId; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Source; /** - * Verifies a ProjectRepoId message. + * Verifies a Source 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 ProjectRepoId message from a plain object. Also converts values to their respective internal types. + * Creates a Source message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ProjectRepoId + * @returns Source */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ProjectRepoId; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Source; /** - * Creates a plain object from a ProjectRepoId message. Also converts values to other types if specified. - * @param message ProjectRepoId + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @param message Source * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ProjectRepoId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Source, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ProjectRepoId to JSON. + * Converts this Source to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ComplianceNote. */ - interface IComplianceNote { - - /** ComplianceNote title */ - title?: (string|null); - - /** ComplianceNote description */ - description?: (string|null); - - /** ComplianceNote version */ - version?: (grafeas.v1.IComplianceVersion[]|null); - - /** ComplianceNote rationale */ - rationale?: (string|null); - - /** ComplianceNote remediation */ - remediation?: (string|null); - - /** ComplianceNote cisBenchmark */ - cisBenchmark?: (grafeas.v1.ComplianceNote.ICisBenchmark|null); + /** Properties of a FileHashes. */ + interface IFileHashes { - /** ComplianceNote scanInstructions */ - scanInstructions?: (Uint8Array|string|null); + /** FileHashes fileHash */ + fileHash?: (grafeas.v1.IHash[]|null); } - /** Represents a ComplianceNote. */ - class ComplianceNote implements IComplianceNote { + /** Represents a FileHashes. */ + class FileHashes implements IFileHashes { /** - * Constructs a new ComplianceNote. + * Constructs a new FileHashes. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IComplianceNote); - - /** ComplianceNote title. */ - public title: string; - - /** ComplianceNote description. */ - public description: string; - - /** ComplianceNote version. */ - public version: grafeas.v1.IComplianceVersion[]; - - /** ComplianceNote rationale. */ - public rationale: string; - - /** ComplianceNote remediation. */ - public remediation: string; - - /** ComplianceNote cisBenchmark. */ - public cisBenchmark?: (grafeas.v1.ComplianceNote.ICisBenchmark|null); - - /** ComplianceNote scanInstructions. */ - public scanInstructions: (Uint8Array|string); + constructor(properties?: grafeas.v1.IFileHashes); - /** ComplianceNote complianceType. */ - public complianceType?: "cisBenchmark"; + /** FileHashes fileHash. */ + public fileHash: grafeas.v1.IHash[]; /** - * Creates a new ComplianceNote instance using the specified properties. + * Creates a new FileHashes instance using the specified properties. * @param [properties] Properties to set - * @returns ComplianceNote instance + * @returns FileHashes instance */ - public static create(properties?: grafeas.v1.IComplianceNote): grafeas.v1.ComplianceNote; + public static create(properties?: grafeas.v1.IFileHashes): grafeas.v1.FileHashes; /** - * Encodes the specified ComplianceNote message. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. - * @param message ComplianceNote message or plain object to encode + * Encodes the specified FileHashes message. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. + * @param message FileHashes message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IComplianceNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IFileHashes, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComplianceNote message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. - * @param message ComplianceNote message or plain object to encode + * Encodes the specified FileHashes message, length delimited. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. + * @param message FileHashes message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IComplianceNote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IFileHashes, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComplianceNote message from the specified reader or buffer. + * Decodes a FileHashes message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComplianceNote + * @returns FileHashes * @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.ComplianceNote; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.FileHashes; /** - * Decodes a ComplianceNote message from the specified reader or buffer, length delimited. + * Decodes a FileHashes message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComplianceNote + * @returns FileHashes * @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.ComplianceNote; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.FileHashes; /** - * Verifies a ComplianceNote message. + * Verifies a FileHashes 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 ComplianceNote message from a plain object. Also converts values to their respective internal types. + * Creates a FileHashes message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComplianceNote + * @returns FileHashes */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.FileHashes; /** - * Creates a plain object from a ComplianceNote message. Also converts values to other types if specified. - * @param message ComplianceNote + * Creates a plain object from a FileHashes message. Also converts values to other types if specified. + * @param message FileHashes * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ComplianceNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.FileHashes, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComplianceNote to JSON. + * Converts this FileHashes to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ComplianceNote { - - /** Properties of a CisBenchmark. */ - interface ICisBenchmark { - - /** CisBenchmark profileLevel */ - profileLevel?: (number|null); - - /** CisBenchmark severity */ - severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - } - - /** Represents a CisBenchmark. */ - class CisBenchmark implements ICisBenchmark { - - /** - * Constructs a new CisBenchmark. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.ComplianceNote.ICisBenchmark); - - /** CisBenchmark profileLevel. */ - public profileLevel: number; - - /** CisBenchmark severity. */ - public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - - /** - * Creates a new CisBenchmark instance using the specified properties. - * @param [properties] Properties to set - * @returns CisBenchmark instance - */ - public static create(properties?: grafeas.v1.ComplianceNote.ICisBenchmark): grafeas.v1.ComplianceNote.CisBenchmark; - - /** - * Encodes the specified CisBenchmark message. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. - * @param message CisBenchmark message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: grafeas.v1.ComplianceNote.ICisBenchmark, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CisBenchmark message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. - * @param message CisBenchmark message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: grafeas.v1.ComplianceNote.ICisBenchmark, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CisBenchmark message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CisBenchmark - * @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.ComplianceNote.CisBenchmark; - - /** - * Decodes a CisBenchmark message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CisBenchmark - * @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.ComplianceNote.CisBenchmark; - - /** - * Verifies a CisBenchmark 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 CisBenchmark message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CisBenchmark - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceNote.CisBenchmark; - - /** - * Creates a plain object from a CisBenchmark message. Also converts values to other types if specified. - * @param message CisBenchmark - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: grafeas.v1.ComplianceNote.CisBenchmark, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CisBenchmark to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a ComplianceVersion. */ - interface IComplianceVersion { + /** Properties of a Hash. */ + interface IHash { - /** ComplianceVersion cpeUri */ - cpeUri?: (string|null); + /** Hash type */ + type?: (string|null); - /** ComplianceVersion version */ - version?: (string|null); + /** Hash value */ + value?: (Uint8Array|string|null); } - /** Represents a ComplianceVersion. */ - class ComplianceVersion implements IComplianceVersion { + /** Represents a Hash. */ + class Hash implements IHash { /** - * Constructs a new ComplianceVersion. + * Constructs a new Hash. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IComplianceVersion); + constructor(properties?: grafeas.v1.IHash); - /** ComplianceVersion cpeUri. */ - public cpeUri: string; + /** Hash type. */ + public type: string; - /** ComplianceVersion version. */ - public version: string; + /** Hash value. */ + public value: (Uint8Array|string); /** - * Creates a new ComplianceVersion instance using the specified properties. + * Creates a new Hash instance using the specified properties. * @param [properties] Properties to set - * @returns ComplianceVersion instance + * @returns Hash instance */ - public static create(properties?: grafeas.v1.IComplianceVersion): grafeas.v1.ComplianceVersion; + public static create(properties?: grafeas.v1.IHash): grafeas.v1.Hash; /** - * Encodes the specified ComplianceVersion message. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. - * @param message ComplianceVersion message or plain object to encode + * Encodes the specified Hash message. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IComplianceVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComplianceVersion message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. - * @param message ComplianceVersion message or plain object to encode + * Encodes the specified Hash message, length delimited. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IComplianceVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComplianceVersion message from the specified reader or buffer. + * Decodes a Hash message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComplianceVersion + * @returns Hash * @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.ComplianceVersion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Hash; /** - * Decodes a ComplianceVersion message from the specified reader or buffer, length delimited. + * Decodes a Hash message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComplianceVersion + * @returns Hash * @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.ComplianceVersion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Hash; /** - * Verifies a ComplianceVersion message. + * Verifies a Hash 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 ComplianceVersion message from a plain object. Also converts values to their respective internal types. + * Creates a Hash message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComplianceVersion + * @returns Hash */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceVersion; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Hash; /** - * Creates a plain object from a ComplianceVersion message. Also converts values to other types if specified. - * @param message ComplianceVersion + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @param message Hash * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ComplianceVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComplianceVersion to JSON. + * Converts this Hash to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ComplianceOccurrence. */ - interface IComplianceOccurrence { + /** Properties of a Command. */ + interface ICommand { - /** ComplianceOccurrence nonCompliantFiles */ - nonCompliantFiles?: (grafeas.v1.INonCompliantFile[]|null); + /** Command name */ + name?: (string|null); - /** ComplianceOccurrence nonComplianceReason */ - nonComplianceReason?: (string|null); + /** Command env */ + env?: (string[]|null); + + /** Command args */ + args?: (string[]|null); + + /** Command dir */ + dir?: (string|null); + + /** Command id */ + id?: (string|null); + + /** Command waitFor */ + waitFor?: (string[]|null); } - /** Represents a ComplianceOccurrence. */ - class ComplianceOccurrence implements IComplianceOccurrence { + /** Represents a Command. */ + class Command implements ICommand { /** - * Constructs a new ComplianceOccurrence. + * Constructs a new Command. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IComplianceOccurrence); + constructor(properties?: grafeas.v1.ICommand); - /** ComplianceOccurrence nonCompliantFiles. */ - public nonCompliantFiles: grafeas.v1.INonCompliantFile[]; + /** Command name. */ + public name: string; - /** ComplianceOccurrence nonComplianceReason. */ - public nonComplianceReason: string; + /** Command env. */ + public env: string[]; + + /** Command args. */ + public args: string[]; + + /** Command dir. */ + public dir: string; + + /** Command id. */ + public id: string; + + /** Command waitFor. */ + public waitFor: string[]; /** - * Creates a new ComplianceOccurrence instance using the specified properties. + * Creates a new Command instance using the specified properties. * @param [properties] Properties to set - * @returns ComplianceOccurrence instance + * @returns Command instance */ - public static create(properties?: grafeas.v1.IComplianceOccurrence): grafeas.v1.ComplianceOccurrence; + public static create(properties?: grafeas.v1.ICommand): grafeas.v1.Command; /** - * Encodes the specified ComplianceOccurrence message. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. - * @param message ComplianceOccurrence message or plain object to encode + * Encodes the specified Command message. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. + * @param message Command message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.IComplianceOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComplianceOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. - * @param message ComplianceOccurrence message or plain object to encode + * Encodes the specified Command message, length delimited. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. + * @param message Command message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.IComplianceOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICommand, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComplianceOccurrence message from the specified reader or buffer. + * Decodes a Command message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComplianceOccurrence + * @returns Command * @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.ComplianceOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Command; /** - * Decodes a ComplianceOccurrence message from the specified reader or buffer, length delimited. + * Decodes a Command message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComplianceOccurrence + * @returns Command * @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.ComplianceOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Command; /** - * Verifies a ComplianceOccurrence message. + * Verifies a Command 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 ComplianceOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a Command message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComplianceOccurrence + * @returns Command */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Command; /** - * Creates a plain object from a ComplianceOccurrence message. Also converts values to other types if specified. - * @param message ComplianceOccurrence + * Creates a plain object from a Command message. Also converts values to other types if specified. + * @param message Command * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.ComplianceOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Command, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComplianceOccurrence to JSON. + * Converts this Command to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a NonCompliantFile. */ - interface INonCompliantFile { + /** Properties of an Artifact. */ + interface IArtifact { - /** NonCompliantFile path */ - path?: (string|null); + /** Artifact checksum */ + checksum?: (string|null); - /** NonCompliantFile displayCommand */ - displayCommand?: (string|null); + /** Artifact id */ + id?: (string|null); - /** NonCompliantFile reason */ - reason?: (string|null); + /** Artifact names */ + names?: (string[]|null); } - /** Represents a NonCompliantFile. */ - class NonCompliantFile implements INonCompliantFile { + /** Represents an Artifact. */ + class Artifact implements IArtifact { /** - * Constructs a new NonCompliantFile. + * Constructs a new Artifact. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.INonCompliantFile); + constructor(properties?: grafeas.v1.IArtifact); - /** NonCompliantFile path. */ - public path: string; + /** Artifact checksum. */ + public checksum: string; - /** NonCompliantFile displayCommand. */ - public displayCommand: string; + /** Artifact id. */ + public id: string; - /** NonCompliantFile reason. */ - public reason: string; + /** Artifact names. */ + public names: string[]; /** - * Creates a new NonCompliantFile instance using the specified properties. + * Creates a new Artifact instance using the specified properties. * @param [properties] Properties to set - * @returns NonCompliantFile instance + * @returns Artifact instance */ - public static create(properties?: grafeas.v1.INonCompliantFile): grafeas.v1.NonCompliantFile; + public static create(properties?: grafeas.v1.IArtifact): grafeas.v1.Artifact; /** - * Encodes the specified NonCompliantFile message. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. - * @param message NonCompliantFile message or plain object to encode + * Encodes the specified Artifact message. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. + * @param message Artifact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: grafeas.v1.INonCompliantFile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NonCompliantFile message, length delimited. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. - * @param message NonCompliantFile message or plain object to encode + * Encodes the specified Artifact message, length delimited. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. + * @param message Artifact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: grafeas.v1.INonCompliantFile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NonCompliantFile message from the specified reader or buffer. + * Decodes an Artifact message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NonCompliantFile + * @returns Artifact * @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.NonCompliantFile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Artifact; /** - * Decodes a NonCompliantFile message from the specified reader or buffer, length delimited. + * Decodes an Artifact message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NonCompliantFile + * @returns Artifact * @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.NonCompliantFile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Artifact; /** - * Verifies a NonCompliantFile message. + * Verifies an Artifact 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 NonCompliantFile message from a plain object. Also converts values to their respective internal types. + * Creates an Artifact message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NonCompliantFile + * @returns Artifact */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.NonCompliantFile; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Artifact; /** - * Creates a plain object from a NonCompliantFile message. Also converts values to other types if specified. - * @param message NonCompliantFile + * Creates a plain object from an Artifact message. Also converts values to other types if specified. + * @param message Artifact * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.NonCompliantFile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Artifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NonCompliantFile to JSON. + * Converts this Artifact to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeploymentNote. */ - interface IDeploymentNote { + /** Properties of a SourceContext. */ + interface ISourceContext { - /** DeploymentNote resourceUri */ - resourceUri?: (string[]|null); + /** SourceContext cloudRepo */ + cloudRepo?: (grafeas.v1.ICloudRepoSourceContext|null); + + /** SourceContext gerrit */ + gerrit?: (grafeas.v1.IGerritSourceContext|null); + + /** SourceContext git */ + git?: (grafeas.v1.IGitSourceContext|null); + + /** SourceContext labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a DeploymentNote. */ - class DeploymentNote implements IDeploymentNote { + /** Represents a SourceContext. */ + class SourceContext implements ISourceContext { /** - * Constructs a new DeploymentNote. + * Constructs a new SourceContext. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDeploymentNote); + constructor(properties?: grafeas.v1.ISourceContext); - /** DeploymentNote resourceUri. */ - public resourceUri: string[]; + /** SourceContext cloudRepo. */ + public cloudRepo?: (grafeas.v1.ICloudRepoSourceContext|null); + + /** SourceContext gerrit. */ + public gerrit?: (grafeas.v1.IGerritSourceContext|null); + + /** SourceContext git. */ + public git?: (grafeas.v1.IGitSourceContext|null); + + /** SourceContext labels. */ + public labels: { [k: string]: string }; + + /** SourceContext context. */ + public context?: ("cloudRepo"|"gerrit"|"git"); /** - * Creates a new DeploymentNote instance using the specified properties. + * Creates a new SourceContext instance using the specified properties. * @param [properties] Properties to set - * @returns DeploymentNote instance + * @returns SourceContext instance */ - public static create(properties?: grafeas.v1.IDeploymentNote): grafeas.v1.DeploymentNote; + public static create(properties?: grafeas.v1.ISourceContext): grafeas.v1.SourceContext; /** - * Encodes the specified DeploymentNote message. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. - * @param message DeploymentNote message or plain object to encode + * Encodes the specified SourceContext message. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. + * @param message SourceContext 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; + public static encode(message: grafeas.v1.ISourceContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * 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 + * Encodes the specified SourceContext message, length delimited. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. + * @param message SourceContext 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; + public static encodeDelimited(message: grafeas.v1.ISourceContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeploymentNote message from the specified reader or buffer. + * Decodes a SourceContext message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeploymentNote + * @returns SourceContext * @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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.SourceContext; /** - * Decodes a DeploymentNote message from the specified reader or buffer, length delimited. + * Decodes a SourceContext message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeploymentNote + * @returns SourceContext * @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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.SourceContext; /** - * Verifies a DeploymentNote message. + * Verifies a SourceContext 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 DeploymentNote message from a plain object. Also converts values to their respective internal types. + * Creates a SourceContext message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeploymentNote + * @returns SourceContext */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.SourceContext; /** - * Creates a plain object from a DeploymentNote message. Also converts values to other types if specified. - * @param message DeploymentNote + * Creates a plain object from a SourceContext message. Also converts values to other types if specified. + * @param message SourceContext * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DeploymentNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.SourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeploymentNote to JSON. + * Converts this SourceContext to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeploymentOccurrence. */ - interface IDeploymentOccurrence { - - /** DeploymentOccurrence userEmail */ - userEmail?: (string|null); - - /** DeploymentOccurrence deployTime */ - deployTime?: (google.protobuf.ITimestamp|null); - - /** DeploymentOccurrence undeployTime */ - undeployTime?: (google.protobuf.ITimestamp|null); - - /** DeploymentOccurrence config */ - config?: (string|null); - - /** DeploymentOccurrence address */ - address?: (string|null); + /** Properties of an AliasContext. */ + interface IAliasContext { - /** DeploymentOccurrence resourceUri */ - resourceUri?: (string[]|null); + /** AliasContext kind */ + kind?: (grafeas.v1.AliasContext.Kind|keyof typeof grafeas.v1.AliasContext.Kind|null); - /** DeploymentOccurrence platform */ - platform?: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform|null); + /** AliasContext name */ + name?: (string|null); } - /** Represents a DeploymentOccurrence. */ - class DeploymentOccurrence implements IDeploymentOccurrence { + /** Represents an AliasContext. */ + class AliasContext implements IAliasContext { /** - * Constructs a new DeploymentOccurrence. + * Constructs a new AliasContext. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDeploymentOccurrence); - - /** DeploymentOccurrence userEmail. */ - public userEmail: string; - - /** DeploymentOccurrence deployTime. */ - public deployTime?: (google.protobuf.ITimestamp|null); - - /** DeploymentOccurrence undeployTime. */ - public undeployTime?: (google.protobuf.ITimestamp|null); - - /** DeploymentOccurrence config. */ - public config: string; - - /** DeploymentOccurrence address. */ - public address: string; + constructor(properties?: grafeas.v1.IAliasContext); - /** DeploymentOccurrence resourceUri. */ - public resourceUri: string[]; + /** AliasContext kind. */ + public kind: (grafeas.v1.AliasContext.Kind|keyof typeof grafeas.v1.AliasContext.Kind); - /** DeploymentOccurrence platform. */ - public platform: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform); + /** AliasContext name. */ + public name: string; /** - * Creates a new DeploymentOccurrence instance using the specified properties. + * Creates a new AliasContext instance using the specified properties. * @param [properties] Properties to set - * @returns DeploymentOccurrence instance + * @returns AliasContext instance */ - public static create(properties?: grafeas.v1.IDeploymentOccurrence): grafeas.v1.DeploymentOccurrence; + public static create(properties?: grafeas.v1.IAliasContext): grafeas.v1.AliasContext; /** - * 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 AliasContext message. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. + * @param message AliasContext 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.IAliasContext, 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 AliasContext message, length delimited. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. + * @param message AliasContext 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.IAliasContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer. + * Decodes an AliasContext 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 AliasContext * @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.AliasContext; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. + * Decodes an AliasContext message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeploymentOccurrence + * @returns AliasContext * @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.AliasContext; /** - * Verifies a DeploymentOccurrence message. + * Verifies an AliasContext 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 AliasContext message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeploymentOccurrence + * @returns AliasContext */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.AliasContext; /** - * 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 AliasContext message. Also converts values to other types if specified. + * @param message AliasContext * @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.AliasContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeploymentOccurrence to JSON. + * Converts this AliasContext to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DeploymentOccurrence { + namespace AliasContext { - /** Platform enum. */ - enum Platform { - PLATFORM_UNSPECIFIED = 0, - GKE = 1, - FLEX = 2, - CUSTOM = 3 + /** Kind enum. */ + enum Kind { + KIND_UNSPECIFIED = 0, + FIXED = 1, + MOVABLE = 2, + OTHER = 4 } } - /** Properties of a DiscoveryNote. */ - interface IDiscoveryNote { + /** Properties of a CloudRepoSourceContext. */ + interface ICloudRepoSourceContext { - /** DiscoveryNote analysisKind */ - analysisKind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); + /** CloudRepoSourceContext repoId */ + repoId?: (grafeas.v1.IRepoId|null); + + /** CloudRepoSourceContext revisionId */ + revisionId?: (string|null); + + /** CloudRepoSourceContext aliasContext */ + aliasContext?: (grafeas.v1.IAliasContext|null); } - /** Represents a DiscoveryNote. */ - class DiscoveryNote implements IDiscoveryNote { + /** Represents a CloudRepoSourceContext. */ + class CloudRepoSourceContext implements ICloudRepoSourceContext { /** - * Constructs a new DiscoveryNote. + * Constructs a new CloudRepoSourceContext. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDiscoveryNote); + constructor(properties?: grafeas.v1.ICloudRepoSourceContext); - /** DiscoveryNote analysisKind. */ - public analysisKind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); + /** CloudRepoSourceContext repoId. */ + public repoId?: (grafeas.v1.IRepoId|null); + + /** CloudRepoSourceContext revisionId. */ + public revisionId?: (string|null); + + /** CloudRepoSourceContext aliasContext. */ + public aliasContext?: (grafeas.v1.IAliasContext|null); + + /** CloudRepoSourceContext revision. */ + public revision?: ("revisionId"|"aliasContext"); /** - * Creates a new DiscoveryNote instance using the specified properties. + * Creates a new CloudRepoSourceContext instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoveryNote instance + * @returns CloudRepoSourceContext instance */ - public static create(properties?: grafeas.v1.IDiscoveryNote): grafeas.v1.DiscoveryNote; + public static create(properties?: grafeas.v1.ICloudRepoSourceContext): grafeas.v1.CloudRepoSourceContext; /** - * 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 CloudRepoSourceContext message. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. + * @param message CloudRepoSourceContext 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.ICloudRepoSourceContext, 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 CloudRepoSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. + * @param message CloudRepoSourceContext 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.ICloudRepoSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoveryNote message from the specified reader or buffer. + * Decodes a CloudRepoSourceContext 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 CloudRepoSourceContext * @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.CloudRepoSourceContext; /** - * Decodes a DiscoveryNote message from the specified reader or buffer, length delimited. + * Decodes a CloudRepoSourceContext message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoveryNote + * @returns CloudRepoSourceContext * @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.CloudRepoSourceContext; /** - * Verifies a DiscoveryNote message. + * Verifies a CloudRepoSourceContext 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 CloudRepoSourceContext message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoveryNote + * @returns CloudRepoSourceContext */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CloudRepoSourceContext; /** - * 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 CloudRepoSourceContext message. Also converts values to other types if specified. + * @param message CloudRepoSourceContext * @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.CloudRepoSourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoveryNote to JSON. + * Converts this CloudRepoSourceContext 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); + /** Properties of a GerritSourceContext. */ + interface IGerritSourceContext { - /** DiscoveryOccurrence analysisStatus */ - analysisStatus?: (grafeas.v1.DiscoveryOccurrence.AnalysisStatus|keyof typeof grafeas.v1.DiscoveryOccurrence.AnalysisStatus|null); + /** GerritSourceContext hostUri */ + hostUri?: (string|null); - /** DiscoveryOccurrence analysisStatusError */ - analysisStatusError?: (google.rpc.IStatus|null); + /** GerritSourceContext gerritProject */ + gerritProject?: (string|null); - /** DiscoveryOccurrence cpe */ - cpe?: (string|null); + /** GerritSourceContext revisionId */ + revisionId?: (string|null); - /** DiscoveryOccurrence lastScanTime */ - lastScanTime?: (google.protobuf.ITimestamp|null); + /** GerritSourceContext aliasContext */ + aliasContext?: (grafeas.v1.IAliasContext|null); } - /** Represents a DiscoveryOccurrence. */ - class DiscoveryOccurrence implements IDiscoveryOccurrence { + /** Represents a GerritSourceContext. */ + class GerritSourceContext implements IGerritSourceContext { /** - * Constructs a new DiscoveryOccurrence. + * Constructs a new GerritSourceContext. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDiscoveryOccurrence); - - /** DiscoveryOccurrence continuousAnalysis. */ - public continuousAnalysis: (grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|keyof typeof grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis); + constructor(properties?: grafeas.v1.IGerritSourceContext); - /** DiscoveryOccurrence analysisStatus. */ - public analysisStatus: (grafeas.v1.DiscoveryOccurrence.AnalysisStatus|keyof typeof grafeas.v1.DiscoveryOccurrence.AnalysisStatus); + /** GerritSourceContext hostUri. */ + public hostUri: string; - /** DiscoveryOccurrence analysisStatusError. */ - public analysisStatusError?: (google.rpc.IStatus|null); + /** GerritSourceContext gerritProject. */ + public gerritProject: string; - /** DiscoveryOccurrence cpe. */ - public cpe: string; + /** GerritSourceContext revisionId. */ + public revisionId?: (string|null); - /** DiscoveryOccurrence lastScanTime. */ - public lastScanTime?: (google.protobuf.ITimestamp|null); + /** GerritSourceContext aliasContext. */ + public aliasContext?: (grafeas.v1.IAliasContext|null); + + /** GerritSourceContext revision. */ + public revision?: ("revisionId"|"aliasContext"); /** - * Creates a new DiscoveryOccurrence instance using the specified properties. + * Creates a new GerritSourceContext instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoveryOccurrence instance + * @returns GerritSourceContext instance */ - public static create(properties?: grafeas.v1.IDiscoveryOccurrence): grafeas.v1.DiscoveryOccurrence; + public static create(properties?: grafeas.v1.IGerritSourceContext): grafeas.v1.GerritSourceContext; /** - * 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 GerritSourceContext message. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. + * @param message GerritSourceContext 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.IGerritSourceContext, 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 GerritSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. + * @param message GerritSourceContext 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.IGerritSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer. + * Decodes a GerritSourceContext 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 GerritSourceContext * @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.GerritSourceContext; /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer, length delimited. + * Decodes a GerritSourceContext message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoveryOccurrence + * @returns GerritSourceContext * @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.GerritSourceContext; /** - * Verifies a DiscoveryOccurrence message. + * Verifies a GerritSourceContext 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 GerritSourceContext message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoveryOccurrence + * @returns GerritSourceContext */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GerritSourceContext; /** - * 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 GerritSourceContext message. Also converts values to other types if specified. + * @param message GerritSourceContext * @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.GerritSourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoveryOccurrence to JSON. + * Converts this GerritSourceContext to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DiscoveryOccurrence { - - /** ContinuousAnalysis enum. */ - enum ContinuousAnalysis { - CONTINUOUS_ANALYSIS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - - /** AnalysisStatus enum. */ - enum AnalysisStatus { - ANALYSIS_STATUS_UNSPECIFIED = 0, - PENDING = 1, - SCANNING = 2, - FINISHED_SUCCESS = 3, - FINISHED_FAILED = 4, - FINISHED_UNSUPPORTED = 5 - } - } + /** Properties of a GitSourceContext. */ + interface IGitSourceContext { - /** Properties of a DSSEAttestationNote. */ - interface IDSSEAttestationNote { + /** GitSourceContext url */ + url?: (string|null); - /** DSSEAttestationNote hint */ - hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); + /** GitSourceContext revisionId */ + revisionId?: (string|null); } - /** Represents a DSSEAttestationNote. */ - class DSSEAttestationNote implements IDSSEAttestationNote { + /** Represents a GitSourceContext. */ + class GitSourceContext implements IGitSourceContext { /** - * Constructs a new DSSEAttestationNote. + * Constructs a new GitSourceContext. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDSSEAttestationNote); + constructor(properties?: grafeas.v1.IGitSourceContext); - /** DSSEAttestationNote hint. */ - public hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); + /** GitSourceContext url. */ + public url: string; + + /** GitSourceContext revisionId. */ + public revisionId: string; /** - * Creates a new DSSEAttestationNote instance using the specified properties. + * Creates a new GitSourceContext instance using the specified properties. * @param [properties] Properties to set - * @returns DSSEAttestationNote instance + * @returns GitSourceContext instance */ - public static create(properties?: grafeas.v1.IDSSEAttestationNote): grafeas.v1.DSSEAttestationNote; + public static create(properties?: grafeas.v1.IGitSourceContext): grafeas.v1.GitSourceContext; /** - * 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 GitSourceContext message. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. + * @param message GitSourceContext 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.IGitSourceContext, 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 GitSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. + * @param message GitSourceContext 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.IGitSourceContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer. + * Decodes a GitSourceContext 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 GitSourceContext * @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.GitSourceContext; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer, length delimited. + * Decodes a GitSourceContext message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DSSEAttestationNote + * @returns GitSourceContext * @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.GitSourceContext; /** - * Verifies a DSSEAttestationNote message. + * Verifies a GitSourceContext 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 GitSourceContext message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DSSEAttestationNote + * @returns GitSourceContext */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationNote; + public static fromObject(object: { [k: string]: any }): grafeas.v1.GitSourceContext; /** - * 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 GitSourceContext message. Also converts values to other types if specified. + * @param message GitSourceContext * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: grafeas.v1.DSSEAttestationNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.GitSourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DSSEAttestationNote to JSON. + * Converts this GitSourceContext 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 }; - - /** - * Converts this DSSEHint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a DSSEAttestationOccurrence. */ - interface IDSSEAttestationOccurrence { + /** Properties of a RepoId. */ + interface IRepoId { - /** DSSEAttestationOccurrence envelope */ - envelope?: (grafeas.v1.IEnvelope|null); + /** RepoId projectRepoId */ + projectRepoId?: (grafeas.v1.IProjectRepoId|null); - /** DSSEAttestationOccurrence statement */ - statement?: (grafeas.v1.IInTotoStatement|null); + /** RepoId uid */ + uid?: (string|null); } - /** Represents a DSSEAttestationOccurrence. */ - class DSSEAttestationOccurrence implements IDSSEAttestationOccurrence { + /** Represents a RepoId. */ + class RepoId implements IRepoId { /** - * Constructs a new DSSEAttestationOccurrence. + * Constructs a new RepoId. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDSSEAttestationOccurrence); + constructor(properties?: grafeas.v1.IRepoId); - /** DSSEAttestationOccurrence envelope. */ - public envelope?: (grafeas.v1.IEnvelope|null); + /** RepoId projectRepoId. */ + public projectRepoId?: (grafeas.v1.IProjectRepoId|null); - /** DSSEAttestationOccurrence statement. */ - public statement?: (grafeas.v1.IInTotoStatement|null); + /** RepoId uid. */ + public uid?: (string|null); - /** DSSEAttestationOccurrence decodedPayload. */ - public decodedPayload?: "statement"; + /** RepoId id. */ + public id?: ("projectRepoId"|"uid"); /** - * Creates a new DSSEAttestationOccurrence instance using the specified properties. + * Creates a new RepoId instance using the specified properties. * @param [properties] Properties to set - * @returns DSSEAttestationOccurrence instance + * @returns RepoId instance */ - public static create(properties?: grafeas.v1.IDSSEAttestationOccurrence): grafeas.v1.DSSEAttestationOccurrence; + public static create(properties?: grafeas.v1.IRepoId): grafeas.v1.RepoId; /** - * 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 RepoId message. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. + * @param message RepoId 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.IRepoId, 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 RepoId message, length delimited. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. + * @param message RepoId 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.IRepoId, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer. + * Decodes a RepoId 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 RepoId * @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.RepoId; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer, length delimited. + * Decodes a RepoId message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DSSEAttestationOccurrence + * @returns RepoId * @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.RepoId; /** - * Verifies a DSSEAttestationOccurrence message. + * Verifies a RepoId 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 RepoId message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DSSEAttestationOccurrence + * @returns RepoId */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.RepoId; /** - * 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 RepoId message. Also converts values to other types if specified. + * @param message RepoId * @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.RepoId, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DSSEAttestationOccurrence to JSON. + * Converts this RepoId to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Grafeas */ - class Grafeas extends $protobuf.rpc.Service { + /** Properties of a ProjectRepoId. */ + interface IProjectRepoId { - /** - * 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); + /** ProjectRepoId projectId */ + projectId?: (string|null); - /** - * 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. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Grafeas; + /** ProjectRepoId repoName */ + repoName?: (string|null); + } - /** - * 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; + /** Represents a ProjectRepoId. */ + class ProjectRepoId implements IProjectRepoId { /** - * Calls GetOccurrence. - * @param request GetOccurrenceRequest message or plain object - * @returns Promise + * Constructs a new ProjectRepoId. + * @param [properties] Properties to set */ - public getOccurrence(request: grafeas.v1.IGetOccurrenceRequest): Promise; + constructor(properties?: grafeas.v1.IProjectRepoId); - /** - * Calls ListOccurrences. - * @param request ListOccurrencesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOccurrencesResponse - */ - public listOccurrences(request: grafeas.v1.IListOccurrencesRequest, callback: grafeas.v1.Grafeas.ListOccurrencesCallback): void; + /** ProjectRepoId projectId. */ + public projectId: string; + + /** ProjectRepoId repoName. */ + public repoName: string; /** - * Calls ListOccurrences. - * @param request ListOccurrencesRequest message or plain object - * @returns Promise + * Creates a new ProjectRepoId instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectRepoId instance */ - public listOccurrences(request: grafeas.v1.IListOccurrencesRequest): Promise; + public static create(properties?: grafeas.v1.IProjectRepoId): grafeas.v1.ProjectRepoId; /** - * Calls DeleteOccurrence. - * @param request DeleteOccurrenceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified ProjectRepoId message. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. + * @param message ProjectRepoId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest, callback: grafeas.v1.Grafeas.DeleteOccurrenceCallback): void; + public static encode(message: grafeas.v1.IProjectRepoId, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteOccurrence. - * @param request DeleteOccurrenceRequest message or plain object - * @returns Promise + * Encodes the specified ProjectRepoId message, length delimited. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. + * @param message ProjectRepoId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteOccurrence(request: grafeas.v1.IDeleteOccurrenceRequest): Promise; + public static encodeDelimited(message: grafeas.v1.IProjectRepoId, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateOccurrence. - * @param request CreateOccurrenceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Occurrence + * Decodes a ProjectRepoId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectRepoId + * @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 decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ProjectRepoId; /** - * Calls CreateOccurrence. - * @param request CreateOccurrenceRequest message or plain object - * @returns Promise + * Decodes a ProjectRepoId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProjectRepoId + * @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): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ProjectRepoId; /** - * Calls BatchCreateOccurrences. - * @param request BatchCreateOccurrencesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchCreateOccurrencesResponse + * Verifies a ProjectRepoId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest, callback: grafeas.v1.Grafeas.BatchCreateOccurrencesCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls BatchCreateOccurrences. - * @param request BatchCreateOccurrencesRequest message or plain object - * @returns Promise + * Creates a ProjectRepoId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProjectRepoId */ - public batchCreateOccurrences(request: grafeas.v1.IBatchCreateOccurrencesRequest): Promise; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ProjectRepoId; /** - * Calls UpdateOccurrence. - * @param request UpdateOccurrenceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Occurrence + * Creates a plain object from a ProjectRepoId message. Also converts values to other types if specified. + * @param message ProjectRepoId + * @param [options] Conversion options + * @returns Plain object */ - public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest, callback: grafeas.v1.Grafeas.UpdateOccurrenceCallback): void; + public static toObject(message: grafeas.v1.ProjectRepoId, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateOccurrence. - * @param request UpdateOccurrenceRequest message or plain object - * @returns Promise + * Converts this ProjectRepoId to JSON. + * @returns JSON object */ - public updateOccurrence(request: grafeas.v1.IUpdateOccurrenceRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ComplianceNote. */ + interface IComplianceNote { + + /** ComplianceNote title */ + title?: (string|null); + + /** ComplianceNote description */ + description?: (string|null); + + /** ComplianceNote version */ + version?: (grafeas.v1.IComplianceVersion[]|null); + + /** ComplianceNote rationale */ + rationale?: (string|null); + + /** ComplianceNote remediation */ + remediation?: (string|null); + + /** ComplianceNote cisBenchmark */ + cisBenchmark?: (grafeas.v1.ComplianceNote.ICisBenchmark|null); + + /** ComplianceNote scanInstructions */ + scanInstructions?: (Uint8Array|string|null); + } + + /** Represents a ComplianceNote. */ + class ComplianceNote implements IComplianceNote { /** - * Calls GetOccurrenceNote. - * @param request GetOccurrenceNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Note + * Constructs a new ComplianceNote. + * @param [properties] Properties to set */ - public getOccurrenceNote(request: grafeas.v1.IGetOccurrenceNoteRequest, callback: grafeas.v1.Grafeas.GetOccurrenceNoteCallback): void; + constructor(properties?: grafeas.v1.IComplianceNote); + + /** ComplianceNote title. */ + public title: string; + + /** ComplianceNote description. */ + public description: string; + + /** ComplianceNote version. */ + public version: grafeas.v1.IComplianceVersion[]; + + /** ComplianceNote rationale. */ + public rationale: string; + + /** ComplianceNote remediation. */ + public remediation: string; + + /** ComplianceNote cisBenchmark. */ + public cisBenchmark?: (grafeas.v1.ComplianceNote.ICisBenchmark|null); + + /** ComplianceNote scanInstructions. */ + public scanInstructions: (Uint8Array|string); + + /** ComplianceNote complianceType. */ + public complianceType?: "cisBenchmark"; /** - * Calls GetOccurrenceNote. - * @param request GetOccurrenceNoteRequest message or plain object - * @returns Promise + * Creates a new ComplianceNote instance using the specified properties. + * @param [properties] Properties to set + * @returns ComplianceNote instance */ - public getOccurrenceNote(request: grafeas.v1.IGetOccurrenceNoteRequest): Promise; + public static create(properties?: grafeas.v1.IComplianceNote): grafeas.v1.ComplianceNote; /** - * 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 ComplianceNote message. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. + * @param message ComplianceNote 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 encode(message: grafeas.v1.IComplianceNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetNote. - * @param request GetNoteRequest message or plain object - * @returns Promise + * Encodes the specified ComplianceNote message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. + * @param message ComplianceNote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getNote(request: grafeas.v1.IGetNoteRequest): Promise; + public static encodeDelimited(message: grafeas.v1.IComplianceNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListNotes. - * @param request ListNotesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNotesResponse + * Decodes a ComplianceNote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComplianceNote + * @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 decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ComplianceNote; /** - * Calls ListNotes. - * @param request ListNotesRequest message or plain object - * @returns Promise + * Decodes a ComplianceNote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComplianceNote + * @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): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ComplianceNote; /** - * Calls DeleteNote. - * @param request DeleteNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Verifies a ComplianceNote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteNote(request: grafeas.v1.IDeleteNoteRequest, callback: grafeas.v1.Grafeas.DeleteNoteCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteNote. - * @param request DeleteNoteRequest message or plain object - * @returns Promise + * Creates a ComplianceNote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComplianceNote */ - public deleteNote(request: grafeas.v1.IDeleteNoteRequest): Promise; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceNote; /** - * Calls CreateNote. - * @param request CreateNoteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Note + * Creates a plain object from a ComplianceNote message. Also converts values to other types if specified. + * @param message ComplianceNote + * @param [options] Conversion options + * @returns Plain object */ - public createNote(request: grafeas.v1.ICreateNoteRequest, callback: grafeas.v1.Grafeas.CreateNoteCallback): void; + public static toObject(message: grafeas.v1.ComplianceNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CreateNote. - * @param request CreateNoteRequest message or plain object - * @returns Promise + * Converts this ComplianceNote to JSON. + * @returns JSON object */ - public createNote(request: grafeas.v1.ICreateNoteRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + namespace ComplianceNote { + + /** Properties of a CisBenchmark. */ + interface ICisBenchmark { + + /** CisBenchmark profileLevel */ + profileLevel?: (number|null); + + /** CisBenchmark severity */ + severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); + } + + /** Represents a CisBenchmark. */ + class CisBenchmark implements ICisBenchmark { + + /** + * Constructs a new CisBenchmark. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.ComplianceNote.ICisBenchmark); + + /** CisBenchmark profileLevel. */ + public profileLevel: number; + + /** CisBenchmark severity. */ + public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + + /** + * Creates a new CisBenchmark instance using the specified properties. + * @param [properties] Properties to set + * @returns CisBenchmark instance + */ + public static create(properties?: grafeas.v1.ComplianceNote.ICisBenchmark): grafeas.v1.ComplianceNote.CisBenchmark; + + /** + * Encodes the specified CisBenchmark message. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. + * @param message CisBenchmark message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: grafeas.v1.ComplianceNote.ICisBenchmark, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CisBenchmark message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. + * @param message CisBenchmark message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: grafeas.v1.ComplianceNote.ICisBenchmark, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CisBenchmark message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CisBenchmark + * @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.ComplianceNote.CisBenchmark; + + /** + * Decodes a CisBenchmark message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CisBenchmark + * @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.ComplianceNote.CisBenchmark; + + /** + * Verifies a CisBenchmark 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 CisBenchmark message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CisBenchmark + */ + public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceNote.CisBenchmark; + + /** + * Creates a plain object from a CisBenchmark message. Also converts values to other types if specified. + * @param message CisBenchmark + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: grafeas.v1.ComplianceNote.CisBenchmark, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CisBenchmark to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ComplianceVersion. */ + interface IComplianceVersion { + + /** ComplianceVersion cpeUri */ + cpeUri?: (string|null); + + /** ComplianceVersion version */ + version?: (string|null); + } + + /** Represents a ComplianceVersion. */ + class ComplianceVersion implements IComplianceVersion { /** - * Calls BatchCreateNotes. - * @param request BatchCreateNotesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchCreateNotesResponse + * Constructs a new ComplianceVersion. + * @param [properties] Properties to set */ - public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest, callback: grafeas.v1.Grafeas.BatchCreateNotesCallback): void; + constructor(properties?: grafeas.v1.IComplianceVersion); + + /** ComplianceVersion cpeUri. */ + public cpeUri: string; + + /** ComplianceVersion version. */ + public version: string; /** - * Calls BatchCreateNotes. - * @param request BatchCreateNotesRequest message or plain object - * @returns Promise + * Creates a new ComplianceVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns ComplianceVersion instance */ - public batchCreateNotes(request: grafeas.v1.IBatchCreateNotesRequest): Promise; + public static create(properties?: grafeas.v1.IComplianceVersion): grafeas.v1.ComplianceVersion; /** - * 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 ComplianceVersion message. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. + * @param message ComplianceVersion 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 encode(message: grafeas.v1.IComplianceVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateNote. - * @param request UpdateNoteRequest message or plain object - * @returns Promise + * Encodes the specified ComplianceVersion message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. + * @param message ComplianceVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateNote(request: grafeas.v1.IUpdateNoteRequest): Promise; + public static encodeDelimited(message: grafeas.v1.IComplianceVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListNoteOccurrences. - * @param request ListNoteOccurrencesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNoteOccurrencesResponse + * Decodes a ComplianceVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComplianceVersion + * @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 decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ComplianceVersion; /** - * Calls ListNoteOccurrences. - * @param request ListNoteOccurrencesRequest message or plain object - * @returns Promise + * Decodes a ComplianceVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComplianceVersion + * @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): Promise; - } - - namespace Grafeas { + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ComplianceVersion; /** - * Callback as used by {@link grafeas.v1.Grafeas#getOccurrence}. - * @param error Error, if any - * @param [response] Occurrence + * Verifies a ComplianceVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link grafeas.v1.Grafeas#listOccurrences}. - * @param error Error, if any - * @param [response] ListOccurrencesResponse + * Creates a ComplianceVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComplianceVersion */ - type ListOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.ListOccurrencesResponse) => void; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceVersion; /** - * Callback as used by {@link grafeas.v1.Grafeas#deleteOccurrence}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a ComplianceVersion message. Also converts values to other types if specified. + * @param message ComplianceVersion + * @param [options] Conversion options + * @returns Plain object */ - type DeleteOccurrenceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: grafeas.v1.ComplianceVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link grafeas.v1.Grafeas#createOccurrence}. - * @param error Error, if any - * @param [response] Occurrence + * Converts this ComplianceVersion to JSON. + * @returns JSON object */ - type CreateOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ComplianceOccurrence. */ + interface IComplianceOccurrence { + + /** ComplianceOccurrence nonCompliantFiles */ + nonCompliantFiles?: (grafeas.v1.INonCompliantFile[]|null); + + /** ComplianceOccurrence nonComplianceReason */ + nonComplianceReason?: (string|null); + } + + /** Represents a ComplianceOccurrence. */ + class ComplianceOccurrence implements IComplianceOccurrence { /** - * Callback as used by {@link grafeas.v1.Grafeas#batchCreateOccurrences}. - * @param error Error, if any - * @param [response] BatchCreateOccurrencesResponse + * Constructs a new ComplianceOccurrence. + * @param [properties] Properties to set */ - type BatchCreateOccurrencesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateOccurrencesResponse) => void; + constructor(properties?: grafeas.v1.IComplianceOccurrence); + + /** ComplianceOccurrence nonCompliantFiles. */ + public nonCompliantFiles: grafeas.v1.INonCompliantFile[]; + + /** ComplianceOccurrence nonComplianceReason. */ + public nonComplianceReason: string; /** - * Callback as used by {@link grafeas.v1.Grafeas#updateOccurrence}. - * @param error Error, if any - * @param [response] Occurrence + * Creates a new ComplianceOccurrence instance using the specified properties. + * @param [properties] Properties to set + * @returns ComplianceOccurrence instance */ - type UpdateOccurrenceCallback = (error: (Error|null), response?: grafeas.v1.Occurrence) => void; + public static create(properties?: grafeas.v1.IComplianceOccurrence): grafeas.v1.ComplianceOccurrence; /** - * Callback as used by {@link grafeas.v1.Grafeas#getOccurrenceNote}. - * @param error Error, if any - * @param [response] Note + * Encodes the specified ComplianceOccurrence message. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. + * @param message ComplianceOccurrence 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.IComplianceOccurrence, 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 ComplianceOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. + * @param message ComplianceOccurrence 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.IComplianceOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link grafeas.v1.Grafeas#listNotes}. - * @param error Error, if any - * @param [response] ListNotesResponse + * Decodes a ComplianceOccurrence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComplianceOccurrence + * @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.ComplianceOccurrence; /** - * Callback as used by {@link grafeas.v1.Grafeas#deleteNote}. - * @param error Error, if any - * @param [response] Empty + * Decodes a ComplianceOccurrence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComplianceOccurrence + * @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.ComplianceOccurrence; /** - * Callback as used by {@link grafeas.v1.Grafeas#createNote}. - * @param error Error, if any - * @param [response] Note + * Verifies a ComplianceOccurrence 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 ComplianceOccurrence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComplianceOccurrence */ - type BatchCreateNotesCallback = (error: (Error|null), response?: grafeas.v1.BatchCreateNotesResponse) => void; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ComplianceOccurrence; /** - * Callback as used by {@link grafeas.v1.Grafeas#updateNote}. - * @param error Error, if any - * @param [response] Note + * Creates a plain object from a ComplianceOccurrence message. Also converts values to other types if specified. + * @param message ComplianceOccurrence + * @param [options] Conversion options + * @returns Plain object */ - type UpdateNoteCallback = (error: (Error|null), response?: grafeas.v1.Note) => void; + public static toObject(message: grafeas.v1.ComplianceOccurrence, 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 ComplianceOccurrence 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); - - /** Occurrence upgrade */ - upgrade?: (grafeas.v1.IUpgradeOccurrence|null); + /** Properties of a NonCompliantFile. */ + interface INonCompliantFile { - /** Occurrence compliance */ - compliance?: (grafeas.v1.IComplianceOccurrence|null); + /** NonCompliantFile path */ + path?: (string|null); - /** Occurrence dsseAttestation */ - dsseAttestation?: (grafeas.v1.IDSSEAttestationOccurrence|null); + /** NonCompliantFile displayCommand */ + displayCommand?: (string|null); - /** Occurrence envelope */ - envelope?: (grafeas.v1.IEnvelope|null); + /** NonCompliantFile reason */ + reason?: (string|null); } - /** Represents an Occurrence. */ - class Occurrence implements IOccurrence { + /** Represents a NonCompliantFile. */ + class NonCompliantFile implements INonCompliantFile { /** - * Constructs a new Occurrence. + * Constructs a new NonCompliantFile. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IOccurrence); - - /** Occurrence name. */ - public name: string; - - /** Occurrence resourceUri. */ - public resourceUri: string; - - /** Occurrence noteName. */ - public noteName: string; - - /** Occurrence kind. */ - public kind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); - - /** Occurrence remediation. */ - public remediation: string; - - /** Occurrence createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** 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); + constructor(properties?: grafeas.v1.INonCompliantFile); - /** Occurrence dsseAttestation. */ - public dsseAttestation?: (grafeas.v1.IDSSEAttestationOccurrence|null); + /** NonCompliantFile path. */ + public path: string; - /** Occurrence envelope. */ - public envelope?: (grafeas.v1.IEnvelope|null); + /** NonCompliantFile displayCommand. */ + public displayCommand: string; - /** Occurrence details. */ - public details?: ("vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"); + /** NonCompliantFile reason. */ + public reason: string; /** - * Creates a new Occurrence instance using the specified properties. + * Creates a new NonCompliantFile instance using the specified properties. * @param [properties] Properties to set - * @returns Occurrence instance + * @returns NonCompliantFile instance */ - public static create(properties?: grafeas.v1.IOccurrence): grafeas.v1.Occurrence; + public static create(properties?: grafeas.v1.INonCompliantFile): grafeas.v1.NonCompliantFile; /** - * 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 NonCompliantFile message. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. + * @param message NonCompliantFile 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.INonCompliantFile, 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 NonCompliantFile message, length delimited. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. + * @param message NonCompliantFile 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.INonCompliantFile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Occurrence message from the specified reader or buffer. + * Decodes a NonCompliantFile 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 NonCompliantFile * @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.NonCompliantFile; /** - * Decodes an Occurrence message from the specified reader or buffer, length delimited. + * Decodes a NonCompliantFile message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Occurrence + * @returns NonCompliantFile * @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.NonCompliantFile; /** - * Verifies an Occurrence message. + * Verifies a NonCompliantFile 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 NonCompliantFile message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Occurrence + * @returns NonCompliantFile */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Occurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.NonCompliantFile; /** - * 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 NonCompliantFile message. Also converts values to other types if specified. + * @param message NonCompliantFile * @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.NonCompliantFile, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Occurrence to JSON. + * Converts this NonCompliantFile to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Note. */ - interface INote { - - /** Note 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); + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + MINIMAL = 1, + LOW = 2, + MEDIUM = 3, + HIGH = 4, + CRITICAL = 5 + } - /** Note compliance */ - compliance?: (grafeas.v1.IComplianceNote|null); + /** Properties of a DeploymentNote. */ + interface IDeploymentNote { - /** Note dsseAttestation */ - dsseAttestation?: (grafeas.v1.IDSSEAttestationNote|null); + /** DeploymentNote resourceUri */ + resourceUri?: (string[]|null); } - /** Represents a Note. */ - class Note implements INote { + /** Represents a DeploymentNote. */ + class DeploymentNote implements IDeploymentNote { /** - * Constructs a new Note. + * Constructs a new DeploymentNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.INote); - - /** 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); + constructor(properties?: grafeas.v1.IDeploymentNote); - /** Note type. */ - public type?: ("vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"); + /** DeploymentNote resourceUri. */ + public resourceUri: string[]; /** - * Creates a new Note instance using the specified properties. + * Creates a new DeploymentNote instance using the specified properties. * @param [properties] Properties to set - * @returns Note instance + * @returns DeploymentNote instance */ - public static create(properties?: grafeas.v1.INote): grafeas.v1.Note; + public static create(properties?: grafeas.v1.IDeploymentNote): grafeas.v1.DeploymentNote; /** - * 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 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.INote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDeploymentNote, 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 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.INote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDeploymentNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Note message from the specified reader or buffer. + * 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 Note + * @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.Note; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeploymentNote; /** - * Decodes a Note message from the specified reader or buffer, length delimited. + * Decodes a DeploymentNote message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Note + * @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.Note; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeploymentNote; /** - * Verifies a Note message. + * 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); /** - * Creates a Note 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. * @param object Plain object - * @returns Note + * @returns DeploymentNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Note; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentNote; /** - * 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 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.Note, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DeploymentNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Note to JSON. + * Converts this DeploymentNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetOccurrenceRequest. */ - interface IGetOccurrenceRequest { + /** Properties of a DeploymentOccurrence. */ + interface IDeploymentOccurrence { + + /** DeploymentOccurrence userEmail */ + userEmail?: (string|null); + + /** DeploymentOccurrence deployTime */ + deployTime?: (google.protobuf.ITimestamp|null); + + /** DeploymentOccurrence undeployTime */ + undeployTime?: (google.protobuf.ITimestamp|null); + + /** DeploymentOccurrence config */ + config?: (string|null); + + /** DeploymentOccurrence address */ + address?: (string|null); + + /** DeploymentOccurrence resourceUri */ + resourceUri?: (string[]|null); - /** GetOccurrenceRequest name */ - name?: (string|null); + /** DeploymentOccurrence platform */ + platform?: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform|null); } - /** Represents a GetOccurrenceRequest. */ - class GetOccurrenceRequest implements IGetOccurrenceRequest { + /** Represents a DeploymentOccurrence. */ + class DeploymentOccurrence implements IDeploymentOccurrence { /** - * Constructs a new GetOccurrenceRequest. + * Constructs a new DeploymentOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IGetOccurrenceRequest); + constructor(properties?: grafeas.v1.IDeploymentOccurrence); - /** GetOccurrenceRequest name. */ - public name: string; + /** DeploymentOccurrence userEmail. */ + public userEmail: string; + + /** DeploymentOccurrence deployTime. */ + public deployTime?: (google.protobuf.ITimestamp|null); + + /** DeploymentOccurrence undeployTime. */ + public undeployTime?: (google.protobuf.ITimestamp|null); + + /** DeploymentOccurrence config. */ + public config: string; + + /** DeploymentOccurrence address. */ + public address: string; + + /** DeploymentOccurrence resourceUri. */ + public resourceUri: string[]; + + /** DeploymentOccurrence platform. */ + public platform: (grafeas.v1.DeploymentOccurrence.Platform|keyof typeof grafeas.v1.DeploymentOccurrence.Platform); /** - * Creates a new GetOccurrenceRequest instance using the specified properties. + * Creates a new DeploymentOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns GetOccurrenceRequest instance + * @returns DeploymentOccurrence instance */ - public static create(properties?: grafeas.v1.IGetOccurrenceRequest): grafeas.v1.GetOccurrenceRequest; + public static create(properties?: grafeas.v1.IDeploymentOccurrence): grafeas.v1.DeploymentOccurrence; /** - * 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 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.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDeploymentOccurrence, 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 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.IGetOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDeploymentOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer. + * 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 GetOccurrenceRequest + * @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.GetOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DeploymentOccurrence; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOccurrenceRequest + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.GetOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DeploymentOccurrence; /** - * Verifies a GetOccurrenceRequest message. + * 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); /** - * Creates a GetOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeploymentOccurrence message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOccurrenceRequest + * @returns DeploymentOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DeploymentOccurrence; /** - * 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 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.GetOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DeploymentOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOccurrenceRequest to JSON. + * Converts this DeploymentOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListOccurrencesRequest. */ - interface IListOccurrencesRequest { - - /** ListOccurrencesRequest parent */ - parent?: (string|null); + namespace DeploymentOccurrence { - /** ListOccurrencesRequest filter */ - filter?: (string|null); + /** Platform enum. */ + enum Platform { + PLATFORM_UNSPECIFIED = 0, + GKE = 1, + FLEX = 2, + CUSTOM = 3 + } + } - /** ListOccurrencesRequest pageSize */ - pageSize?: (number|null); + /** Properties of a DiscoveryNote. */ + interface IDiscoveryNote { - /** ListOccurrencesRequest pageToken */ - pageToken?: (string|null); + /** DiscoveryNote analysisKind */ + analysisKind?: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind|null); } - /** Represents a ListOccurrencesRequest. */ - class ListOccurrencesRequest implements IListOccurrencesRequest { + /** Represents a DiscoveryNote. */ + class DiscoveryNote implements IDiscoveryNote { /** - * Constructs a new ListOccurrencesRequest. + * Constructs a new DiscoveryNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListOccurrencesRequest); - - /** ListOccurrencesRequest parent. */ - public parent: string; - - /** ListOccurrencesRequest filter. */ - public filter: string; - - /** ListOccurrencesRequest pageSize. */ - public pageSize: number; + constructor(properties?: grafeas.v1.IDiscoveryNote); - /** ListOccurrencesRequest pageToken. */ - public pageToken: string; + /** DiscoveryNote analysisKind. */ + public analysisKind: (grafeas.v1.NoteKind|keyof typeof grafeas.v1.NoteKind); /** - * Creates a new ListOccurrencesRequest instance using the specified properties. + * Creates a new DiscoveryNote instance using the specified properties. * @param [properties] Properties to set - * @returns ListOccurrencesRequest instance + * @returns DiscoveryNote instance */ - public static create(properties?: grafeas.v1.IListOccurrencesRequest): grafeas.v1.ListOccurrencesRequest; + public static create(properties?: grafeas.v1.IDiscoveryNote): grafeas.v1.DiscoveryNote; /** - * 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 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.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDiscoveryNote, 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 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.IListOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDiscoveryNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOccurrencesRequest 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 ListOccurrencesRequest + * @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.ListOccurrencesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DiscoveryNote; /** - * Decodes a ListOccurrencesRequest 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 ListOccurrencesRequest + * @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.ListOccurrencesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DiscoveryNote; /** - * Verifies a ListOccurrencesRequest 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 ListOccurrencesRequest 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 ListOccurrencesRequest + * @returns DiscoveryNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryNote; /** - * Creates a plain object from a ListOccurrencesRequest message. Also converts values to other types if specified. - * @param message ListOccurrencesRequest + * 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.ListOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DiscoveryNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOccurrencesRequest to JSON. + * Converts this DiscoveryNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListOccurrencesResponse. */ - interface IListOccurrencesResponse { + /** Properties of a DiscoveryOccurrence. */ + interface IDiscoveryOccurrence { - /** ListOccurrencesResponse occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** DiscoveryOccurrence continuousAnalysis */ + continuousAnalysis?: (grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|keyof typeof grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|null); - /** ListOccurrencesResponse nextPageToken */ - nextPageToken?: (string|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); + + /** DiscoveryOccurrence lastScanTime */ + lastScanTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryOccurrence archiveTime */ + archiveTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListOccurrencesResponse. */ - class ListOccurrencesResponse implements IListOccurrencesResponse { + /** Represents a DiscoveryOccurrence. */ + class DiscoveryOccurrence implements IDiscoveryOccurrence { /** - * Constructs a new ListOccurrencesResponse. + * Constructs a new DiscoveryOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListOccurrencesResponse); + constructor(properties?: grafeas.v1.IDiscoveryOccurrence); - /** ListOccurrencesResponse occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** DiscoveryOccurrence continuousAnalysis. */ + public continuousAnalysis: (grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis|keyof typeof grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis); - /** ListOccurrencesResponse nextPageToken. */ - public nextPageToken: string; + /** 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; + + /** DiscoveryOccurrence lastScanTime. */ + public lastScanTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryOccurrence archiveTime. */ + public archiveTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListOccurrencesResponse instance using the specified properties. + * Creates a new DiscoveryOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns ListOccurrencesResponse instance + * @returns DiscoveryOccurrence instance */ - public static create(properties?: grafeas.v1.IListOccurrencesResponse): grafeas.v1.ListOccurrencesResponse; + public static create(properties?: grafeas.v1.IDiscoveryOccurrence): grafeas.v1.DiscoveryOccurrence; /** - * 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 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.IListOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDiscoveryOccurrence, 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 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.IListOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDiscoveryOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOccurrencesResponse 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 ListOccurrencesResponse + * @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.ListOccurrencesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DiscoveryOccurrence; /** - * Decodes a ListOccurrencesResponse 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 ListOccurrencesResponse + * @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.ListOccurrencesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DiscoveryOccurrence; /** - * Verifies a ListOccurrencesResponse 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 ListOccurrencesResponse 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 ListOccurrencesResponse + * @returns DiscoveryOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListOccurrencesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DiscoveryOccurrence; /** - * 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 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.ListOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DiscoveryOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOccurrencesResponse to JSON. + * Converts this DiscoveryOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteOccurrenceRequest. */ - interface IDeleteOccurrenceRequest { + namespace DiscoveryOccurrence { - /** DeleteOccurrenceRequest name */ - name?: (string|null); + /** ContinuousAnalysis enum. */ + enum ContinuousAnalysis { + CONTINUOUS_ANALYSIS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + + /** AnalysisStatus enum. */ + enum AnalysisStatus { + ANALYSIS_STATUS_UNSPECIFIED = 0, + PENDING = 1, + SCANNING = 2, + FINISHED_SUCCESS = 3, + FINISHED_FAILED = 4, + FINISHED_UNSUPPORTED = 5 + } } - /** Represents a DeleteOccurrenceRequest. */ - class DeleteOccurrenceRequest implements IDeleteOccurrenceRequest { + /** Properties of a DSSEAttestationNote. */ + interface IDSSEAttestationNote { + + /** DSSEAttestationNote hint */ + hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); + } + + /** Represents a DSSEAttestationNote. */ + class DSSEAttestationNote implements IDSSEAttestationNote { /** - * Constructs a new DeleteOccurrenceRequest. + * Constructs a new DSSEAttestationNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDeleteOccurrenceRequest); + constructor(properties?: grafeas.v1.IDSSEAttestationNote); - /** DeleteOccurrenceRequest name. */ - public name: string; + /** DSSEAttestationNote hint. */ + public hint?: (grafeas.v1.DSSEAttestationNote.IDSSEHint|null); /** - * Creates a new DeleteOccurrenceRequest instance using the specified properties. + * Creates a new DSSEAttestationNote instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteOccurrenceRequest instance + * @returns DSSEAttestationNote instance */ - public static create(properties?: grafeas.v1.IDeleteOccurrenceRequest): grafeas.v1.DeleteOccurrenceRequest; + public static create(properties?: grafeas.v1.IDSSEAttestationNote): grafeas.v1.DSSEAttestationNote; /** - * 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 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.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDSSEAttestationNote, 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 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.IDeleteOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDSSEAttestationNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteOccurrenceRequest 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 DeleteOccurrenceRequest + * @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.DeleteOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationNote; /** - * Decodes a DeleteOccurrenceRequest 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 DeleteOccurrenceRequest + * @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.DeleteOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationNote; /** - * Verifies a DeleteOccurrenceRequest 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 DeleteOccurrenceRequest 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 DeleteOccurrenceRequest + * @returns DSSEAttestationNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationNote; /** - * 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 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.DeleteOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DSSEAttestationNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteOccurrenceRequest to JSON. + * Converts this DSSEAttestationNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateOccurrenceRequest. */ - interface ICreateOccurrenceRequest { + namespace DSSEAttestationNote { - /** CreateOccurrenceRequest parent */ - parent?: (string|null); + /** Properties of a DSSEHint. */ + interface IDSSEHint { - /** CreateOccurrenceRequest occurrence */ - occurrence?: (grafeas.v1.IOccurrence|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 CreateOccurrenceRequest. */ - class CreateOccurrenceRequest implements ICreateOccurrenceRequest { + /** 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 CreateOccurrenceRequest. + * Constructs a new DSSEAttestationOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ICreateOccurrenceRequest); + constructor(properties?: grafeas.v1.IDSSEAttestationOccurrence); - /** CreateOccurrenceRequest parent. */ - public parent: string; + /** DSSEAttestationOccurrence envelope. */ + public envelope?: (grafeas.v1.IEnvelope|null); - /** CreateOccurrenceRequest occurrence. */ - public occurrence?: (grafeas.v1.IOccurrence|null); + /** DSSEAttestationOccurrence statement. */ + public statement?: (grafeas.v1.IInTotoStatement|null); + + /** DSSEAttestationOccurrence decodedPayload. */ + public decodedPayload?: "statement"; /** - * Creates a new CreateOccurrenceRequest instance using the specified properties. + * Creates a new DSSEAttestationOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns CreateOccurrenceRequest instance + * @returns DSSEAttestationOccurrence instance */ - public static create(properties?: grafeas.v1.ICreateOccurrenceRequest): grafeas.v1.CreateOccurrenceRequest; + public static create(properties?: grafeas.v1.IDSSEAttestationOccurrence): grafeas.v1.DSSEAttestationOccurrence; /** - * 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 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.ICreateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDSSEAttestationOccurrence, 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 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.ICreateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDSSEAttestationOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateOccurrenceRequest 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 CreateOccurrenceRequest + * @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.CreateOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.DSSEAttestationOccurrence; /** - * Decodes a CreateOccurrenceRequest 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 CreateOccurrenceRequest + * @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.CreateOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.DSSEAttestationOccurrence; /** - * Verifies a CreateOccurrenceRequest 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 CreateOccurrenceRequest 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 CreateOccurrenceRequest + * @returns DSSEAttestationOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.DSSEAttestationOccurrence; /** - * 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 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.CreateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.DSSEAttestationOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateOccurrenceRequest to JSON. + * Converts this DSSEAttestationOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateOccurrenceRequest. */ - interface IUpdateOccurrenceRequest { - - /** UpdateOccurrenceRequest name */ - name?: (string|null); + /** Properties of a Layer. */ + interface ILayer { - /** UpdateOccurrenceRequest occurrence */ - occurrence?: (grafeas.v1.IOccurrence|null); + /** Layer directive */ + directive?: (string|null); - /** UpdateOccurrenceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Layer arguments */ + "arguments"?: (string|null); } - /** Represents an UpdateOccurrenceRequest. */ - class UpdateOccurrenceRequest implements IUpdateOccurrenceRequest { + /** Represents a Layer. */ + class Layer implements ILayer { /** - * Constructs a new UpdateOccurrenceRequest. + * Constructs a new Layer. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IUpdateOccurrenceRequest); - - /** UpdateOccurrenceRequest name. */ - public name: string; + constructor(properties?: grafeas.v1.ILayer); - /** UpdateOccurrenceRequest occurrence. */ - public occurrence?: (grafeas.v1.IOccurrence|null); + /** Layer directive. */ + public directive: string; - /** UpdateOccurrenceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Layer arguments. */ + public arguments: string; /** - * Creates a new UpdateOccurrenceRequest instance using the specified properties. + * Creates a new Layer instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateOccurrenceRequest instance + * @returns Layer instance */ - public static create(properties?: grafeas.v1.IUpdateOccurrenceRequest): grafeas.v1.UpdateOccurrenceRequest; + public static create(properties?: grafeas.v1.ILayer): grafeas.v1.Layer; /** - * 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 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.IUpdateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ILayer, 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 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.IUpdateOccurrenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ILayer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateOccurrenceRequest 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 UpdateOccurrenceRequest + * @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.UpdateOccurrenceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Layer; /** - * Decodes an UpdateOccurrenceRequest 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 UpdateOccurrenceRequest + * @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.UpdateOccurrenceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Layer; /** - * Verifies an UpdateOccurrenceRequest 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 an UpdateOccurrenceRequest 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 UpdateOccurrenceRequest + * @returns Layer */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateOccurrenceRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Layer; /** - * 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 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.UpdateOccurrenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Layer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateOccurrenceRequest to JSON. + * Converts this Layer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetNoteRequest. */ - interface IGetNoteRequest { + /** Properties of a Fingerprint. */ + interface IFingerprint { - /** GetNoteRequest name */ - name?: (string|null); + /** Fingerprint v1Name */ + v1Name?: (string|null); + + /** Fingerprint v2Blob */ + v2Blob?: (string[]|null); + + /** Fingerprint v2Name */ + v2Name?: (string|null); } - /** Represents a GetNoteRequest. */ - class GetNoteRequest implements IGetNoteRequest { + /** Represents a Fingerprint. */ + class Fingerprint implements IFingerprint { /** - * Constructs a new GetNoteRequest. + * Constructs a new Fingerprint. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IGetNoteRequest); + constructor(properties?: grafeas.v1.IFingerprint); - /** GetNoteRequest name. */ - public name: string; + /** Fingerprint v1Name. */ + public v1Name: string; + + /** Fingerprint v2Blob. */ + public v2Blob: string[]; + + /** Fingerprint v2Name. */ + public v2Name: string; /** - * Creates a new GetNoteRequest instance using the specified properties. + * Creates a new Fingerprint instance using the specified properties. * @param [properties] Properties to set - * @returns GetNoteRequest instance + * @returns Fingerprint instance */ - public static create(properties?: grafeas.v1.IGetNoteRequest): grafeas.v1.GetNoteRequest; + public static create(properties?: grafeas.v1.IFingerprint): grafeas.v1.Fingerprint; /** - * 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 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.IGetNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IFingerprint, 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 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.IGetNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNoteRequest 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 GetNoteRequest + * @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.GetNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Fingerprint; /** - * Decodes a GetNoteRequest 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 GetNoteRequest + * @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.GetNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Fingerprint; /** - * Verifies a GetNoteRequest 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 GetNoteRequest 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 GetNoteRequest + * @returns Fingerprint */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GetNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Fingerprint; /** - * 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 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.GetNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Fingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNoteRequest to JSON. + * Converts this Fingerprint to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetOccurrenceNoteRequest. */ - interface IGetOccurrenceNoteRequest { + /** Properties of an ImageNote. */ + interface IImageNote { - /** GetOccurrenceNoteRequest name */ - name?: (string|null); + /** ImageNote resourceUrl */ + resourceUrl?: (string|null); + + /** ImageNote fingerprint */ + fingerprint?: (grafeas.v1.IFingerprint|null); } - /** Represents a GetOccurrenceNoteRequest. */ - class GetOccurrenceNoteRequest implements IGetOccurrenceNoteRequest { + /** Represents an ImageNote. */ + class ImageNote implements IImageNote { /** - * Constructs a new GetOccurrenceNoteRequest. + * Constructs a new ImageNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IGetOccurrenceNoteRequest); + constructor(properties?: grafeas.v1.IImageNote); - /** GetOccurrenceNoteRequest name. */ - public name: string; + /** ImageNote resourceUrl. */ + public resourceUrl: string; + + /** ImageNote fingerprint. */ + public fingerprint?: (grafeas.v1.IFingerprint|null); /** - * Creates a new GetOccurrenceNoteRequest instance using the specified properties. + * Creates a new ImageNote instance using the specified properties. * @param [properties] Properties to set - * @returns GetOccurrenceNoteRequest instance + * @returns ImageNote instance */ - public static create(properties?: grafeas.v1.IGetOccurrenceNoteRequest): grafeas.v1.GetOccurrenceNoteRequest; + public static create(properties?: grafeas.v1.IImageNote): grafeas.v1.ImageNote; /** - * 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 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.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IImageNote, 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 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.IGetOccurrenceNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IImageNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOccurrenceNoteRequest 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 GetOccurrenceNoteRequest + * @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.GetOccurrenceNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ImageNote; /** - * Decodes a GetOccurrenceNoteRequest 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 GetOccurrenceNoteRequest + * @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.GetOccurrenceNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ImageNote; /** - * Verifies a GetOccurrenceNoteRequest 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 GetOccurrenceNoteRequest 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 GetOccurrenceNoteRequest + * @returns ImageNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.GetOccurrenceNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageNote; /** - * Creates a plain object from a GetOccurrenceNoteRequest message. Also converts values to other types if specified. - * @param message GetOccurrenceNoteRequest + * 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.GetOccurrenceNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ImageNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOccurrenceNoteRequest to JSON. + * Converts this ImageNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNotesRequest. */ - interface IListNotesRequest { + /** Properties of an ImageOccurrence. */ + interface IImageOccurrence { - /** ListNotesRequest parent */ - parent?: (string|null); + /** ImageOccurrence fingerprint */ + fingerprint?: (grafeas.v1.IFingerprint|null); - /** ListNotesRequest filter */ - filter?: (string|null); + /** ImageOccurrence distance */ + distance?: (number|null); - /** ListNotesRequest pageSize */ - pageSize?: (number|null); + /** ImageOccurrence layerInfo */ + layerInfo?: (grafeas.v1.ILayer[]|null); - /** ListNotesRequest pageToken */ - pageToken?: (string|null); + /** ImageOccurrence baseResourceUrl */ + baseResourceUrl?: (string|null); } - /** Represents a ListNotesRequest. */ - class ListNotesRequest implements IListNotesRequest { + /** Represents an ImageOccurrence. */ + class ImageOccurrence implements IImageOccurrence { /** - * Constructs a new ListNotesRequest. + * Constructs a new ImageOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNotesRequest); + constructor(properties?: grafeas.v1.IImageOccurrence); - /** ListNotesRequest parent. */ - public parent: string; + /** ImageOccurrence fingerprint. */ + public fingerprint?: (grafeas.v1.IFingerprint|null); - /** ListNotesRequest filter. */ - public filter: string; + /** ImageOccurrence distance. */ + public distance: number; - /** ListNotesRequest pageSize. */ - public pageSize: number; + /** ImageOccurrence layerInfo. */ + public layerInfo: grafeas.v1.ILayer[]; - /** ListNotesRequest pageToken. */ - public pageToken: string; + /** ImageOccurrence baseResourceUrl. */ + public baseResourceUrl: string; /** - * Creates a new ListNotesRequest instance using the specified properties. + * Creates a new ImageOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns ListNotesRequest instance + * @returns ImageOccurrence instance */ - public static create(properties?: grafeas.v1.IListNotesRequest): grafeas.v1.ListNotesRequest; + public static create(properties?: grafeas.v1.IImageOccurrence): grafeas.v1.ImageOccurrence; /** - * 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 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.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IImageOccurrence, 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 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.IListNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IImageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNotesRequest 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 ListNotesRequest + * @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.ListNotesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.ImageOccurrence; /** - * Decodes a ListNotesRequest 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 ListNotesRequest + * @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.ListNotesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.ImageOccurrence; /** - * Verifies a ListNotesRequest 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 ListNotesRequest 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 ListNotesRequest + * @returns ImageOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageOccurrence; /** - * Creates a plain object from a ListNotesRequest message. Also converts values to other types if specified. - * @param message ListNotesRequest + * 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.ListNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.ImageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNotesRequest to JSON. + * Converts this ImageOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNotesResponse. */ - interface IListNotesResponse { + /** Architecture enum. */ + enum Architecture { + ARCHITECTURE_UNSPECIFIED = 0, + X86 = 1, + X64 = 2 + } - /** ListNotesResponse notes */ - notes?: (grafeas.v1.INote[]|null); + /** Properties of a Distribution. */ + interface IDistribution { - /** ListNotesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Distribution cpeUri */ + cpeUri?: (string|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 a ListNotesResponse. */ - class ListNotesResponse implements IListNotesResponse { + /** Represents a Distribution. */ + class Distribution implements IDistribution { /** - * Constructs a new ListNotesResponse. + * Constructs a new Distribution. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNotesResponse); + constructor(properties?: grafeas.v1.IDistribution); - /** ListNotesResponse notes. */ - public notes: grafeas.v1.INote[]; + /** Distribution cpeUri. */ + public cpeUri: string; - /** ListNotesResponse nextPageToken. */ - public nextPageToken: string; + /** Distribution architecture. */ + public architecture: (grafeas.v1.Architecture|keyof typeof grafeas.v1.Architecture); + + /** 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 ListNotesResponse instance using the specified properties. + * Creates a new Distribution instance using the specified properties. * @param [properties] Properties to set - * @returns ListNotesResponse instance + * @returns Distribution instance */ - public static create(properties?: grafeas.v1.IListNotesResponse): grafeas.v1.ListNotesResponse; + public static create(properties?: grafeas.v1.IDistribution): grafeas.v1.Distribution; /** - * 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 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.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IDistribution, 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 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.IListNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNotesResponse 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 ListNotesResponse + * @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.ListNotesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Distribution; /** - * Decodes a ListNotesResponse 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 ListNotesResponse + * @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.ListNotesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Distribution; /** - * Verifies a ListNotesResponse 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 a ListNotesResponse 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 ListNotesResponse + * @returns Distribution */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNotesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Distribution; /** - * 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 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.ListNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNotesResponse to JSON. + * Converts this Distribution to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteNoteRequest. */ - interface IDeleteNoteRequest { + /** Properties of a Location. */ + interface ILocation { - /** DeleteNoteRequest name */ - name?: (string|null); + /** Location cpeUri */ + cpeUri?: (string|null); + + /** Location version */ + version?: (grafeas.v1.IVersion|null); + + /** Location path */ + path?: (string|null); } - /** Represents a DeleteNoteRequest. */ - class DeleteNoteRequest implements IDeleteNoteRequest { + /** Represents a Location. */ + class Location implements ILocation { /** - * Constructs a new DeleteNoteRequest. + * Constructs a new Location. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IDeleteNoteRequest); + constructor(properties?: grafeas.v1.ILocation); - /** DeleteNoteRequest name. */ - public name: string; + /** Location cpeUri. */ + public cpeUri: string; + + /** Location version. */ + public version?: (grafeas.v1.IVersion|null); + + /** Location path. */ + public path: string; /** - * Creates a new DeleteNoteRequest instance using the specified properties. + * Creates a new Location instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteNoteRequest instance + * @returns Location instance */ - public static create(properties?: grafeas.v1.IDeleteNoteRequest): grafeas.v1.DeleteNoteRequest; + public static create(properties?: grafeas.v1.ILocation): grafeas.v1.Location; /** - * 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 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.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ILocation, 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 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.IDeleteNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteNoteRequest 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 DeleteNoteRequest + * @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.DeleteNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Location; /** - * Decodes a DeleteNoteRequest 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 DeleteNoteRequest + * @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.DeleteNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Location; /** - * Verifies a DeleteNoteRequest 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 DeleteNoteRequest 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 DeleteNoteRequest + * @returns Location */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.DeleteNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Location; /** - * Creates a plain object from a DeleteNoteRequest message. Also converts values to other types if specified. - * @param message DeleteNoteRequest + * 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.DeleteNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteNoteRequest to JSON. + * Converts this Location to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateNoteRequest. */ - interface ICreateNoteRequest { - - /** CreateNoteRequest parent */ - parent?: (string|null); + /** Properties of a PackageNote. */ + interface IPackageNote { - /** CreateNoteRequest noteId */ - noteId?: (string|null); + /** PackageNote name */ + name?: (string|null); - /** CreateNoteRequest note */ - note?: (grafeas.v1.INote|null); + /** PackageNote distribution */ + distribution?: (grafeas.v1.IDistribution[]|null); } - /** Represents a CreateNoteRequest. */ - class CreateNoteRequest implements ICreateNoteRequest { + /** Represents a PackageNote. */ + class PackageNote implements IPackageNote { /** - * Constructs a new CreateNoteRequest. + * Constructs a new PackageNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.ICreateNoteRequest); - - /** CreateNoteRequest parent. */ - public parent: string; + constructor(properties?: grafeas.v1.IPackageNote); - /** CreateNoteRequest noteId. */ - public noteId: string; + /** PackageNote name. */ + public name: string; - /** CreateNoteRequest note. */ - public note?: (grafeas.v1.INote|null); + /** PackageNote distribution. */ + public distribution: grafeas.v1.IDistribution[]; /** - * Creates a new CreateNoteRequest instance using the specified properties. + * Creates a new PackageNote instance using the specified properties. * @param [properties] Properties to set - * @returns CreateNoteRequest instance + * @returns PackageNote instance */ - public static create(properties?: grafeas.v1.ICreateNoteRequest): grafeas.v1.CreateNoteRequest; + public static create(properties?: grafeas.v1.IPackageNote): grafeas.v1.PackageNote; /** - * 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 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.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IPackageNote, 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 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.ICreateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IPackageNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateNoteRequest 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 CreateNoteRequest + * @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.CreateNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.PackageNote; /** - * Decodes a CreateNoteRequest 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 CreateNoteRequest + * @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.CreateNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.PackageNote; /** - * Verifies a CreateNoteRequest 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 CreateNoteRequest 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 CreateNoteRequest + * @returns PackageNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.CreateNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageNote; /** - * Creates a plain object from a CreateNoteRequest message. Also converts values to other types if specified. - * @param message CreateNoteRequest + * 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.CreateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.PackageNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateNoteRequest to JSON. + * Converts this PackageNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateNoteRequest. */ - interface IUpdateNoteRequest { + /** Properties of a PackageOccurrence. */ + interface IPackageOccurrence { - /** UpdateNoteRequest name */ + /** PackageOccurrence name */ name?: (string|null); - /** UpdateNoteRequest note */ - note?: (grafeas.v1.INote|null); - - /** UpdateNoteRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** PackageOccurrence location */ + location?: (grafeas.v1.ILocation[]|null); } - /** Represents an UpdateNoteRequest. */ - class UpdateNoteRequest implements IUpdateNoteRequest { + /** Represents a PackageOccurrence. */ + class PackageOccurrence implements IPackageOccurrence { /** - * Constructs a new UpdateNoteRequest. + * Constructs a new PackageOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IUpdateNoteRequest); + constructor(properties?: grafeas.v1.IPackageOccurrence); - /** UpdateNoteRequest name. */ + /** PackageOccurrence name. */ public name: string; - /** UpdateNoteRequest note. */ - public note?: (grafeas.v1.INote|null); - - /** UpdateNoteRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** PackageOccurrence location. */ + public location: grafeas.v1.ILocation[]; /** - * Creates a new UpdateNoteRequest instance using the specified properties. + * Creates a new PackageOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateNoteRequest instance + * @returns PackageOccurrence instance */ - public static create(properties?: grafeas.v1.IUpdateNoteRequest): grafeas.v1.UpdateNoteRequest; + public static create(properties?: grafeas.v1.IPackageOccurrence): grafeas.v1.PackageOccurrence; /** - * 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 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.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IPackageOccurrence, 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 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.IUpdateNoteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IPackageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateNoteRequest 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 UpdateNoteRequest + * @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.UpdateNoteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.PackageOccurrence; /** - * Decodes an UpdateNoteRequest 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 UpdateNoteRequest + * @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.UpdateNoteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.PackageOccurrence; /** - * Verifies an UpdateNoteRequest 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 an UpdateNoteRequest 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 UpdateNoteRequest + * @returns PackageOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpdateNoteRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.PackageOccurrence; /** - * 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 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.UpdateNoteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.PackageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateNoteRequest to JSON. + * Converts this PackageOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNoteOccurrencesRequest. */ - interface IListNoteOccurrencesRequest { + /** Properties of a Version. */ + interface IVersion { - /** ListNoteOccurrencesRequest name */ + /** Version epoch */ + epoch?: (number|null); + + /** Version name */ name?: (string|null); - /** ListNoteOccurrencesRequest filter */ - filter?: (string|null); + /** Version revision */ + revision?: (string|null); - /** ListNoteOccurrencesRequest pageSize */ - pageSize?: (number|null); + /** Version inclusive */ + inclusive?: (boolean|null); - /** ListNoteOccurrencesRequest pageToken */ - pageToken?: (string|null); + /** Version kind */ + kind?: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind|null); + + /** Version fullName */ + fullName?: (string|null); } - /** Represents a ListNoteOccurrencesRequest. */ - class ListNoteOccurrencesRequest implements IListNoteOccurrencesRequest { + /** Represents a Version. */ + class Version implements IVersion { /** - * Constructs a new ListNoteOccurrencesRequest. + * Constructs a new Version. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNoteOccurrencesRequest); + constructor(properties?: grafeas.v1.IVersion); - /** ListNoteOccurrencesRequest name. */ + /** Version epoch. */ + public epoch: number; + + /** Version name. */ public name: string; - /** ListNoteOccurrencesRequest filter. */ - public filter: string; + /** Version revision. */ + public revision: string; - /** ListNoteOccurrencesRequest pageSize. */ - public pageSize: number; + /** Version inclusive. */ + public inclusive: boolean; - /** ListNoteOccurrencesRequest pageToken. */ - public pageToken: string; + /** Version kind. */ + public kind: (grafeas.v1.Version.VersionKind|keyof typeof grafeas.v1.Version.VersionKind); + + /** Version fullName. */ + public fullName: string; /** - * Creates a new ListNoteOccurrencesRequest instance using the specified properties. + * Creates a new Version instance using the specified properties. * @param [properties] Properties to set - * @returns ListNoteOccurrencesRequest instance + * @returns Version instance */ - public static create(properties?: grafeas.v1.IListNoteOccurrencesRequest): grafeas.v1.ListNoteOccurrencesRequest; + public static create(properties?: grafeas.v1.IVersion): grafeas.v1.Version; /** - * 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 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.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IVersion, 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 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.IListNoteOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNoteOccurrencesRequest 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 ListNoteOccurrencesRequest + * @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.ListNoteOccurrencesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.Version; /** - * Decodes a ListNoteOccurrencesRequest 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 ListNoteOccurrencesRequest + * @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.ListNoteOccurrencesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.Version; /** - * Verifies a ListNoteOccurrencesRequest 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 ListNoteOccurrencesRequest 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 ListNoteOccurrencesRequest + * @returns Version */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.Version; /** - * 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 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.ListNoteOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNoteOccurrencesRequest to JSON. + * Converts this Version to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNoteOccurrencesResponse. */ - interface IListNoteOccurrencesResponse { + namespace Version { - /** ListNoteOccurrencesResponse occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** VersionKind enum. */ + enum VersionKind { + VERSION_KIND_UNSPECIFIED = 0, + NORMAL = 1, + MINIMUM = 2, + MAXIMUM = 3 + } + } - /** ListNoteOccurrencesResponse nextPageToken */ - nextPageToken?: (string|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 ListNoteOccurrencesResponse. */ - class ListNoteOccurrencesResponse implements IListNoteOccurrencesResponse { + /** Represents an UpgradeNote. */ + class UpgradeNote implements IUpgradeNote { /** - * Constructs a new ListNoteOccurrencesResponse. + * Constructs a new UpgradeNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IListNoteOccurrencesResponse); + constructor(properties?: grafeas.v1.IUpgradeNote); - /** ListNoteOccurrencesResponse occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** UpgradeNote package. */ + public package: string; - /** ListNoteOccurrencesResponse nextPageToken. */ - public nextPageToken: string; + /** 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 ListNoteOccurrencesResponse instance using the specified properties. + * Creates a new UpgradeNote instance using the specified properties. * @param [properties] Properties to set - * @returns ListNoteOccurrencesResponse instance + * @returns UpgradeNote instance */ - public static create(properties?: grafeas.v1.IListNoteOccurrencesResponse): grafeas.v1.ListNoteOccurrencesResponse; + public static create(properties?: grafeas.v1.IUpgradeNote): grafeas.v1.UpgradeNote; /** - * 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 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.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpgradeNote, 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 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.IListNoteOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpgradeNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNoteOccurrencesResponse 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 ListNoteOccurrencesResponse + * @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.ListNoteOccurrencesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeNote; /** - * Decodes a ListNoteOccurrencesResponse 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 ListNoteOccurrencesResponse + * @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.ListNoteOccurrencesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeNote; /** - * Verifies a ListNoteOccurrencesResponse 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 ListNoteOccurrencesResponse 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 ListNoteOccurrencesResponse + * @returns UpgradeNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ListNoteOccurrencesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeNote; /** - * Creates a plain object from a ListNoteOccurrencesResponse message. Also converts values to other types if specified. - * @param message ListNoteOccurrencesResponse + * 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.ListNoteOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpgradeNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNoteOccurrencesResponse to JSON. + * Converts this UpgradeNote to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateNotesRequest. */ - interface IBatchCreateNotesRequest { + /** Properties of an UpgradeDistribution. */ + interface IUpgradeDistribution { - /** BatchCreateNotesRequest parent */ - parent?: (string|null); + /** UpgradeDistribution cpeUri */ + cpeUri?: (string|null); - /** BatchCreateNotesRequest notes */ - notes?: ({ [k: string]: grafeas.v1.INote }|null); + /** UpgradeDistribution classification */ + classification?: (string|null); + + /** UpgradeDistribution severity */ + severity?: (string|null); + + /** UpgradeDistribution cve */ + cve?: (string[]|null); } - /** Represents a BatchCreateNotesRequest. */ - class BatchCreateNotesRequest implements IBatchCreateNotesRequest { + /** Represents an UpgradeDistribution. */ + class UpgradeDistribution implements IUpgradeDistribution { /** - * Constructs a new BatchCreateNotesRequest. + * Constructs a new UpgradeDistribution. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateNotesRequest); + constructor(properties?: grafeas.v1.IUpgradeDistribution); - /** BatchCreateNotesRequest parent. */ - public parent: string; + /** UpgradeDistribution cpeUri. */ + public cpeUri: string; - /** BatchCreateNotesRequest notes. */ - public notes: { [k: string]: grafeas.v1.INote }; + /** UpgradeDistribution classification. */ + public classification: string; + + /** UpgradeDistribution severity. */ + public severity: string; + + /** UpgradeDistribution cve. */ + public cve: string[]; /** - * Creates a new BatchCreateNotesRequest instance using the specified properties. + * Creates a new UpgradeDistribution instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateNotesRequest instance + * @returns UpgradeDistribution instance */ - public static create(properties?: grafeas.v1.IBatchCreateNotesRequest): grafeas.v1.BatchCreateNotesRequest; + public static create(properties?: grafeas.v1.IUpgradeDistribution): grafeas.v1.UpgradeDistribution; /** - * 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 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.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpgradeDistribution, 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 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.IBatchCreateNotesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpgradeDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateNotesRequest 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 BatchCreateNotesRequest + * @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.BatchCreateNotesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeDistribution; /** - * Decodes a BatchCreateNotesRequest 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 BatchCreateNotesRequest + * @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.BatchCreateNotesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeDistribution; /** - * Verifies a BatchCreateNotesRequest 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 BatchCreateNotesRequest 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 BatchCreateNotesRequest + * @returns UpgradeDistribution */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeDistribution; /** - * Creates a plain object from a BatchCreateNotesRequest message. Also converts values to other types if specified. - * @param message BatchCreateNotesRequest + * 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.BatchCreateNotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpgradeDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateNotesRequest to JSON. + * Converts this UpgradeDistribution to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateNotesResponse. */ - interface IBatchCreateNotesResponse { + /** Properties of a WindowsUpdate. */ + interface IWindowsUpdate { - /** BatchCreateNotesResponse notes */ - notes?: (grafeas.v1.INote[]|null); + /** WindowsUpdate identity */ + identity?: (grafeas.v1.WindowsUpdate.IIdentity|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 BatchCreateNotesResponse. */ - class BatchCreateNotesResponse implements IBatchCreateNotesResponse { + /** Represents a WindowsUpdate. */ + class WindowsUpdate implements IWindowsUpdate { /** - * Constructs a new BatchCreateNotesResponse. + * Constructs a new WindowsUpdate. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateNotesResponse); + constructor(properties?: grafeas.v1.IWindowsUpdate); - /** BatchCreateNotesResponse notes. */ - public notes: grafeas.v1.INote[]; + /** WindowsUpdate identity. */ + public identity?: (grafeas.v1.WindowsUpdate.IIdentity|null); + + /** 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 BatchCreateNotesResponse instance using the specified properties. + * Creates a new WindowsUpdate instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateNotesResponse instance + * @returns WindowsUpdate instance */ - public static create(properties?: grafeas.v1.IBatchCreateNotesResponse): grafeas.v1.BatchCreateNotesResponse; + public static create(properties?: grafeas.v1.IWindowsUpdate): grafeas.v1.WindowsUpdate; /** - * 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 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.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IWindowsUpdate, 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 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.IBatchCreateNotesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IWindowsUpdate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateNotesResponse 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 BatchCreateNotesResponse + * @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.BatchCreateNotesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.WindowsUpdate; /** - * Decodes a BatchCreateNotesResponse 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 BatchCreateNotesResponse + * @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.BatchCreateNotesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.WindowsUpdate; /** - * Verifies a BatchCreateNotesResponse 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 BatchCreateNotesResponse 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 BatchCreateNotesResponse + * @returns WindowsUpdate */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateNotesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate; /** - * 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 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.BatchCreateNotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.WindowsUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateNotesResponse to JSON. + * Converts this WindowsUpdate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateOccurrencesRequest. */ - interface IBatchCreateOccurrencesRequest { + namespace WindowsUpdate { - /** BatchCreateOccurrencesRequest parent */ - parent?: (string|null); + /** Properties of an Identity. */ + interface IIdentity { - /** BatchCreateOccurrencesRequest occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** 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; + + /** + * 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); + + /** Category categoryId. */ + public categoryId: string; + + /** Category name. */ + public name: string; + + /** + * 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 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; + + /** + * 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 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; + + /** + * 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; + + /** + * 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 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; + + /** + * 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 }; + } } - /** Represents a BatchCreateOccurrencesRequest. */ - class BatchCreateOccurrencesRequest implements IBatchCreateOccurrencesRequest { + /** 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 BatchCreateOccurrencesRequest. + * Constructs a new UpgradeOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateOccurrencesRequest); + constructor(properties?: grafeas.v1.IUpgradeOccurrence); + + /** UpgradeOccurrence package. */ + public package: string; + + /** UpgradeOccurrence parsedVersion. */ + public parsedVersion?: (grafeas.v1.IVersion|null); - /** BatchCreateOccurrencesRequest parent. */ - public parent: string; + /** UpgradeOccurrence distribution. */ + public distribution?: (grafeas.v1.IUpgradeDistribution|null); - /** BatchCreateOccurrencesRequest occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** UpgradeOccurrence windowsUpdate. */ + public windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); /** - * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. + * Creates a new UpgradeOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateOccurrencesRequest instance + * @returns UpgradeOccurrence instance */ - public static create(properties?: grafeas.v1.IBatchCreateOccurrencesRequest): grafeas.v1.BatchCreateOccurrencesRequest; + public static create(properties?: grafeas.v1.IUpgradeOccurrence): grafeas.v1.UpgradeOccurrence; /** - * 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 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.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IUpgradeOccurrence, 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 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.IBatchCreateOccurrencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IUpgradeOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateOccurrencesRequest 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 BatchCreateOccurrencesRequest + * @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.BatchCreateOccurrencesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.UpgradeOccurrence; /** - * Decodes a BatchCreateOccurrencesRequest 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 BatchCreateOccurrencesRequest + * @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.BatchCreateOccurrencesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.UpgradeOccurrence; /** - * Verifies a BatchCreateOccurrencesRequest 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 a BatchCreateOccurrencesRequest 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 BatchCreateOccurrencesRequest + * @returns UpgradeOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesRequest; + public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeOccurrence; /** - * 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 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.BatchCreateOccurrencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.UpgradeOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateOccurrencesRequest to JSON. + * Converts this UpgradeOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateOccurrencesResponse. */ - interface IBatchCreateOccurrencesResponse { + /** Properties of a VulnerabilityNote. */ + interface IVulnerabilityNote { - /** BatchCreateOccurrencesResponse occurrences */ - occurrences?: (grafeas.v1.IOccurrence[]|null); + /** VulnerabilityNote cvssScore */ + cvssScore?: (number|null); + + /** VulnerabilityNote severity */ + severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); + + /** VulnerabilityNote details */ + details?: (grafeas.v1.VulnerabilityNote.IDetail[]|null); + + /** VulnerabilityNote cvssV3 */ + cvssV3?: (grafeas.v1.ICVSSv3|null); + + /** VulnerabilityNote windowsDetails */ + windowsDetails?: (grafeas.v1.VulnerabilityNote.IWindowsDetail[]|null); + + /** VulnerabilityNote sourceUpdateTime */ + sourceUpdateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a BatchCreateOccurrencesResponse. */ - class BatchCreateOccurrencesResponse implements IBatchCreateOccurrencesResponse { + /** Represents a VulnerabilityNote. */ + class VulnerabilityNote implements IVulnerabilityNote { /** - * Constructs a new BatchCreateOccurrencesResponse. + * Constructs a new VulnerabilityNote. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IBatchCreateOccurrencesResponse); + constructor(properties?: grafeas.v1.IVulnerabilityNote); - /** BatchCreateOccurrencesResponse occurrences. */ - public occurrences: grafeas.v1.IOccurrence[]; + /** VulnerabilityNote cvssScore. */ + public cvssScore: number; + + /** VulnerabilityNote severity. */ + public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); + + /** VulnerabilityNote details. */ + public details: grafeas.v1.VulnerabilityNote.IDetail[]; + + /** VulnerabilityNote cvssV3. */ + public cvssV3?: (grafeas.v1.ICVSSv3|null); + + /** VulnerabilityNote windowsDetails. */ + public windowsDetails: grafeas.v1.VulnerabilityNote.IWindowsDetail[]; + + /** VulnerabilityNote sourceUpdateTime. */ + public sourceUpdateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. + * Creates a new VulnerabilityNote instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateOccurrencesResponse instance + * @returns VulnerabilityNote instance */ - public static create(properties?: grafeas.v1.IBatchCreateOccurrencesResponse): grafeas.v1.BatchCreateOccurrencesResponse; + public static create(properties?: grafeas.v1.IVulnerabilityNote): grafeas.v1.VulnerabilityNote; /** - * 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 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.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IVulnerabilityNote, 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 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.IBatchCreateOccurrencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IVulnerabilityNote, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateOccurrencesResponse 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 BatchCreateOccurrencesResponse + * @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.BatchCreateOccurrencesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityNote; /** - * Decodes a BatchCreateOccurrencesResponse 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 BatchCreateOccurrencesResponse + * @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.BatchCreateOccurrencesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityNote; /** - * Verifies a BatchCreateOccurrencesResponse 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 a BatchCreateOccurrencesResponse 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 BatchCreateOccurrencesResponse + * @returns VulnerabilityNote */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.BatchCreateOccurrencesResponse; + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityNote; /** - * Creates a plain object from a BatchCreateOccurrencesResponse message. Also converts values to other types if specified. - * @param message BatchCreateOccurrencesResponse + * 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.BatchCreateOccurrencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.VulnerabilityNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VulnerabilityNote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace VulnerabilityNote { + + /** Properties of a Detail. */ + interface IDetail { + + /** Detail severityName */ + severityName?: (string|null); + + /** Detail description */ + description?: (string|null); + + /** Detail packageType */ + packageType?: (string|null); + + /** 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; - /** - * Converts this BatchCreateOccurrencesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a Layer. */ - interface ILayer { + /** + * 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; - /** Layer directive */ - directive?: (string|null); + /** + * 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; - /** Layer arguments */ - "arguments"?: (string|null); - } + /** + * 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; - /** Represents a Layer. */ - class Layer implements ILayer { + /** + * 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); - /** - * Constructs a new Layer. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.ILayer); + /** + * 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; - /** Layer directive. */ - public directive: string; + /** + * 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 }; - /** Layer arguments. */ - public arguments: string; + /** + * Converts this Detail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new Layer instance using the specified properties. - * @param [properties] Properties to set - * @returns Layer instance - */ - public static create(properties?: grafeas.v1.ILayer): grafeas.v1.Layer; + /** Properties of a WindowsDetail. */ + interface IWindowsDetail { - /** - * 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.ILayer, writer?: $protobuf.Writer): $protobuf.Writer; + /** WindowsDetail cpeUri */ + cpeUri?: (string|null); - /** - * 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.ILayer, writer?: $protobuf.Writer): $protobuf.Writer; + /** WindowsDetail name */ + name?: (string|null); - /** - * 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 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.Layer; + /** WindowsDetail description */ + description?: (string|null); - /** - * Decodes a Layer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.Layer; + /** WindowsDetail fixingKbs */ + fixingKbs?: (grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase[]|null); + } - /** - * 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); + /** Represents a WindowsDetail. */ + class WindowsDetail implements IWindowsDetail { - /** - * Creates a Layer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Layer - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.Layer; + /** + * Constructs a new WindowsDetail. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.VulnerabilityNote.IWindowsDetail); - /** - * 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.Layer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** WindowsDetail cpeUri. */ + public cpeUri: string; - /** - * Converts this Layer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** WindowsDetail name. */ + public name: string; - /** Properties of a Fingerprint. */ - interface IFingerprint { + /** WindowsDetail description. */ + public description: string; - /** Fingerprint v1Name */ - v1Name?: (string|null); + /** WindowsDetail fixingKbs. */ + public fixingKbs: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase[]; - /** Fingerprint v2Blob */ - v2Blob?: (string[]|null); + /** + * 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; - /** Fingerprint v2Name */ - v2Name?: (string|null); - } + /** + * 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; - /** Represents a Fingerprint. */ - class Fingerprint implements IFingerprint { + /** + * 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; - /** - * Constructs a new Fingerprint. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IFingerprint); + /** + * 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; - /** Fingerprint v1Name. */ - public v1Name: string; + /** + * 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; - /** Fingerprint v2Blob. */ - public v2Blob: string[]; + /** + * 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); - /** Fingerprint v2Name. */ - public v2Name: string; + /** + * 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 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; + /** + * 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 }; - /** - * 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; + /** + * Converts this WindowsDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + namespace WindowsDetail { - /** - * 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; + /** Properties of a KnowledgeBase. */ + interface IKnowledgeBase { - /** - * 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; + /** KnowledgeBase name */ + name?: (string|null); - /** - * 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); + /** KnowledgeBase url */ + url?: (string|null); + } - /** - * 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; + /** Represents a KnowledgeBase. */ + class KnowledgeBase implements IKnowledgeBase { - /** - * 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 }; + /** + * Constructs a new KnowledgeBase. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.VulnerabilityNote.WindowsDetail.IKnowledgeBase); - /** - * Converts this Fingerprint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** KnowledgeBase name. */ + public name: string; - /** Properties of an ImageNote. */ - interface IImageNote { + /** KnowledgeBase url. */ + public url: string; - /** ImageNote resourceUrl */ - resourceUrl?: (string|null); + /** + * 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; - /** ImageNote fingerprint */ - fingerprint?: (grafeas.v1.IFingerprint|null); - } + /** + * 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; - /** Represents an ImageNote. */ - class ImageNote implements IImageNote { + /** + * 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; - /** - * Constructs a new ImageNote. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IImageNote); + /** + * 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; - /** ImageNote resourceUrl. */ - public resourceUrl: string; + /** + * 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; - /** ImageNote fingerprint. */ - public fingerprint?: (grafeas.v1.IFingerprint|null); + /** + * 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 new ImageNote instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageNote instance - */ - public static create(properties?: grafeas.v1.IImageNote): grafeas.v1.ImageNote; + /** + * 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; - /** - * 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.IImageNote, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 }; - /** - * 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.IImageNote, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this KnowledgeBase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } - /** - * 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 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.ImageNote; + /** Properties of a VulnerabilityOccurrence. */ + interface IVulnerabilityOccurrence { - /** - * Decodes an ImageNote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ImageNote; + /** VulnerabilityOccurrence type */ + type?: (string|null); - /** - * 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); + /** VulnerabilityOccurrence severity */ + severity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - /** - * Creates an ImageNote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageNote - */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageNote; + /** VulnerabilityOccurrence cvssScore */ + cvssScore?: (number|null); - /** - * 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.ImageNote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** VulnerabilityOccurrence cvssv3 */ + cvssv3?: (grafeas.v1.ICVSS|null); - /** - * Converts this ImageNote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** VulnerabilityOccurrence packageIssue */ + packageIssue?: (grafeas.v1.VulnerabilityOccurrence.IPackageIssue[]|null); - /** Properties of an ImageOccurrence. */ - interface IImageOccurrence { + /** VulnerabilityOccurrence shortDescription */ + shortDescription?: (string|null); - /** ImageOccurrence fingerprint */ - fingerprint?: (grafeas.v1.IFingerprint|null); + /** VulnerabilityOccurrence longDescription */ + longDescription?: (string|null); - /** ImageOccurrence distance */ - distance?: (number|null); + /** VulnerabilityOccurrence relatedUrls */ + relatedUrls?: (grafeas.v1.IRelatedUrl[]|null); - /** ImageOccurrence layerInfo */ - layerInfo?: (grafeas.v1.ILayer[]|null); + /** VulnerabilityOccurrence effectiveSeverity */ + effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); - /** ImageOccurrence baseResourceUrl */ - baseResourceUrl?: (string|null); + /** VulnerabilityOccurrence fixAvailable */ + fixAvailable?: (boolean|null); } - /** Represents an ImageOccurrence. */ - class ImageOccurrence implements IImageOccurrence { + /** Represents a VulnerabilityOccurrence. */ + class VulnerabilityOccurrence implements IVulnerabilityOccurrence { /** - * Constructs a new ImageOccurrence. + * Constructs a new VulnerabilityOccurrence. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IImageOccurrence); + constructor(properties?: grafeas.v1.IVulnerabilityOccurrence); - /** ImageOccurrence fingerprint. */ - public fingerprint?: (grafeas.v1.IFingerprint|null); + /** VulnerabilityOccurrence type. */ + public type: string; - /** ImageOccurrence distance. */ - public distance: number; + /** VulnerabilityOccurrence severity. */ + public severity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - /** ImageOccurrence layerInfo. */ - public layerInfo: grafeas.v1.ILayer[]; + /** VulnerabilityOccurrence cvssScore. */ + public cvssScore: number; - /** ImageOccurrence baseResourceUrl. */ - public baseResourceUrl: string; + /** VulnerabilityOccurrence cvssv3. */ + public cvssv3?: (grafeas.v1.ICVSS|null); + + /** 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; /** - * Creates a new ImageOccurrence instance using the specified properties. + * Creates a new VulnerabilityOccurrence instance using the specified properties. * @param [properties] Properties to set - * @returns ImageOccurrence instance + * @returns VulnerabilityOccurrence instance */ - public static create(properties?: grafeas.v1.IImageOccurrence): grafeas.v1.ImageOccurrence; + public static create(properties?: grafeas.v1.IVulnerabilityOccurrence): grafeas.v1.VulnerabilityOccurrence; /** - * 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 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.IImageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.IVulnerabilityOccurrence, 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 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.IImageOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.IVulnerabilityOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageOccurrence 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 ImageOccurrence + * @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.ImageOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.VulnerabilityOccurrence; /** - * Decodes an ImageOccurrence 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 ImageOccurrence + * @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.ImageOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.VulnerabilityOccurrence; /** - * Verifies an ImageOccurrence 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 an ImageOccurrence 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 ImageOccurrence + * @returns VulnerabilityOccurrence */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.ImageOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.VulnerabilityOccurrence; /** - * 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 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.ImageOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.VulnerabilityOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageOccurrence to JSON. + * Converts this VulnerabilityOccurrence to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** 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 an UpgradeNote. */ - class UpgradeNote implements IUpgradeNote { + namespace VulnerabilityOccurrence { - /** - * Constructs a new UpgradeNote. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IUpgradeNote); + /** Properties of a PackageIssue. */ + interface IPackageIssue { - /** UpgradeNote package. */ - public package: string; + /** PackageIssue affectedCpeUri */ + affectedCpeUri?: (string|null); - /** UpgradeNote version. */ - public version?: (grafeas.v1.IVersion|null); + /** PackageIssue affectedPackage */ + affectedPackage?: (string|null); - /** UpgradeNote distributions. */ - public distributions: grafeas.v1.IUpgradeDistribution[]; + /** PackageIssue affectedVersion */ + affectedVersion?: (grafeas.v1.IVersion|null); - /** UpgradeNote windowsUpdate. */ - public windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); + /** PackageIssue fixedCpeUri */ + fixedCpeUri?: (string|null); - /** - * 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; + /** PackageIssue fixedPackage */ + fixedPackage?: (string|null); - /** - * 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; + /** PackageIssue fixedVersion */ + fixedVersion?: (grafeas.v1.IVersion|null); - /** - * 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; + /** PackageIssue fixAvailable */ + fixAvailable?: (boolean|null); - /** - * 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; + /** PackageIssue packageType */ + packageType?: (string|null); - /** - * 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; + /** PackageIssue effectiveSeverity */ + effectiveSeverity?: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity|null); + } - /** - * 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); + /** Represents a PackageIssue. */ + class PackageIssue implements IPackageIssue { - /** - * 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; + /** + * Constructs a new PackageIssue. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.VulnerabilityOccurrence.IPackageIssue); - /** - * 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 }; + /** PackageIssue affectedCpeUri. */ + public affectedCpeUri: string; - /** - * Converts this UpgradeNote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PackageIssue affectedPackage. */ + public affectedPackage: string; - /** Properties of an UpgradeDistribution. */ - interface IUpgradeDistribution { + /** PackageIssue affectedVersion. */ + public affectedVersion?: (grafeas.v1.IVersion|null); - /** UpgradeDistribution cpeUri */ - cpeUri?: (string|null); + /** PackageIssue fixedCpeUri. */ + public fixedCpeUri: string; - /** UpgradeDistribution classification */ - classification?: (string|null); + /** PackageIssue fixedPackage. */ + public fixedPackage: string; - /** UpgradeDistribution severity */ - severity?: (string|null); + /** PackageIssue fixedVersion. */ + public fixedVersion?: (grafeas.v1.IVersion|null); - /** UpgradeDistribution cve */ - cve?: (string[]|null); - } + /** PackageIssue fixAvailable. */ + public fixAvailable: boolean; - /** Represents an UpgradeDistribution. */ - class UpgradeDistribution implements IUpgradeDistribution { + /** PackageIssue packageType. */ + public packageType: string; - /** - * Constructs a new UpgradeDistribution. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IUpgradeDistribution); + /** PackageIssue effectiveSeverity. */ + public effectiveSeverity: (grafeas.v1.Severity|keyof typeof grafeas.v1.Severity); - /** UpgradeDistribution cpeUri. */ - public cpeUri: string; + /** + * 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; - /** UpgradeDistribution classification. */ - public classification: string; + /** + * 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; - /** UpgradeDistribution severity. */ - public severity: string; + /** + * 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; - /** UpgradeDistribution cve. */ - public cve: string[]; + /** + * 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; - /** - * 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 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; - /** - * 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; + /** + * 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); - /** - * 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; + /** + * 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; - /** - * 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 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 }; - /** - * 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; + /** + * Converts this PackageIssue to JSON. + * @returns JSON object + */ + public toJSON(): { [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); + /** Properties of a CVSSv3. */ + interface ICVSSv3 { - /** - * 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; + /** CVSSv3 baseScore */ + baseScore?: (number|null); - /** - * 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 }; + /** CVSSv3 exploitabilityScore */ + exploitabilityScore?: (number|null); - /** - * Converts this UpgradeDistribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** CVSSv3 impactScore */ + impactScore?: (number|null); - /** Properties of a WindowsUpdate. */ - interface IWindowsUpdate { + /** CVSSv3 attackVector */ + attackVector?: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector|null); - /** WindowsUpdate identity */ - identity?: (grafeas.v1.WindowsUpdate.IIdentity|null); + /** CVSSv3 attackComplexity */ + attackComplexity?: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity|null); - /** WindowsUpdate title */ - title?: (string|null); + /** CVSSv3 privilegesRequired */ + privilegesRequired?: (grafeas.v1.CVSSv3.PrivilegesRequired|keyof typeof grafeas.v1.CVSSv3.PrivilegesRequired|null); - /** WindowsUpdate description */ - description?: (string|null); + /** CVSSv3 userInteraction */ + userInteraction?: (grafeas.v1.CVSSv3.UserInteraction|keyof typeof grafeas.v1.CVSSv3.UserInteraction|null); - /** WindowsUpdate categories */ - categories?: (grafeas.v1.WindowsUpdate.ICategory[]|null); + /** CVSSv3 scope */ + scope?: (grafeas.v1.CVSSv3.Scope|keyof typeof grafeas.v1.CVSSv3.Scope|null); - /** WindowsUpdate kbArticleIds */ - kbArticleIds?: (string[]|null); + /** CVSSv3 confidentialityImpact */ + confidentialityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); - /** WindowsUpdate supportUrl */ - supportUrl?: (string|null); + /** CVSSv3 integrityImpact */ + integrityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); - /** WindowsUpdate lastPublishedTimestamp */ - lastPublishedTimestamp?: (google.protobuf.ITimestamp|null); + /** CVSSv3 availabilityImpact */ + availabilityImpact?: (grafeas.v1.CVSSv3.Impact|keyof typeof grafeas.v1.CVSSv3.Impact|null); } - /** Represents a WindowsUpdate. */ - class WindowsUpdate implements IWindowsUpdate { + /** Represents a CVSSv3. */ + class CVSSv3 implements ICVSSv3 { /** - * Constructs a new WindowsUpdate. + * Constructs a new CVSSv3. * @param [properties] Properties to set */ - constructor(properties?: grafeas.v1.IWindowsUpdate); + constructor(properties?: grafeas.v1.ICVSSv3); - /** WindowsUpdate identity. */ - public identity?: (grafeas.v1.WindowsUpdate.IIdentity|null); + /** CVSSv3 baseScore. */ + public baseScore: number; - /** WindowsUpdate title. */ - public title: string; + /** CVSSv3 exploitabilityScore. */ + public exploitabilityScore: number; - /** WindowsUpdate description. */ - public description: string; + /** CVSSv3 impactScore. */ + public impactScore: number; - /** WindowsUpdate categories. */ - public categories: grafeas.v1.WindowsUpdate.ICategory[]; + /** CVSSv3 attackVector. */ + public attackVector: (grafeas.v1.CVSSv3.AttackVector|keyof typeof grafeas.v1.CVSSv3.AttackVector); - /** WindowsUpdate kbArticleIds. */ - public kbArticleIds: string[]; + /** CVSSv3 attackComplexity. */ + public attackComplexity: (grafeas.v1.CVSSv3.AttackComplexity|keyof typeof grafeas.v1.CVSSv3.AttackComplexity); - /** WindowsUpdate supportUrl. */ - public supportUrl: string; + /** CVSSv3 privilegesRequired. */ + public privilegesRequired: (grafeas.v1.CVSSv3.PrivilegesRequired|keyof typeof grafeas.v1.CVSSv3.PrivilegesRequired); - /** WindowsUpdate lastPublishedTimestamp. */ - public lastPublishedTimestamp?: (google.protobuf.ITimestamp|null); + /** 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 WindowsUpdate instance using the specified properties. + * Creates a new CVSSv3 instance using the specified properties. * @param [properties] Properties to set - * @returns WindowsUpdate instance + * @returns CVSSv3 instance */ - public static create(properties?: grafeas.v1.IWindowsUpdate): grafeas.v1.WindowsUpdate; + public static create(properties?: grafeas.v1.ICVSSv3): grafeas.v1.CVSSv3; /** - * 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 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.IWindowsUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICVSSv3, 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 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.IWindowsUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WindowsUpdate 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 WindowsUpdate + * @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.WindowsUpdate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CVSSv3; /** - * Decodes a WindowsUpdate 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 WindowsUpdate + * @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.WindowsUpdate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CVSSv3; /** - * Verifies a WindowsUpdate 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 WindowsUpdate 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 WindowsUpdate + * @returns CVSSv3 */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.WindowsUpdate; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CVSSv3; /** - * 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 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.WindowsUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WindowsUpdate to JSON. + * Converts this CVSSv3 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace WindowsUpdate { - - /** Properties of an Identity. */ - interface IIdentity { - - /** Identity updateId */ - updateId?: (string|null); + namespace CVSSv3 { - /** Identity revision */ - revision?: (number|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 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; - - /** - * 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; + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 + } - /** - * 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); + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } - /** - * 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; + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } - /** - * 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 }; + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } - /** - * Converts this Identity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 } + } - /** Properties of a Category. */ - interface ICategory { + /** Properties of a CVSS. */ + interface ICVSS { - /** Category categoryId */ - categoryId?: (string|null); + /** CVSS baseScore */ + baseScore?: (number|null); - /** Category name */ - name?: (string|null); - } + /** CVSS exploitabilityScore */ + exploitabilityScore?: (number|null); - /** Represents a Category. */ - class Category implements ICategory { + /** CVSS impactScore */ + impactScore?: (number|null); - /** - * Constructs a new Category. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.WindowsUpdate.ICategory); + /** CVSS attackVector */ + attackVector?: (grafeas.v1.CVSS.AttackVector|keyof typeof grafeas.v1.CVSS.AttackVector|null); - /** Category categoryId. */ - public categoryId: string; + /** CVSS attackComplexity */ + attackComplexity?: (grafeas.v1.CVSS.AttackComplexity|keyof typeof grafeas.v1.CVSS.AttackComplexity|null); - /** Category name. */ - public name: string; + /** CVSS authentication */ + authentication?: (grafeas.v1.CVSS.Authentication|keyof typeof grafeas.v1.CVSS.Authentication|null); - /** - * 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; + /** CVSS privilegesRequired */ + privilegesRequired?: (grafeas.v1.CVSS.PrivilegesRequired|keyof typeof grafeas.v1.CVSS.PrivilegesRequired|null); - /** - * 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; + /** CVSS userInteraction */ + userInteraction?: (grafeas.v1.CVSS.UserInteraction|keyof typeof grafeas.v1.CVSS.UserInteraction|null); - /** - * 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; + /** CVSS scope */ + scope?: (grafeas.v1.CVSS.Scope|keyof typeof grafeas.v1.CVSS.Scope|null); - /** - * 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; + /** CVSS confidentialityImpact */ + confidentialityImpact?: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact|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; + /** CVSS integrityImpact */ + integrityImpact?: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact|null); - /** - * 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); + /** CVSS availabilityImpact */ + availabilityImpact?: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact|null); + } - /** - * 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; + /** Represents a CVSS. */ + class CVSS implements ICVSS { - /** - * 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 }; + /** + * Constructs a new CVSS. + * @param [properties] Properties to set + */ + constructor(properties?: grafeas.v1.ICVSS); - /** - * Converts this Category to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** CVSS baseScore. */ + public baseScore: number; - /** Properties of an UpgradeOccurrence. */ - interface IUpgradeOccurrence { + /** CVSS exploitabilityScore. */ + public exploitabilityScore: number; - /** UpgradeOccurrence package */ - "package"?: (string|null); + /** CVSS impactScore. */ + public impactScore: number; - /** UpgradeOccurrence parsedVersion */ - parsedVersion?: (grafeas.v1.IVersion|null); + /** CVSS attackVector. */ + public attackVector: (grafeas.v1.CVSS.AttackVector|keyof typeof grafeas.v1.CVSS.AttackVector); - /** UpgradeOccurrence distribution */ - distribution?: (grafeas.v1.IUpgradeDistribution|null); + /** CVSS attackComplexity. */ + public attackComplexity: (grafeas.v1.CVSS.AttackComplexity|keyof typeof grafeas.v1.CVSS.AttackComplexity); - /** UpgradeOccurrence windowsUpdate */ - windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); - } + /** CVSS authentication. */ + public authentication: (grafeas.v1.CVSS.Authentication|keyof typeof grafeas.v1.CVSS.Authentication); - /** Represents an UpgradeOccurrence. */ - class UpgradeOccurrence implements IUpgradeOccurrence { + /** CVSS privilegesRequired. */ + public privilegesRequired: (grafeas.v1.CVSS.PrivilegesRequired|keyof typeof grafeas.v1.CVSS.PrivilegesRequired); - /** - * Constructs a new UpgradeOccurrence. - * @param [properties] Properties to set - */ - constructor(properties?: grafeas.v1.IUpgradeOccurrence); + /** CVSS userInteraction. */ + public userInteraction: (grafeas.v1.CVSS.UserInteraction|keyof typeof grafeas.v1.CVSS.UserInteraction); - /** UpgradeOccurrence package. */ - public package: string; + /** CVSS scope. */ + public scope: (grafeas.v1.CVSS.Scope|keyof typeof grafeas.v1.CVSS.Scope); - /** UpgradeOccurrence parsedVersion. */ - public parsedVersion?: (grafeas.v1.IVersion|null); + /** CVSS confidentialityImpact. */ + public confidentialityImpact: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact); - /** UpgradeOccurrence distribution. */ - public distribution?: (grafeas.v1.IUpgradeDistribution|null); + /** CVSS integrityImpact. */ + public integrityImpact: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact); - /** UpgradeOccurrence windowsUpdate. */ - public windowsUpdate?: (grafeas.v1.IWindowsUpdate|null); + /** CVSS availabilityImpact. */ + public availabilityImpact: (grafeas.v1.CVSS.Impact|keyof typeof grafeas.v1.CVSS.Impact); /** - * Creates a new UpgradeOccurrence instance using the specified properties. + * Creates a new CVSS instance using the specified properties. * @param [properties] Properties to set - * @returns UpgradeOccurrence instance + * @returns CVSS instance */ - public static create(properties?: grafeas.v1.IUpgradeOccurrence): grafeas.v1.UpgradeOccurrence; + public static create(properties?: grafeas.v1.ICVSS): grafeas.v1.CVSS; /** - * Encodes the specified UpgradeOccurrence message. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. - * @param message UpgradeOccurrence 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.IUpgradeOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: grafeas.v1.ICVSS, 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 + * 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.IUpgradeOccurrence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: grafeas.v1.ICVSS, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpgradeOccurrence 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 UpgradeOccurrence + * @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.UpgradeOccurrence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): grafeas.v1.CVSS; /** - * Decodes an UpgradeOccurrence 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 UpgradeOccurrence + * @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.UpgradeOccurrence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): grafeas.v1.CVSS; /** - * Verifies an UpgradeOccurrence 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 an UpgradeOccurrence 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 UpgradeOccurrence + * @returns CVSS */ - public static fromObject(object: { [k: string]: any }): grafeas.v1.UpgradeOccurrence; + public static fromObject(object: { [k: string]: any }): grafeas.v1.CVSS; /** - * Creates a plain object from an UpgradeOccurrence message. Also converts values to other types if specified. - * @param message UpgradeOccurrence + * 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.UpgradeOccurrence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: grafeas.v1.CVSS, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpgradeOccurrence to JSON. + * Converts this CVSS to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + namespace CVSS { + + /** 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 + } + + /** Authentication enum. */ + enum Authentication { + AUTHENTICATION_UNSPECIFIED = 0, + AUTHENTICATION_MULTIPLE = 1, + AUTHENTICATION_SINGLE = 2, + AUTHENTICATION_NONE = 3 + } + + /** 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 + } + } } /** Namespace v1beta1. */ @@ -23441,102 +23564,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @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): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @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)): google.protobuf.Any; - - /** - * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of an Empty. */ interface IEmpty { } @@ -23710,6 +23737,102 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @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): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @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)): google.protobuf.Any; + + /** + * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Namespace iam. */ diff --git a/packages/google-devtools-containeranalysis/protos/protos.js b/packages/google-devtools-containeranalysis/protos/protos.js index a44ea04a550..3903cd85a3e 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.js +++ b/packages/google-devtools-containeranalysis/protos/protos.js @@ -49,52 +49,56 @@ var v1 = {}; /** - * Severity enum. - * @name grafeas.v1.Severity + * NoteKind enum. + * @name grafeas.v1.NoteKind * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} MINIMAL=1 MINIMAL value - * @property {number} LOW=2 LOW value - * @property {number} MEDIUM=3 MEDIUM value - * @property {number} HIGH=4 HIGH value - * @property {number} CRITICAL=5 CRITICAL value + * @property {number} NOTE_KIND_UNSPECIFIED=0 NOTE_KIND_UNSPECIFIED value + * @property {number} VULNERABILITY=1 VULNERABILITY value + * @property {number} BUILD=2 BUILD value + * @property {number} IMAGE=3 IMAGE value + * @property {number} PACKAGE=4 PACKAGE value + * @property {number} DEPLOYMENT=5 DEPLOYMENT value + * @property {number} DISCOVERY=6 DISCOVERY value + * @property {number} ATTESTATION=7 ATTESTATION value + * @property {number} UPGRADE=8 UPGRADE value + * @property {number} COMPLIANCE=9 COMPLIANCE value + * @property {number} DSSE_ATTESTATION=10 DSSE_ATTESTATION value */ - v1.Severity = (function() { + v1.NoteKind = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "MINIMAL"] = 1; - values[valuesById[2] = "LOW"] = 2; - values[valuesById[3] = "MEDIUM"] = 3; - values[valuesById[4] = "HIGH"] = 4; - values[valuesById[5] = "CRITICAL"] = 5; + values[valuesById[0] = "NOTE_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "VULNERABILITY"] = 1; + values[valuesById[2] = "BUILD"] = 2; + values[valuesById[3] = "IMAGE"] = 3; + values[valuesById[4] = "PACKAGE"] = 4; + values[valuesById[5] = "DEPLOYMENT"] = 5; + values[valuesById[6] = "DISCOVERY"] = 6; + values[valuesById[7] = "ATTESTATION"] = 7; + values[valuesById[8] = "UPGRADE"] = 8; + values[valuesById[9] = "COMPLIANCE"] = 9; + values[valuesById[10] = "DSSE_ATTESTATION"] = 10; return values; })(); - v1.VulnerabilityNote = (function() { + v1.RelatedUrl = (function() { /** - * Properties of a VulnerabilityNote. + * Properties of a RelatedUrl. * @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 IRelatedUrl + * @property {string|null} [url] RelatedUrl url + * @property {string|null} [label] RelatedUrl label */ /** - * Constructs a new VulnerabilityNote. + * Constructs a new RelatedUrl. * @memberof grafeas.v1 - * @classdesc Represents a VulnerabilityNote. - * @implements IVulnerabilityNote + * @classdesc Represents a RelatedUrl. + * @implements IRelatedUrl * @constructor - * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set + * @param {grafeas.v1.IRelatedUrl=} [properties] Properties to set */ - function VulnerabilityNote(properties) { - this.details = []; - this.windowsDetails = []; + function RelatedUrl(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102,146 +106,88 @@ } /** - * VulnerabilityNote cvssScore. - * @member {number} cvssScore - * @memberof grafeas.v1.VulnerabilityNote - * @instance - */ - VulnerabilityNote.prototype.cvssScore = 0; - - /** - * VulnerabilityNote severity. - * @member {grafeas.v1.Severity} severity - * @memberof grafeas.v1.VulnerabilityNote - * @instance - */ - VulnerabilityNote.prototype.severity = 0; - - /** - * 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 + * RelatedUrl url. + * @member {string} url + * @memberof grafeas.v1.RelatedUrl * @instance */ - VulnerabilityNote.prototype.windowsDetails = $util.emptyArray; + RelatedUrl.prototype.url = ""; /** - * VulnerabilityNote sourceUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} sourceUpdateTime - * @memberof grafeas.v1.VulnerabilityNote + * RelatedUrl label. + * @member {string} label + * @memberof grafeas.v1.RelatedUrl * @instance */ - VulnerabilityNote.prototype.sourceUpdateTime = null; + RelatedUrl.prototype.label = ""; /** - * Creates a new VulnerabilityNote instance using the specified properties. + * Creates a new RelatedUrl instance using the specified properties. * @function create - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @static - * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote instance + * @param {grafeas.v1.IRelatedUrl=} [properties] Properties to set + * @returns {grafeas.v1.RelatedUrl} RelatedUrl instance */ - VulnerabilityNote.create = function create(properties) { - return new VulnerabilityNote(properties); + RelatedUrl.create = function create(properties) { + return new RelatedUrl(properties); }; /** - * Encodes the specified VulnerabilityNote message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. + * Encodes the specified RelatedUrl message. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. * @function encode - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @static - * @param {grafeas.v1.IVulnerabilityNote} message VulnerabilityNote message or plain object to encode + * @param {grafeas.v1.IRelatedUrl} message RelatedUrl message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VulnerabilityNote.encode = function encode(message, writer) { + RelatedUrl.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.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.label); return writer; }; /** - * Encodes the specified VulnerabilityNote message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. + * Encodes the specified RelatedUrl message, length delimited. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @static - * @param {grafeas.v1.IVulnerabilityNote} message VulnerabilityNote message or plain object to encode + * @param {grafeas.v1.IRelatedUrl} message RelatedUrl message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VulnerabilityNote.encodeDelimited = function encodeDelimited(message, writer) { + RelatedUrl.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer. + * Decodes a RelatedUrl message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @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.RelatedUrl} RelatedUrl * @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) { + RelatedUrl.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.RelatedUrl(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cvssScore = reader.float(); + message.url = reader.string(); break; case 2: - 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()); + message.label = reader.string(); break; default: reader.skipType(tag & 7); @@ -252,1417 +198,443 @@ }; /** - * Decodes a VulnerabilityNote message from the specified reader or buffer, length delimited. + * Decodes a RelatedUrl message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote + * @returns {grafeas.v1.RelatedUrl} RelatedUrl * @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) { + RelatedUrl.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VulnerabilityNote message. + * Verifies a RelatedUrl message. * @function verify - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @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) { + RelatedUrl.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: - 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 "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; - } + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; return null; }; /** - * Creates a VulnerabilityNote message from a plain object. Also converts values to their respective internal types. + * Creates a RelatedUrl message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote + * @returns {grafeas.v1.RelatedUrl} RelatedUrl */ - VulnerabilityNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityNote) + RelatedUrl.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.RelatedUrl) return object; - 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); - } + var message = new $root.grafeas.v1.RelatedUrl(); + if (object.url != null) + message.url = String(object.url); + if (object.label != null) + message.label = String(object.label); return message; }; /** - * Creates a plain object from a VulnerabilityNote message. Also converts values to other types if specified. + * Creates a plain object from a RelatedUrl message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @static - * @param {grafeas.v1.VulnerabilityNote} message VulnerabilityNote + * @param {grafeas.v1.RelatedUrl} message RelatedUrl * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VulnerabilityNote.toObject = function toObject(message, options) { + RelatedUrl.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.url = ""; + object.label = ""; } - if (message.sourceUpdateTime != null && message.hasOwnProperty("sourceUpdateTime")) - object.sourceUpdateTime = $root.google.protobuf.Timestamp.toObject(message.sourceUpdateTime, options); + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; return object; }; /** - * Converts this VulnerabilityNote to JSON. + * Converts this RelatedUrl to JSON. * @function toJSON - * @memberof grafeas.v1.VulnerabilityNote + * @memberof grafeas.v1.RelatedUrl * @instance * @returns {Object.} JSON object */ - VulnerabilityNote.prototype.toJSON = function toJSON() { + RelatedUrl.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - VulnerabilityNote.Detail = (function() { + return RelatedUrl; + })(); - /** - * 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 - */ + v1.Signature = (function() { - /** - * 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]]; - } + /** + * Properties of a Signature. + * @memberof grafeas.v1 + * @interface ISignature + * @property {Uint8Array|null} [signature] Signature signature + * @property {string|null} [publicKeyId] Signature publicKeyId + */ - /** - * Detail severityName. - * @member {string} severityName - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.severityName = ""; + /** + * Constructs a new Signature. + * @memberof grafeas.v1 + * @classdesc Represents a Signature. + * @implements ISignature + * @constructor + * @param {grafeas.v1.ISignature=} [properties] Properties to set + */ + function Signature(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 description. - * @member {string} description - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.description = ""; + /** + * Signature signature. + * @member {Uint8Array} signature + * @memberof grafeas.v1.Signature + * @instance + */ + Signature.prototype.signature = $util.newBuffer([]); - /** - * Detail packageType. - * @member {string} packageType - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.packageType = ""; + /** + * Signature publicKeyId. + * @member {string} publicKeyId + * @memberof grafeas.v1.Signature + * @instance + */ + Signature.prototype.publicKeyId = ""; - /** - * Detail affectedCpeUri. - * @member {string} affectedCpeUri - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedCpeUri = ""; + /** + * Creates a new Signature instance using the specified properties. + * @function create + * @memberof grafeas.v1.Signature + * @static + * @param {grafeas.v1.ISignature=} [properties] Properties to set + * @returns {grafeas.v1.Signature} Signature instance + */ + Signature.create = function create(properties) { + return new Signature(properties); + }; - /** - * Detail affectedPackage. - * @member {string} affectedPackage - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedPackage = ""; - - /** - * Detail affectedVersionStart. - * @member {grafeas.v1.IVersion|null|undefined} affectedVersionStart - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedVersionStart = null; - - /** - * Detail affectedVersionEnd. - * @member {grafeas.v1.IVersion|null|undefined} affectedVersionEnd - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.affectedVersionEnd = null; - - /** - * Detail fixedCpeUri. - * @member {string} fixedCpeUri - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.fixedCpeUri = ""; - - /** - * Detail fixedPackage. - * @member {string} fixedPackage - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.fixedPackage = ""; - - /** - * Detail fixedVersion. - * @member {grafeas.v1.IVersion|null|undefined} fixedVersion - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.fixedVersion = null; - - /** - * Detail isObsolete. - * @member {boolean} isObsolete - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.isObsolete = false; - - /** - * Detail sourceUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} sourceUpdateTime - * @memberof grafeas.v1.VulnerabilityNote.Detail - * @instance - */ - Detail.prototype.sourceUpdateTime = null; - - /** - * 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 = ""; - - /** - * 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); - }; - - /** - * 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; - }; - - /** - * 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(); - }; - - /** - * 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; - }; - - /** - * 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()); - }; - - /** - * 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; - }; - - /** - * 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; - }; - - /** - * 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; - }; - - /** - * 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 - */ - - /** - * 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]]; - } - - /** - * 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() { + /** + * Encodes the specified Signature message. Does not implicitly {@link grafeas.v1.Signature.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.Signature + * @static + * @param {grafeas.v1.ISignature} message Signature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Signature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature); + if (message.publicKeyId != null && Object.hasOwnProperty.call(message, "publicKeyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicKeyId); + return writer; + }; /** - * 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 + * Encodes the specified Signature message, length delimited. Does not implicitly {@link grafeas.v1.Signature.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.Signature + * @static + * @param {grafeas.v1.ISignature} message Signature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + Signature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Constructs a new VulnerabilityOccurrence. - * @memberof grafeas.v1 - * @classdesc Represents a VulnerabilityOccurrence. - * @implements IVulnerabilityOccurrence - * @constructor - * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set + * Decodes a Signature message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.Signature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.Signature} Signature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - 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]]; - } + Signature.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.Signature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signature = reader.bytes(); + break; + case 2: + message.publicKeyId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * VulnerabilityOccurrence type. - * @member {string} type - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Decodes a Signature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.Signature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.Signature} Signature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VulnerabilityOccurrence.prototype.type = ""; + Signature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * VulnerabilityOccurrence severity. - * @member {grafeas.v1.Severity} severity - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Verifies a Signature message. + * @function verify + * @memberof grafeas.v1.Signature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VulnerabilityOccurrence.prototype.severity = 0; + Signature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + if (message.publicKeyId != null && message.hasOwnProperty("publicKeyId")) + if (!$util.isString(message.publicKeyId)) + return "publicKeyId: string expected"; + return null; + }; /** - * VulnerabilityOccurrence cvssScore. - * @member {number} cvssScore - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Creates a Signature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.Signature + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.Signature} Signature */ - VulnerabilityOccurrence.prototype.cvssScore = 0; + Signature.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Signature) + return object; + var message = new $root.grafeas.v1.Signature(); + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + if (object.publicKeyId != null) + message.publicKeyId = String(object.publicKeyId); + return message; + }; /** - * VulnerabilityOccurrence cvssv3. - * @member {grafeas.v1.VulnerabilityOccurrence.ICVSSV3|null|undefined} cvssv3 - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Creates a plain object from a Signature message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.Signature + * @static + * @param {grafeas.v1.Signature} message Signature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - VulnerabilityOccurrence.prototype.cvssv3 = null; + Signature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + object.publicKeyId = ""; + } + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.publicKeyId != null && message.hasOwnProperty("publicKeyId")) + object.publicKeyId = message.publicKeyId; + return object; + }; /** - * VulnerabilityOccurrence packageIssue. - * @member {Array.} packageIssue - * @memberof grafeas.v1.VulnerabilityOccurrence + * Converts this Signature to JSON. + * @function toJSON + * @memberof grafeas.v1.Signature * @instance + * @returns {Object.} JSON object */ - VulnerabilityOccurrence.prototype.packageIssue = $util.emptyArray; + Signature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Signature; + })(); + + v1.Envelope = (function() { /** - * VulnerabilityOccurrence shortDescription. - * @member {string} shortDescription - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Properties of an Envelope. + * @memberof grafeas.v1 + * @interface IEnvelope + * @property {Uint8Array|null} [payload] Envelope payload + * @property {string|null} [payloadType] Envelope payloadType + * @property {Array.|null} [signatures] Envelope signatures */ - VulnerabilityOccurrence.prototype.shortDescription = ""; /** - * VulnerabilityOccurrence longDescription. - * @member {string} longDescription - * @memberof grafeas.v1.VulnerabilityOccurrence - * @instance + * Constructs a new Envelope. + * @memberof grafeas.v1 + * @classdesc Represents an Envelope. + * @implements IEnvelope + * @constructor + * @param {grafeas.v1.IEnvelope=} [properties] Properties to set */ - VulnerabilityOccurrence.prototype.longDescription = ""; + function Envelope(properties) { + this.signatures = []; + 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 relatedUrls. - * @member {Array.} relatedUrls - * @memberof grafeas.v1.VulnerabilityOccurrence + * Envelope payload. + * @member {Uint8Array} payload + * @memberof grafeas.v1.Envelope * @instance */ - VulnerabilityOccurrence.prototype.relatedUrls = $util.emptyArray; + Envelope.prototype.payload = $util.newBuffer([]); /** - * VulnerabilityOccurrence effectiveSeverity. - * @member {grafeas.v1.Severity} effectiveSeverity - * @memberof grafeas.v1.VulnerabilityOccurrence + * Envelope payloadType. + * @member {string} payloadType + * @memberof grafeas.v1.Envelope * @instance */ - VulnerabilityOccurrence.prototype.effectiveSeverity = 0; + Envelope.prototype.payloadType = ""; /** - * VulnerabilityOccurrence fixAvailable. - * @member {boolean} fixAvailable - * @memberof grafeas.v1.VulnerabilityOccurrence + * Envelope signatures. + * @member {Array.} signatures + * @memberof grafeas.v1.Envelope * @instance */ - VulnerabilityOccurrence.prototype.fixAvailable = false; + Envelope.prototype.signatures = $util.emptyArray; /** - * Creates a new VulnerabilityOccurrence instance using the specified properties. + * Creates a new Envelope instance using the specified properties. * @function create - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.Envelope * @static - * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence instance + * @param {grafeas.v1.IEnvelope=} [properties] Properties to set + * @returns {grafeas.v1.Envelope} Envelope instance */ - VulnerabilityOccurrence.create = function create(properties) { - return new VulnerabilityOccurrence(properties); + Envelope.create = function create(properties) { + return new Envelope(properties); }; /** - * Encodes the specified VulnerabilityOccurrence message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. + * Encodes the specified Envelope message. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. * @function encode - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.Envelope * @static - * @param {grafeas.v1.IVulnerabilityOccurrence} message VulnerabilityOccurrence message or plain object to encode + * @param {grafeas.v1.IEnvelope} message Envelope message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VulnerabilityOccurrence.encode = function encode(message, writer) { + Envelope.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.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.payload); + if (message.payloadType != null && Object.hasOwnProperty.call(message, "payloadType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.payloadType); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.grafeas.v1.EnvelopeSignature.encode(message.signatures[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified VulnerabilityOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. + * Encodes the specified Envelope message, length delimited. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.Envelope * @static - * @param {grafeas.v1.IVulnerabilityOccurrence} message VulnerabilityOccurrence message or plain object to encode + * @param {grafeas.v1.IEnvelope} message Envelope message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VulnerabilityOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + Envelope.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VulnerabilityOccurrence message from the specified reader or buffer. + * Decodes an Envelope message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.Envelope * @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 + * @returns {grafeas.v1.Envelope} Envelope * @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) { + Envelope.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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Envelope(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.payload = reader.bytes(); break; case 2: - message.severity = reader.int32(); + message.payloadType = reader.string(); 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(); + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.grafeas.v1.EnvelopeSignature.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -1673,970 +645,884 @@ }; /** - * Decodes a VulnerabilityOccurrence message from the specified reader or buffer, length delimited. + * Decodes an Envelope message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.Envelope * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence + * @returns {grafeas.v1.Envelope} Envelope * @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) { + Envelope.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VulnerabilityOccurrence message. + * Verifies an Envelope message. * @function verify - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.Envelope * @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) { + Envelope.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.payload != null && message.hasOwnProperty("payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + if (message.payloadType != null && message.hasOwnProperty("payloadType")) + if (!$util.isString(message.payloadType)) + return "payloadType: string expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.grafeas.v1.EnvelopeSignature.verify(message.signatures[i]); + if (error) + return "signatures." + error; } - 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; + return null; + }; + + /** + * Creates an Envelope message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.Envelope + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.Envelope} Envelope + */ + Envelope.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Envelope) + return object; + var message = new $root.grafeas.v1.Envelope(); + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length) + message.payload = object.payload; + if (object.payloadType != null) + message.payloadType = String(object.payloadType); + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".grafeas.v1.Envelope.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".grafeas.v1.Envelope.signatures: object expected"); + message.signatures[i] = $root.grafeas.v1.EnvelopeSignature.fromObject(object.signatures[i]); } } - 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; + return message; + }; + + /** + * Creates a plain object from an Envelope message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.Envelope + * @static + * @param {grafeas.v1.Envelope} message Envelope + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Envelope.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); } + object.payloadType = ""; } - if (message.effectiveSeverity != null && message.hasOwnProperty("effectiveSeverity")) - switch (message.effectiveSeverity) { - default: - return "effectiveSeverity: enum value expected"; - case 0: + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + if (message.payloadType != null && message.hasOwnProperty("payloadType")) + object.payloadType = message.payloadType; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.grafeas.v1.EnvelopeSignature.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this Envelope to JSON. + * @function toJSON + * @memberof grafeas.v1.Envelope + * @instance + * @returns {Object.} JSON object + */ + Envelope.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Envelope; + })(); + + v1.EnvelopeSignature = (function() { + + /** + * Properties of an EnvelopeSignature. + * @memberof grafeas.v1 + * @interface IEnvelopeSignature + * @property {Uint8Array|null} [sig] EnvelopeSignature sig + * @property {string|null} [keyid] EnvelopeSignature keyid + */ + + /** + * Constructs a new EnvelopeSignature. + * @memberof grafeas.v1 + * @classdesc Represents an EnvelopeSignature. + * @implements IEnvelopeSignature + * @constructor + * @param {grafeas.v1.IEnvelopeSignature=} [properties] Properties to set + */ + function EnvelopeSignature(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]]; + } + + /** + * EnvelopeSignature sig. + * @member {Uint8Array} sig + * @memberof grafeas.v1.EnvelopeSignature + * @instance + */ + EnvelopeSignature.prototype.sig = $util.newBuffer([]); + + /** + * EnvelopeSignature keyid. + * @member {string} keyid + * @memberof grafeas.v1.EnvelopeSignature + * @instance + */ + EnvelopeSignature.prototype.keyid = ""; + + /** + * Creates a new EnvelopeSignature instance using the specified properties. + * @function create + * @memberof grafeas.v1.EnvelopeSignature + * @static + * @param {grafeas.v1.IEnvelopeSignature=} [properties] Properties to set + * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature instance + */ + EnvelopeSignature.create = function create(properties) { + return new EnvelopeSignature(properties); + }; + + /** + * Encodes the specified EnvelopeSignature message. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.EnvelopeSignature + * @static + * @param {grafeas.v1.IEnvelopeSignature} message EnvelopeSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvelopeSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sig != null && Object.hasOwnProperty.call(message, "sig")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sig); + if (message.keyid != null && Object.hasOwnProperty.call(message, "keyid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyid); + return writer; + }; + + /** + * Encodes the specified EnvelopeSignature message, length delimited. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.EnvelopeSignature + * @static + * @param {grafeas.v1.IEnvelopeSignature} message EnvelopeSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvelopeSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnvelopeSignature message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.EnvelopeSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvelopeSignature.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.EnvelopeSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: + message.sig = reader.bytes(); + break; case 2: - case 3: - case 4: - case 5: + message.keyid = reader.string(); + break; + default: + reader.skipType(tag & 7); break; } - if (message.fixAvailable != null && message.hasOwnProperty("fixAvailable")) - if (typeof message.fixAvailable !== "boolean") - return "fixAvailable: boolean expected"; + } + return message; + }; + + /** + * Decodes an EnvelopeSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.EnvelopeSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvelopeSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnvelopeSignature message. + * @function verify + * @memberof grafeas.v1.EnvelopeSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnvelopeSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sig != null && message.hasOwnProperty("sig")) + if (!(message.sig && typeof message.sig.length === "number" || $util.isString(message.sig))) + return "sig: buffer expected"; + if (message.keyid != null && message.hasOwnProperty("keyid")) + if (!$util.isString(message.keyid)) + return "keyid: string expected"; return null; }; /** - * Creates a VulnerabilityOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates an EnvelopeSignature message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.EnvelopeSignature * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence + * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature */ - VulnerabilityOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.VulnerabilityOccurrence) + EnvelopeSignature.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.EnvelopeSignature) 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; - } - if (object.fixAvailable != null) - message.fixAvailable = Boolean(object.fixAvailable); + var message = new $root.grafeas.v1.EnvelopeSignature(); + if (object.sig != null) + if (typeof object.sig === "string") + $util.base64.decode(object.sig, message.sig = $util.newBuffer($util.base64.length(object.sig)), 0); + else if (object.sig.length) + message.sig = object.sig; + if (object.keyid != null) + message.keyid = String(object.keyid); return message; }; /** - * Creates a plain object from a VulnerabilityOccurrence message. Also converts values to other types if specified. + * Creates a plain object from an EnvelopeSignature message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.EnvelopeSignature * @static - * @param {grafeas.v1.VulnerabilityOccurrence} message VulnerabilityOccurrence + * @param {grafeas.v1.EnvelopeSignature} message EnvelopeSignature * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VulnerabilityOccurrence.toObject = function toObject(message, options) { + EnvelopeSignature.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.bytes === String) + object.sig = ""; + else { + object.sig = []; + if (options.bytes !== Array) + object.sig = $util.newBuffer(object.sig); + } + object.keyid = ""; } - 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); + if (message.sig != null && message.hasOwnProperty("sig")) + object.sig = options.bytes === String ? $util.base64.encode(message.sig, 0, message.sig.length) : options.bytes === Array ? Array.prototype.slice.call(message.sig) : message.sig; + if (message.keyid != null && message.hasOwnProperty("keyid")) + object.keyid = message.keyid; return object; }; /** - * Converts this VulnerabilityOccurrence to JSON. + * Converts this EnvelopeSignature to JSON. * @function toJSON - * @memberof grafeas.v1.VulnerabilityOccurrence + * @memberof grafeas.v1.EnvelopeSignature * @instance * @returns {Object.} JSON object */ - VulnerabilityOccurrence.prototype.toJSON = function toJSON() { + EnvelopeSignature.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - VulnerabilityOccurrence.CVSSV3 = (function() { + return EnvelopeSignature; + })(); - /** - * 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.Grafeas = (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]]; - } + /** + * 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); + } - /** - * CVSSV3 baseScore. - * @member {number} baseScore - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @instance - */ - CVSSV3.prototype.baseScore = 0; + (Grafeas.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Grafeas; - /** - * CVSSV3 severity. - * @member {grafeas.v1.Severity} severity - * @memberof grafeas.v1.VulnerabilityOccurrence.CVSSV3 - * @instance - */ - CVSSV3.prototype.severity = 0; + /** + * 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); + }; - /** - * 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); - }; + /** + * 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 + */ - /** - * 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; - }; + /** + * 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" }); - /** - * 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(); - }; + /** + * Calls GetOccurrence. + * @function getOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetOccurrenceRequest} request GetOccurrenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * 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 + */ - /** - * 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()); - }; + /** + * 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" }); - /** - * 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; - }; + /** + * Calls ListOccurrences. + * @function listOccurrences + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IListOccurrencesRequest} request ListOccurrencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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": - 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 message; - }; + /** + * 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" }); - /** - * 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; - }; + /** + * Calls CreateOccurrence. + * @function createOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.ICreateOccurrenceRequest} request CreateOccurrenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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); - }; + /** + * 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 + */ - return CVSSV3; - })(); + /** + * 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 + */ + 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" }); - VulnerabilityOccurrence.PackageIssue = (function() { + /** + * Calls BatchCreateOccurrences. + * @function batchCreateOccurrences + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IBatchCreateOccurrencesRequest} request BatchCreateOccurrencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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 - */ + /** + * 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 + */ - /** - * 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]]; - } + /** + * 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 + */ + 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" }); - /** - * PackageIssue affectedCpeUri. - * @member {string} affectedCpeUri - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.affectedCpeUri = ""; + /** + * Calls UpdateOccurrence. + * @function updateOccurrence + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IUpdateOccurrenceRequest} request UpdateOccurrenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * PackageIssue affectedPackage. - * @member {string} affectedPackage - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.affectedPackage = ""; + /** + * 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 + */ - /** - * PackageIssue affectedVersion. - * @member {grafeas.v1.IVersion|null|undefined} affectedVersion - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.affectedVersion = null; + /** + * 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 + */ + 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" }); - /** - * PackageIssue fixedCpeUri. - * @member {string} fixedCpeUri - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixedCpeUri = ""; + /** + * Calls GetOccurrenceNote. + * @function getOccurrenceNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetOccurrenceNoteRequest} request GetOccurrenceNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * PackageIssue fixedPackage. - * @member {string} fixedPackage - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixedPackage = ""; + /** + * 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 + */ - /** - * PackageIssue fixedVersion. - * @member {grafeas.v1.IVersion|null|undefined} fixedVersion - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixedVersion = null; + /** + * 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 + */ + 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" }); - /** - * PackageIssue fixAvailable. - * @member {boolean} fixAvailable - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.fixAvailable = false; + /** + * Calls GetNote. + * @function getNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IGetNoteRequest} request GetNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * PackageIssue packageType. - * @member {string} packageType - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.packageType = ""; + /** + * 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 + */ - /** - * PackageIssue effectiveSeverity. - * @member {grafeas.v1.Severity} effectiveSeverity - * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue - * @instance - */ - PackageIssue.prototype.effectiveSeverity = 0; + /** + * 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 + */ + 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" }); - /** - * 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); - }; + /** + * Calls ListNotes. + * @function listNotes + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IListNotesRequest} request ListNotesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * 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 + */ - /** - * 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(); - }; + /** + * 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" }); - /** - * 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; - }; + /** + * Calls DeleteNote. + * @function deleteNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IDeleteNoteRequest} request DeleteNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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()); - }; + /** + * 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 + */ - /** - * 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; - } - 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; - }; + /** + * 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 + */ + 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" }); + + /** + * Calls CreateNote. + * @function createNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.ICreateNoteRequest} request CreateNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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.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; - } - return message; - }; + /** + * 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 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; - }; + /** + * 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 + */ + 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" }); - /** - * 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); - }; + /** + * Calls BatchCreateNotes. + * @function batchCreateNotes + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IBatchCreateNotesRequest} request BatchCreateNotesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return PackageIssue; - })(); + /** + * 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 + */ - return VulnerabilityOccurrence; - })(); + /** + * 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 + */ + 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" }); - /** - * NoteKind enum. - * @name grafeas.v1.NoteKind - * @enum {number} - * @property {number} NOTE_KIND_UNSPECIFIED=0 NOTE_KIND_UNSPECIFIED value - * @property {number} VULNERABILITY=1 VULNERABILITY value - * @property {number} BUILD=2 BUILD value - * @property {number} IMAGE=3 IMAGE value - * @property {number} PACKAGE=4 PACKAGE value - * @property {number} DEPLOYMENT=5 DEPLOYMENT value - * @property {number} DISCOVERY=6 DISCOVERY value - * @property {number} ATTESTATION=7 ATTESTATION value - * @property {number} UPGRADE=8 UPGRADE value - * @property {number} COMPLIANCE=9 COMPLIANCE value - * @property {number} DSSE_ATTESTATION=10 DSSE_ATTESTATION value - */ - v1.NoteKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NOTE_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "VULNERABILITY"] = 1; - values[valuesById[2] = "BUILD"] = 2; - values[valuesById[3] = "IMAGE"] = 3; - values[valuesById[4] = "PACKAGE"] = 4; - values[valuesById[5] = "DEPLOYMENT"] = 5; - values[valuesById[6] = "DISCOVERY"] = 6; - values[valuesById[7] = "ATTESTATION"] = 7; - values[valuesById[8] = "UPGRADE"] = 8; - values[valuesById[9] = "COMPLIANCE"] = 9; - values[valuesById[10] = "DSSE_ATTESTATION"] = 10; - return values; + /** + * Calls UpdateNote. + * @function updateNote + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IUpdateNoteRequest} request UpdateNoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * Calls ListNoteOccurrences. + * @function listNoteOccurrences + * @memberof grafeas.v1.Grafeas + * @instance + * @param {grafeas.v1.IListNoteOccurrencesRequest} request ListNoteOccurrencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Grafeas; })(); - v1.RelatedUrl = (function() { + v1.Occurrence = (function() { /** - * Properties of a RelatedUrl. + * Properties of an Occurrence. * @memberof grafeas.v1 - * @interface IRelatedUrl - * @property {string|null} [url] RelatedUrl url - * @property {string|null} [label] RelatedUrl label + * @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 RelatedUrl. + * Constructs a new Occurrence. * @memberof grafeas.v1 - * @classdesc Represents a RelatedUrl. - * @implements IRelatedUrl + * @classdesc Represents an Occurrence. + * @implements IOccurrence * @constructor - * @param {grafeas.v1.IRelatedUrl=} [properties] Properties to set + * @param {grafeas.v1.IOccurrence=} [properties] Properties to set */ - function RelatedUrl(properties) { + function Occurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2644,298 +1530,310 @@ } /** - * RelatedUrl url. - * @member {string} url - * @memberof grafeas.v1.RelatedUrl + * Occurrence name. + * @member {string} name + * @memberof grafeas.v1.Occurrence * @instance */ - RelatedUrl.prototype.url = ""; + Occurrence.prototype.name = ""; /** - * RelatedUrl label. - * @member {string} label - * @memberof grafeas.v1.RelatedUrl + * Occurrence resourceUri. + * @member {string} resourceUri + * @memberof grafeas.v1.Occurrence * @instance */ - RelatedUrl.prototype.label = ""; + Occurrence.prototype.resourceUri = ""; /** - * Creates a new RelatedUrl instance using the specified properties. - * @function create - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {grafeas.v1.IRelatedUrl=} [properties] Properties to set - * @returns {grafeas.v1.RelatedUrl} RelatedUrl instance + * Occurrence noteName. + * @member {string} noteName + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.create = function create(properties) { - return new RelatedUrl(properties); - }; + Occurrence.prototype.noteName = ""; /** - * Encodes the specified RelatedUrl message. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {grafeas.v1.IRelatedUrl} message RelatedUrl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Occurrence kind. + * @member {grafeas.v1.NoteKind} kind + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.label); - return writer; - }; + Occurrence.prototype.kind = 0; /** - * Encodes the specified RelatedUrl message, length delimited. Does not implicitly {@link grafeas.v1.RelatedUrl.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {grafeas.v1.IRelatedUrl} message RelatedUrl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Occurrence remediation. + * @member {string} remediation + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Occurrence.prototype.remediation = ""; /** - * Decodes a RelatedUrl message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.RelatedUrl} RelatedUrl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Occurrence createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.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.RelatedUrl(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.label = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Occurrence.prototype.createTime = null; /** - * Decodes a RelatedUrl message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.RelatedUrl} RelatedUrl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Occurrence updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Occurrence.prototype.updateTime = null; /** - * Verifies a RelatedUrl message. - * @function verify - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Occurrence vulnerability. + * @member {grafeas.v1.IVulnerabilityOccurrence|null|undefined} vulnerability + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - return null; - }; + Occurrence.prototype.vulnerability = null; /** - * Creates a RelatedUrl message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.RelatedUrl} RelatedUrl + * Occurrence build. + * @member {grafeas.v1.IBuildOccurrence|null|undefined} build + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.RelatedUrl) - return object; - var message = new $root.grafeas.v1.RelatedUrl(); - if (object.url != null) - message.url = String(object.url); - if (object.label != null) - message.label = String(object.label); - return message; - }; + Occurrence.prototype.build = null; /** - * Creates a plain object from a RelatedUrl message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.RelatedUrl - * @static - * @param {grafeas.v1.RelatedUrl} message RelatedUrl - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Occurrence image. + * @member {grafeas.v1.IImageOccurrence|null|undefined} image + * @memberof grafeas.v1.Occurrence + * @instance */ - RelatedUrl.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.url = ""; - object.label = ""; - } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - return object; - }; + Occurrence.prototype.image = null; /** - * Converts this RelatedUrl to JSON. - * @function toJSON - * @memberof grafeas.v1.RelatedUrl + * Occurrence package. + * @member {grafeas.v1.IPackageOccurrence|null|undefined} package + * @memberof grafeas.v1.Occurrence + * @instance + */ + Occurrence.prototype["package"] = null; + + /** + * Occurrence deployment. + * @member {grafeas.v1.IDeploymentOccurrence|null|undefined} deployment + * @memberof grafeas.v1.Occurrence + * @instance + */ + Occurrence.prototype.deployment = null; + + /** + * Occurrence discovery. + * @member {grafeas.v1.IDiscoveryOccurrence|null|undefined} discovery + * @memberof grafeas.v1.Occurrence + * @instance + */ + Occurrence.prototype.discovery = null; + + /** + * Occurrence attestation. + * @member {grafeas.v1.IAttestationOccurrence|null|undefined} attestation + * @memberof grafeas.v1.Occurrence + * @instance + */ + Occurrence.prototype.attestation = null; + + /** + * Occurrence upgrade. + * @member {grafeas.v1.IUpgradeOccurrence|null|undefined} upgrade + * @memberof grafeas.v1.Occurrence * @instance - * @returns {Object.} JSON object */ - RelatedUrl.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RelatedUrl; - })(); - - v1.Signature = (function() { + Occurrence.prototype.upgrade = null; /** - * Properties of a Signature. - * @memberof grafeas.v1 - * @interface ISignature - * @property {Uint8Array|null} [signature] Signature signature - * @property {string|null} [publicKeyId] Signature publicKeyId + * Occurrence compliance. + * @member {grafeas.v1.IComplianceOccurrence|null|undefined} compliance + * @memberof grafeas.v1.Occurrence + * @instance */ + Occurrence.prototype.compliance = null; /** - * Constructs a new Signature. - * @memberof grafeas.v1 - * @classdesc Represents a Signature. - * @implements ISignature - * @constructor - * @param {grafeas.v1.ISignature=} [properties] Properties to set + * Occurrence dsseAttestation. + * @member {grafeas.v1.IDSSEAttestationOccurrence|null|undefined} dsseAttestation + * @memberof grafeas.v1.Occurrence + * @instance */ - function Signature(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.dsseAttestation = null; /** - * Signature signature. - * @member {Uint8Array} signature - * @memberof grafeas.v1.Signature + * Occurrence envelope. + * @member {grafeas.v1.IEnvelope|null|undefined} envelope + * @memberof grafeas.v1.Occurrence * @instance */ - Signature.prototype.signature = $util.newBuffer([]); + Occurrence.prototype.envelope = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Signature publicKeyId. - * @member {string} publicKeyId - * @memberof grafeas.v1.Signature + * Occurrence details. + * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} details + * @memberof grafeas.v1.Occurrence * @instance */ - Signature.prototype.publicKeyId = ""; + 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 Signature instance using the specified properties. + * Creates a new Occurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.Signature + * @memberof grafeas.v1.Occurrence * @static - * @param {grafeas.v1.ISignature=} [properties] Properties to set - * @returns {grafeas.v1.Signature} Signature instance + * @param {grafeas.v1.IOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.Occurrence} Occurrence instance */ - Signature.create = function create(properties) { - return new Signature(properties); + Occurrence.create = function create(properties) { + return new Occurrence(properties); }; /** - * Encodes the specified Signature message. Does not implicitly {@link grafeas.v1.Signature.verify|verify} messages. + * Encodes the specified Occurrence message. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Signature + * @memberof grafeas.v1.Occurrence * @static - * @param {grafeas.v1.ISignature} message Signature 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 */ - Signature.encode = function encode(message, writer) { + Occurrence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature); - if (message.publicKeyId != null && Object.hasOwnProperty.call(message, "publicKeyId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicKeyId); + 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(); return writer; }; /** - * Encodes the specified Signature message, length delimited. Does not implicitly {@link grafeas.v1.Signature.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.Signature + * @memberof grafeas.v1.Occurrence * @static - * @param {grafeas.v1.ISignature} message Signature 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 */ - Signature.encodeDelimited = function encodeDelimited(message, writer) { + Occurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Signature message from the specified reader or buffer. + * Decodes an Occurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Signature + * @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.Signature} Signature + * @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 */ - Signature.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.Signature(); + 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.signature = reader.bytes(); + message.name = reader.string(); break; case 2: - message.publicKeyId = reader.string(); + message.resourceUri = reader.string(); + break; + case 3: + message.noteName = reader.string(); + 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()); break; default: reader.skipType(tag & 7); @@ -2946,389 +1844,456 @@ }; /** - * Decodes a Signature message from the specified reader or buffer, length delimited. + * Decodes an Occurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Signature + * @memberof grafeas.v1.Occurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Signature} Signature + * @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 */ - Signature.decodeDelimited = function decodeDelimited(reader) { + Occurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Signature message. + * Verifies an Occurrence message. * @function verify - * @memberof grafeas.v1.Signature + * @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 */ - Signature.verify = function verify(message) { + Occurrence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.publicKeyId != null && message.hasOwnProperty("publicKeyId")) - if (!$util.isString(message.publicKeyId)) - return "publicKeyId: string expected"; - return null; - }; - - /** - * Creates a Signature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.Signature - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.Signature} Signature - */ - Signature.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Signature) - return object; - var message = new $root.grafeas.v1.Signature(); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.publicKeyId != null) - message.publicKeyId = String(object.publicKeyId); - return message; - }; - - /** - * Creates a plain object from a Signature message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.Signature - * @static - * @param {grafeas.v1.Signature} message Signature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Signature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - object.publicKeyId = ""; - } - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.publicKeyId != null && message.hasOwnProperty("publicKeyId")) - object.publicKeyId = message.publicKeyId; - return object; - }; - - /** - * Converts this Signature to JSON. - * @function toJSON - * @memberof grafeas.v1.Signature - * @instance - * @returns {Object.} JSON object - */ - Signature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Signature; - })(); - - v1.Envelope = (function() { - - /** - * Properties of an Envelope. - * @memberof grafeas.v1 - * @interface IEnvelope - * @property {Uint8Array|null} [payload] Envelope payload - * @property {string|null} [payloadType] Envelope payloadType - * @property {Array.|null} [signatures] Envelope signatures - */ - - /** - * Constructs a new Envelope. - * @memberof grafeas.v1 - * @classdesc Represents an Envelope. - * @implements IEnvelope - * @constructor - * @param {grafeas.v1.IEnvelope=} [properties] Properties to set - */ - function Envelope(properties) { - this.signatures = []; - 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]]; - } - - /** - * Envelope payload. - * @member {Uint8Array} payload - * @memberof grafeas.v1.Envelope - * @instance - */ - Envelope.prototype.payload = $util.newBuffer([]); - - /** - * Envelope payloadType. - * @member {string} payloadType - * @memberof grafeas.v1.Envelope - * @instance - */ - Envelope.prototype.payloadType = ""; - - /** - * Envelope signatures. - * @member {Array.} signatures - * @memberof grafeas.v1.Envelope - * @instance - */ - Envelope.prototype.signatures = $util.emptyArray; - - /** - * Creates a new Envelope instance using the specified properties. - * @function create - * @memberof grafeas.v1.Envelope - * @static - * @param {grafeas.v1.IEnvelope=} [properties] Properties to set - * @returns {grafeas.v1.Envelope} Envelope instance - */ - Envelope.create = function create(properties) { - return new Envelope(properties); - }; - - /** - * Encodes the specified Envelope message. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.Envelope - * @static - * @param {grafeas.v1.IEnvelope} message Envelope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Envelope.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.payload); - if (message.payloadType != null && Object.hasOwnProperty.call(message, "payloadType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.payloadType); - if (message.signatures != null && message.signatures.length) - for (var i = 0; i < message.signatures.length; ++i) - $root.grafeas.v1.EnvelopeSignature.encode(message.signatures[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Envelope message, length delimited. Does not implicitly {@link grafeas.v1.Envelope.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.Envelope - * @static - * @param {grafeas.v1.IEnvelope} message Envelope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Envelope.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Envelope message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.Envelope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Envelope} Envelope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Envelope.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.Envelope(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.payload = reader.bytes(); - break; case 2: - message.payloadType = reader.string(); - break; case 3: - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push($root.grafeas.v1.EnvelopeSignature.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + 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; + } } - return message; - }; - - /** - * Decodes an Envelope message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.Envelope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Envelope} Envelope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Envelope.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Envelope message. - * @function verify - * @memberof grafeas.v1.Envelope - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Envelope.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) - return "payload: buffer expected"; - if (message.payloadType != null && message.hasOwnProperty("payloadType")) - if (!$util.isString(message.payloadType)) - return "payloadType: string expected"; - if (message.signatures != null && message.hasOwnProperty("signatures")) { - if (!Array.isArray(message.signatures)) - return "signatures: array expected"; - for (var i = 0; i < message.signatures.length; ++i) { - var error = $root.grafeas.v1.EnvelopeSignature.verify(message.signatures[i]); + 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 "signatures." + 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 an Envelope 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.Envelope + * @memberof grafeas.v1.Occurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Envelope} Envelope + * @returns {grafeas.v1.Occurrence} Occurrence */ - Envelope.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Envelope) + Occurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Occurrence) return object; - var message = new $root.grafeas.v1.Envelope(); - if (object.payload != null) - if (typeof object.payload === "string") - $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) - message.payload = object.payload; - if (object.payloadType != null) - message.payloadType = String(object.payloadType); - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".grafeas.v1.Envelope.signatures: array expected"); - message.signatures = []; - for (var i = 0; i < object.signatures.length; ++i) { - if (typeof object.signatures[i] !== "object") - throw TypeError(".grafeas.v1.Envelope.signatures: object expected"); - message.signatures[i] = $root.grafeas.v1.EnvelopeSignature.fromObject(object.signatures[i]); - } + 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); } return message; }; /** - * Creates a plain object from an Envelope message. Also converts values to other types if specified. + * Creates a plain object from an Occurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Envelope + * @memberof grafeas.v1.Occurrence * @static - * @param {grafeas.v1.Envelope} message Envelope + * @param {grafeas.v1.Occurrence} message Occurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Envelope.toObject = function toObject(message, options) { + Occurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.signatures = []; if (options.defaults) { - if (options.bytes === String) - object.payload = ""; - else { - object.payload = []; - if (options.bytes !== Array) - object.payload = $util.newBuffer(object.payload); - } - object.payloadType = ""; + 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.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - if (message.payloadType != null && message.hasOwnProperty("payloadType")) - object.payloadType = message.payloadType; - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (var j = 0; j < message.signatures.length; ++j) - object.signatures[j] = $root.grafeas.v1.EnvelopeSignature.toObject(message.signatures[j], options); + 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"; + } + if (message.envelope != null && message.hasOwnProperty("envelope")) + object.envelope = $root.grafeas.v1.Envelope.toObject(message.envelope, options); return object; }; /** - * Converts this Envelope to JSON. + * Converts this Occurrence to JSON. * @function toJSON - * @memberof grafeas.v1.Envelope + * @memberof grafeas.v1.Occurrence * @instance * @returns {Object.} JSON object */ - Envelope.prototype.toJSON = function toJSON() { + Occurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Envelope; + return Occurrence; })(); - v1.EnvelopeSignature = (function() { + v1.Note = (function() { /** - * Properties of an EnvelopeSignature. + * Properties of a Note. * @memberof grafeas.v1 - * @interface IEnvelopeSignature - * @property {Uint8Array|null} [sig] EnvelopeSignature sig - * @property {string|null} [keyid] EnvelopeSignature keyid + * @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 EnvelopeSignature. + * Constructs a new Note. * @memberof grafeas.v1 - * @classdesc Represents an EnvelopeSignature. - * @implements IEnvelopeSignature + * @classdesc Represents a Note. + * @implements INote * @constructor - * @param {grafeas.v1.IEnvelopeSignature=} [properties] Properties to set + * @param {grafeas.v1.INote=} [properties] Properties to set */ - function EnvelopeSignature(properties) { + 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) @@ -3336,433 +2301,329 @@ } /** - * EnvelopeSignature sig. - * @member {Uint8Array} sig - * @memberof grafeas.v1.EnvelopeSignature + * Note name. + * @member {string} name + * @memberof grafeas.v1.Note * @instance */ - EnvelopeSignature.prototype.sig = $util.newBuffer([]); + Note.prototype.name = ""; /** - * EnvelopeSignature keyid. - * @member {string} keyid - * @memberof grafeas.v1.EnvelopeSignature + * Note shortDescription. + * @member {string} shortDescription + * @memberof grafeas.v1.Note * @instance */ - EnvelopeSignature.prototype.keyid = ""; - - /** - * Creates a new EnvelopeSignature instance using the specified properties. - * @function create - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {grafeas.v1.IEnvelopeSignature=} [properties] Properties to set - * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature instance - */ - EnvelopeSignature.create = function create(properties) { - return new EnvelopeSignature(properties); - }; - - /** - * Encodes the specified EnvelopeSignature message. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {grafeas.v1.IEnvelopeSignature} message EnvelopeSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnvelopeSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sig != null && Object.hasOwnProperty.call(message, "sig")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sig); - if (message.keyid != null && Object.hasOwnProperty.call(message, "keyid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyid); - return writer; - }; - - /** - * Encodes the specified EnvelopeSignature message, length delimited. Does not implicitly {@link grafeas.v1.EnvelopeSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {grafeas.v1.IEnvelopeSignature} message EnvelopeSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnvelopeSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnvelopeSignature message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnvelopeSignature.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.EnvelopeSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sig = reader.bytes(); - break; - case 2: - message.keyid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnvelopeSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnvelopeSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnvelopeSignature message. - * @function verify - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnvelopeSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sig != null && message.hasOwnProperty("sig")) - if (!(message.sig && typeof message.sig.length === "number" || $util.isString(message.sig))) - return "sig: buffer expected"; - if (message.keyid != null && message.hasOwnProperty("keyid")) - if (!$util.isString(message.keyid)) - return "keyid: string expected"; - return null; - }; + Note.prototype.shortDescription = ""; - /** - * Creates an EnvelopeSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.EnvelopeSignature} EnvelopeSignature - */ - EnvelopeSignature.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.EnvelopeSignature) - return object; - var message = new $root.grafeas.v1.EnvelopeSignature(); - if (object.sig != null) - if (typeof object.sig === "string") - $util.base64.decode(object.sig, message.sig = $util.newBuffer($util.base64.length(object.sig)), 0); - else if (object.sig.length) - message.sig = object.sig; - if (object.keyid != null) - message.keyid = String(object.keyid); - return message; - }; + /** + * Note longDescription. + * @member {string} longDescription + * @memberof grafeas.v1.Note + * @instance + */ + Note.prototype.longDescription = ""; /** - * Creates a plain object from an EnvelopeSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.EnvelopeSignature - * @static - * @param {grafeas.v1.EnvelopeSignature} message EnvelopeSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Note kind. + * @member {grafeas.v1.NoteKind} kind + * @memberof grafeas.v1.Note + * @instance */ - EnvelopeSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.sig = ""; - else { - object.sig = []; - if (options.bytes !== Array) - object.sig = $util.newBuffer(object.sig); - } - object.keyid = ""; - } - if (message.sig != null && message.hasOwnProperty("sig")) - object.sig = options.bytes === String ? $util.base64.encode(message.sig, 0, message.sig.length) : options.bytes === Array ? Array.prototype.slice.call(message.sig) : message.sig; - if (message.keyid != null && message.hasOwnProperty("keyid")) - object.keyid = message.keyid; - return object; - }; + Note.prototype.kind = 0; /** - * Converts this EnvelopeSignature to JSON. - * @function toJSON - * @memberof grafeas.v1.EnvelopeSignature + * Note relatedUrl. + * @member {Array.} relatedUrl + * @memberof grafeas.v1.Note * @instance - * @returns {Object.} JSON object */ - EnvelopeSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Note.prototype.relatedUrl = $util.emptyArray; - return EnvelopeSignature; - })(); + /** + * Note expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof grafeas.v1.Note + * @instance + */ + Note.prototype.expirationTime = null; - v1.CVSSv3 = (function() { + /** + * Note createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof grafeas.v1.Note + * @instance + */ + Note.prototype.createTime = null; /** - * Properties of a CVSSv3. - * @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 + * Note updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof grafeas.v1.Note + * @instance */ + Note.prototype.updateTime = null; /** - * Constructs a new CVSSv3. - * @memberof grafeas.v1 - * @classdesc Represents a CVSSv3. - * @implements ICVSSv3 - * @constructor - * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set + * Note relatedNoteNames. + * @member {Array.} relatedNoteNames + * @memberof grafeas.v1.Note + * @instance */ - 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]]; - } + Note.prototype.relatedNoteNames = $util.emptyArray; /** - * CVSSv3 baseScore. - * @member {number} baseScore - * @memberof grafeas.v1.CVSSv3 + * Note vulnerability. + * @member {grafeas.v1.IVulnerabilityNote|null|undefined} vulnerability + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.baseScore = 0; + Note.prototype.vulnerability = null; /** - * CVSSv3 exploitabilityScore. - * @member {number} exploitabilityScore - * @memberof grafeas.v1.CVSSv3 + * Note build. + * @member {grafeas.v1.IBuildNote|null|undefined} build + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.exploitabilityScore = 0; + Note.prototype.build = null; /** - * CVSSv3 impactScore. - * @member {number} impactScore - * @memberof grafeas.v1.CVSSv3 + * Note image. + * @member {grafeas.v1.IImageNote|null|undefined} image + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.impactScore = 0; + Note.prototype.image = null; /** - * CVSSv3 attackVector. - * @member {grafeas.v1.CVSSv3.AttackVector} attackVector - * @memberof grafeas.v1.CVSSv3 + * Note package. + * @member {grafeas.v1.IPackageNote|null|undefined} package + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.attackVector = 0; + Note.prototype["package"] = null; /** - * CVSSv3 attackComplexity. - * @member {grafeas.v1.CVSSv3.AttackComplexity} attackComplexity - * @memberof grafeas.v1.CVSSv3 + * Note deployment. + * @member {grafeas.v1.IDeploymentNote|null|undefined} deployment + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.attackComplexity = 0; + Note.prototype.deployment = null; /** - * CVSSv3 privilegesRequired. - * @member {grafeas.v1.CVSSv3.PrivilegesRequired} privilegesRequired - * @memberof grafeas.v1.CVSSv3 + * Note discovery. + * @member {grafeas.v1.IDiscoveryNote|null|undefined} discovery + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.privilegesRequired = 0; + Note.prototype.discovery = null; /** - * CVSSv3 userInteraction. - * @member {grafeas.v1.CVSSv3.UserInteraction} userInteraction - * @memberof grafeas.v1.CVSSv3 + * Note attestation. + * @member {grafeas.v1.IAttestationNote|null|undefined} attestation + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.userInteraction = 0; + Note.prototype.attestation = null; /** - * CVSSv3 scope. - * @member {grafeas.v1.CVSSv3.Scope} scope - * @memberof grafeas.v1.CVSSv3 + * Note upgrade. + * @member {grafeas.v1.IUpgradeNote|null|undefined} upgrade + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.scope = 0; + Note.prototype.upgrade = null; /** - * CVSSv3 confidentialityImpact. - * @member {grafeas.v1.CVSSv3.Impact} confidentialityImpact - * @memberof grafeas.v1.CVSSv3 + * Note compliance. + * @member {grafeas.v1.IComplianceNote|null|undefined} compliance + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.confidentialityImpact = 0; + Note.prototype.compliance = null; /** - * CVSSv3 integrityImpact. - * @member {grafeas.v1.CVSSv3.Impact} integrityImpact - * @memberof grafeas.v1.CVSSv3 + * Note dsseAttestation. + * @member {grafeas.v1.IDSSEAttestationNote|null|undefined} dsseAttestation + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.integrityImpact = 0; + Note.prototype.dsseAttestation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CVSSv3 availabilityImpact. - * @member {grafeas.v1.CVSSv3.Impact} availabilityImpact - * @memberof grafeas.v1.CVSSv3 + * Note type. + * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} type + * @memberof grafeas.v1.Note * @instance */ - CVSSv3.prototype.availabilityImpact = 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 CVSSv3 instance using the specified properties. + * Creates a new Note instance using the specified properties. * @function create - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.Note * @static - * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set - * @returns {grafeas.v1.CVSSv3} CVSSv3 instance + * @param {grafeas.v1.INote=} [properties] Properties to set + * @returns {grafeas.v1.Note} Note instance */ - CVSSv3.create = function create(properties) { - return new CVSSv3(properties); + Note.create = function create(properties) { + return new Note(properties); }; /** - * Encodes the specified CVSSv3 message. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. + * Encodes the specified Note message. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. * @function encode - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.Note * @static - * @param {grafeas.v1.ICVSSv3} message CVSSv3 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 */ - CVSSv3.encode = function encode(message, writer) { + Note.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.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 CVSSv3 message, length delimited. Does not implicitly {@link grafeas.v1.CVSSv3.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.CVSSv3 + * @memberof grafeas.v1.Note * @static - * @param {grafeas.v1.ICVSSv3} message CVSSv3 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 */ - CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { + Note.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CVSSv3 message from the specified reader or buffer. + * Decodes a Note message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.CVSSv3 + * @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.CVSSv3} CVSSv3 + * @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 */ - CVSSv3.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.CVSSv3(); + 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.baseScore = reader.float(); + message.name = reader.string(); break; case 2: - message.exploitabilityScore = reader.float(); + message.shortDescription = reader.string(); break; case 3: - message.impactScore = reader.float(); + message.longDescription = reader.string(); + break; + case 4: + message.kind = reader.int32(); break; case 5: - message.attackVector = reader.int32(); + if (!(message.relatedUrl && message.relatedUrl.length)) + message.relatedUrl = []; + message.relatedUrl.push($root.grafeas.v1.RelatedUrl.decode(reader, reader.uint32())); break; case 6: - message.attackComplexity = reader.int32(); + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 7: - message.privilegesRequired = reader.int32(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 8: - message.userInteraction = reader.int32(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 9: - message.scope = reader.int32(); + if (!(message.relatedNoteNames && message.relatedNoteNames.length)) + message.relatedNoteNames = []; + message.relatedNoteNames.push(reader.string()); break; case 10: - message.confidentialityImpact = reader.int32(); + message.vulnerability = $root.grafeas.v1.VulnerabilityNote.decode(reader, reader.uint32()); break; case 11: - message.integrityImpact = reader.int32(); + message.build = $root.grafeas.v1.BuildNote.decode(reader, reader.uint32()); break; case 12: - message.availabilityImpact = reader.int32(); + 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); @@ -3773,487 +2634,475 @@ }; /** - * Decodes a CVSSv3 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.CVSSv3 + * @memberof grafeas.v1.Note * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.CVSSv3} CVSSv3 + * @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 */ - CVSSv3.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 CVSSv3 message. + * Verifies a Note message. * @function verify - * @memberof grafeas.v1.CVSSv3 + * @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 */ - CVSSv3.verify = function verify(message) { + Note.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) { + 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 "attackVector: 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.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - switch (message.attackComplexity) { - default: - return "attackComplexity: enum value expected"; - case 0: - case 1: - case 2: - 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.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.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.userInteraction != null && message.hasOwnProperty("userInteraction")) - switch (message.userInteraction) { - default: - return "userInteraction: enum value expected"; - case 0: - case 1: - case 2: - break; + } + 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.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; + } + 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.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.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.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.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.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.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 CVSSv3 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.CVSSv3 + * @memberof grafeas.v1.Note * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.CVSSv3} CVSSv3 + * @returns {grafeas.v1.Note} Note */ - CVSSv3.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.CVSSv3) + Note.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Note) 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": + 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.attackVector = 0; + message.kind = 0; break; - case "ATTACK_VECTOR_NETWORK": + case "VULNERABILITY": case 1: - message.attackVector = 1; + message.kind = 1; break; - case "ATTACK_VECTOR_ADJACENT": + case "BUILD": case 2: - message.attackVector = 2; + message.kind = 2; break; - case "ATTACK_VECTOR_LOCAL": + case "IMAGE": case 3: - message.attackVector = 3; + message.kind = 3; break; - case "ATTACK_VECTOR_PHYSICAL": + case "PACKAGE": case 4: - message.attackVector = 4; - break; - } - switch (object.attackComplexity) { - case "ATTACK_COMPLEXITY_UNSPECIFIED": - case 0: - message.attackComplexity = 0; + message.kind = 4; break; - case "ATTACK_COMPLEXITY_LOW": - case 1: - message.attackComplexity = 1; + case "DEPLOYMENT": + case 5: + message.kind = 5; break; - case "ATTACK_COMPLEXITY_HIGH": - case 2: - message.attackComplexity = 2; + case "DISCOVERY": + case 6: + message.kind = 6; break; - } - switch (object.privilegesRequired) { - case "PRIVILEGES_REQUIRED_UNSPECIFIED": - case 0: - message.privilegesRequired = 0; + case "ATTESTATION": + case 7: + message.kind = 7; break; - case "PRIVILEGES_REQUIRED_NONE": - case 1: - message.privilegesRequired = 1; + case "UPGRADE": + case 8: + message.kind = 8; break; - case "PRIVILEGES_REQUIRED_LOW": - case 2: - message.privilegesRequired = 2; + case "COMPLIANCE": + case 9: + message.kind = 9; break; - case "PRIVILEGES_REQUIRED_HIGH": - case 3: - message.privilegesRequired = 3; + case "DSSE_ATTESTATION": + case 10: + message.kind = 10; 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; + 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]); + } } - 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.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".grafeas.v1.Note.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); } - 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; + 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); } - 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; + 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); } - 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; + 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 CVSSv3 message. Also converts values to other types if specified. + * Creates a plain object from a Note message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.CVSSv3 + * @memberof grafeas.v1.Note * @static - * @param {grafeas.v1.CVSSv3} message CVSSv3 + * @param {grafeas.v1.Note} message Note * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CVSSv3.toObject = function toObject(message, options) { + Note.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.relatedUrl = []; + object.relatedNoteNames = []; + } 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; + 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.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 CVSSv3 to JSON. - * @function toJSON - * @memberof grafeas.v1.CVSSv3 - * @instance - * @returns {Object.} JSON object - */ - CVSSv3.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; - })(); - - /** - * 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; - })(); - - /** - * 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; - })(); - - /** - * 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; - })(); - - /** - * 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; - })(); + 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"; + } + return object; + }; /** - * 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 + * Converts this Note to JSON. + * @function toJSON + * @memberof grafeas.v1.Note + * @instance + * @returns {Object.} JSON object */ - 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 CVSSv3; - })(); + Note.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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 Note; })(); - v1.Distribution = (function() { + v1.GetOccurrenceRequest = (function() { /** - * Properties of a Distribution. + * Properties of a GetOccurrenceRequest. * @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 IGetOccurrenceRequest + * @property {string|null} [name] GetOccurrenceRequest name */ /** - * Constructs a new Distribution. + * Constructs a new GetOccurrenceRequest. * @memberof grafeas.v1 - * @classdesc Represents a Distribution. - * @implements IDistribution + * @classdesc Represents a GetOccurrenceRequest. + * @implements IGetOccurrenceRequest * @constructor - * @param {grafeas.v1.IDistribution=} [properties] Properties to set + * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set */ - function Distribution(properties) { + function GetOccurrenceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4261,140 +3110,75 @@ } /** - * 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 - * @instance - */ - Distribution.prototype.latestVersion = null; - - /** - * 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 + * GetOccurrenceRequest name. + * @member {string} name + * @memberof grafeas.v1.GetOccurrenceRequest * @instance */ - Distribution.prototype.description = ""; + GetOccurrenceRequest.prototype.name = ""; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new GetOccurrenceRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.IDistribution=} [properties] Properties to set - * @returns {grafeas.v1.Distribution} Distribution instance + * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest instance */ - Distribution.create = function create(properties) { - return new Distribution(properties); + GetOccurrenceRequest.create = function create(properties) { + return new GetOccurrenceRequest(properties); }; /** - * Encodes the specified Distribution message. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. + * Encodes the specified GetOccurrenceRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.IDistribution} message Distribution 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 */ - Distribution.encode = function encode(message, writer) { + GetOccurrenceRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link grafeas.v1.Distribution.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.Distribution + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.IDistribution} message Distribution 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 */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { + GetOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a GetOccurrenceRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Distribution + * @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.Distribution} Distribution + * @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 */ - Distribution.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.Distribution(); + 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.cpeUri = reader.string(); - 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.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -4405,173 +3189,110 @@ }; /** - * Decodes a Distribution 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.Distribution + * @memberof grafeas.v1.GetOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Distribution} Distribution + * @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 */ - Distribution.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 Distribution message. + * Verifies a GetOccurrenceRequest message. * @function verify - * @memberof grafeas.v1.Distribution + * @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 */ - Distribution.verify = function verify(message) { + GetOccurrenceRequest.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); - if (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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Distribution 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. * @function fromObject - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.GetOccurrenceRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Distribution} Distribution + * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Distribution) + GetOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GetOccurrenceRequest) 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; - } - 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); + var message = new $root.grafeas.v1.GetOccurrenceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Distribution 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.Distribution + * @memberof grafeas.v1.GetOccurrenceRequest * @static - * @param {grafeas.v1.Distribution} message Distribution + * @param {grafeas.v1.GetOccurrenceRequest} message GetOccurrenceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Distribution.toObject = function toObject(message, options) { + GetOccurrenceRequest.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 (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; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Distribution to JSON. + * Converts this GetOccurrenceRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Distribution + * @memberof grafeas.v1.GetOccurrenceRequest * @instance * @returns {Object.} JSON object */ - Distribution.prototype.toJSON = function toJSON() { + GetOccurrenceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Distribution; + return GetOccurrenceRequest; })(); - v1.Location = (function() { + v1.ListOccurrencesRequest = (function() { /** - * Properties of a Location. + * Properties of a ListOccurrencesRequest. * @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 + * @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 Location. + * Constructs a new ListOccurrencesRequest. * @memberof grafeas.v1 - * @classdesc Represents a Location. - * @implements ILocation + * @classdesc Represents a ListOccurrencesRequest. + * @implements IListOccurrencesRequest * @constructor - * @param {grafeas.v1.ILocation=} [properties] Properties to set + * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set */ - function Location(properties) { + function ListOccurrencesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4579,101 +3300,114 @@ } /** - * Location cpeUri. - * @member {string} cpeUri - * @memberof grafeas.v1.Location + * ListOccurrencesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.ListOccurrencesRequest * @instance */ - Location.prototype.cpeUri = ""; + ListOccurrencesRequest.prototype.parent = ""; /** - * Location version. - * @member {grafeas.v1.IVersion|null|undefined} version - * @memberof grafeas.v1.Location + * ListOccurrencesRequest filter. + * @member {string} filter + * @memberof grafeas.v1.ListOccurrencesRequest * @instance */ - Location.prototype.version = null; + ListOccurrencesRequest.prototype.filter = ""; /** - * Location path. - * @member {string} path - * @memberof grafeas.v1.Location + * ListOccurrencesRequest pageSize. + * @member {number} pageSize + * @memberof grafeas.v1.ListOccurrencesRequest * @instance */ - Location.prototype.path = ""; + ListOccurrencesRequest.prototype.pageSize = 0; /** - * Creates a new Location instance using the specified properties. + * ListOccurrencesRequest pageToken. + * @member {string} pageToken + * @memberof grafeas.v1.ListOccurrencesRequest + * @instance + */ + ListOccurrencesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOccurrencesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Location + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.ILocation=} [properties] Properties to set - * @returns {grafeas.v1.Location} Location instance + * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set + * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest instance */ - Location.create = function create(properties) { - return new Location(properties); + ListOccurrencesRequest.create = function create(properties) { + return new ListOccurrencesRequest(properties); }; /** - * Encodes the specified Location message. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. + * Encodes the specified ListOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Location + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.ILocation} message Location 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 */ - Location.encode = function encode(message, writer) { + ListOccurrencesRequest.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); + 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 Location message, length delimited. Does not implicitly {@link grafeas.v1.Location.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.Location + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.ILocation} message Location 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 */ - Location.encodeDelimited = function encodeDelimited(message, writer) { + ListOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes a ListOccurrencesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Location + * @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.Location} Location + * @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 */ - Location.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.Location(); + 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.cpeUri = reader.string(); + message.parent = reader.string(); break; case 2: - message.version = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + message.filter = reader.string(); break; case 3: - message.path = reader.string(); + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -4684,131 +3418,134 @@ }; /** - * Decodes a Location message from the specified reader or buffer, length delimited. + * Decodes a ListOccurrencesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Location + * @memberof grafeas.v1.ListOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Location} Location + * @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 */ - Location.decodeDelimited = function decodeDelimited(reader) { + ListOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Location message. + * Verifies a ListOccurrencesRequest message. * @function verify - * @memberof grafeas.v1.Location + * @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 */ - Location.verify = function verify(message) { + ListOccurrencesRequest.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"; + 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 Location 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.Location + * @memberof grafeas.v1.ListOccurrencesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Location} Location + * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Location) + ListOccurrencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListOccurrencesRequest) 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); + 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 Location 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.Location + * @memberof grafeas.v1.ListOccurrencesRequest * @static - * @param {grafeas.v1.Location} message Location + * @param {grafeas.v1.ListOccurrencesRequest} message ListOccurrencesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + ListOccurrencesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.cpeUri = ""; - object.version = null; - object.path = ""; + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; } - 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; + 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 Location to JSON. + * Converts this ListOccurrencesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Location + * @memberof grafeas.v1.ListOccurrencesRequest * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { + ListOccurrencesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Location; + return ListOccurrencesRequest; })(); - v1.PackageNote = (function() { + v1.ListOccurrencesResponse = (function() { /** - * Properties of a PackageNote. + * Properties of a ListOccurrencesResponse. * @memberof grafeas.v1 - * @interface IPackageNote - * @property {string|null} [name] PackageNote name - * @property {Array.|null} [distribution] PackageNote distribution + * @interface IListOccurrencesResponse + * @property {Array.|null} [occurrences] ListOccurrencesResponse occurrences + * @property {string|null} [nextPageToken] ListOccurrencesResponse nextPageToken */ /** - * Constructs a new PackageNote. + * Constructs a new ListOccurrencesResponse. * @memberof grafeas.v1 - * @classdesc Represents a PackageNote. - * @implements IPackageNote + * @classdesc Represents a ListOccurrencesResponse. + * @implements IListOccurrencesResponse * @constructor - * @param {grafeas.v1.IPackageNote=} [properties] Properties to set + * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set */ - function PackageNote(properties) { - this.distribution = []; + function ListOccurrencesResponse(properties) { + this.occurrences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4816,91 +3553,91 @@ } /** - * PackageNote name. - * @member {string} name - * @memberof grafeas.v1.PackageNote + * ListOccurrencesResponse occurrences. + * @member {Array.} occurrences + * @memberof grafeas.v1.ListOccurrencesResponse * @instance */ - PackageNote.prototype.name = ""; + ListOccurrencesResponse.prototype.occurrences = $util.emptyArray; /** - * PackageNote distribution. - * @member {Array.} distribution - * @memberof grafeas.v1.PackageNote + * ListOccurrencesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof grafeas.v1.ListOccurrencesResponse * @instance */ - PackageNote.prototype.distribution = $util.emptyArray; + ListOccurrencesResponse.prototype.nextPageToken = ""; /** - * Creates a new PackageNote instance using the specified properties. + * Creates a new ListOccurrencesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.PackageNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static - * @param {grafeas.v1.IPackageNote=} [properties] Properties to set - * @returns {grafeas.v1.PackageNote} PackageNote instance + * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set + * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse instance */ - PackageNote.create = function create(properties) { - return new PackageNote(properties); + ListOccurrencesResponse.create = function create(properties) { + return new ListOccurrencesResponse(properties); }; /** - * Encodes the specified PackageNote message. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. + * Encodes the specified ListOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.PackageNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static - * @param {grafeas.v1.IPackageNote} message PackageNote 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 */ - PackageNote.encode = function encode(message, writer) { + ListOccurrencesResponse.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(); + 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 PackageNote message, length delimited. Does not implicitly {@link grafeas.v1.PackageNote.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.PackageNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static - * @param {grafeas.v1.IPackageNote} message PackageNote 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 */ - PackageNote.encodeDelimited = function encodeDelimited(message, writer) { + ListOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PackageNote message from the specified reader or buffer. + * Decodes a ListOccurrencesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.PackageNote + * @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.PackageNote} PackageNote + * @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 */ - PackageNote.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.PackageNote(); + 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.name = reader.string(); + if (!(message.occurrences && message.occurrences.length)) + message.occurrences = []; + message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); break; - case 10: - if (!(message.distribution && message.distribution.length)) - message.distribution = []; - message.distribution.push($root.grafeas.v1.Distribution.decode(reader, reader.uint32())); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -4911,135 +3648,133 @@ }; /** - * Decodes a PackageNote 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.PackageNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.PackageNote} PackageNote + * @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 */ - PackageNote.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 PackageNote message. + * Verifies a ListOccurrencesResponse message. * @function verify - * @memberof grafeas.v1.PackageNote + * @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 */ - PackageNote.verify = function verify(message) { + ListOccurrencesResponse.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 (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 "distribution." + error; + return "occurrences." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a PackageNote 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. * @function fromObject - * @memberof grafeas.v1.PackageNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.PackageNote} PackageNote + * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse */ - PackageNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.PackageNote) + ListOccurrencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListOccurrencesResponse) 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]); + 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; }; /** - * Creates a plain object from a PackageNote message. Also converts values to other types if specified. + * Creates a plain object from a ListOccurrencesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.PackageNote + * @memberof grafeas.v1.ListOccurrencesResponse * @static - * @param {grafeas.v1.PackageNote} message PackageNote + * @param {grafeas.v1.ListOccurrencesResponse} message ListOccurrencesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PackageNote.toObject = function toObject(message, options) { + ListOccurrencesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.distribution = []; + object.occurrences = []; 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); + 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; }; /** - * Converts this PackageNote to JSON. + * Converts this ListOccurrencesResponse to JSON. * @function toJSON - * @memberof grafeas.v1.PackageNote + * @memberof grafeas.v1.ListOccurrencesResponse * @instance * @returns {Object.} JSON object */ - PackageNote.prototype.toJSON = function toJSON() { + ListOccurrencesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PackageNote; + return ListOccurrencesResponse; })(); - v1.PackageOccurrence = (function() { + v1.DeleteOccurrenceRequest = (function() { /** - * Properties of a PackageOccurrence. + * Properties of a DeleteOccurrenceRequest. * @memberof grafeas.v1 - * @interface IPackageOccurrence - * @property {string|null} [name] PackageOccurrence name - * @property {Array.|null} [location] PackageOccurrence location + * @interface IDeleteOccurrenceRequest + * @property {string|null} [name] DeleteOccurrenceRequest name */ /** - * Constructs a new PackageOccurrence. + * Constructs a new DeleteOccurrenceRequest. * @memberof grafeas.v1 - * @classdesc Represents a PackageOccurrence. - * @implements IPackageOccurrence + * @classdesc Represents a DeleteOccurrenceRequest. + * @implements IDeleteOccurrenceRequest * @constructor - * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set */ - function PackageOccurrence(properties) { - this.location = []; + function DeleteOccurrenceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5047,92 +3782,76 @@ } /** - * PackageOccurrence name. + * DeleteOccurrenceRequest name. * @member {string} name - * @memberof grafeas.v1.PackageOccurrence - * @instance - */ - PackageOccurrence.prototype.name = ""; - - /** - * PackageOccurrence location. - * @member {Array.} location - * @memberof grafeas.v1.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @instance */ - PackageOccurrence.prototype.location = $util.emptyArray; + DeleteOccurrenceRequest.prototype.name = ""; /** - * Creates a new PackageOccurrence instance using the specified properties. + * Creates a new DeleteOccurrenceRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence instance + * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest instance */ - PackageOccurrence.create = function create(properties) { - return new PackageOccurrence(properties); + DeleteOccurrenceRequest.create = function create(properties) { + return new DeleteOccurrenceRequest(properties); }; /** - * Encodes the specified PackageOccurrence message. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. + * Encodes the specified DeleteOccurrenceRequest message. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.IPackageOccurrence} message PackageOccurrence 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 */ - PackageOccurrence.encode = function encode(message, writer) { + DeleteOccurrenceRequest.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; }; /** - * Encodes the specified PackageOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.PackageOccurrence.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.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.IPackageOccurrence} message PackageOccurrence 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 */ - PackageOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + DeleteOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PackageOccurrence message from the specified reader or buffer. + * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.PackageOccurrence + * @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.PackageOccurrence} PackageOccurrence + * @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 */ - PackageOccurrence.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.PackageOccurrence(); + 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.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; @@ -5142,138 +3861,108 @@ }; /** - * Decodes a PackageOccurrence 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.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence + * @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 */ - PackageOccurrence.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 PackageOccurrence message. + * Verifies a DeleteOccurrenceRequest message. * @function verify - * @memberof grafeas.v1.PackageOccurrence + * @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 */ - PackageOccurrence.verify = function verify(message) { + DeleteOccurrenceRequest.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; }; /** - * Creates a PackageOccurrence 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.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence + * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest */ - PackageOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.PackageOccurrence) + DeleteOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeleteOccurrenceRequest) return object; - var message = new $root.grafeas.v1.PackageOccurrence(); + var message = new $root.grafeas.v1.DeleteOccurrenceRequest(); 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; }; /** - * Creates a plain object from a PackageOccurrence 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.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @static - * @param {grafeas.v1.PackageOccurrence} message PackageOccurrence + * @param {grafeas.v1.DeleteOccurrenceRequest} message DeleteOccurrenceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PackageOccurrence.toObject = function toObject(message, options) { + DeleteOccurrenceRequest.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; }; /** - * Converts this PackageOccurrence to JSON. + * Converts this DeleteOccurrenceRequest to JSON. * @function toJSON - * @memberof grafeas.v1.PackageOccurrence + * @memberof grafeas.v1.DeleteOccurrenceRequest * @instance * @returns {Object.} JSON object */ - PackageOccurrence.prototype.toJSON = function toJSON() { + DeleteOccurrenceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PackageOccurrence; + return DeleteOccurrenceRequest; })(); - v1.Version = (function() { + v1.CreateOccurrenceRequest = (function() { /** - * Properties of a Version. + * Properties of a CreateOccurrenceRequest. * @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 + * @interface ICreateOccurrenceRequest + * @property {string|null} [parent] CreateOccurrenceRequest parent + * @property {grafeas.v1.IOccurrence|null} [occurrence] CreateOccurrenceRequest occurrence */ /** - * Constructs a new Version. + * Constructs a new CreateOccurrenceRequest. * @memberof grafeas.v1 - * @classdesc Represents a Version. - * @implements IVersion + * @classdesc Represents a CreateOccurrenceRequest. + * @implements ICreateOccurrenceRequest * @constructor - * @param {grafeas.v1.IVersion=} [properties] Properties to set + * @param {grafeas.v1.ICreateOccurrenceRequest=} [properties] Properties to set */ - function Version(properties) { + function CreateOccurrenceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5281,140 +3970,88 @@ } /** - * 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 = ""; - - /** - * Version inclusive. - * @member {boolean} inclusive - * @memberof grafeas.v1.Version - * @instance - */ - Version.prototype.inclusive = false; - - /** - * Version kind. - * @member {grafeas.v1.Version.VersionKind} kind - * @memberof grafeas.v1.Version + * CreateOccurrenceRequest parent. + * @member {string} parent + * @memberof grafeas.v1.CreateOccurrenceRequest * @instance */ - Version.prototype.kind = 0; + CreateOccurrenceRequest.prototype.parent = ""; /** - * Version fullName. - * @member {string} fullName - * @memberof grafeas.v1.Version + * CreateOccurrenceRequest occurrence. + * @member {grafeas.v1.IOccurrence|null|undefined} occurrence + * @memberof grafeas.v1.CreateOccurrenceRequest * @instance */ - Version.prototype.fullName = ""; + CreateOccurrenceRequest.prototype.occurrence = null; /** - * Creates a new Version instance using the specified properties. + * Creates a new CreateOccurrenceRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.CreateOccurrenceRequest * @static - * @param {grafeas.v1.IVersion=} [properties] Properties to set - * @returns {grafeas.v1.Version} Version instance + * @param {grafeas.v1.ICreateOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest instance */ - Version.create = function create(properties) { - return new Version(properties); + CreateOccurrenceRequest.create = function create(properties) { + return new CreateOccurrenceRequest(properties); }; /** - * Encodes the specified Version message. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. + * Encodes the specified CreateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.CreateOccurrenceRequest * @static - * @param {grafeas.v1.IVersion} message Version message or plain object to encode + * @param {grafeas.v1.ICreateOccurrenceRequest} message CreateOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encode = function encode(message, writer) { + CreateOccurrenceRequest.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); - 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.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; }; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. + * Encodes the specified CreateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateOccurrenceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.CreateOccurrenceRequest * @static - * @param {grafeas.v1.IVersion} message Version message or plain object to encode + * @param {grafeas.v1.ICreateOccurrenceRequest} message CreateOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encodeDelimited = function encodeDelimited(message, writer) { + CreateOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Version message from the specified reader or buffer. + * Decodes a CreateOccurrenceRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Version + * @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.Version} Version + * @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 */ - Version.decode = function decode(reader, length) { + 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.Version(); + 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.epoch = reader.int32(); - break; - case 2: - 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(); + message.parent = reader.string(); break; - case 5: - message.fullName = reader.string(); + case 2: + message.occurrence = $root.grafeas.v1.Occurrence.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5425,189 +4062,123 @@ }; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes a CreateOccurrenceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.CreateOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Version} Version + * @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 */ - Version.decodeDelimited = function decodeDelimited(reader) { + CreateOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Version message. + * Verifies a CreateOccurrenceRequest message. * @function verify - * @memberof grafeas.v1.Version + * @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 */ - Version.verify = function verify(message) { + CreateOccurrenceRequest.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"; + 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; }; /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. + * Creates a CreateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.CreateOccurrenceRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Version} Version + * @returns {grafeas.v1.CreateOccurrenceRequest} CreateOccurrenceRequest */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Version) + CreateOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CreateOccurrenceRequest) return object; - 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; + 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); } - 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. + * Creates a plain object from a CreateOccurrenceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.CreateOccurrenceRequest * @static - * @param {grafeas.v1.Version} message Version + * @param {grafeas.v1.CreateOccurrenceRequest} message CreateOccurrenceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Version.toObject = function toObject(message, options) { + CreateOccurrenceRequest.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; + object.parent = ""; + object.occurrence = null; } - 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.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 Version to JSON. + * Converts this CreateOccurrenceRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Version + * @memberof grafeas.v1.CreateOccurrenceRequest * @instance * @returns {Object.} JSON object */ - Version.prototype.toJSON = function toJSON() { + CreateOccurrenceRequest.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 CreateOccurrenceRequest; })(); - v1.AttestationNote = (function() { + v1.UpdateOccurrenceRequest = (function() { /** - * Properties of an AttestationNote. + * Properties of an UpdateOccurrenceRequest. * @memberof grafeas.v1 - * @interface IAttestationNote - * @property {grafeas.v1.AttestationNote.IHint|null} [hint] AttestationNote hint + * @interface IUpdateOccurrenceRequest + * @property {string|null} [name] UpdateOccurrenceRequest name + * @property {grafeas.v1.IOccurrence|null} [occurrence] UpdateOccurrenceRequest occurrence + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOccurrenceRequest updateMask */ /** - * Constructs a new AttestationNote. + * Constructs a new UpdateOccurrenceRequest. * @memberof grafeas.v1 - * @classdesc Represents an AttestationNote. - * @implements IAttestationNote + * @classdesc Represents an UpdateOccurrenceRequest. + * @implements IUpdateOccurrenceRequest * @constructor - * @param {grafeas.v1.IAttestationNote=} [properties] Properties to set + * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set */ - function AttestationNote(properties) { + function UpdateOccurrenceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5615,75 +4186,101 @@ } /** - * AttestationNote hint. - * @member {grafeas.v1.AttestationNote.IHint|null|undefined} hint - * @memberof grafeas.v1.AttestationNote + * UpdateOccurrenceRequest name. + * @member {string} name + * @memberof grafeas.v1.UpdateOccurrenceRequest * @instance */ - AttestationNote.prototype.hint = null; + UpdateOccurrenceRequest.prototype.name = ""; /** - * Creates a new AttestationNote instance using the specified properties. + * UpdateOccurrenceRequest occurrence. + * @member {grafeas.v1.IOccurrence|null|undefined} occurrence + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @instance + */ + UpdateOccurrenceRequest.prototype.occurrence = null; + + /** + * UpdateOccurrenceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @instance + */ + UpdateOccurrenceRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateOccurrenceRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.AttestationNote + * @memberof grafeas.v1.UpdateOccurrenceRequest * @static - * @param {grafeas.v1.IAttestationNote=} [properties] Properties to set - * @returns {grafeas.v1.AttestationNote} AttestationNote instance + * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set + * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest instance */ - AttestationNote.create = function create(properties) { - return new AttestationNote(properties); + UpdateOccurrenceRequest.create = function create(properties) { + return new UpdateOccurrenceRequest(properties); }; /** - * Encodes the specified AttestationNote message. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. + * Encodes the specified UpdateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.AttestationNote + * @memberof grafeas.v1.UpdateOccurrenceRequest * @static - * @param {grafeas.v1.IAttestationNote} message AttestationNote message or plain object to encode + * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttestationNote.encode = function encode(message, writer) { + UpdateOccurrenceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hint != null && Object.hasOwnProperty.call(message, "hint")) - $root.grafeas.v1.AttestationNote.Hint.encode(message.hint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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; }; /** - * Encodes the specified AttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. + * Encodes the specified UpdateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.AttestationNote + * @memberof grafeas.v1.UpdateOccurrenceRequest * @static - * @param {grafeas.v1.IAttestationNote} message AttestationNote message or plain object to encode + * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttestationNote.encodeDelimited = function encodeDelimited(message, writer) { + UpdateOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AttestationNote message from the specified reader or buffer. + * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.AttestationNote + * @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.AttestationNote} AttestationNote + * @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 */ - AttestationNote.decode = function decode(reader, length) { + 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.AttestationNote(); + 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.hint = $root.grafeas.v1.AttestationNote.Hint.decode(reader, reader.uint32()); + 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); @@ -5694,299 +4291,134 @@ }; /** - * Decodes an AttestationNote message from the specified reader or buffer, length delimited. + * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.AttestationNote + * @memberof grafeas.v1.UpdateOccurrenceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.AttestationNote} AttestationNote + * @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 */ - AttestationNote.decodeDelimited = function decodeDelimited(reader) { + UpdateOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AttestationNote message. + * Verifies an UpdateOccurrenceRequest message. * @function verify - * @memberof grafeas.v1.AttestationNote + * @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 */ - AttestationNote.verify = function verify(message) { + UpdateOccurrenceRequest.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.AttestationNote.Hint.verify(message.hint); + 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 "hint." + 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; }; /** - * Creates an AttestationNote message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateOccurrenceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.AttestationNote + * @memberof grafeas.v1.UpdateOccurrenceRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.AttestationNote} AttestationNote + * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest */ - AttestationNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.AttestationNote) + UpdateOccurrenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpdateOccurrenceRequest) return object; - var message = new $root.grafeas.v1.AttestationNote(); - if (object.hint != null) { - if (typeof object.hint !== "object") - throw TypeError(".grafeas.v1.AttestationNote.hint: object expected"); - message.hint = $root.grafeas.v1.AttestationNote.Hint.fromObject(object.hint); + 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; }; - /** - * Creates a plain object from an AttestationNote message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.AttestationNote - * @static - * @param {grafeas.v1.AttestationNote} message AttestationNote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AttestationNote.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.AttestationNote.Hint.toObject(message.hint, options); - return object; - }; - - /** - * Converts this AttestationNote to JSON. - * @function toJSON - * @memberof grafeas.v1.AttestationNote - * @instance - * @returns {Object.} JSON object - */ - AttestationNote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - AttestationNote.Hint = (function() { - - /** - * Properties of a Hint. - * @memberof grafeas.v1.AttestationNote - * @interface IHint - * @property {string|null} [humanReadableName] Hint humanReadableName - */ - - /** - * Constructs a new Hint. - * @memberof grafeas.v1.AttestationNote - * @classdesc Represents a Hint. - * @implements IHint - * @constructor - * @param {grafeas.v1.AttestationNote.IHint=} [properties] Properties to set - */ - function Hint(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]]; - } - - /** - * Hint humanReadableName. - * @member {string} humanReadableName - * @memberof grafeas.v1.AttestationNote.Hint - * @instance - */ - Hint.prototype.humanReadableName = ""; - - /** - * Creates a new Hint instance using the specified properties. - * @function create - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {grafeas.v1.AttestationNote.IHint=} [properties] Properties to set - * @returns {grafeas.v1.AttestationNote.Hint} Hint instance - */ - Hint.create = function create(properties) { - return new Hint(properties); - }; - - /** - * Encodes the specified Hint message. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {grafeas.v1.AttestationNote.IHint} message Hint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Hint.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 Hint message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {grafeas.v1.AttestationNote.IHint} message Hint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Hint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Hint message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.AttestationNote.Hint} Hint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Hint.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.AttestationNote.Hint(); - 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 Hint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.AttestationNote.Hint} Hint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Hint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Hint message. - * @function verify - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Hint.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 Hint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.AttestationNote.Hint} Hint - */ - Hint.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.AttestationNote.Hint) - return object; - var message = new $root.grafeas.v1.AttestationNote.Hint(); - if (object.humanReadableName != null) - message.humanReadableName = String(object.humanReadableName); - return message; - }; - - /** - * Creates a plain object from a Hint message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.AttestationNote.Hint - * @static - * @param {grafeas.v1.AttestationNote.Hint} message Hint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Hint.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; - }; - - /** - * Converts this Hint to JSON. - * @function toJSON - * @memberof grafeas.v1.AttestationNote.Hint - * @instance - * @returns {Object.} JSON object - */ - Hint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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 + */ + 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; + }; - return Hint; - })(); + /** + * Converts this UpdateOccurrenceRequest to JSON. + * @function toJSON + * @memberof grafeas.v1.UpdateOccurrenceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateOccurrenceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return AttestationNote; + return UpdateOccurrenceRequest; })(); - v1.Jwt = (function() { + v1.GetNoteRequest = (function() { /** - * Properties of a Jwt. + * Properties of a GetNoteRequest. * @memberof grafeas.v1 - * @interface IJwt - * @property {string|null} [compactJwt] Jwt compactJwt + * @interface IGetNoteRequest + * @property {string|null} [name] GetNoteRequest name */ /** - * Constructs a new Jwt. + * Constructs a new GetNoteRequest. * @memberof grafeas.v1 - * @classdesc Represents a Jwt. - * @implements IJwt + * @classdesc Represents a GetNoteRequest. + * @implements IGetNoteRequest * @constructor - * @param {grafeas.v1.IJwt=} [properties] Properties to set + * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set */ - function Jwt(properties) { + function GetNoteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5994,75 +4426,75 @@ } /** - * Jwt compactJwt. - * @member {string} compactJwt - * @memberof grafeas.v1.Jwt + * GetNoteRequest name. + * @member {string} name + * @memberof grafeas.v1.GetNoteRequest * @instance */ - Jwt.prototype.compactJwt = ""; + GetNoteRequest.prototype.name = ""; /** - * Creates a new Jwt instance using the specified properties. + * Creates a new GetNoteRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Jwt + * @memberof grafeas.v1.GetNoteRequest * @static - * @param {grafeas.v1.IJwt=} [properties] Properties to set - * @returns {grafeas.v1.Jwt} Jwt instance + * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest instance */ - Jwt.create = function create(properties) { - return new Jwt(properties); + GetNoteRequest.create = function create(properties) { + return new GetNoteRequest(properties); }; /** - * Encodes the specified Jwt message. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. + * Encodes the specified GetNoteRequest message. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Jwt + * @memberof grafeas.v1.GetNoteRequest * @static - * @param {grafeas.v1.IJwt} message Jwt message or plain object to encode + * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Jwt.encode = function encode(message, writer) { + GetNoteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.compactJwt != null && Object.hasOwnProperty.call(message, "compactJwt")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.compactJwt); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Jwt message, length delimited. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. + * Encodes the specified GetNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Jwt + * @memberof grafeas.v1.GetNoteRequest * @static - * @param {grafeas.v1.IJwt} message Jwt message or plain object to encode + * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Jwt.encodeDelimited = function encodeDelimited(message, writer) { + GetNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Jwt message from the specified reader or buffer. + * Decodes a GetNoteRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Jwt + * @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.Jwt} Jwt + * @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 */ - Jwt.decode = function decode(reader, length) { + 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.Jwt(); + 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.compactJwt = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -6073,111 +4505,107 @@ }; /** - * Decodes a Jwt message from the specified reader or buffer, length delimited. + * Decodes a GetNoteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Jwt + * @memberof grafeas.v1.GetNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Jwt} Jwt + * @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 */ - Jwt.decodeDelimited = function decodeDelimited(reader) { + GetNoteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Jwt message. + * Verifies a GetNoteRequest message. * @function verify - * @memberof grafeas.v1.Jwt + * @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 */ - Jwt.verify = function verify(message) { + GetNoteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.compactJwt != null && message.hasOwnProperty("compactJwt")) - if (!$util.isString(message.compactJwt)) - return "compactJwt: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Jwt message from a plain object. Also converts values to their respective internal types. + * Creates a GetNoteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Jwt + * @memberof grafeas.v1.GetNoteRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Jwt} Jwt + * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest */ - Jwt.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Jwt) + GetNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GetNoteRequest) return object; - var message = new $root.grafeas.v1.Jwt(); - if (object.compactJwt != null) - message.compactJwt = String(object.compactJwt); + var message = new $root.grafeas.v1.GetNoteRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Jwt message. Also converts values to other types if specified. + * Creates a plain object from a GetNoteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Jwt + * @memberof grafeas.v1.GetNoteRequest * @static - * @param {grafeas.v1.Jwt} message Jwt + * @param {grafeas.v1.GetNoteRequest} message GetNoteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Jwt.toObject = function toObject(message, options) { + GetNoteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.compactJwt = ""; - if (message.compactJwt != null && message.hasOwnProperty("compactJwt")) - object.compactJwt = message.compactJwt; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Jwt to JSON. + * Converts this GetNoteRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Jwt + * @memberof grafeas.v1.GetNoteRequest * @instance * @returns {Object.} JSON object */ - Jwt.prototype.toJSON = function toJSON() { + GetNoteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Jwt; + return GetNoteRequest; })(); - v1.AttestationOccurrence = (function() { + v1.GetOccurrenceNoteRequest = (function() { /** - * Properties of an AttestationOccurrence. + * Properties of a GetOccurrenceNoteRequest. * @memberof grafeas.v1 - * @interface IAttestationOccurrence - * @property {Uint8Array|null} [serializedPayload] AttestationOccurrence serializedPayload - * @property {Array.|null} [signatures] AttestationOccurrence signatures - * @property {Array.|null} [jwts] AttestationOccurrence jwts + * @interface IGetOccurrenceNoteRequest + * @property {string|null} [name] GetOccurrenceNoteRequest name */ /** - * Constructs a new AttestationOccurrence. + * Constructs a new GetOccurrenceNoteRequest. * @memberof grafeas.v1 - * @classdesc Represents an AttestationOccurrence. - * @implements IAttestationOccurrence + * @classdesc Represents a GetOccurrenceNoteRequest. + * @implements IGetOccurrenceNoteRequest * @constructor - * @param {grafeas.v1.IAttestationOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set */ - function AttestationOccurrence(properties) { - this.signatures = []; - this.jwts = []; + function GetOccurrenceNoteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6185,107 +4613,75 @@ } /** - * AttestationOccurrence serializedPayload. - * @member {Uint8Array} serializedPayload - * @memberof grafeas.v1.AttestationOccurrence - * @instance - */ - AttestationOccurrence.prototype.serializedPayload = $util.newBuffer([]); - - /** - * AttestationOccurrence signatures. - * @member {Array.} signatures - * @memberof grafeas.v1.AttestationOccurrence - * @instance - */ - AttestationOccurrence.prototype.signatures = $util.emptyArray; - - /** - * AttestationOccurrence jwts. - * @member {Array.} jwts - * @memberof grafeas.v1.AttestationOccurrence + * GetOccurrenceNoteRequest name. + * @member {string} name + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @instance */ - AttestationOccurrence.prototype.jwts = $util.emptyArray; + GetOccurrenceNoteRequest.prototype.name = ""; /** - * Creates a new AttestationOccurrence instance using the specified properties. + * Creates a new GetOccurrenceNoteRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.AttestationOccurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @static - * @param {grafeas.v1.IAttestationOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.AttestationOccurrence} AttestationOccurrence instance + * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest instance */ - AttestationOccurrence.create = function create(properties) { - return new AttestationOccurrence(properties); + GetOccurrenceNoteRequest.create = function create(properties) { + return new GetOccurrenceNoteRequest(properties); }; /** - * Encodes the specified AttestationOccurrence message. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. + * Encodes the specified GetOccurrenceNoteRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.AttestationOccurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @static - * @param {grafeas.v1.IAttestationOccurrence} message AttestationOccurrence message or plain object to encode + * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttestationOccurrence.encode = function encode(message, writer) { + GetOccurrenceNoteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.serializedPayload != null && Object.hasOwnProperty.call(message, "serializedPayload")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.serializedPayload); - if (message.signatures != null && message.signatures.length) - for (var i = 0; i < message.signatures.length; ++i) - $root.grafeas.v1.Signature.encode(message.signatures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.jwts != null && message.jwts.length) - for (var i = 0; i < message.jwts.length; ++i) - $root.grafeas.v1.Jwt.encode(message.jwts[i], writer.uint32(/* id 3, wireType 2 =*/26).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 AttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. + * Encodes the specified GetOccurrenceNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.AttestationOccurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @static - * @param {grafeas.v1.IAttestationOccurrence} message AttestationOccurrence message or plain object to encode + * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttestationOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + GetOccurrenceNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AttestationOccurrence message from the specified reader or buffer. + * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.AttestationOccurrence + * @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.AttestationOccurrence} AttestationOccurrence + * @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 */ - AttestationOccurrence.decode = function decode(reader, length) { + 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.AttestationOccurrence(); + 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.serializedPayload = reader.bytes(); - break; - case 2: - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push($root.grafeas.v1.Signature.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.jwts && message.jwts.length)) - message.jwts = []; - message.jwts.push($root.grafeas.v1.Jwt.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -6296,168 +4692,110 @@ }; /** - * Decodes an AttestationOccurrence message from the specified reader or buffer, length delimited. + * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.AttestationOccurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.AttestationOccurrence} AttestationOccurrence + * @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 */ - AttestationOccurrence.decodeDelimited = function decodeDelimited(reader) { + GetOccurrenceNoteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AttestationOccurrence message. + * Verifies a GetOccurrenceNoteRequest message. * @function verify - * @memberof grafeas.v1.AttestationOccurrence + * @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 */ - AttestationOccurrence.verify = function verify(message) { + GetOccurrenceNoteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.serializedPayload != null && message.hasOwnProperty("serializedPayload")) - if (!(message.serializedPayload && typeof message.serializedPayload.length === "number" || $util.isString(message.serializedPayload))) - return "serializedPayload: buffer expected"; - if (message.signatures != null && message.hasOwnProperty("signatures")) { - if (!Array.isArray(message.signatures)) - return "signatures: array expected"; - for (var i = 0; i < message.signatures.length; ++i) { - var error = $root.grafeas.v1.Signature.verify(message.signatures[i]); - if (error) - return "signatures." + error; - } - } - if (message.jwts != null && message.hasOwnProperty("jwts")) { - if (!Array.isArray(message.jwts)) - return "jwts: array expected"; - for (var i = 0; i < message.jwts.length; ++i) { - var error = $root.grafeas.v1.Jwt.verify(message.jwts[i]); - if (error) - return "jwts." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an AttestationOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a GetOccurrenceNoteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.AttestationOccurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.AttestationOccurrence} AttestationOccurrence + * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest */ - AttestationOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.AttestationOccurrence) + GetOccurrenceNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GetOccurrenceNoteRequest) return object; - var message = new $root.grafeas.v1.AttestationOccurrence(); - if (object.serializedPayload != null) - if (typeof object.serializedPayload === "string") - $util.base64.decode(object.serializedPayload, message.serializedPayload = $util.newBuffer($util.base64.length(object.serializedPayload)), 0); - else if (object.serializedPayload.length) - message.serializedPayload = object.serializedPayload; - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".grafeas.v1.AttestationOccurrence.signatures: array expected"); - message.signatures = []; - for (var i = 0; i < object.signatures.length; ++i) { - if (typeof object.signatures[i] !== "object") - throw TypeError(".grafeas.v1.AttestationOccurrence.signatures: object expected"); - message.signatures[i] = $root.grafeas.v1.Signature.fromObject(object.signatures[i]); - } - } - if (object.jwts) { - if (!Array.isArray(object.jwts)) - throw TypeError(".grafeas.v1.AttestationOccurrence.jwts: array expected"); - message.jwts = []; - for (var i = 0; i < object.jwts.length; ++i) { - if (typeof object.jwts[i] !== "object") - throw TypeError(".grafeas.v1.AttestationOccurrence.jwts: object expected"); - message.jwts[i] = $root.grafeas.v1.Jwt.fromObject(object.jwts[i]); - } - } + var message = new $root.grafeas.v1.GetOccurrenceNoteRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an AttestationOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a GetOccurrenceNoteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.AttestationOccurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @static - * @param {grafeas.v1.AttestationOccurrence} message AttestationOccurrence + * @param {grafeas.v1.GetOccurrenceNoteRequest} message GetOccurrenceNoteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AttestationOccurrence.toObject = function toObject(message, options) { + GetOccurrenceNoteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.signatures = []; - object.jwts = []; - } if (options.defaults) - if (options.bytes === String) - object.serializedPayload = ""; - else { - object.serializedPayload = []; - if (options.bytes !== Array) - object.serializedPayload = $util.newBuffer(object.serializedPayload); - } - if (message.serializedPayload != null && message.hasOwnProperty("serializedPayload")) - object.serializedPayload = options.bytes === String ? $util.base64.encode(message.serializedPayload, 0, message.serializedPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.serializedPayload) : message.serializedPayload; - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (var j = 0; j < message.signatures.length; ++j) - object.signatures[j] = $root.grafeas.v1.Signature.toObject(message.signatures[j], options); - } - if (message.jwts && message.jwts.length) { - object.jwts = []; - for (var j = 0; j < message.jwts.length; ++j) - object.jwts[j] = $root.grafeas.v1.Jwt.toObject(message.jwts[j], options); - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this AttestationOccurrence to JSON. + * Converts this GetOccurrenceNoteRequest to JSON. * @function toJSON - * @memberof grafeas.v1.AttestationOccurrence + * @memberof grafeas.v1.GetOccurrenceNoteRequest * @instance * @returns {Object.} JSON object */ - AttestationOccurrence.prototype.toJSON = function toJSON() { + GetOccurrenceNoteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AttestationOccurrence; + return GetOccurrenceNoteRequest; })(); - v1.BuildNote = (function() { + v1.ListNotesRequest = (function() { /** - * Properties of a BuildNote. + * Properties of a ListNotesRequest. * @memberof grafeas.v1 - * @interface IBuildNote - * @property {string|null} [builderVersion] BuildNote builderVersion + * @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 */ /** - * Constructs a new BuildNote. + * Constructs a new ListNotesRequest. * @memberof grafeas.v1 - * @classdesc Represents a BuildNote. - * @implements IBuildNote + * @classdesc Represents a ListNotesRequest. + * @implements IListNotesRequest * @constructor - * @param {grafeas.v1.IBuildNote=} [properties] Properties to set + * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set */ - function BuildNote(properties) { + function ListNotesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6465,75 +4803,114 @@ } /** - * BuildNote builderVersion. - * @member {string} builderVersion - * @memberof grafeas.v1.BuildNote + * ListNotesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.ListNotesRequest * @instance */ - BuildNote.prototype.builderVersion = ""; + ListNotesRequest.prototype.parent = ""; /** - * Creates a new BuildNote instance using the specified properties. + * ListNotesRequest filter. + * @member {string} filter + * @memberof grafeas.v1.ListNotesRequest + * @instance + */ + ListNotesRequest.prototype.filter = ""; + + /** + * ListNotesRequest pageSize. + * @member {number} pageSize + * @memberof grafeas.v1.ListNotesRequest + * @instance + */ + ListNotesRequest.prototype.pageSize = 0; + + /** + * ListNotesRequest pageToken. + * @member {string} pageToken + * @memberof grafeas.v1.ListNotesRequest + * @instance + */ + ListNotesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListNotesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.BuildNote + * @memberof grafeas.v1.ListNotesRequest * @static - * @param {grafeas.v1.IBuildNote=} [properties] Properties to set - * @returns {grafeas.v1.BuildNote} BuildNote instance + * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set + * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest instance */ - BuildNote.create = function create(properties) { - return new BuildNote(properties); + ListNotesRequest.create = function create(properties) { + return new ListNotesRequest(properties); }; /** - * Encodes the specified BuildNote message. Does not implicitly {@link grafeas.v1.BuildNote.verify|verify} messages. + * Encodes the specified ListNotesRequest message. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BuildNote + * @memberof grafeas.v1.ListNotesRequest * @static - * @param {grafeas.v1.IBuildNote} message BuildNote 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 */ - BuildNote.encode = function encode(message, writer) { + ListNotesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.builderVersion != null && Object.hasOwnProperty.call(message, "builderVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.builderVersion); + 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 BuildNote message, length delimited. Does not implicitly {@link grafeas.v1.BuildNote.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.BuildNote + * @memberof grafeas.v1.ListNotesRequest * @static - * @param {grafeas.v1.IBuildNote} message BuildNote 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 */ - BuildNote.encodeDelimited = function encodeDelimited(message, writer) { + ListNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildNote message from the specified reader or buffer. + * Decodes a ListNotesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BuildNote + * @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.BuildNote} BuildNote + * @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 */ - BuildNote.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.BuildNote(); + 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.builderVersion = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -6544,110 +4921,134 @@ }; /** - * Decodes a BuildNote 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.BuildNote + * @memberof grafeas.v1.ListNotesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BuildNote} BuildNote + * @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 */ - BuildNote.decodeDelimited = function decodeDelimited(reader) { + ListNotesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildNote message. + * Verifies a ListNotesRequest message. * @function verify - * @memberof grafeas.v1.BuildNote + * @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 */ - BuildNote.verify = function verify(message) { + ListNotesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) - if (!$util.isString(message.builderVersion)) - return "builderVersion: string 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 BuildNote 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.BuildNote + * @memberof grafeas.v1.ListNotesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BuildNote} BuildNote + * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest */ - BuildNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BuildNote) + ListNotesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNotesRequest) return object; - var message = new $root.grafeas.v1.BuildNote(); - if (object.builderVersion != null) - message.builderVersion = String(object.builderVersion); + 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 a BuildNote 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.BuildNote + * @memberof grafeas.v1.ListNotesRequest * @static - * @param {grafeas.v1.BuildNote} message BuildNote + * @param {grafeas.v1.ListNotesRequest} message ListNotesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildNote.toObject = function toObject(message, options) { + ListNotesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.builderVersion = ""; - if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) - object.builderVersion = message.builderVersion; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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 BuildNote to JSON. + * Converts this ListNotesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.BuildNote + * @memberof grafeas.v1.ListNotesRequest * @instance * @returns {Object.} JSON object */ - BuildNote.prototype.toJSON = function toJSON() { + ListNotesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BuildNote; + return ListNotesRequest; })(); - v1.BuildOccurrence = (function() { + v1.ListNotesResponse = (function() { /** - * Properties of a BuildOccurrence. + * Properties of a ListNotesResponse. * @memberof grafeas.v1 - * @interface IBuildOccurrence - * @property {grafeas.v1.IBuildProvenance|null} [provenance] BuildOccurrence provenance - * @property {string|null} [provenanceBytes] BuildOccurrence provenanceBytes - * @property {grafeas.v1.IInTotoProvenance|null} [intotoProvenance] BuildOccurrence intotoProvenance - * @property {grafeas.v1.IInTotoStatement|null} [intotoStatement] BuildOccurrence intotoStatement + * @interface IListNotesResponse + * @property {Array.|null} [notes] ListNotesResponse notes + * @property {string|null} [nextPageToken] ListNotesResponse nextPageToken */ /** - * Constructs a new BuildOccurrence. + * Constructs a new ListNotesResponse. * @memberof grafeas.v1 - * @classdesc Represents a BuildOccurrence. - * @implements IBuildOccurrence + * @classdesc Represents a ListNotesResponse. + * @implements IListNotesResponse * @constructor - * @param {grafeas.v1.IBuildOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set */ - function BuildOccurrence(properties) { + function ListNotesResponse(properties) { + this.notes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6655,114 +5056,91 @@ } /** - * BuildOccurrence provenance. - * @member {grafeas.v1.IBuildProvenance|null|undefined} provenance - * @memberof grafeas.v1.BuildOccurrence - * @instance - */ - BuildOccurrence.prototype.provenance = null; - - /** - * BuildOccurrence provenanceBytes. - * @member {string} provenanceBytes - * @memberof grafeas.v1.BuildOccurrence - * @instance - */ - BuildOccurrence.prototype.provenanceBytes = ""; - - /** - * BuildOccurrence intotoProvenance. - * @member {grafeas.v1.IInTotoProvenance|null|undefined} intotoProvenance - * @memberof grafeas.v1.BuildOccurrence + * ListNotesResponse notes. + * @member {Array.} notes + * @memberof grafeas.v1.ListNotesResponse * @instance */ - BuildOccurrence.prototype.intotoProvenance = null; + ListNotesResponse.prototype.notes = $util.emptyArray; /** - * BuildOccurrence intotoStatement. - * @member {grafeas.v1.IInTotoStatement|null|undefined} intotoStatement - * @memberof grafeas.v1.BuildOccurrence + * ListNotesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof grafeas.v1.ListNotesResponse * @instance */ - BuildOccurrence.prototype.intotoStatement = null; + ListNotesResponse.prototype.nextPageToken = ""; /** - * Creates a new BuildOccurrence instance using the specified properties. + * Creates a new ListNotesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.BuildOccurrence + * @memberof grafeas.v1.ListNotesResponse * @static - * @param {grafeas.v1.IBuildOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.BuildOccurrence} BuildOccurrence instance + * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set + * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse instance */ - BuildOccurrence.create = function create(properties) { - return new BuildOccurrence(properties); + ListNotesResponse.create = function create(properties) { + return new ListNotesResponse(properties); }; /** - * Encodes the specified BuildOccurrence message. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. + * Encodes the specified ListNotesResponse message. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BuildOccurrence + * @memberof grafeas.v1.ListNotesResponse * @static - * @param {grafeas.v1.IBuildOccurrence} message BuildOccurrence message or plain object to encode + * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildOccurrence.encode = function encode(message, writer) { + ListNotesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance")) - $root.grafeas.v1.BuildProvenance.encode(message.provenance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.provenanceBytes != null && Object.hasOwnProperty.call(message, "provenanceBytes")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.provenanceBytes); - if (message.intotoProvenance != null && Object.hasOwnProperty.call(message, "intotoProvenance")) - $root.grafeas.v1.InTotoProvenance.encode(message.intotoProvenance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.intotoStatement != null && Object.hasOwnProperty.call(message, "intotoStatement")) - $root.grafeas.v1.InTotoStatement.encode(message.intotoStatement, writer.uint32(/* id 4, wireType 2 =*/34).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(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified BuildOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. + * Encodes the specified ListNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.BuildOccurrence + * @memberof grafeas.v1.ListNotesResponse * @static - * @param {grafeas.v1.IBuildOccurrence} message BuildOccurrence message or plain object to encode + * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + ListNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildOccurrence message from the specified reader or buffer. + * Decodes a ListNotesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BuildOccurrence + * @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.BuildOccurrence} BuildOccurrence + * @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 */ - BuildOccurrence.decode = function decode(reader, length) { + 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.BuildOccurrence(); + 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: - message.provenance = $root.grafeas.v1.BuildProvenance.decode(reader, reader.uint32()); + if (!(message.notes && message.notes.length)) + message.notes = []; + message.notes.push($root.grafeas.v1.Note.decode(reader, reader.uint32())); break; case 2: - message.provenanceBytes = reader.string(); - break; - case 3: - message.intotoProvenance = $root.grafeas.v1.InTotoProvenance.decode(reader, reader.uint32()); - break; - case 4: - message.intotoStatement = $root.grafeas.v1.InTotoStatement.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -6773,153 +5151,133 @@ }; /** - * Decodes a BuildOccurrence message from the specified reader or buffer, length delimited. + * Decodes a ListNotesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.BuildOccurrence + * @memberof grafeas.v1.ListNotesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BuildOccurrence} BuildOccurrence + * @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 */ - BuildOccurrence.decodeDelimited = function decodeDelimited(reader) { + ListNotesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildOccurrence message. + * Verifies a ListNotesResponse message. * @function verify - * @memberof grafeas.v1.BuildOccurrence + * @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 */ - BuildOccurrence.verify = function verify(message) { + ListNotesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.provenance != null && message.hasOwnProperty("provenance")) { - var error = $root.grafeas.v1.BuildProvenance.verify(message.provenance); - if (error) - return "provenance." + error; - } - if (message.provenanceBytes != null && message.hasOwnProperty("provenanceBytes")) - if (!$util.isString(message.provenanceBytes)) - return "provenanceBytes: string expected"; - if (message.intotoProvenance != null && message.hasOwnProperty("intotoProvenance")) { - var error = $root.grafeas.v1.InTotoProvenance.verify(message.intotoProvenance); - if (error) - return "intotoProvenance." + error; - } - if (message.intotoStatement != null && message.hasOwnProperty("intotoStatement")) { - var error = $root.grafeas.v1.InTotoStatement.verify(message.intotoStatement); - if (error) - return "intotoStatement." + 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; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a BuildOccurrence 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. * @function fromObject - * @memberof grafeas.v1.BuildOccurrence + * @memberof grafeas.v1.ListNotesResponse * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BuildOccurrence} BuildOccurrence + * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse */ - BuildOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BuildOccurrence) + ListNotesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNotesResponse) return object; - var message = new $root.grafeas.v1.BuildOccurrence(); - if (object.provenance != null) { - if (typeof object.provenance !== "object") - throw TypeError(".grafeas.v1.BuildOccurrence.provenance: object expected"); - message.provenance = $root.grafeas.v1.BuildProvenance.fromObject(object.provenance); - } - if (object.provenanceBytes != null) - message.provenanceBytes = String(object.provenanceBytes); - if (object.intotoProvenance != null) { - if (typeof object.intotoProvenance !== "object") - throw TypeError(".grafeas.v1.BuildOccurrence.intotoProvenance: object expected"); - message.intotoProvenance = $root.grafeas.v1.InTotoProvenance.fromObject(object.intotoProvenance); - } - if (object.intotoStatement != null) { - if (typeof object.intotoStatement !== "object") - throw TypeError(".grafeas.v1.BuildOccurrence.intotoStatement: object expected"); - message.intotoStatement = $root.grafeas.v1.InTotoStatement.fromObject(object.intotoStatement); + 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; }; /** - * Creates a plain object from a BuildOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a ListNotesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.BuildOccurrence + * @memberof grafeas.v1.ListNotesResponse * @static - * @param {grafeas.v1.BuildOccurrence} message BuildOccurrence + * @param {grafeas.v1.ListNotesResponse} message ListNotesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildOccurrence.toObject = function toObject(message, options) { + ListNotesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.provenance = null; - object.provenanceBytes = ""; - object.intotoProvenance = null; - object.intotoStatement = null; + 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.provenance != null && message.hasOwnProperty("provenance")) - object.provenance = $root.grafeas.v1.BuildProvenance.toObject(message.provenance, options); - if (message.provenanceBytes != null && message.hasOwnProperty("provenanceBytes")) - object.provenanceBytes = message.provenanceBytes; - if (message.intotoProvenance != null && message.hasOwnProperty("intotoProvenance")) - object.intotoProvenance = $root.grafeas.v1.InTotoProvenance.toObject(message.intotoProvenance, options); - if (message.intotoStatement != null && message.hasOwnProperty("intotoStatement")) - object.intotoStatement = $root.grafeas.v1.InTotoStatement.toObject(message.intotoStatement, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this BuildOccurrence to JSON. + * Converts this ListNotesResponse to JSON. * @function toJSON - * @memberof grafeas.v1.BuildOccurrence + * @memberof grafeas.v1.ListNotesResponse * @instance * @returns {Object.} JSON object */ - BuildOccurrence.prototype.toJSON = function toJSON() { + ListNotesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BuildOccurrence; + return ListNotesResponse; })(); - v1.Recipe = (function() { + v1.DeleteNoteRequest = (function() { /** - * Properties of a Recipe. + * Properties of a DeleteNoteRequest. * @memberof grafeas.v1 - * @interface IRecipe - * @property {string|null} [type] Recipe type - * @property {number|Long|null} [definedInMaterial] Recipe definedInMaterial - * @property {string|null} [entryPoint] Recipe entryPoint - * @property {Array.|null} ["arguments"] Recipe arguments - * @property {Array.|null} [environment] Recipe environment + * @interface IDeleteNoteRequest + * @property {string|null} [name] DeleteNoteRequest name */ /** - * Constructs a new Recipe. + * Constructs a new DeleteNoteRequest. * @memberof grafeas.v1 - * @classdesc Represents a Recipe. - * @implements IRecipe + * @classdesc Represents a DeleteNoteRequest. + * @implements IDeleteNoteRequest * @constructor - * @param {grafeas.v1.IRecipe=} [properties] Properties to set + * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set */ - function Recipe(properties) { - this["arguments"] = []; - this.environment = []; + function DeleteNoteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6927,133 +5285,75 @@ } /** - * Recipe type. - * @member {string} type - * @memberof grafeas.v1.Recipe - * @instance - */ - Recipe.prototype.type = ""; - - /** - * Recipe definedInMaterial. - * @member {number|Long} definedInMaterial - * @memberof grafeas.v1.Recipe - * @instance - */ - Recipe.prototype.definedInMaterial = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Recipe entryPoint. - * @member {string} entryPoint - * @memberof grafeas.v1.Recipe - * @instance - */ - Recipe.prototype.entryPoint = ""; - - /** - * Recipe arguments. - * @member {Array.} arguments - * @memberof grafeas.v1.Recipe - * @instance - */ - Recipe.prototype["arguments"] = $util.emptyArray; - - /** - * Recipe environment. - * @member {Array.} environment - * @memberof grafeas.v1.Recipe + * DeleteNoteRequest name. + * @member {string} name + * @memberof grafeas.v1.DeleteNoteRequest * @instance */ - Recipe.prototype.environment = $util.emptyArray; + DeleteNoteRequest.prototype.name = ""; /** - * Creates a new Recipe instance using the specified properties. + * Creates a new DeleteNoteRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Recipe + * @memberof grafeas.v1.DeleteNoteRequest * @static - * @param {grafeas.v1.IRecipe=} [properties] Properties to set - * @returns {grafeas.v1.Recipe} Recipe instance + * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest instance */ - Recipe.create = function create(properties) { - return new Recipe(properties); + DeleteNoteRequest.create = function create(properties) { + return new DeleteNoteRequest(properties); }; /** - * Encodes the specified Recipe message. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. + * Encodes the specified DeleteNoteRequest message. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Recipe + * @memberof grafeas.v1.DeleteNoteRequest * @static - * @param {grafeas.v1.IRecipe} message Recipe 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 */ - Recipe.encode = function encode(message, writer) { + DeleteNoteRequest.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.definedInMaterial != null && Object.hasOwnProperty.call(message, "definedInMaterial")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.definedInMaterial); - if (message.entryPoint != null && Object.hasOwnProperty.call(message, "entryPoint")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryPoint); - if (message["arguments"] != null && message["arguments"].length) - for (var i = 0; i < message["arguments"].length; ++i) - $root.google.protobuf.Any.encode(message["arguments"][i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.environment != null && message.environment.length) - for (var i = 0; i < message.environment.length; ++i) - $root.google.protobuf.Any.encode(message.environment[i], writer.uint32(/* id 5, wireType 2 =*/42).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 Recipe message, length delimited. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. + * Encodes the specified DeleteNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Recipe + * @memberof grafeas.v1.DeleteNoteRequest * @static - * @param {grafeas.v1.IRecipe} message Recipe 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 */ - Recipe.encodeDelimited = function encodeDelimited(message, writer) { + DeleteNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Recipe message from the specified reader or buffer. + * Decodes a DeleteNoteRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Recipe + * @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.Recipe} Recipe + * @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 */ - Recipe.decode = function decode(reader, length) { + 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.Recipe(); + 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.type = reader.string(); - break; - case 2: - message.definedInMaterial = reader.int64(); - break; - case 3: - message.entryPoint = reader.string(); - break; - case 4: - if (!(message["arguments"] && message["arguments"].length)) - message["arguments"] = []; - message["arguments"].push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.environment && message.environment.length)) - message.environment = []; - message.environment.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -7064,192 +5364,109 @@ }; /** - * Decodes a Recipe 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.Recipe + * @memberof grafeas.v1.DeleteNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Recipe} Recipe - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Recipe.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Recipe message. - * @function verify - * @memberof grafeas.v1.Recipe - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Recipe.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.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) - if (!$util.isInteger(message.definedInMaterial) && !(message.definedInMaterial && $util.isInteger(message.definedInMaterial.low) && $util.isInteger(message.definedInMaterial.high))) - return "definedInMaterial: integer|Long expected"; - if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) - if (!$util.isString(message.entryPoint)) - return "entryPoint: string expected"; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) { - if (!Array.isArray(message["arguments"])) - return "arguments: array expected"; - for (var i = 0; i < message["arguments"].length; ++i) { - var error = $root.google.protobuf.Any.verify(message["arguments"][i]); - if (error) - return "arguments." + error; - } - } - if (message.environment != null && message.hasOwnProperty("environment")) { - if (!Array.isArray(message.environment)) - return "environment: array expected"; - for (var i = 0; i < message.environment.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.environment[i]); - if (error) - return "environment." + error; - } - } + * @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.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteNoteRequest message. + * @function verify + * @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 + */ + DeleteNoteRequest.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 Recipe 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. * @function fromObject - * @memberof grafeas.v1.Recipe + * @memberof grafeas.v1.DeleteNoteRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Recipe} Recipe + * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest */ - Recipe.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Recipe) + DeleteNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeleteNoteRequest) return object; - var message = new $root.grafeas.v1.Recipe(); - if (object.type != null) - message.type = String(object.type); - if (object.definedInMaterial != null) - if ($util.Long) - (message.definedInMaterial = $util.Long.fromValue(object.definedInMaterial)).unsigned = false; - else if (typeof object.definedInMaterial === "string") - message.definedInMaterial = parseInt(object.definedInMaterial, 10); - else if (typeof object.definedInMaterial === "number") - message.definedInMaterial = object.definedInMaterial; - else if (typeof object.definedInMaterial === "object") - message.definedInMaterial = new $util.LongBits(object.definedInMaterial.low >>> 0, object.definedInMaterial.high >>> 0).toNumber(); - if (object.entryPoint != null) - message.entryPoint = String(object.entryPoint); - if (object["arguments"]) { - if (!Array.isArray(object["arguments"])) - throw TypeError(".grafeas.v1.Recipe.arguments: array expected"); - message["arguments"] = []; - for (var i = 0; i < object["arguments"].length; ++i) { - if (typeof object["arguments"][i] !== "object") - throw TypeError(".grafeas.v1.Recipe.arguments: object expected"); - message["arguments"][i] = $root.google.protobuf.Any.fromObject(object["arguments"][i]); - } - } - if (object.environment) { - if (!Array.isArray(object.environment)) - throw TypeError(".grafeas.v1.Recipe.environment: array expected"); - message.environment = []; - for (var i = 0; i < object.environment.length; ++i) { - if (typeof object.environment[i] !== "object") - throw TypeError(".grafeas.v1.Recipe.environment: object expected"); - message.environment[i] = $root.google.protobuf.Any.fromObject(object.environment[i]); - } - } + var message = new $root.grafeas.v1.DeleteNoteRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Recipe message. Also converts values to other types if specified. + * Creates a plain object from a DeleteNoteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Recipe + * @memberof grafeas.v1.DeleteNoteRequest * @static - * @param {grafeas.v1.Recipe} message Recipe + * @param {grafeas.v1.DeleteNoteRequest} message DeleteNoteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Recipe.toObject = function toObject(message, options) { + DeleteNoteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object["arguments"] = []; - object.environment = []; - } - if (options.defaults) { - object.type = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.definedInMaterial = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.definedInMaterial = options.longs === String ? "0" : 0; - object.entryPoint = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) - if (typeof message.definedInMaterial === "number") - object.definedInMaterial = options.longs === String ? String(message.definedInMaterial) : message.definedInMaterial; - else - object.definedInMaterial = options.longs === String ? $util.Long.prototype.toString.call(message.definedInMaterial) : options.longs === Number ? new $util.LongBits(message.definedInMaterial.low >>> 0, message.definedInMaterial.high >>> 0).toNumber() : message.definedInMaterial; - if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) - object.entryPoint = message.entryPoint; - if (message["arguments"] && message["arguments"].length) { - object["arguments"] = []; - for (var j = 0; j < message["arguments"].length; ++j) - object["arguments"][j] = $root.google.protobuf.Any.toObject(message["arguments"][j], options); - } - if (message.environment && message.environment.length) { - object.environment = []; - for (var j = 0; j < message.environment.length; ++j) - object.environment[j] = $root.google.protobuf.Any.toObject(message.environment[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Recipe to JSON. + * Converts this DeleteNoteRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Recipe + * @memberof grafeas.v1.DeleteNoteRequest * @instance * @returns {Object.} JSON object */ - Recipe.prototype.toJSON = function toJSON() { + DeleteNoteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Recipe; + return DeleteNoteRequest; })(); - v1.Completeness = (function() { + v1.CreateNoteRequest = (function() { /** - * Properties of a Completeness. + * Properties of a CreateNoteRequest. * @memberof grafeas.v1 - * @interface ICompleteness - * @property {boolean|null} ["arguments"] Completeness arguments - * @property {boolean|null} [environment] Completeness environment - * @property {boolean|null} [materials] Completeness materials + * @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 Completeness. + * Constructs a new CreateNoteRequest. * @memberof grafeas.v1 - * @classdesc Represents a Completeness. - * @implements ICompleteness + * @classdesc Represents a CreateNoteRequest. + * @implements ICreateNoteRequest * @constructor - * @param {grafeas.v1.ICompleteness=} [properties] Properties to set + * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set */ - function Completeness(properties) { + function CreateNoteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7257,101 +5474,101 @@ } /** - * Completeness arguments. - * @member {boolean} arguments - * @memberof grafeas.v1.Completeness + * CreateNoteRequest parent. + * @member {string} parent + * @memberof grafeas.v1.CreateNoteRequest * @instance */ - Completeness.prototype["arguments"] = false; + CreateNoteRequest.prototype.parent = ""; /** - * Completeness environment. - * @member {boolean} environment - * @memberof grafeas.v1.Completeness + * CreateNoteRequest noteId. + * @member {string} noteId + * @memberof grafeas.v1.CreateNoteRequest * @instance */ - Completeness.prototype.environment = false; + CreateNoteRequest.prototype.noteId = ""; /** - * Completeness materials. - * @member {boolean} materials - * @memberof grafeas.v1.Completeness + * CreateNoteRequest note. + * @member {grafeas.v1.INote|null|undefined} note + * @memberof grafeas.v1.CreateNoteRequest * @instance */ - Completeness.prototype.materials = false; + CreateNoteRequest.prototype.note = null; /** - * Creates a new Completeness instance using the specified properties. + * Creates a new CreateNoteRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Completeness + * @memberof grafeas.v1.CreateNoteRequest * @static - * @param {grafeas.v1.ICompleteness=} [properties] Properties to set - * @returns {grafeas.v1.Completeness} Completeness instance + * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest instance */ - Completeness.create = function create(properties) { - return new Completeness(properties); + CreateNoteRequest.create = function create(properties) { + return new CreateNoteRequest(properties); }; /** - * Encodes the specified Completeness message. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. + * Encodes the specified CreateNoteRequest message. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Completeness + * @memberof grafeas.v1.CreateNoteRequest * @static - * @param {grafeas.v1.ICompleteness} message Completeness message or plain object to encode + * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Completeness.encode = function encode(message, writer) { + CreateNoteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message["arguments"]); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.environment); - if (message.materials != null && Object.hasOwnProperty.call(message, "materials")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.materials); + 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 Completeness message, length delimited. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. + * Encodes the specified CreateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Completeness + * @memberof grafeas.v1.CreateNoteRequest * @static - * @param {grafeas.v1.ICompleteness} message Completeness message or plain object to encode + * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Completeness.encodeDelimited = function encodeDelimited(message, writer) { + CreateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Completeness message from the specified reader or buffer. + * Decodes a CreateNoteRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Completeness + * @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.Completeness} Completeness + * @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 */ - Completeness.decode = function decode(reader, length) { + 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.Completeness(); + 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["arguments"] = reader.bool(); + message.parent = reader.string(); break; case 2: - message.environment = reader.bool(); + message.noteId = reader.string(); break; case 3: - message.materials = reader.bool(); + message.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7362,128 +5579,131 @@ }; /** - * Decodes a Completeness message from the specified reader or buffer, length delimited. + * Decodes a CreateNoteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Completeness + * @memberof grafeas.v1.CreateNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Completeness} Completeness + * @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 */ - Completeness.decodeDelimited = function decodeDelimited(reader) { + CreateNoteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Completeness message. + * Verifies a CreateNoteRequest message. * @function verify - * @memberof grafeas.v1.Completeness + * @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 */ - Completeness.verify = function verify(message) { + CreateNoteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - if (typeof message["arguments"] !== "boolean") - return "arguments: boolean expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (typeof message.environment !== "boolean") - return "environment: boolean expected"; - if (message.materials != null && message.hasOwnProperty("materials")) - if (typeof message.materials !== "boolean") - return "materials: boolean 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; + } return null; }; /** - * Creates a Completeness 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. * @function fromObject - * @memberof grafeas.v1.Completeness + * @memberof grafeas.v1.CreateNoteRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Completeness} Completeness + * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest */ - Completeness.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Completeness) + CreateNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CreateNoteRequest) return object; - var message = new $root.grafeas.v1.Completeness(); - if (object["arguments"] != null) - message["arguments"] = Boolean(object["arguments"]); - if (object.environment != null) - message.environment = Boolean(object.environment); - if (object.materials != null) - message.materials = Boolean(object.materials); + 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 Completeness 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.Completeness + * @memberof grafeas.v1.CreateNoteRequest * @static - * @param {grafeas.v1.Completeness} message Completeness + * @param {grafeas.v1.CreateNoteRequest} message CreateNoteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Completeness.toObject = function toObject(message, options) { + CreateNoteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object["arguments"] = false; - object.environment = false; - object.materials = false; + object.parent = ""; + object.noteId = ""; + object.note = null; } - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - object["arguments"] = message["arguments"]; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.materials != null && message.hasOwnProperty("materials")) - object.materials = message.materials; + 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 Completeness to JSON. + * Converts this CreateNoteRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Completeness + * @memberof grafeas.v1.CreateNoteRequest * @instance * @returns {Object.} JSON object */ - Completeness.prototype.toJSON = function toJSON() { + CreateNoteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Completeness; + return CreateNoteRequest; })(); - v1.Metadata = (function() { + v1.UpdateNoteRequest = (function() { /** - * Properties of a Metadata. + * Properties of an UpdateNoteRequest. * @memberof grafeas.v1 - * @interface IMetadata - * @property {string|null} [buildInvocationId] Metadata buildInvocationId - * @property {google.protobuf.ITimestamp|null} [buildStartedOn] Metadata buildStartedOn - * @property {google.protobuf.ITimestamp|null} [buildFinishedOn] Metadata buildFinishedOn - * @property {grafeas.v1.ICompleteness|null} [completeness] Metadata completeness - * @property {boolean|null} [reproducible] Metadata reproducible + * @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 Metadata. + * Constructs a new UpdateNoteRequest. * @memberof grafeas.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata + * @classdesc Represents an UpdateNoteRequest. + * @implements IUpdateNoteRequest * @constructor - * @param {grafeas.v1.IMetadata=} [properties] Properties to set + * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set */ - function Metadata(properties) { + function UpdateNoteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7491,127 +5711,101 @@ } /** - * Metadata buildInvocationId. - * @member {string} buildInvocationId - * @memberof grafeas.v1.Metadata - * @instance - */ - Metadata.prototype.buildInvocationId = ""; - - /** - * Metadata buildStartedOn. - * @member {google.protobuf.ITimestamp|null|undefined} buildStartedOn - * @memberof grafeas.v1.Metadata - * @instance - */ - Metadata.prototype.buildStartedOn = null; - - /** - * Metadata buildFinishedOn. - * @member {google.protobuf.ITimestamp|null|undefined} buildFinishedOn - * @memberof grafeas.v1.Metadata + * UpdateNoteRequest name. + * @member {string} name + * @memberof grafeas.v1.UpdateNoteRequest * @instance */ - Metadata.prototype.buildFinishedOn = null; + UpdateNoteRequest.prototype.name = ""; /** - * Metadata completeness. - * @member {grafeas.v1.ICompleteness|null|undefined} completeness - * @memberof grafeas.v1.Metadata + * UpdateNoteRequest note. + * @member {grafeas.v1.INote|null|undefined} note + * @memberof grafeas.v1.UpdateNoteRequest * @instance */ - Metadata.prototype.completeness = null; + UpdateNoteRequest.prototype.note = null; /** - * Metadata reproducible. - * @member {boolean} reproducible - * @memberof grafeas.v1.Metadata + * UpdateNoteRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof grafeas.v1.UpdateNoteRequest * @instance */ - Metadata.prototype.reproducible = false; + UpdateNoteRequest.prototype.updateMask = null; /** - * Creates a new Metadata instance using the specified properties. + * Creates a new UpdateNoteRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.Metadata + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.IMetadata=} [properties] Properties to set - * @returns {grafeas.v1.Metadata} Metadata instance + * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set + * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest instance */ - Metadata.create = function create(properties) { - return new Metadata(properties); + UpdateNoteRequest.create = function create(properties) { + return new UpdateNoteRequest(properties); }; /** - * Encodes the specified Metadata message. Does not implicitly {@link grafeas.v1.Metadata.verify|verify} messages. + * Encodes the specified UpdateNoteRequest message. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Metadata + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.IMetadata} message Metadata 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 */ - Metadata.encode = function encode(message, writer) { + UpdateNoteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.buildInvocationId != null && Object.hasOwnProperty.call(message, "buildInvocationId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildInvocationId); - if (message.buildStartedOn != null && Object.hasOwnProperty.call(message, "buildStartedOn")) - $root.google.protobuf.Timestamp.encode(message.buildStartedOn, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.buildFinishedOn != null && Object.hasOwnProperty.call(message, "buildFinishedOn")) - $root.google.protobuf.Timestamp.encode(message.buildFinishedOn, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.completeness != null && Object.hasOwnProperty.call(message, "completeness")) - $root.grafeas.v1.Completeness.encode(message.completeness, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reproducible != null && Object.hasOwnProperty.call(message, "reproducible")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reproducible); + 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 Metadata message, length delimited. Does not implicitly {@link grafeas.v1.Metadata.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.Metadata + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.IMetadata} message Metadata 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 */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metadata message from the specified reader or buffer. + * Decodes an UpdateNoteRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Metadata + * @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.Metadata} Metadata + * @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 */ - Metadata.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.Metadata(); + 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.buildInvocationId = reader.string(); + message.name = reader.string(); break; case 2: - message.buildStartedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); break; case 3: - message.buildFinishedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.completeness = $root.grafeas.v1.Completeness.decode(reader, reader.uint32()); - break; - case 5: - message.reproducible = reader.bool(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7622,155 +5816,137 @@ }; /** - * Decodes a Metadata 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.Metadata + * @memberof grafeas.v1.UpdateNoteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Metadata} Metadata + * @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 */ - Metadata.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 Metadata message. + * Verifies an UpdateNoteRequest message. * @function verify - * @memberof grafeas.v1.Metadata + * @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 */ - Metadata.verify = function verify(message) { + UpdateNoteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) - if (!$util.isString(message.buildInvocationId)) - return "buildInvocationId: string expected"; - if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) { - var error = $root.google.protobuf.Timestamp.verify(message.buildStartedOn); - if (error) - return "buildStartedOn." + error; - } - if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) { - var error = $root.google.protobuf.Timestamp.verify(message.buildFinishedOn); + 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 "buildFinishedOn." + error; + return "note." + error; } - if (message.completeness != null && message.hasOwnProperty("completeness")) { - var error = $root.grafeas.v1.Completeness.verify(message.completeness); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "completeness." + error; + return "updateMask." + error; } - if (message.reproducible != null && message.hasOwnProperty("reproducible")) - if (typeof message.reproducible !== "boolean") - return "reproducible: boolean expected"; return null; }; /** - * Creates a Metadata 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.Metadata + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Metadata) - return object; - var message = new $root.grafeas.v1.Metadata(); - if (object.buildInvocationId != null) - message.buildInvocationId = String(object.buildInvocationId); - if (object.buildStartedOn != null) { - if (typeof object.buildStartedOn !== "object") - throw TypeError(".grafeas.v1.Metadata.buildStartedOn: object expected"); - message.buildStartedOn = $root.google.protobuf.Timestamp.fromObject(object.buildStartedOn); - } - if (object.buildFinishedOn != null) { - if (typeof object.buildFinishedOn !== "object") - throw TypeError(".grafeas.v1.Metadata.buildFinishedOn: object expected"); - message.buildFinishedOn = $root.google.protobuf.Timestamp.fromObject(object.buildFinishedOn); + * @param {Object.} object Plain object + * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest + */ + UpdateNoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpdateNoteRequest) + 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.completeness != null) { - if (typeof object.completeness !== "object") - throw TypeError(".grafeas.v1.Metadata.completeness: object expected"); - message.completeness = $root.grafeas.v1.Completeness.fromObject(object.completeness); + 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); } - if (object.reproducible != null) - message.reproducible = Boolean(object.reproducible); return message; }; /** - * Creates a plain object from a Metadata 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.Metadata + * @memberof grafeas.v1.UpdateNoteRequest * @static - * @param {grafeas.v1.Metadata} message Metadata + * @param {grafeas.v1.UpdateNoteRequest} message UpdateNoteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metadata.toObject = function toObject(message, options) { + UpdateNoteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.buildInvocationId = ""; - object.buildStartedOn = null; - object.buildFinishedOn = null; - object.completeness = null; - object.reproducible = false; + object.name = ""; + object.note = null; + object.updateMask = null; } - if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) - object.buildInvocationId = message.buildInvocationId; - if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) - object.buildStartedOn = $root.google.protobuf.Timestamp.toObject(message.buildStartedOn, options); - if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) - object.buildFinishedOn = $root.google.protobuf.Timestamp.toObject(message.buildFinishedOn, options); - if (message.completeness != null && message.hasOwnProperty("completeness")) - object.completeness = $root.grafeas.v1.Completeness.toObject(message.completeness, options); - if (message.reproducible != null && message.hasOwnProperty("reproducible")) - object.reproducible = message.reproducible; + 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 Metadata to JSON. + * Converts this UpdateNoteRequest to JSON. * @function toJSON - * @memberof grafeas.v1.Metadata + * @memberof grafeas.v1.UpdateNoteRequest * @instance * @returns {Object.} JSON object */ - Metadata.prototype.toJSON = function toJSON() { + UpdateNoteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Metadata; + return UpdateNoteRequest; })(); - v1.BuilderConfig = (function() { + v1.ListNoteOccurrencesRequest = (function() { /** - * Properties of a BuilderConfig. + * Properties of a ListNoteOccurrencesRequest. * @memberof grafeas.v1 - * @interface IBuilderConfig - * @property {string|null} [id] BuilderConfig id + * @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 BuilderConfig. + * Constructs a new ListNoteOccurrencesRequest. * @memberof grafeas.v1 - * @classdesc Represents a BuilderConfig. - * @implements IBuilderConfig + * @classdesc Represents a ListNoteOccurrencesRequest. + * @implements IListNoteOccurrencesRequest * @constructor - * @param {grafeas.v1.IBuilderConfig=} [properties] Properties to set + * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set */ - function BuilderConfig(properties) { + function ListNoteOccurrencesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7778,75 +5954,114 @@ } /** - * BuilderConfig id. - * @member {string} id - * @memberof grafeas.v1.BuilderConfig + * ListNoteOccurrencesRequest name. + * @member {string} name + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @instance */ - BuilderConfig.prototype.id = ""; + ListNoteOccurrencesRequest.prototype.name = ""; /** - * Creates a new BuilderConfig instance using the specified properties. + * ListNoteOccurrencesRequest filter. + * @member {string} filter + * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @instance + */ + ListNoteOccurrencesRequest.prototype.filter = ""; + + /** + * ListNoteOccurrencesRequest pageSize. + * @member {number} pageSize + * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @instance + */ + ListNoteOccurrencesRequest.prototype.pageSize = 0; + + /** + * ListNoteOccurrencesRequest pageToken. + * @member {string} pageToken + * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @instance + */ + ListNoteOccurrencesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListNoteOccurrencesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.BuilderConfig + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.IBuilderConfig=} [properties] Properties to set - * @returns {grafeas.v1.BuilderConfig} BuilderConfig instance + * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set + * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest instance */ - BuilderConfig.create = function create(properties) { - return new BuilderConfig(properties); + ListNoteOccurrencesRequest.create = function create(properties) { + return new ListNoteOccurrencesRequest(properties); }; /** - * Encodes the specified BuilderConfig message. Does not implicitly {@link grafeas.v1.BuilderConfig.verify|verify} messages. + * Encodes the specified ListNoteOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BuilderConfig + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.IBuilderConfig} message BuilderConfig 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 */ - BuilderConfig.encode = function encode(message, writer) { + ListNoteOccurrencesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + 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); return writer; }; /** - * Encodes the specified BuilderConfig message, length delimited. Does not implicitly {@link grafeas.v1.BuilderConfig.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.BuilderConfig + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.IBuilderConfig} message BuilderConfig 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 */ - BuilderConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListNoteOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuilderConfig message from the specified reader or buffer. + * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BuilderConfig + * @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.BuilderConfig} BuilderConfig + * @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 */ - BuilderConfig.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.BuilderConfig(); + 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.id = reader.string(); + 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(); break; default: reader.skipType(tag & 7); @@ -7857,111 +6072,134 @@ }; /** - * Decodes a BuilderConfig 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.BuilderConfig + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BuilderConfig} BuilderConfig + * @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 */ - BuilderConfig.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 BuilderConfig message. + * Verifies a ListNoteOccurrencesRequest message. * @function verify - * @memberof grafeas.v1.BuilderConfig + * @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 */ - BuilderConfig.verify = function verify(message) { + ListNoteOccurrencesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: 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"; + 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 BuilderConfig 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.BuilderConfig + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BuilderConfig} BuilderConfig + * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest */ - BuilderConfig.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BuilderConfig) + ListNoteOccurrencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNoteOccurrencesRequest) return object; - var message = new $root.grafeas.v1.BuilderConfig(); - if (object.id != null) - message.id = String(object.id); + 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) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a BuilderConfig 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.BuilderConfig + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @static - * @param {grafeas.v1.BuilderConfig} message BuilderConfig + * @param {grafeas.v1.ListNoteOccurrencesRequest} message ListNoteOccurrencesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuilderConfig.toObject = function toObject(message, options) { + ListNoteOccurrencesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.id = ""; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; + 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; return object; }; /** - * Converts this BuilderConfig to JSON. + * Converts this ListNoteOccurrencesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.BuilderConfig + * @memberof grafeas.v1.ListNoteOccurrencesRequest * @instance * @returns {Object.} JSON object */ - BuilderConfig.prototype.toJSON = function toJSON() { + ListNoteOccurrencesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BuilderConfig; + return ListNoteOccurrencesRequest; })(); - v1.InTotoProvenance = (function() { + v1.ListNoteOccurrencesResponse = (function() { /** - * Properties of an InTotoProvenance. + * Properties of a ListNoteOccurrencesResponse. * @memberof grafeas.v1 - * @interface IInTotoProvenance - * @property {grafeas.v1.IBuilderConfig|null} [builderConfig] InTotoProvenance builderConfig - * @property {grafeas.v1.IRecipe|null} [recipe] InTotoProvenance recipe - * @property {grafeas.v1.IMetadata|null} [metadata] InTotoProvenance metadata - * @property {Array.|null} [materials] InTotoProvenance materials + * @interface IListNoteOccurrencesResponse + * @property {Array.|null} [occurrences] ListNoteOccurrencesResponse occurrences + * @property {string|null} [nextPageToken] ListNoteOccurrencesResponse nextPageToken */ /** - * Constructs a new InTotoProvenance. + * Constructs a new ListNoteOccurrencesResponse. * @memberof grafeas.v1 - * @classdesc Represents an InTotoProvenance. - * @implements IInTotoProvenance + * @classdesc Represents a ListNoteOccurrencesResponse. + * @implements IListNoteOccurrencesResponse * @constructor - * @param {grafeas.v1.IInTotoProvenance=} [properties] Properties to set + * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set */ - function InTotoProvenance(properties) { - this.materials = []; + function ListNoteOccurrencesResponse(properties) { + this.occurrences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7969,117 +6207,91 @@ } /** - * InTotoProvenance builderConfig. - * @member {grafeas.v1.IBuilderConfig|null|undefined} builderConfig - * @memberof grafeas.v1.InTotoProvenance - * @instance - */ - InTotoProvenance.prototype.builderConfig = null; - - /** - * InTotoProvenance recipe. - * @member {grafeas.v1.IRecipe|null|undefined} recipe - * @memberof grafeas.v1.InTotoProvenance - * @instance - */ - InTotoProvenance.prototype.recipe = null; - - /** - * InTotoProvenance metadata. - * @member {grafeas.v1.IMetadata|null|undefined} metadata - * @memberof grafeas.v1.InTotoProvenance + * ListNoteOccurrencesResponse occurrences. + * @member {Array.} occurrences + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @instance */ - InTotoProvenance.prototype.metadata = null; + ListNoteOccurrencesResponse.prototype.occurrences = $util.emptyArray; /** - * InTotoProvenance materials. - * @member {Array.} materials - * @memberof grafeas.v1.InTotoProvenance + * ListNoteOccurrencesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @instance */ - InTotoProvenance.prototype.materials = $util.emptyArray; + ListNoteOccurrencesResponse.prototype.nextPageToken = ""; /** - * Creates a new InTotoProvenance instance using the specified properties. + * Creates a new ListNoteOccurrencesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.InTotoProvenance + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.IInTotoProvenance=} [properties] Properties to set - * @returns {grafeas.v1.InTotoProvenance} InTotoProvenance instance + * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set + * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse instance */ - InTotoProvenance.create = function create(properties) { - return new InTotoProvenance(properties); + ListNoteOccurrencesResponse.create = function create(properties) { + return new ListNoteOccurrencesResponse(properties); }; /** - * Encodes the specified InTotoProvenance message. Does not implicitly {@link grafeas.v1.InTotoProvenance.verify|verify} messages. + * Encodes the specified ListNoteOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.InTotoProvenance + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.IInTotoProvenance} message InTotoProvenance 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 */ - InTotoProvenance.encode = function encode(message, writer) { + ListNoteOccurrencesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.builderConfig != null && Object.hasOwnProperty.call(message, "builderConfig")) - $root.grafeas.v1.BuilderConfig.encode(message.builderConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.recipe != null && Object.hasOwnProperty.call(message, "recipe")) - $root.grafeas.v1.Recipe.encode(message.recipe, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.grafeas.v1.Metadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.materials != null && message.materials.length) - for (var i = 0; i < message.materials.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.materials[i]); + 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 InTotoProvenance message, length delimited. Does not implicitly {@link grafeas.v1.InTotoProvenance.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.InTotoProvenance + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.IInTotoProvenance} message InTotoProvenance 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 */ - InTotoProvenance.encodeDelimited = function encodeDelimited(message, writer) { + ListNoteOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InTotoProvenance message from the specified reader or buffer. + * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.InTotoProvenance + * @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.InTotoProvenance} InTotoProvenance + * @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 */ - InTotoProvenance.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.InTotoProvenance(); + 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) { case 1: - message.builderConfig = $root.grafeas.v1.BuilderConfig.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.recipe = $root.grafeas.v1.Recipe.decode(reader, reader.uint32()); - break; - case 3: - message.metadata = $root.grafeas.v1.Metadata.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.materials && message.materials.length)) - message.materials = []; - message.materials.push(reader.string()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -8090,165 +6302,135 @@ }; /** - * Decodes an InTotoProvenance 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.InTotoProvenance + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.InTotoProvenance} InTotoProvenance + * @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 */ - InTotoProvenance.decodeDelimited = function decodeDelimited(reader) { + ListNoteOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InTotoProvenance message. + * Verifies a ListNoteOccurrencesResponse message. * @function verify - * @memberof grafeas.v1.InTotoProvenance + * @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 */ - InTotoProvenance.verify = function verify(message) { + ListNoteOccurrencesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.builderConfig != null && message.hasOwnProperty("builderConfig")) { - var error = $root.grafeas.v1.BuilderConfig.verify(message.builderConfig); - if (error) - return "builderConfig." + error; - } - if (message.recipe != null && message.hasOwnProperty("recipe")) { - var error = $root.grafeas.v1.Recipe.verify(message.recipe); - if (error) - return "recipe." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.grafeas.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.materials != null && message.hasOwnProperty("materials")) { - if (!Array.isArray(message.materials)) - return "materials: array expected"; - for (var i = 0; i < message.materials.length; ++i) - if (!$util.isString(message.materials[i])) - return "materials: 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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an InTotoProvenance 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.InTotoProvenance + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.InTotoProvenance} InTotoProvenance + * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse */ - InTotoProvenance.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.InTotoProvenance) + ListNoteOccurrencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ListNoteOccurrencesResponse) return object; - var message = new $root.grafeas.v1.InTotoProvenance(); - if (object.builderConfig != null) { - if (typeof object.builderConfig !== "object") - throw TypeError(".grafeas.v1.InTotoProvenance.builderConfig: object expected"); - message.builderConfig = $root.grafeas.v1.BuilderConfig.fromObject(object.builderConfig); - } - if (object.recipe != null) { - if (typeof object.recipe !== "object") - throw TypeError(".grafeas.v1.InTotoProvenance.recipe: object expected"); - message.recipe = $root.grafeas.v1.Recipe.fromObject(object.recipe); - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".grafeas.v1.InTotoProvenance.metadata: object expected"); - message.metadata = $root.grafeas.v1.Metadata.fromObject(object.metadata); - } - if (object.materials) { - if (!Array.isArray(object.materials)) - throw TypeError(".grafeas.v1.InTotoProvenance.materials: array expected"); - message.materials = []; - for (var i = 0; i < object.materials.length; ++i) - message.materials[i] = String(object.materials[i]); + 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]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an InTotoProvenance 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.InTotoProvenance + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @static - * @param {grafeas.v1.InTotoProvenance} message InTotoProvenance + * @param {grafeas.v1.ListNoteOccurrencesResponse} message ListNoteOccurrencesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InTotoProvenance.toObject = function toObject(message, options) { + ListNoteOccurrencesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.materials = []; - if (options.defaults) { - object.builderConfig = null; - object.recipe = null; - object.metadata = null; - } - if (message.builderConfig != null && message.hasOwnProperty("builderConfig")) - object.builderConfig = $root.grafeas.v1.BuilderConfig.toObject(message.builderConfig, options); - if (message.recipe != null && message.hasOwnProperty("recipe")) - object.recipe = $root.grafeas.v1.Recipe.toObject(message.recipe, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.grafeas.v1.Metadata.toObject(message.metadata, options); - if (message.materials && message.materials.length) { - object.materials = []; - for (var j = 0; j < message.materials.length; ++j) - object.materials[j] = message.materials[j]; + 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; }; /** - * Converts this InTotoProvenance to JSON. + * Converts this ListNoteOccurrencesResponse to JSON. * @function toJSON - * @memberof grafeas.v1.InTotoProvenance + * @memberof grafeas.v1.ListNoteOccurrencesResponse * @instance * @returns {Object.} JSON object */ - InTotoProvenance.prototype.toJSON = function toJSON() { + ListNoteOccurrencesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InTotoProvenance; + return ListNoteOccurrencesResponse; })(); - v1.InTotoStatement = (function() { + v1.BatchCreateNotesRequest = (function() { /** - * Properties of an InTotoStatement. + * Properties of a BatchCreateNotesRequest. * @memberof grafeas.v1 - * @interface IInTotoStatement - * @property {string|null} [type] InTotoStatement type - * @property {Array.|null} [subject] InTotoStatement subject - * @property {string|null} [predicateType] InTotoStatement predicateType - * @property {grafeas.v1.IInTotoProvenance|null} [provenance] InTotoStatement provenance - * @property {grafeas.v1.ISlsaProvenance|null} [slsaProvenance] InTotoStatement slsaProvenance + * @interface IBatchCreateNotesRequest + * @property {string|null} [parent] BatchCreateNotesRequest parent + * @property {Object.|null} [notes] BatchCreateNotesRequest notes */ /** - * Constructs a new InTotoStatement. + * Constructs a new BatchCreateNotesRequest. * @memberof grafeas.v1 - * @classdesc Represents an InTotoStatement. - * @implements IInTotoStatement + * @classdesc Represents a BatchCreateNotesRequest. + * @implements IBatchCreateNotesRequest * @constructor - * @param {grafeas.v1.IInTotoStatement=} [properties] Properties to set + * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set */ - function InTotoStatement(properties) { - this.subject = []; + function BatchCreateNotesRequest(properties) { + this.notes = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8256,144 +6438,110 @@ } /** - * InTotoStatement type. - * @member {string} type - * @memberof grafeas.v1.InTotoStatement - * @instance - */ - InTotoStatement.prototype.type = ""; - - /** - * InTotoStatement subject. - * @member {Array.} subject - * @memberof grafeas.v1.InTotoStatement - * @instance - */ - InTotoStatement.prototype.subject = $util.emptyArray; - - /** - * InTotoStatement predicateType. - * @member {string} predicateType - * @memberof grafeas.v1.InTotoStatement - * @instance - */ - InTotoStatement.prototype.predicateType = ""; - - /** - * InTotoStatement provenance. - * @member {grafeas.v1.IInTotoProvenance|null|undefined} provenance - * @memberof grafeas.v1.InTotoStatement - * @instance - */ - InTotoStatement.prototype.provenance = null; - - /** - * InTotoStatement slsaProvenance. - * @member {grafeas.v1.ISlsaProvenance|null|undefined} slsaProvenance - * @memberof grafeas.v1.InTotoStatement + * BatchCreateNotesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.BatchCreateNotesRequest * @instance */ - InTotoStatement.prototype.slsaProvenance = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BatchCreateNotesRequest.prototype.parent = ""; /** - * InTotoStatement predicate. - * @member {"provenance"|"slsaProvenance"|undefined} predicate - * @memberof grafeas.v1.InTotoStatement + * BatchCreateNotesRequest notes. + * @member {Object.} notes + * @memberof grafeas.v1.BatchCreateNotesRequest * @instance */ - Object.defineProperty(InTotoStatement.prototype, "predicate", { - get: $util.oneOfGetter($oneOfFields = ["provenance", "slsaProvenance"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchCreateNotesRequest.prototype.notes = $util.emptyObject; /** - * Creates a new InTotoStatement instance using the specified properties. + * Creates a new BatchCreateNotesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.InTotoStatement + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.IInTotoStatement=} [properties] Properties to set - * @returns {grafeas.v1.InTotoStatement} InTotoStatement instance + * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest instance */ - InTotoStatement.create = function create(properties) { - return new InTotoStatement(properties); + BatchCreateNotesRequest.create = function create(properties) { + return new BatchCreateNotesRequest(properties); }; /** - * Encodes the specified InTotoStatement message. Does not implicitly {@link grafeas.v1.InTotoStatement.verify|verify} messages. + * Encodes the specified BatchCreateNotesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.InTotoStatement + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.IInTotoStatement} message InTotoStatement 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 */ - InTotoStatement.encode = function encode(message, writer) { + BatchCreateNotesRequest.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.subject != null && message.subject.length) - for (var i = 0; i < message.subject.length; ++i) - $root.grafeas.v1.Subject.encode(message.subject[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.predicateType != null && Object.hasOwnProperty.call(message, "predicateType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.predicateType); - if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance")) - $root.grafeas.v1.InTotoProvenance.encode(message.provenance, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.slsaProvenance != null && Object.hasOwnProperty.call(message, "slsaProvenance")) - $root.grafeas.v1.SlsaProvenance.encode(message.slsaProvenance, 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.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 InTotoStatement message, length delimited. Does not implicitly {@link grafeas.v1.InTotoStatement.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.InTotoStatement + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.IInTotoStatement} message InTotoStatement 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 */ - InTotoStatement.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InTotoStatement message from the specified reader or buffer. + * Decodes a BatchCreateNotesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.InTotoStatement + * @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.InTotoStatement} InTotoStatement + * @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 */ - InTotoStatement.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.InTotoStatement(); + 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.type = reader.string(); + message.parent = reader.string(); break; case 2: - if (!(message.subject && message.subject.length)) - message.subject = []; - message.subject.push($root.grafeas.v1.Subject.decode(reader, reader.uint32())); - break; - case 3: - message.predicateType = reader.string(); - break; - case 4: - message.provenance = $root.grafeas.v1.InTotoProvenance.decode(reader, reader.uint32()); - break; - case 5: - message.slsaProvenance = $root.grafeas.v1.SlsaProvenance.decode(reader, reader.uint32()); + 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); @@ -8404,183 +6552,136 @@ }; /** - * Decodes an InTotoStatement 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.InTotoStatement + * @memberof grafeas.v1.BatchCreateNotesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.InTotoStatement} InTotoStatement + * @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 */ - InTotoStatement.decodeDelimited = function decodeDelimited(reader) { + BatchCreateNotesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InTotoStatement message. + * Verifies a BatchCreateNotesRequest message. * @function verify - * @memberof grafeas.v1.InTotoStatement + * @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 */ - InTotoStatement.verify = function verify(message) { + BatchCreateNotesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.subject != null && message.hasOwnProperty("subject")) { - if (!Array.isArray(message.subject)) - return "subject: array expected"; - for (var i = 0; i < message.subject.length; ++i) { - var error = $root.grafeas.v1.Subject.verify(message.subject[i]); - if (error) - return "subject." + error; - } - } - if (message.predicateType != null && message.hasOwnProperty("predicateType")) - if (!$util.isString(message.predicateType)) - return "predicateType: string expected"; - if (message.provenance != null && message.hasOwnProperty("provenance")) { - properties.predicate = 1; - { - var error = $root.grafeas.v1.InTotoProvenance.verify(message.provenance); - if (error) - return "provenance." + error; - } - } - if (message.slsaProvenance != null && message.hasOwnProperty("slsaProvenance")) { - if (properties.predicate === 1) - return "predicate: multiple values"; - properties.predicate = 1; - { - var error = $root.grafeas.v1.SlsaProvenance.verify(message.slsaProvenance); + 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 "slsaProvenance." + error; + return "notes." + error; } } return null; }; /** - * Creates an InTotoStatement 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.InTotoStatement + * @memberof grafeas.v1.BatchCreateNotesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.InTotoStatement} InTotoStatement + * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest */ - InTotoStatement.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.InTotoStatement) + BatchCreateNotesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateNotesRequest) return object; - var message = new $root.grafeas.v1.InTotoStatement(); - if (object.type != null) - message.type = String(object.type); - if (object.subject) { - if (!Array.isArray(object.subject)) - throw TypeError(".grafeas.v1.InTotoStatement.subject: array expected"); - message.subject = []; - for (var i = 0; i < object.subject.length; ++i) { - if (typeof object.subject[i] !== "object") - throw TypeError(".grafeas.v1.InTotoStatement.subject: object expected"); - message.subject[i] = $root.grafeas.v1.Subject.fromObject(object.subject[i]); + 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]]); } } - if (object.predicateType != null) - message.predicateType = String(object.predicateType); - if (object.provenance != null) { - if (typeof object.provenance !== "object") - throw TypeError(".grafeas.v1.InTotoStatement.provenance: object expected"); - message.provenance = $root.grafeas.v1.InTotoProvenance.fromObject(object.provenance); - } - if (object.slsaProvenance != null) { - if (typeof object.slsaProvenance !== "object") - throw TypeError(".grafeas.v1.InTotoStatement.slsaProvenance: object expected"); - message.slsaProvenance = $root.grafeas.v1.SlsaProvenance.fromObject(object.slsaProvenance); - } return message; }; /** - * Creates a plain object from an InTotoStatement 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.InTotoStatement + * @memberof grafeas.v1.BatchCreateNotesRequest * @static - * @param {grafeas.v1.InTotoStatement} message InTotoStatement + * @param {grafeas.v1.BatchCreateNotesRequest} message BatchCreateNotesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InTotoStatement.toObject = function toObject(message, options) { + BatchCreateNotesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.subject = []; - if (options.defaults) { - object.type = ""; - object.predicateType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.subject && message.subject.length) { - object.subject = []; - for (var j = 0; j < message.subject.length; ++j) - object.subject[j] = $root.grafeas.v1.Subject.toObject(message.subject[j], options); - } - if (message.predicateType != null && message.hasOwnProperty("predicateType")) - object.predicateType = message.predicateType; - if (message.provenance != null && message.hasOwnProperty("provenance")) { - object.provenance = $root.grafeas.v1.InTotoProvenance.toObject(message.provenance, options); - if (options.oneofs) - object.predicate = "provenance"; - } - if (message.slsaProvenance != null && message.hasOwnProperty("slsaProvenance")) { - object.slsaProvenance = $root.grafeas.v1.SlsaProvenance.toObject(message.slsaProvenance, options); - if (options.oneofs) - object.predicate = "slsaProvenance"; + 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); } return object; }; /** - * Converts this InTotoStatement to JSON. + * Converts this BatchCreateNotesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.InTotoStatement + * @memberof grafeas.v1.BatchCreateNotesRequest * @instance * @returns {Object.} JSON object */ - InTotoStatement.prototype.toJSON = function toJSON() { + BatchCreateNotesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InTotoStatement; + return BatchCreateNotesRequest; })(); - v1.Subject = (function() { + v1.BatchCreateNotesResponse = (function() { /** - * Properties of a Subject. + * Properties of a BatchCreateNotesResponse. * @memberof grafeas.v1 - * @interface ISubject - * @property {string|null} [name] Subject name - * @property {Object.|null} [digest] Subject digest + * @interface IBatchCreateNotesResponse + * @property {Array.|null} [notes] BatchCreateNotesResponse notes */ /** - * Constructs a new Subject. + * Constructs a new BatchCreateNotesResponse. * @memberof grafeas.v1 - * @classdesc Represents a Subject. - * @implements ISubject + * @classdesc Represents a BatchCreateNotesResponse. + * @implements IBatchCreateNotesResponse * @constructor - * @param {grafeas.v1.ISubject=} [properties] Properties to set + * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set */ - function Subject(properties) { - this.digest = {}; + function BatchCreateNotesResponse(properties) { + this.notes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8588,108 +6689,78 @@ } /** - * Subject name. - * @member {string} name - * @memberof grafeas.v1.Subject - * @instance - */ - Subject.prototype.name = ""; - - /** - * Subject digest. - * @member {Object.} digest - * @memberof grafeas.v1.Subject + * BatchCreateNotesResponse notes. + * @member {Array.} notes + * @memberof grafeas.v1.BatchCreateNotesResponse * @instance */ - Subject.prototype.digest = $util.emptyObject; + BatchCreateNotesResponse.prototype.notes = $util.emptyArray; /** - * Creates a new Subject instance using the specified properties. + * Creates a new BatchCreateNotesResponse instance using the specified properties. * @function create - * @memberof grafeas.v1.Subject + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.ISubject=} [properties] Properties to set - * @returns {grafeas.v1.Subject} Subject instance + * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse instance */ - Subject.create = function create(properties) { - return new Subject(properties); + BatchCreateNotesResponse.create = function create(properties) { + return new BatchCreateNotesResponse(properties); }; /** - * Encodes the specified Subject message. Does not implicitly {@link grafeas.v1.Subject.verify|verify} messages. + * Encodes the specified BatchCreateNotesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Subject + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.ISubject} message Subject 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 */ - Subject.encode = function encode(message, writer) { + BatchCreateNotesResponse.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.digest != null && Object.hasOwnProperty.call(message, "digest")) - for (var keys = Object.keys(message.digest), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.digest[keys[i]]).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 Subject message, length delimited. Does not implicitly {@link grafeas.v1.Subject.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.Subject + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.ISubject} message Subject 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 */ - Subject.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Subject message from the specified reader or buffer. + * Decodes a BatchCreateNotesResponse message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Subject + * @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.Subject} Subject + * @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 */ - Subject.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.Subject(), key, value; + 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.name = reader.string(); - break; - case 2: - if (message.digest === $util.emptyObject) - message.digest = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.digest[key] = value; + 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); @@ -8700,134 +6771,126 @@ }; /** - * Decodes a Subject 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.Subject + * @memberof grafeas.v1.BatchCreateNotesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Subject} Subject + * @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 */ - Subject.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 Subject message. + * Verifies a BatchCreateNotesResponse message. * @function verify - * @memberof grafeas.v1.Subject + * @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 */ - Subject.verify = function verify(message) { + BatchCreateNotesResponse.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.digest != null && message.hasOwnProperty("digest")) { - if (!$util.isObject(message.digest)) - return "digest: object expected"; - var key = Object.keys(message.digest); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.digest[key[i]])) - return "digest: string{k:string} 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; + } } return null; }; /** - * Creates a Subject 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.Subject + * @memberof grafeas.v1.BatchCreateNotesResponse * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Subject} Subject + * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse */ - Subject.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Subject) + BatchCreateNotesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateNotesResponse) return object; - var message = new $root.grafeas.v1.Subject(); - if (object.name != null) - message.name = String(object.name); - if (object.digest) { - if (typeof object.digest !== "object") - throw TypeError(".grafeas.v1.Subject.digest: object expected"); - message.digest = {}; - for (var keys = Object.keys(object.digest), i = 0; i < keys.length; ++i) - message.digest[keys[i]] = String(object.digest[keys[i]]); + 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 Subject 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.Subject + * @memberof grafeas.v1.BatchCreateNotesResponse * @static - * @param {grafeas.v1.Subject} message Subject + * @param {grafeas.v1.BatchCreateNotesResponse} message BatchCreateNotesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object - */ - Subject.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.digest = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.digest && (keys2 = Object.keys(message.digest)).length) { - object.digest = {}; - for (var j = 0; j < keys2.length; ++j) - object.digest[keys2[j]] = message.digest[keys2[j]]; + */ + BatchCreateNotesResponse.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); } return object; }; /** - * Converts this Subject to JSON. + * Converts this BatchCreateNotesResponse to JSON. * @function toJSON - * @memberof grafeas.v1.Subject + * @memberof grafeas.v1.BatchCreateNotesResponse * @instance * @returns {Object.} JSON object */ - Subject.prototype.toJSON = function toJSON() { + BatchCreateNotesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Subject; + return BatchCreateNotesResponse; })(); - v1.SlsaProvenance = (function() { + v1.BatchCreateOccurrencesRequest = (function() { /** - * Properties of a SlsaProvenance. + * Properties of a BatchCreateOccurrencesRequest. * @memberof grafeas.v1 - * @interface ISlsaProvenance - * @property {grafeas.v1.SlsaProvenance.ISlsaBuilder|null} [builder] SlsaProvenance builder - * @property {grafeas.v1.SlsaProvenance.ISlsaRecipe|null} [recipe] SlsaProvenance recipe - * @property {grafeas.v1.SlsaProvenance.ISlsaMetadata|null} [metadata] SlsaProvenance metadata - * @property {Array.|null} [materials] SlsaProvenance materials + * @interface IBatchCreateOccurrencesRequest + * @property {string|null} [parent] BatchCreateOccurrencesRequest parent + * @property {Array.|null} [occurrences] BatchCreateOccurrencesRequest occurrences */ /** - * Constructs a new SlsaProvenance. + * Constructs a new BatchCreateOccurrencesRequest. * @memberof grafeas.v1 - * @classdesc Represents a SlsaProvenance. - * @implements ISlsaProvenance + * @classdesc Represents a BatchCreateOccurrencesRequest. + * @implements IBatchCreateOccurrencesRequest * @constructor - * @param {grafeas.v1.ISlsaProvenance=} [properties] Properties to set + * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set */ - function SlsaProvenance(properties) { - this.materials = []; + function BatchCreateOccurrencesRequest(properties) { + this.occurrences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8835,117 +6898,91 @@ } /** - * SlsaProvenance builder. - * @member {grafeas.v1.SlsaProvenance.ISlsaBuilder|null|undefined} builder - * @memberof grafeas.v1.SlsaProvenance - * @instance - */ - SlsaProvenance.prototype.builder = null; - - /** - * SlsaProvenance recipe. - * @member {grafeas.v1.SlsaProvenance.ISlsaRecipe|null|undefined} recipe - * @memberof grafeas.v1.SlsaProvenance - * @instance - */ - SlsaProvenance.prototype.recipe = null; - - /** - * SlsaProvenance metadata. - * @member {grafeas.v1.SlsaProvenance.ISlsaMetadata|null|undefined} metadata - * @memberof grafeas.v1.SlsaProvenance + * BatchCreateOccurrencesRequest parent. + * @member {string} parent + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @instance */ - SlsaProvenance.prototype.metadata = null; + BatchCreateOccurrencesRequest.prototype.parent = ""; /** - * SlsaProvenance materials. - * @member {Array.} materials - * @memberof grafeas.v1.SlsaProvenance + * BatchCreateOccurrencesRequest occurrences. + * @member {Array.} occurrences + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @instance */ - SlsaProvenance.prototype.materials = $util.emptyArray; + BatchCreateOccurrencesRequest.prototype.occurrences = $util.emptyArray; /** - * Creates a new SlsaProvenance instance using the specified properties. + * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. * @function create - * @memberof grafeas.v1.SlsaProvenance + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.ISlsaProvenance=} [properties] Properties to set - * @returns {grafeas.v1.SlsaProvenance} SlsaProvenance instance + * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest instance */ - SlsaProvenance.create = function create(properties) { - return new SlsaProvenance(properties); + BatchCreateOccurrencesRequest.create = function create(properties) { + return new BatchCreateOccurrencesRequest(properties); }; /** - * Encodes the specified SlsaProvenance message. Does not implicitly {@link grafeas.v1.SlsaProvenance.verify|verify} messages. + * Encodes the specified BatchCreateOccurrencesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. * @function encode - * @memberof grafeas.v1.SlsaProvenance + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.ISlsaProvenance} message SlsaProvenance 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 */ - SlsaProvenance.encode = function encode(message, writer) { + BatchCreateOccurrencesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.builder != null && Object.hasOwnProperty.call(message, "builder")) - $root.grafeas.v1.SlsaProvenance.SlsaBuilder.encode(message.builder, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.recipe != null && Object.hasOwnProperty.call(message, "recipe")) - $root.grafeas.v1.SlsaProvenance.SlsaRecipe.encode(message.recipe, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.grafeas.v1.SlsaProvenance.SlsaMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.materials != null && message.materials.length) - for (var i = 0; i < message.materials.length; ++i) - $root.grafeas.v1.SlsaProvenance.Material.encode(message.materials[i], writer.uint32(/* id 4, wireType 2 =*/34).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 SlsaProvenance message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.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.SlsaProvenance + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.ISlsaProvenance} message SlsaProvenance 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 */ - SlsaProvenance.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SlsaProvenance message from the specified reader or buffer. + * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.SlsaProvenance + * @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.SlsaProvenance} SlsaProvenance + * @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 */ - SlsaProvenance.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.SlsaProvenance(); + 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.builder = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.recipe = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.decode(reader, reader.uint32()); - break; - case 3: - message.metadata = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.materials && message.materials.length)) - message.materials = []; - message.materials.push($root.grafeas.v1.SlsaProvenance.Material.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); @@ -8956,698 +6993,530 @@ }; /** - * Decodes a SlsaProvenance 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.SlsaProvenance + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.SlsaProvenance} SlsaProvenance + * @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 */ - SlsaProvenance.decodeDelimited = function decodeDelimited(reader) { + BatchCreateOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SlsaProvenance message. + * Verifies a BatchCreateOccurrencesRequest message. * @function verify - * @memberof grafeas.v1.SlsaProvenance + * @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 */ - SlsaProvenance.verify = function verify(message) { + BatchCreateOccurrencesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.builder != null && message.hasOwnProperty("builder")) { - var error = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.verify(message.builder); - if (error) - return "builder." + error; - } - if (message.recipe != null && message.hasOwnProperty("recipe")) { - var error = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.verify(message.recipe); - if (error) - return "recipe." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.materials != null && message.hasOwnProperty("materials")) { - if (!Array.isArray(message.materials)) - return "materials: array expected"; - for (var i = 0; i < message.materials.length; ++i) { - var error = $root.grafeas.v1.SlsaProvenance.Material.verify(message.materials[i]); + 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 "materials." + error; + return "occurrences." + error; } } return null; }; /** - * Creates a SlsaProvenance 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.SlsaProvenance + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.SlsaProvenance} SlsaProvenance + * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest */ - SlsaProvenance.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.SlsaProvenance) + BatchCreateOccurrencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesRequest) return object; - var message = new $root.grafeas.v1.SlsaProvenance(); - if (object.builder != null) { - if (typeof object.builder !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.builder: object expected"); - message.builder = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.fromObject(object.builder); - } - if (object.recipe != null) { - if (typeof object.recipe !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.recipe: object expected"); - message.recipe = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.fromObject(object.recipe); - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.metadata: object expected"); - message.metadata = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.fromObject(object.metadata); - } - if (object.materials) { - if (!Array.isArray(object.materials)) - throw TypeError(".grafeas.v1.SlsaProvenance.materials: array expected"); - message.materials = []; - for (var i = 0; i < object.materials.length; ++i) { - if (typeof object.materials[i] !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.materials: object expected"); - message.materials[i] = $root.grafeas.v1.SlsaProvenance.Material.fromObject(object.materials[i]); + 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 a SlsaProvenance 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.SlsaProvenance + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @static - * @param {grafeas.v1.SlsaProvenance} message SlsaProvenance + * @param {grafeas.v1.BatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SlsaProvenance.toObject = function toObject(message, options) { + BatchCreateOccurrencesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.materials = []; - if (options.defaults) { - object.builder = null; - object.recipe = null; - object.metadata = null; - } - if (message.builder != null && message.hasOwnProperty("builder")) - object.builder = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.toObject(message.builder, options); - if (message.recipe != null && message.hasOwnProperty("recipe")) - object.recipe = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.toObject(message.recipe, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.toObject(message.metadata, options); - if (message.materials && message.materials.length) { - object.materials = []; - for (var j = 0; j < message.materials.length; ++j) - object.materials[j] = $root.grafeas.v1.SlsaProvenance.Material.toObject(message.materials[j], options); + 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); } return object; }; /** - * Converts this SlsaProvenance to JSON. + * Converts this BatchCreateOccurrencesRequest to JSON. * @function toJSON - * @memberof grafeas.v1.SlsaProvenance + * @memberof grafeas.v1.BatchCreateOccurrencesRequest * @instance * @returns {Object.} JSON object */ - SlsaProvenance.prototype.toJSON = function toJSON() { + BatchCreateOccurrencesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SlsaProvenance.SlsaRecipe = (function() { - - /** - * Properties of a SlsaRecipe. - * @memberof grafeas.v1.SlsaProvenance - * @interface ISlsaRecipe - * @property {string|null} [type] SlsaRecipe type - * @property {number|Long|null} [definedInMaterial] SlsaRecipe definedInMaterial - * @property {string|null} [entryPoint] SlsaRecipe entryPoint - * @property {google.protobuf.IAny|null} ["arguments"] SlsaRecipe arguments - * @property {google.protobuf.IAny|null} [environment] SlsaRecipe environment - */ - - /** - * Constructs a new SlsaRecipe. - * @memberof grafeas.v1.SlsaProvenance - * @classdesc Represents a SlsaRecipe. - * @implements ISlsaRecipe - * @constructor - * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe=} [properties] Properties to set - */ - function SlsaRecipe(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]]; - } - - /** - * SlsaRecipe type. - * @member {string} type - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @instance - */ - SlsaRecipe.prototype.type = ""; + return BatchCreateOccurrencesRequest; + })(); - /** - * SlsaRecipe definedInMaterial. - * @member {number|Long} definedInMaterial - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @instance - */ - SlsaRecipe.prototype.definedInMaterial = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v1.BatchCreateOccurrencesResponse = (function() { - /** - * SlsaRecipe entryPoint. - * @member {string} entryPoint - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @instance - */ - SlsaRecipe.prototype.entryPoint = ""; + /** + * Properties of a BatchCreateOccurrencesResponse. + * @memberof grafeas.v1 + * @interface IBatchCreateOccurrencesResponse + * @property {Array.|null} [occurrences] BatchCreateOccurrencesResponse occurrences + */ - /** - * SlsaRecipe arguments. - * @member {google.protobuf.IAny|null|undefined} arguments - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @instance - */ - SlsaRecipe.prototype["arguments"] = null; + /** + * Constructs a new BatchCreateOccurrencesResponse. + * @memberof grafeas.v1 + * @classdesc Represents a BatchCreateOccurrencesResponse. + * @implements IBatchCreateOccurrencesResponse + * @constructor + * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set + */ + function BatchCreateOccurrencesResponse(properties) { + this.occurrences = []; + 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]]; + } - /** - * SlsaRecipe environment. - * @member {google.protobuf.IAny|null|undefined} environment - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @instance - */ - SlsaRecipe.prototype.environment = null; + /** + * BatchCreateOccurrencesResponse occurrences. + * @member {Array.} occurrences + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @instance + */ + BatchCreateOccurrencesResponse.prototype.occurrences = $util.emptyArray; - /** - * Creates a new SlsaRecipe instance using the specified properties. - * @function create - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe=} [properties] Properties to set - * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe instance - */ - SlsaRecipe.create = function create(properties) { - return new SlsaRecipe(properties); - }; + /** + * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. + * @function create + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @static + * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set + * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse instance + */ + BatchCreateOccurrencesResponse.create = function create(properties) { + return new BatchCreateOccurrencesResponse(properties); + }; - /** - * Encodes the specified SlsaRecipe message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe} message SlsaRecipe message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SlsaRecipe.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.definedInMaterial != null && Object.hasOwnProperty.call(message, "definedInMaterial")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.definedInMaterial); - if (message.entryPoint != null && Object.hasOwnProperty.call(message, "entryPoint")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryPoint); - if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) - $root.google.protobuf.Any.encode(message["arguments"], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.protobuf.Any.encode(message.environment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified BatchCreateOccurrencesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @static + * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateOccurrencesResponse.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(); + return writer; + }; - /** - * Encodes the specified SlsaRecipe message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe} message SlsaRecipe message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SlsaRecipe.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified BatchCreateOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @static + * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SlsaRecipe message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SlsaRecipe.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.SlsaProvenance.SlsaRecipe(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.definedInMaterial = reader.int64(); - break; - case 3: - message.entryPoint = reader.string(); - break; - case 4: - message["arguments"] = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 5: - message.environment = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer. + * @function decode + * @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.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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: + 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); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a SlsaRecipe message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SlsaRecipe.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + BatchCreateOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SlsaRecipe message. - * @function verify - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SlsaRecipe.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.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) - if (!$util.isInteger(message.definedInMaterial) && !(message.definedInMaterial && $util.isInteger(message.definedInMaterial.low) && $util.isInteger(message.definedInMaterial.high))) - return "definedInMaterial: integer|Long expected"; - if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) - if (!$util.isString(message.entryPoint)) - return "entryPoint: string expected"; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) { - var error = $root.google.protobuf.Any.verify(message["arguments"]); - if (error) - return "arguments." + error; - } - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.protobuf.Any.verify(message.environment); + /** + * Verifies a BatchCreateOccurrencesResponse message. + * @function verify + * @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 + */ + BatchCreateOccurrencesResponse.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 (error) - return "environment." + error; - } - return null; - }; - - /** - * Creates a SlsaRecipe message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe - */ - SlsaRecipe.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaRecipe) - return object; - var message = new $root.grafeas.v1.SlsaProvenance.SlsaRecipe(); - if (object.type != null) - message.type = String(object.type); - if (object.definedInMaterial != null) - if ($util.Long) - (message.definedInMaterial = $util.Long.fromValue(object.definedInMaterial)).unsigned = false; - else if (typeof object.definedInMaterial === "string") - message.definedInMaterial = parseInt(object.definedInMaterial, 10); - else if (typeof object.definedInMaterial === "number") - message.definedInMaterial = object.definedInMaterial; - else if (typeof object.definedInMaterial === "object") - message.definedInMaterial = new $util.LongBits(object.definedInMaterial.low >>> 0, object.definedInMaterial.high >>> 0).toNumber(); - if (object.entryPoint != null) - message.entryPoint = String(object.entryPoint); - if (object["arguments"] != null) { - if (typeof object["arguments"] !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.SlsaRecipe.arguments: object expected"); - message["arguments"] = $root.google.protobuf.Any.fromObject(object["arguments"]); - } - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.SlsaRecipe.environment: object expected"); - message.environment = $root.google.protobuf.Any.fromObject(object.environment); + return "occurrences." + error; } - return message; - }; + } + return null; + }; - /** - * Creates a plain object from a SlsaRecipe message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @static - * @param {grafeas.v1.SlsaProvenance.SlsaRecipe} message SlsaRecipe - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SlsaRecipe.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.definedInMaterial = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.definedInMaterial = options.longs === String ? "0" : 0; - object.entryPoint = ""; - object["arguments"] = null; - object.environment = null; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) - if (typeof message.definedInMaterial === "number") - object.definedInMaterial = options.longs === String ? String(message.definedInMaterial) : message.definedInMaterial; - else - object.definedInMaterial = options.longs === String ? $util.Long.prototype.toString.call(message.definedInMaterial) : options.longs === Number ? new $util.LongBits(message.definedInMaterial.low >>> 0, message.definedInMaterial.high >>> 0).toNumber() : message.definedInMaterial; - if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) - object.entryPoint = message.entryPoint; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - object["arguments"] = $root.google.protobuf.Any.toObject(message["arguments"], options); - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.protobuf.Any.toObject(message.environment, options); + /** + * Creates a BatchCreateOccurrencesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + */ + BatchCreateOccurrencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesResponse) return object; - }; - - /** - * Converts this SlsaRecipe to JSON. - * @function toJSON - * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe - * @instance - * @returns {Object.} JSON object - */ - SlsaRecipe.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SlsaRecipe; - })(); - - SlsaProvenance.SlsaCompleteness = (function() { - - /** - * Properties of a SlsaCompleteness. - * @memberof grafeas.v1.SlsaProvenance - * @interface ISlsaCompleteness - * @property {boolean|null} ["arguments"] SlsaCompleteness arguments - * @property {boolean|null} [environment] SlsaCompleteness environment - * @property {boolean|null} [materials] SlsaCompleteness materials - */ - - /** - * Constructs a new SlsaCompleteness. - * @memberof grafeas.v1.SlsaProvenance - * @classdesc Represents a SlsaCompleteness. - * @implements ISlsaCompleteness - * @constructor - * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness=} [properties] Properties to set - */ - function SlsaCompleteness(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]]; + 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; + }; - /** - * SlsaCompleteness arguments. - * @member {boolean} arguments - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @instance - */ - SlsaCompleteness.prototype["arguments"] = false; + /** + * Creates a plain object from a BatchCreateOccurrencesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @static + * @param {grafeas.v1.BatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateOccurrencesResponse.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); + } + return object; + }; - /** - * SlsaCompleteness environment. - * @member {boolean} environment - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @instance - */ - SlsaCompleteness.prototype.environment = false; + /** + * Converts this BatchCreateOccurrencesResponse to JSON. + * @function toJSON + * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @instance + * @returns {Object.} JSON object + */ + BatchCreateOccurrencesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * SlsaCompleteness materials. - * @member {boolean} materials - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @instance - */ - SlsaCompleteness.prototype.materials = false; + return BatchCreateOccurrencesResponse; + })(); - /** - * Creates a new SlsaCompleteness instance using the specified properties. - * @function create - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness=} [properties] Properties to set - * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness instance - */ - SlsaCompleteness.create = function create(properties) { - return new SlsaCompleteness(properties); - }; + v1.AttestationNote = (function() { - /** - * Encodes the specified SlsaCompleteness message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness} message SlsaCompleteness message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SlsaCompleteness.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message["arguments"]); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.environment); - if (message.materials != null && Object.hasOwnProperty.call(message, "materials")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.materials); - return writer; - }; + /** + * Properties of an AttestationNote. + * @memberof grafeas.v1 + * @interface IAttestationNote + * @property {grafeas.v1.AttestationNote.IHint|null} [hint] AttestationNote hint + */ - /** - * Encodes the specified SlsaCompleteness message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness} message SlsaCompleteness message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SlsaCompleteness.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new AttestationNote. + * @memberof grafeas.v1 + * @classdesc Represents an AttestationNote. + * @implements IAttestationNote + * @constructor + * @param {grafeas.v1.IAttestationNote=} [properties] Properties to set + */ + function AttestationNote(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 a SlsaCompleteness message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SlsaCompleteness.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.SlsaProvenance.SlsaCompleteness(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message["arguments"] = reader.bool(); - break; - case 2: - message.environment = reader.bool(); - break; - case 3: - message.materials = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * AttestationNote hint. + * @member {grafeas.v1.AttestationNote.IHint|null|undefined} hint + * @memberof grafeas.v1.AttestationNote + * @instance + */ + AttestationNote.prototype.hint = null; - /** - * Decodes a SlsaCompleteness message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SlsaCompleteness.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new AttestationNote instance using the specified properties. + * @function create + * @memberof grafeas.v1.AttestationNote + * @static + * @param {grafeas.v1.IAttestationNote=} [properties] Properties to set + * @returns {grafeas.v1.AttestationNote} AttestationNote instance + */ + AttestationNote.create = function create(properties) { + return new AttestationNote(properties); + }; - /** - * Verifies a SlsaCompleteness message. - * @function verify - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SlsaCompleteness.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - if (typeof message["arguments"] !== "boolean") - return "arguments: boolean expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (typeof message.environment !== "boolean") - return "environment: boolean expected"; - if (message.materials != null && message.hasOwnProperty("materials")) - if (typeof message.materials !== "boolean") - return "materials: boolean expected"; - return null; - }; + /** + * Encodes the specified AttestationNote message. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.AttestationNote + * @static + * @param {grafeas.v1.IAttestationNote} message AttestationNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttestationNote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hint != null && Object.hasOwnProperty.call(message, "hint")) + $root.grafeas.v1.AttestationNote.Hint.encode(message.hint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a SlsaCompleteness message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness - */ - SlsaCompleteness.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaCompleteness) - return object; - var message = new $root.grafeas.v1.SlsaProvenance.SlsaCompleteness(); - if (object["arguments"] != null) - message["arguments"] = Boolean(object["arguments"]); - if (object.environment != null) - message.environment = Boolean(object.environment); - if (object.materials != null) - message.materials = Boolean(object.materials); - return message; - }; + /** + * Encodes the specified AttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.AttestationNote + * @static + * @param {grafeas.v1.IAttestationNote} message AttestationNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttestationNote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a SlsaCompleteness message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @static - * @param {grafeas.v1.SlsaProvenance.SlsaCompleteness} message SlsaCompleteness - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SlsaCompleteness.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object["arguments"] = false; - object.environment = false; - object.materials = false; + /** + * Decodes an AttestationNote message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.AttestationNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.AttestationNote} AttestationNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttestationNote.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.AttestationNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hint = $root.grafeas.v1.AttestationNote.Hint.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - object["arguments"] = message["arguments"]; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.materials != null && message.hasOwnProperty("materials")) - object.materials = message.materials; + } + return message; + }; + + /** + * Decodes an AttestationNote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.AttestationNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.AttestationNote} AttestationNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttestationNote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttestationNote message. + * @function verify + * @memberof grafeas.v1.AttestationNote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttestationNote.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.AttestationNote.Hint.verify(message.hint); + if (error) + return "hint." + error; + } + return null; + }; + + /** + * Creates an AttestationNote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.AttestationNote + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.AttestationNote} AttestationNote + */ + AttestationNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.AttestationNote) return object; - }; + var message = new $root.grafeas.v1.AttestationNote(); + if (object.hint != null) { + if (typeof object.hint !== "object") + throw TypeError(".grafeas.v1.AttestationNote.hint: object expected"); + message.hint = $root.grafeas.v1.AttestationNote.Hint.fromObject(object.hint); + } + return message; + }; - /** - * Converts this SlsaCompleteness to JSON. - * @function toJSON - * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness - * @instance - * @returns {Object.} JSON object - */ - SlsaCompleteness.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an AttestationNote message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.AttestationNote + * @static + * @param {grafeas.v1.AttestationNote} message AttestationNote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttestationNote.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.AttestationNote.Hint.toObject(message.hint, options); + return object; + }; - return SlsaCompleteness; - })(); + /** + * Converts this AttestationNote to JSON. + * @function toJSON + * @memberof grafeas.v1.AttestationNote + * @instance + * @returns {Object.} JSON object + */ + AttestationNote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - SlsaProvenance.SlsaMetadata = (function() { + AttestationNote.Hint = (function() { /** - * Properties of a SlsaMetadata. - * @memberof grafeas.v1.SlsaProvenance - * @interface ISlsaMetadata - * @property {string|null} [buildInvocationId] SlsaMetadata buildInvocationId - * @property {google.protobuf.ITimestamp|null} [buildStartedOn] SlsaMetadata buildStartedOn - * @property {google.protobuf.ITimestamp|null} [buildFinishedOn] SlsaMetadata buildFinishedOn - * @property {grafeas.v1.SlsaProvenance.ISlsaCompleteness|null} [completeness] SlsaMetadata completeness - * @property {boolean|null} [reproducible] SlsaMetadata reproducible + * Properties of a Hint. + * @memberof grafeas.v1.AttestationNote + * @interface IHint + * @property {string|null} [humanReadableName] Hint humanReadableName */ /** - * Constructs a new SlsaMetadata. - * @memberof grafeas.v1.SlsaProvenance - * @classdesc Represents a SlsaMetadata. - * @implements ISlsaMetadata + * Constructs a new Hint. + * @memberof grafeas.v1.AttestationNote + * @classdesc Represents a Hint. + * @implements IHint * @constructor - * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata=} [properties] Properties to set + * @param {grafeas.v1.AttestationNote.IHint=} [properties] Properties to set */ - function SlsaMetadata(properties) { + function Hint(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9655,127 +7524,75 @@ } /** - * SlsaMetadata buildInvocationId. - * @member {string} buildInvocationId - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata - * @instance - */ - SlsaMetadata.prototype.buildInvocationId = ""; - - /** - * SlsaMetadata buildStartedOn. - * @member {google.protobuf.ITimestamp|null|undefined} buildStartedOn - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata - * @instance - */ - SlsaMetadata.prototype.buildStartedOn = null; - - /** - * SlsaMetadata buildFinishedOn. - * @member {google.protobuf.ITimestamp|null|undefined} buildFinishedOn - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata - * @instance - */ - SlsaMetadata.prototype.buildFinishedOn = null; - - /** - * SlsaMetadata completeness. - * @member {grafeas.v1.SlsaProvenance.ISlsaCompleteness|null|undefined} completeness - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata - * @instance - */ - SlsaMetadata.prototype.completeness = null; - - /** - * SlsaMetadata reproducible. - * @member {boolean} reproducible - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * Hint humanReadableName. + * @member {string} humanReadableName + * @memberof grafeas.v1.AttestationNote.Hint * @instance */ - SlsaMetadata.prototype.reproducible = false; + Hint.prototype.humanReadableName = ""; /** - * Creates a new SlsaMetadata instance using the specified properties. + * Creates a new Hint instance using the specified properties. * @function create - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata=} [properties] Properties to set - * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata instance + * @param {grafeas.v1.AttestationNote.IHint=} [properties] Properties to set + * @returns {grafeas.v1.AttestationNote.Hint} Hint instance */ - SlsaMetadata.create = function create(properties) { - return new SlsaMetadata(properties); + Hint.create = function create(properties) { + return new Hint(properties); }; /** - * Encodes the specified SlsaMetadata message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. + * Encodes the specified Hint message. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. * @function encode - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata} message SlsaMetadata message or plain object to encode + * @param {grafeas.v1.AttestationNote.IHint} message Hint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SlsaMetadata.encode = function encode(message, writer) { + Hint.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.buildInvocationId != null && Object.hasOwnProperty.call(message, "buildInvocationId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildInvocationId); - if (message.buildStartedOn != null && Object.hasOwnProperty.call(message, "buildStartedOn")) - $root.google.protobuf.Timestamp.encode(message.buildStartedOn, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.buildFinishedOn != null && Object.hasOwnProperty.call(message, "buildFinishedOn")) - $root.google.protobuf.Timestamp.encode(message.buildFinishedOn, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.completeness != null && Object.hasOwnProperty.call(message, "completeness")) - $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.encode(message.completeness, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reproducible != null && Object.hasOwnProperty.call(message, "reproducible")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reproducible); + if (message.humanReadableName != null && Object.hasOwnProperty.call(message, "humanReadableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.humanReadableName); return writer; }; /** - * Encodes the specified SlsaMetadata message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. + * Encodes the specified Hint message, length delimited. Does not implicitly {@link grafeas.v1.AttestationNote.Hint.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata} message SlsaMetadata message or plain object to encode + * @param {grafeas.v1.AttestationNote.IHint} message Hint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SlsaMetadata.encodeDelimited = function encodeDelimited(message, writer) { + Hint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SlsaMetadata message from the specified reader or buffer. + * Decodes a Hint message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata + * @returns {grafeas.v1.AttestationNote.Hint} Hint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SlsaMetadata.decode = function decode(reader, length) { + Hint.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.SlsaProvenance.SlsaMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.AttestationNote.Hint(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.buildInvocationId = reader.string(); - break; - case 2: - message.buildStartedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.buildFinishedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.completeness = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.decode(reader, reader.uint32()); - break; - case 5: - message.reproducible = reader.bool(); + message.humanReadableName = reader.string(); break; default: reader.skipType(tag & 7); @@ -9786,605 +7603,771 @@ }; /** - * Decodes a SlsaMetadata message from the specified reader or buffer, length delimited. + * Decodes a Hint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata + * @returns {grafeas.v1.AttestationNote.Hint} Hint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SlsaMetadata.decodeDelimited = function decodeDelimited(reader) { + Hint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SlsaMetadata message. + * Verifies a Hint message. * @function verify - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SlsaMetadata.verify = function verify(message) { + Hint.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) - if (!$util.isString(message.buildInvocationId)) - return "buildInvocationId: string expected"; - if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) { - var error = $root.google.protobuf.Timestamp.verify(message.buildStartedOn); - if (error) - return "buildStartedOn." + error; - } - if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) { - var error = $root.google.protobuf.Timestamp.verify(message.buildFinishedOn); - if (error) - return "buildFinishedOn." + error; - } - if (message.completeness != null && message.hasOwnProperty("completeness")) { - var error = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.verify(message.completeness); - if (error) - return "completeness." + error; - } - if (message.reproducible != null && message.hasOwnProperty("reproducible")) - if (typeof message.reproducible !== "boolean") - return "reproducible: boolean expected"; + if (message.humanReadableName != null && message.hasOwnProperty("humanReadableName")) + if (!$util.isString(message.humanReadableName)) + return "humanReadableName: string expected"; return null; }; /** - * Creates a SlsaMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Hint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata + * @returns {grafeas.v1.AttestationNote.Hint} Hint */ - SlsaMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaMetadata) + Hint.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.AttestationNote.Hint) return object; - var message = new $root.grafeas.v1.SlsaProvenance.SlsaMetadata(); - if (object.buildInvocationId != null) - message.buildInvocationId = String(object.buildInvocationId); - if (object.buildStartedOn != null) { - if (typeof object.buildStartedOn !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.SlsaMetadata.buildStartedOn: object expected"); - message.buildStartedOn = $root.google.protobuf.Timestamp.fromObject(object.buildStartedOn); - } - if (object.buildFinishedOn != null) { - if (typeof object.buildFinishedOn !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.SlsaMetadata.buildFinishedOn: object expected"); - message.buildFinishedOn = $root.google.protobuf.Timestamp.fromObject(object.buildFinishedOn); - } - if (object.completeness != null) { - if (typeof object.completeness !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.SlsaMetadata.completeness: object expected"); - message.completeness = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.fromObject(object.completeness); - } - if (object.reproducible != null) - message.reproducible = Boolean(object.reproducible); + var message = new $root.grafeas.v1.AttestationNote.Hint(); + if (object.humanReadableName != null) + message.humanReadableName = String(object.humanReadableName); return message; }; /** - * Creates a plain object from a SlsaMetadata message. Also converts values to other types if specified. + * Creates a plain object from a Hint message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @static - * @param {grafeas.v1.SlsaProvenance.SlsaMetadata} message SlsaMetadata + * @param {grafeas.v1.AttestationNote.Hint} message Hint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SlsaMetadata.toObject = function toObject(message, options) { + Hint.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.buildInvocationId = ""; - object.buildStartedOn = null; - object.buildFinishedOn = null; - object.completeness = null; - object.reproducible = false; - } - if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) - object.buildInvocationId = message.buildInvocationId; - if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) - object.buildStartedOn = $root.google.protobuf.Timestamp.toObject(message.buildStartedOn, options); - if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) - object.buildFinishedOn = $root.google.protobuf.Timestamp.toObject(message.buildFinishedOn, options); - if (message.completeness != null && message.hasOwnProperty("completeness")) - object.completeness = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.toObject(message.completeness, options); - if (message.reproducible != null && message.hasOwnProperty("reproducible")) - object.reproducible = message.reproducible; + if (options.defaults) + object.humanReadableName = ""; + if (message.humanReadableName != null && message.hasOwnProperty("humanReadableName")) + object.humanReadableName = message.humanReadableName; return object; }; /** - * Converts this SlsaMetadata to JSON. + * Converts this Hint to JSON. * @function toJSON - * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @memberof grafeas.v1.AttestationNote.Hint * @instance * @returns {Object.} JSON object */ - SlsaMetadata.prototype.toJSON = function toJSON() { + Hint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SlsaMetadata; - })(); + return Hint; + })(); + + return AttestationNote; + })(); + + v1.Jwt = (function() { + + /** + * Properties of a Jwt. + * @memberof grafeas.v1 + * @interface IJwt + * @property {string|null} [compactJwt] Jwt compactJwt + */ + + /** + * Constructs a new Jwt. + * @memberof grafeas.v1 + * @classdesc Represents a Jwt. + * @implements IJwt + * @constructor + * @param {grafeas.v1.IJwt=} [properties] Properties to set + */ + function Jwt(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]]; + } + + /** + * Jwt compactJwt. + * @member {string} compactJwt + * @memberof grafeas.v1.Jwt + * @instance + */ + Jwt.prototype.compactJwt = ""; + + /** + * Creates a new Jwt instance using the specified properties. + * @function create + * @memberof grafeas.v1.Jwt + * @static + * @param {grafeas.v1.IJwt=} [properties] Properties to set + * @returns {grafeas.v1.Jwt} Jwt instance + */ + Jwt.create = function create(properties) { + return new Jwt(properties); + }; + + /** + * Encodes the specified Jwt message. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.Jwt + * @static + * @param {grafeas.v1.IJwt} message Jwt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Jwt.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compactJwt != null && Object.hasOwnProperty.call(message, "compactJwt")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.compactJwt); + return writer; + }; + + /** + * Encodes the specified Jwt message, length delimited. Does not implicitly {@link grafeas.v1.Jwt.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.Jwt + * @static + * @param {grafeas.v1.IJwt} message Jwt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Jwt.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Jwt message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.Jwt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.Jwt} Jwt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Jwt.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.Jwt(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.compactJwt = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Jwt message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.Jwt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.Jwt} Jwt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Jwt.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Jwt message. + * @function verify + * @memberof grafeas.v1.Jwt + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Jwt.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compactJwt != null && message.hasOwnProperty("compactJwt")) + if (!$util.isString(message.compactJwt)) + return "compactJwt: string expected"; + return null; + }; + + /** + * Creates a Jwt message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.Jwt + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.Jwt} Jwt + */ + Jwt.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Jwt) + return object; + var message = new $root.grafeas.v1.Jwt(); + if (object.compactJwt != null) + message.compactJwt = String(object.compactJwt); + return message; + }; + + /** + * Creates a plain object from a Jwt message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.Jwt + * @static + * @param {grafeas.v1.Jwt} message Jwt + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Jwt.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.compactJwt = ""; + if (message.compactJwt != null && message.hasOwnProperty("compactJwt")) + object.compactJwt = message.compactJwt; + return object; + }; + + /** + * Converts this Jwt to JSON. + * @function toJSON + * @memberof grafeas.v1.Jwt + * @instance + * @returns {Object.} JSON object + */ + Jwt.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - SlsaProvenance.SlsaBuilder = (function() { + return Jwt; + })(); - /** - * Properties of a SlsaBuilder. - * @memberof grafeas.v1.SlsaProvenance - * @interface ISlsaBuilder - * @property {string|null} [id] SlsaBuilder id - */ + v1.AttestationOccurrence = (function() { - /** - * Constructs a new SlsaBuilder. - * @memberof grafeas.v1.SlsaProvenance - * @classdesc Represents a SlsaBuilder. - * @implements ISlsaBuilder - * @constructor - * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder=} [properties] Properties to set - */ - function SlsaBuilder(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 an AttestationOccurrence. + * @memberof grafeas.v1 + * @interface IAttestationOccurrence + * @property {Uint8Array|null} [serializedPayload] AttestationOccurrence serializedPayload + * @property {Array.|null} [signatures] AttestationOccurrence signatures + * @property {Array.|null} [jwts] AttestationOccurrence jwts + */ - /** - * SlsaBuilder id. - * @member {string} id - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @instance - */ - SlsaBuilder.prototype.id = ""; + /** + * Constructs a new AttestationOccurrence. + * @memberof grafeas.v1 + * @classdesc Represents an AttestationOccurrence. + * @implements IAttestationOccurrence + * @constructor + * @param {grafeas.v1.IAttestationOccurrence=} [properties] Properties to set + */ + function AttestationOccurrence(properties) { + this.signatures = []; + this.jwts = []; + 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 SlsaBuilder instance using the specified properties. - * @function create - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder=} [properties] Properties to set - * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder instance - */ - SlsaBuilder.create = function create(properties) { - return new SlsaBuilder(properties); - }; + /** + * AttestationOccurrence serializedPayload. + * @member {Uint8Array} serializedPayload + * @memberof grafeas.v1.AttestationOccurrence + * @instance + */ + AttestationOccurrence.prototype.serializedPayload = $util.newBuffer([]); - /** - * Encodes the specified SlsaBuilder message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder} message SlsaBuilder message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SlsaBuilder.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - return writer; - }; + /** + * AttestationOccurrence signatures. + * @member {Array.} signatures + * @memberof grafeas.v1.AttestationOccurrence + * @instance + */ + AttestationOccurrence.prototype.signatures = $util.emptyArray; - /** - * Encodes the specified SlsaBuilder message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder} message SlsaBuilder message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SlsaBuilder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * AttestationOccurrence jwts. + * @member {Array.} jwts + * @memberof grafeas.v1.AttestationOccurrence + * @instance + */ + AttestationOccurrence.prototype.jwts = $util.emptyArray; - /** - * Decodes a SlsaBuilder message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SlsaBuilder.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.SlsaProvenance.SlsaBuilder(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new AttestationOccurrence instance using the specified properties. + * @function create + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {grafeas.v1.IAttestationOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.AttestationOccurrence} AttestationOccurrence instance + */ + AttestationOccurrence.create = function create(properties) { + return new AttestationOccurrence(properties); + }; - /** - * Decodes a SlsaBuilder message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SlsaBuilder.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified AttestationOccurrence message. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {grafeas.v1.IAttestationOccurrence} message AttestationOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttestationOccurrence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serializedPayload != null && Object.hasOwnProperty.call(message, "serializedPayload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.serializedPayload); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.grafeas.v1.Signature.encode(message.signatures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jwts != null && message.jwts.length) + for (var i = 0; i < message.jwts.length; ++i) + $root.grafeas.v1.Jwt.encode(message.jwts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Verifies a SlsaBuilder message. - * @function verify - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SlsaBuilder.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; + /** + * Encodes the specified AttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.AttestationOccurrence.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {grafeas.v1.IAttestationOccurrence} message AttestationOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttestationOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a SlsaBuilder message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder - */ - SlsaBuilder.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaBuilder) - return object; - var message = new $root.grafeas.v1.SlsaProvenance.SlsaBuilder(); - if (object.id != null) - message.id = String(object.id); - return message; - }; + /** + * Decodes an AttestationOccurrence message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.AttestationOccurrence} AttestationOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttestationOccurrence.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.AttestationOccurrence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serializedPayload = reader.bytes(); + break; + case 2: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.grafeas.v1.Signature.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.jwts && message.jwts.length)) + message.jwts = []; + message.jwts.push($root.grafeas.v1.Jwt.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a SlsaBuilder message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @static - * @param {grafeas.v1.SlsaProvenance.SlsaBuilder} message SlsaBuilder - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SlsaBuilder.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.id = ""; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - return object; - }; + /** + * Decodes an AttestationOccurrence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.AttestationOccurrence} AttestationOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttestationOccurrence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this SlsaBuilder to JSON. - * @function toJSON - * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder - * @instance - * @returns {Object.} JSON object - */ - SlsaBuilder.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an AttestationOccurrence message. + * @function verify + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttestationOccurrence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serializedPayload != null && message.hasOwnProperty("serializedPayload")) + if (!(message.serializedPayload && typeof message.serializedPayload.length === "number" || $util.isString(message.serializedPayload))) + return "serializedPayload: buffer expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.grafeas.v1.Signature.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + if (message.jwts != null && message.hasOwnProperty("jwts")) { + if (!Array.isArray(message.jwts)) + return "jwts: array expected"; + for (var i = 0; i < message.jwts.length; ++i) { + var error = $root.grafeas.v1.Jwt.verify(message.jwts[i]); + if (error) + return "jwts." + error; + } + } + return null; + }; - return SlsaBuilder; - })(); + /** + * Creates an AttestationOccurrence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.AttestationOccurrence} AttestationOccurrence + */ + AttestationOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.AttestationOccurrence) + return object; + var message = new $root.grafeas.v1.AttestationOccurrence(); + if (object.serializedPayload != null) + if (typeof object.serializedPayload === "string") + $util.base64.decode(object.serializedPayload, message.serializedPayload = $util.newBuffer($util.base64.length(object.serializedPayload)), 0); + else if (object.serializedPayload.length) + message.serializedPayload = object.serializedPayload; + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".grafeas.v1.AttestationOccurrence.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".grafeas.v1.AttestationOccurrence.signatures: object expected"); + message.signatures[i] = $root.grafeas.v1.Signature.fromObject(object.signatures[i]); + } + } + if (object.jwts) { + if (!Array.isArray(object.jwts)) + throw TypeError(".grafeas.v1.AttestationOccurrence.jwts: array expected"); + message.jwts = []; + for (var i = 0; i < object.jwts.length; ++i) { + if (typeof object.jwts[i] !== "object") + throw TypeError(".grafeas.v1.AttestationOccurrence.jwts: object expected"); + message.jwts[i] = $root.grafeas.v1.Jwt.fromObject(object.jwts[i]); + } + } + return message; + }; - SlsaProvenance.Material = (function() { + /** + * Creates a plain object from an AttestationOccurrence message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.AttestationOccurrence + * @static + * @param {grafeas.v1.AttestationOccurrence} message AttestationOccurrence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttestationOccurrence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.signatures = []; + object.jwts = []; + } + if (options.defaults) + if (options.bytes === String) + object.serializedPayload = ""; + else { + object.serializedPayload = []; + if (options.bytes !== Array) + object.serializedPayload = $util.newBuffer(object.serializedPayload); + } + if (message.serializedPayload != null && message.hasOwnProperty("serializedPayload")) + object.serializedPayload = options.bytes === String ? $util.base64.encode(message.serializedPayload, 0, message.serializedPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.serializedPayload) : message.serializedPayload; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.grafeas.v1.Signature.toObject(message.signatures[j], options); + } + if (message.jwts && message.jwts.length) { + object.jwts = []; + for (var j = 0; j < message.jwts.length; ++j) + object.jwts[j] = $root.grafeas.v1.Jwt.toObject(message.jwts[j], options); + } + return object; + }; - /** - * Properties of a Material. - * @memberof grafeas.v1.SlsaProvenance - * @interface IMaterial - * @property {string|null} [uri] Material uri - * @property {Object.|null} [digest] Material digest - */ + /** + * Converts this AttestationOccurrence to JSON. + * @function toJSON + * @memberof grafeas.v1.AttestationOccurrence + * @instance + * @returns {Object.} JSON object + */ + AttestationOccurrence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Material. - * @memberof grafeas.v1.SlsaProvenance - * @classdesc Represents a Material. - * @implements IMaterial - * @constructor - * @param {grafeas.v1.SlsaProvenance.IMaterial=} [properties] Properties to set - */ - function Material(properties) { - this.digest = {}; - 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]]; - } + return AttestationOccurrence; + })(); - /** - * Material uri. - * @member {string} uri - * @memberof grafeas.v1.SlsaProvenance.Material - * @instance - */ - Material.prototype.uri = ""; + v1.BuildNote = (function() { - /** - * Material digest. - * @member {Object.} digest - * @memberof grafeas.v1.SlsaProvenance.Material - * @instance - */ - Material.prototype.digest = $util.emptyObject; + /** + * Properties of a BuildNote. + * @memberof grafeas.v1 + * @interface IBuildNote + * @property {string|null} [builderVersion] BuildNote builderVersion + */ - /** - * Creates a new Material instance using the specified properties. - * @function create - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {grafeas.v1.SlsaProvenance.IMaterial=} [properties] Properties to set - * @returns {grafeas.v1.SlsaProvenance.Material} Material instance - */ - Material.create = function create(properties) { - return new Material(properties); - }; + /** + * Constructs a new BuildNote. + * @memberof grafeas.v1 + * @classdesc Represents a BuildNote. + * @implements IBuildNote + * @constructor + * @param {grafeas.v1.IBuildNote=} [properties] Properties to set + */ + function BuildNote(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 Material message. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {grafeas.v1.SlsaProvenance.IMaterial} message Material message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Material.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) - for (var keys = Object.keys(message.digest), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.digest[keys[i]]).ldelim(); - return writer; - }; + /** + * BuildNote builderVersion. + * @member {string} builderVersion + * @memberof grafeas.v1.BuildNote + * @instance + */ + BuildNote.prototype.builderVersion = ""; - /** - * Encodes the specified Material message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {grafeas.v1.SlsaProvenance.IMaterial} message Material message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Material.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new BuildNote instance using the specified properties. + * @function create + * @memberof grafeas.v1.BuildNote + * @static + * @param {grafeas.v1.IBuildNote=} [properties] Properties to set + * @returns {grafeas.v1.BuildNote} BuildNote instance + */ + BuildNote.create = function create(properties) { + return new BuildNote(properties); + }; - /** - * Decodes a Material message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.SlsaProvenance.Material} Material - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Material.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.SlsaProvenance.Material(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - case 2: - if (message.digest === $util.emptyObject) - message.digest = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.digest[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified BuildNote message. Does not implicitly {@link grafeas.v1.BuildNote.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.BuildNote + * @static + * @param {grafeas.v1.IBuildNote} message BuildNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildNote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.builderVersion != null && Object.hasOwnProperty.call(message, "builderVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.builderVersion); + return writer; + }; - /** - * Decodes a Material message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.SlsaProvenance.Material} Material - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Material.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified BuildNote message, length delimited. Does not implicitly {@link grafeas.v1.BuildNote.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.BuildNote + * @static + * @param {grafeas.v1.IBuildNote} message BuildNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildNote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a Material message. - * @function verify - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Material.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.digest != null && message.hasOwnProperty("digest")) { - if (!$util.isObject(message.digest)) - return "digest: object expected"; - var key = Object.keys(message.digest); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.digest[key[i]])) - return "digest: string{k:string} expected"; + /** + * Decodes a BuildNote message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.BuildNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.BuildNote} BuildNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildNote.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.BuildNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.builderVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a Material message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.SlsaProvenance.Material} Material - */ - Material.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.SlsaProvenance.Material) - return object; - var message = new $root.grafeas.v1.SlsaProvenance.Material(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.digest) { - if (typeof object.digest !== "object") - throw TypeError(".grafeas.v1.SlsaProvenance.Material.digest: object expected"); - message.digest = {}; - for (var keys = Object.keys(object.digest), i = 0; i < keys.length; ++i) - message.digest[keys[i]] = String(object.digest[keys[i]]); - } - return message; - }; + /** + * Decodes a BuildNote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.BuildNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.BuildNote} BuildNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildNote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Material message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.SlsaProvenance.Material - * @static - * @param {grafeas.v1.SlsaProvenance.Material} message Material - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Material.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.digest = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - var keys2; - if (message.digest && (keys2 = Object.keys(message.digest)).length) { - object.digest = {}; - for (var j = 0; j < keys2.length; ++j) - object.digest[keys2[j]] = message.digest[keys2[j]]; - } + /** + * Verifies a BuildNote message. + * @function verify + * @memberof grafeas.v1.BuildNote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildNote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) + if (!$util.isString(message.builderVersion)) + return "builderVersion: string expected"; + return null; + }; + + /** + * Creates a BuildNote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.BuildNote + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.BuildNote} BuildNote + */ + BuildNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BuildNote) return object; - }; + var message = new $root.grafeas.v1.BuildNote(); + if (object.builderVersion != null) + message.builderVersion = String(object.builderVersion); + return message; + }; - /** - * Converts this Material to JSON. - * @function toJSON - * @memberof grafeas.v1.SlsaProvenance.Material - * @instance - * @returns {Object.} JSON object - */ - Material.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a BuildNote message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.BuildNote + * @static + * @param {grafeas.v1.BuildNote} message BuildNote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildNote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.builderVersion = ""; + if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) + object.builderVersion = message.builderVersion; + return object; + }; - return Material; - })(); + /** + * Converts this BuildNote to JSON. + * @function toJSON + * @memberof grafeas.v1.BuildNote + * @instance + * @returns {Object.} JSON object + */ + BuildNote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SlsaProvenance; + return BuildNote; })(); - v1.BuildProvenance = (function() { + v1.BuildOccurrence = (function() { /** - * Properties of a BuildProvenance. + * Properties of a BuildOccurrence. * @memberof grafeas.v1 - * @interface IBuildProvenance - * @property {string|null} [id] BuildProvenance id - * @property {string|null} [projectId] BuildProvenance projectId - * @property {Array.|null} [commands] BuildProvenance commands - * @property {Array.|null} [builtArtifacts] BuildProvenance builtArtifacts - * @property {google.protobuf.ITimestamp|null} [createTime] BuildProvenance createTime - * @property {google.protobuf.ITimestamp|null} [startTime] BuildProvenance startTime - * @property {google.protobuf.ITimestamp|null} [endTime] BuildProvenance endTime - * @property {string|null} [creator] BuildProvenance creator - * @property {string|null} [logsUri] BuildProvenance logsUri - * @property {grafeas.v1.ISource|null} [sourceProvenance] BuildProvenance sourceProvenance - * @property {string|null} [triggerId] BuildProvenance triggerId - * @property {Object.|null} [buildOptions] BuildProvenance buildOptions - * @property {string|null} [builderVersion] BuildProvenance builderVersion + * @interface IBuildOccurrence + * @property {grafeas.v1.IBuildProvenance|null} [provenance] BuildOccurrence provenance + * @property {string|null} [provenanceBytes] BuildOccurrence provenanceBytes + * @property {grafeas.v1.IInTotoProvenance|null} [intotoProvenance] BuildOccurrence intotoProvenance + * @property {grafeas.v1.IInTotoStatement|null} [intotoStatement] BuildOccurrence intotoStatement */ /** - * Constructs a new BuildProvenance. + * Constructs a new BuildOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a BuildProvenance. - * @implements IBuildProvenance + * @classdesc Represents a BuildOccurrence. + * @implements IBuildOccurrence * @constructor - * @param {grafeas.v1.IBuildProvenance=} [properties] Properties to set + * @param {grafeas.v1.IBuildOccurrence=} [properties] Properties to set */ - function BuildProvenance(properties) { - this.commands = []; - this.builtArtifacts = []; - this.buildOptions = {}; + function BuildOccurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10392,257 +8375,405 @@ } /** - * BuildProvenance id. - * @member {string} id - * @memberof grafeas.v1.BuildProvenance + * BuildOccurrence provenance. + * @member {grafeas.v1.IBuildProvenance|null|undefined} provenance + * @memberof grafeas.v1.BuildOccurrence * @instance */ - BuildProvenance.prototype.id = ""; + BuildOccurrence.prototype.provenance = null; + + /** + * BuildOccurrence provenanceBytes. + * @member {string} provenanceBytes + * @memberof grafeas.v1.BuildOccurrence + * @instance + */ + BuildOccurrence.prototype.provenanceBytes = ""; + + /** + * BuildOccurrence intotoProvenance. + * @member {grafeas.v1.IInTotoProvenance|null|undefined} intotoProvenance + * @memberof grafeas.v1.BuildOccurrence + * @instance + */ + BuildOccurrence.prototype.intotoProvenance = null; + + /** + * BuildOccurrence intotoStatement. + * @member {grafeas.v1.IInTotoStatement|null|undefined} intotoStatement + * @memberof grafeas.v1.BuildOccurrence + * @instance + */ + BuildOccurrence.prototype.intotoStatement = null; + + /** + * Creates a new BuildOccurrence instance using the specified properties. + * @function create + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {grafeas.v1.IBuildOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.BuildOccurrence} BuildOccurrence instance + */ + BuildOccurrence.create = function create(properties) { + return new BuildOccurrence(properties); + }; + + /** + * Encodes the specified BuildOccurrence message. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {grafeas.v1.IBuildOccurrence} message BuildOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOccurrence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance")) + $root.grafeas.v1.BuildProvenance.encode(message.provenance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.provenanceBytes != null && Object.hasOwnProperty.call(message, "provenanceBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.provenanceBytes); + if (message.intotoProvenance != null && Object.hasOwnProperty.call(message, "intotoProvenance")) + $root.grafeas.v1.InTotoProvenance.encode(message.intotoProvenance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.intotoStatement != null && Object.hasOwnProperty.call(message, "intotoStatement")) + $root.grafeas.v1.InTotoStatement.encode(message.intotoStatement, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BuildOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.BuildOccurrence.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {grafeas.v1.IBuildOccurrence} message BuildOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildOccurrence message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.BuildOccurrence} BuildOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildOccurrence.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.BuildOccurrence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.provenance = $root.grafeas.v1.BuildProvenance.decode(reader, reader.uint32()); + break; + case 2: + message.provenanceBytes = reader.string(); + break; + case 3: + message.intotoProvenance = $root.grafeas.v1.InTotoProvenance.decode(reader, reader.uint32()); + break; + case 4: + message.intotoStatement = $root.grafeas.v1.InTotoStatement.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * BuildProvenance projectId. - * @member {string} projectId - * @memberof grafeas.v1.BuildProvenance - * @instance + * Decodes a BuildOccurrence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.BuildOccurrence} BuildOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildProvenance.prototype.projectId = ""; + BuildOccurrence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * BuildProvenance commands. - * @member {Array.} commands - * @memberof grafeas.v1.BuildProvenance - * @instance + * Verifies a BuildOccurrence message. + * @function verify + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildProvenance.prototype.commands = $util.emptyArray; + BuildOccurrence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.provenance != null && message.hasOwnProperty("provenance")) { + var error = $root.grafeas.v1.BuildProvenance.verify(message.provenance); + if (error) + return "provenance." + error; + } + if (message.provenanceBytes != null && message.hasOwnProperty("provenanceBytes")) + if (!$util.isString(message.provenanceBytes)) + return "provenanceBytes: string expected"; + if (message.intotoProvenance != null && message.hasOwnProperty("intotoProvenance")) { + var error = $root.grafeas.v1.InTotoProvenance.verify(message.intotoProvenance); + if (error) + return "intotoProvenance." + error; + } + if (message.intotoStatement != null && message.hasOwnProperty("intotoStatement")) { + var error = $root.grafeas.v1.InTotoStatement.verify(message.intotoStatement); + if (error) + return "intotoStatement." + error; + } + return null; + }; /** - * BuildProvenance builtArtifacts. - * @member {Array.} builtArtifacts - * @memberof grafeas.v1.BuildProvenance - * @instance + * Creates a BuildOccurrence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.BuildOccurrence} BuildOccurrence */ - BuildProvenance.prototype.builtArtifacts = $util.emptyArray; + BuildOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BuildOccurrence) + return object; + var message = new $root.grafeas.v1.BuildOccurrence(); + if (object.provenance != null) { + if (typeof object.provenance !== "object") + throw TypeError(".grafeas.v1.BuildOccurrence.provenance: object expected"); + message.provenance = $root.grafeas.v1.BuildProvenance.fromObject(object.provenance); + } + if (object.provenanceBytes != null) + message.provenanceBytes = String(object.provenanceBytes); + if (object.intotoProvenance != null) { + if (typeof object.intotoProvenance !== "object") + throw TypeError(".grafeas.v1.BuildOccurrence.intotoProvenance: object expected"); + message.intotoProvenance = $root.grafeas.v1.InTotoProvenance.fromObject(object.intotoProvenance); + } + if (object.intotoStatement != null) { + if (typeof object.intotoStatement !== "object") + throw TypeError(".grafeas.v1.BuildOccurrence.intotoStatement: object expected"); + message.intotoStatement = $root.grafeas.v1.InTotoStatement.fromObject(object.intotoStatement); + } + return message; + }; /** - * BuildProvenance createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof grafeas.v1.BuildProvenance - * @instance + * Creates a plain object from a BuildOccurrence message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.BuildOccurrence + * @static + * @param {grafeas.v1.BuildOccurrence} message BuildOccurrence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - BuildProvenance.prototype.createTime = null; + BuildOccurrence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.provenance = null; + object.provenanceBytes = ""; + object.intotoProvenance = null; + object.intotoStatement = null; + } + if (message.provenance != null && message.hasOwnProperty("provenance")) + object.provenance = $root.grafeas.v1.BuildProvenance.toObject(message.provenance, options); + if (message.provenanceBytes != null && message.hasOwnProperty("provenanceBytes")) + object.provenanceBytes = message.provenanceBytes; + if (message.intotoProvenance != null && message.hasOwnProperty("intotoProvenance")) + object.intotoProvenance = $root.grafeas.v1.InTotoProvenance.toObject(message.intotoProvenance, options); + if (message.intotoStatement != null && message.hasOwnProperty("intotoStatement")) + object.intotoStatement = $root.grafeas.v1.InTotoStatement.toObject(message.intotoStatement, options); + return object; + }; /** - * BuildProvenance startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof grafeas.v1.BuildProvenance + * Converts this BuildOccurrence to JSON. + * @function toJSON + * @memberof grafeas.v1.BuildOccurrence * @instance + * @returns {Object.} JSON object */ - BuildProvenance.prototype.startTime = null; + BuildOccurrence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BuildOccurrence; + })(); + + v1.Recipe = (function() { /** - * BuildProvenance endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof grafeas.v1.BuildProvenance - * @instance + * Properties of a Recipe. + * @memberof grafeas.v1 + * @interface IRecipe + * @property {string|null} [type] Recipe type + * @property {number|Long|null} [definedInMaterial] Recipe definedInMaterial + * @property {string|null} [entryPoint] Recipe entryPoint + * @property {Array.|null} ["arguments"] Recipe arguments + * @property {Array.|null} [environment] Recipe environment */ - BuildProvenance.prototype.endTime = null; /** - * BuildProvenance creator. - * @member {string} creator - * @memberof grafeas.v1.BuildProvenance - * @instance + * Constructs a new Recipe. + * @memberof grafeas.v1 + * @classdesc Represents a Recipe. + * @implements IRecipe + * @constructor + * @param {grafeas.v1.IRecipe=} [properties] Properties to set */ - BuildProvenance.prototype.creator = ""; + function Recipe(properties) { + this["arguments"] = []; + this.environment = []; + 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]]; + } /** - * BuildProvenance logsUri. - * @member {string} logsUri - * @memberof grafeas.v1.BuildProvenance + * Recipe type. + * @member {string} type + * @memberof grafeas.v1.Recipe * @instance */ - BuildProvenance.prototype.logsUri = ""; + Recipe.prototype.type = ""; /** - * BuildProvenance sourceProvenance. - * @member {grafeas.v1.ISource|null|undefined} sourceProvenance - * @memberof grafeas.v1.BuildProvenance + * Recipe definedInMaterial. + * @member {number|Long} definedInMaterial + * @memberof grafeas.v1.Recipe * @instance */ - BuildProvenance.prototype.sourceProvenance = null; + Recipe.prototype.definedInMaterial = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * BuildProvenance triggerId. - * @member {string} triggerId - * @memberof grafeas.v1.BuildProvenance + * Recipe entryPoint. + * @member {string} entryPoint + * @memberof grafeas.v1.Recipe * @instance */ - BuildProvenance.prototype.triggerId = ""; + Recipe.prototype.entryPoint = ""; /** - * BuildProvenance buildOptions. - * @member {Object.} buildOptions - * @memberof grafeas.v1.BuildProvenance + * Recipe arguments. + * @member {Array.} arguments + * @memberof grafeas.v1.Recipe * @instance */ - BuildProvenance.prototype.buildOptions = $util.emptyObject; + Recipe.prototype["arguments"] = $util.emptyArray; /** - * BuildProvenance builderVersion. - * @member {string} builderVersion - * @memberof grafeas.v1.BuildProvenance + * Recipe environment. + * @member {Array.} environment + * @memberof grafeas.v1.Recipe * @instance */ - BuildProvenance.prototype.builderVersion = ""; + Recipe.prototype.environment = $util.emptyArray; /** - * Creates a new BuildProvenance instance using the specified properties. + * Creates a new Recipe instance using the specified properties. * @function create - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static - * @param {grafeas.v1.IBuildProvenance=} [properties] Properties to set - * @returns {grafeas.v1.BuildProvenance} BuildProvenance instance + * @param {grafeas.v1.IRecipe=} [properties] Properties to set + * @returns {grafeas.v1.Recipe} Recipe instance */ - BuildProvenance.create = function create(properties) { - return new BuildProvenance(properties); + Recipe.create = function create(properties) { + return new Recipe(properties); }; /** - * Encodes the specified BuildProvenance message. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. + * Encodes the specified Recipe message. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static - * @param {grafeas.v1.IBuildProvenance} message BuildProvenance message or plain object to encode + * @param {grafeas.v1.IRecipe} message Recipe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildProvenance.encode = function encode(message, writer) { + Recipe.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); - if (message.commands != null && message.commands.length) - for (var i = 0; i < message.commands.length; ++i) - $root.grafeas.v1.Command.encode(message.commands[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.builtArtifacts != null && message.builtArtifacts.length) - for (var i = 0; i < message.builtArtifacts.length; ++i) - $root.grafeas.v1.Artifact.encode(message.builtArtifacts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.creator); - if (message.logsUri != null && Object.hasOwnProperty.call(message, "logsUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.logsUri); - if (message.sourceProvenance != null && Object.hasOwnProperty.call(message, "sourceProvenance")) - $root.grafeas.v1.Source.encode(message.sourceProvenance, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerId); - if (message.buildOptions != null && Object.hasOwnProperty.call(message, "buildOptions")) - for (var keys = Object.keys(message.buildOptions), i = 0; i < keys.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.buildOptions[keys[i]]).ldelim(); - if (message.builderVersion != null && Object.hasOwnProperty.call(message, "builderVersion")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.builderVersion); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.definedInMaterial != null && Object.hasOwnProperty.call(message, "definedInMaterial")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.definedInMaterial); + if (message.entryPoint != null && Object.hasOwnProperty.call(message, "entryPoint")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryPoint); + if (message["arguments"] != null && message["arguments"].length) + for (var i = 0; i < message["arguments"].length; ++i) + $root.google.protobuf.Any.encode(message["arguments"][i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.environment != null && message.environment.length) + for (var i = 0; i < message.environment.length; ++i) + $root.google.protobuf.Any.encode(message.environment[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified BuildProvenance message, length delimited. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. + * Encodes the specified Recipe message, length delimited. Does not implicitly {@link grafeas.v1.Recipe.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static - * @param {grafeas.v1.IBuildProvenance} message BuildProvenance message or plain object to encode + * @param {grafeas.v1.IRecipe} message Recipe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildProvenance.encodeDelimited = function encodeDelimited(message, writer) { + Recipe.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildProvenance message from the specified reader or buffer. + * Decodes a Recipe message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.BuildProvenance} BuildProvenance + * @returns {grafeas.v1.Recipe} Recipe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildProvenance.decode = function decode(reader, length) { + Recipe.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.BuildProvenance(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Recipe(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.type = reader.string(); break; case 2: - message.projectId = reader.string(); + message.definedInMaterial = reader.int64(); break; case 3: - if (!(message.commands && message.commands.length)) - message.commands = []; - message.commands.push($root.grafeas.v1.Command.decode(reader, reader.uint32())); + message.entryPoint = reader.string(); break; case 4: - if (!(message.builtArtifacts && message.builtArtifacts.length)) - message.builtArtifacts = []; - message.builtArtifacts.push($root.grafeas.v1.Artifact.decode(reader, reader.uint32())); + if (!(message["arguments"] && message["arguments"].length)) + message["arguments"] = []; + message["arguments"].push($root.google.protobuf.Any.decode(reader, reader.uint32())); break; case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.creator = reader.string(); - break; - case 9: - message.logsUri = reader.string(); - break; - case 10: - message.sourceProvenance = $root.grafeas.v1.Source.decode(reader, reader.uint32()); - break; - case 11: - message.triggerId = reader.string(); - break; - case 12: - if (message.buildOptions === $util.emptyObject) - message.buildOptions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.buildOptions[key] = value; - break; - case 13: - message.builderVersion = reader.string(); + if (!(message.environment && message.environment.length)) + message.environment = []; + message.environment.push($root.google.protobuf.Any.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -10653,280 +8784,192 @@ }; /** - * Decodes a BuildProvenance message from the specified reader or buffer, length delimited. + * Decodes a Recipe message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BuildProvenance} BuildProvenance + * @returns {grafeas.v1.Recipe} Recipe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildProvenance.decodeDelimited = function decodeDelimited(reader) { + Recipe.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildProvenance message. + * Verifies a Recipe message. * @function verify - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildProvenance.verify = function verify(message) { + Recipe.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.commands != null && message.hasOwnProperty("commands")) { - if (!Array.isArray(message.commands)) - return "commands: array expected"; - for (var i = 0; i < message.commands.length; ++i) { - var error = $root.grafeas.v1.Command.verify(message.commands[i]); + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) + if (!$util.isInteger(message.definedInMaterial) && !(message.definedInMaterial && $util.isInteger(message.definedInMaterial.low) && $util.isInteger(message.definedInMaterial.high))) + return "definedInMaterial: integer|Long expected"; + if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) + if (!$util.isString(message.entryPoint)) + return "entryPoint: string expected"; + if (message["arguments"] != null && message.hasOwnProperty("arguments")) { + if (!Array.isArray(message["arguments"])) + return "arguments: array expected"; + for (var i = 0; i < message["arguments"].length; ++i) { + var error = $root.google.protobuf.Any.verify(message["arguments"][i]); if (error) - return "commands." + error; + return "arguments." + error; } } - if (message.builtArtifacts != null && message.hasOwnProperty("builtArtifacts")) { - if (!Array.isArray(message.builtArtifacts)) - return "builtArtifacts: array expected"; - for (var i = 0; i < message.builtArtifacts.length; ++i) { - var error = $root.grafeas.v1.Artifact.verify(message.builtArtifacts[i]); + if (message.environment != null && message.hasOwnProperty("environment")) { + if (!Array.isArray(message.environment)) + return "environment: array expected"; + for (var i = 0; i < message.environment.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.environment[i]); if (error) - return "builtArtifacts." + error; + return "environment." + error; } } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.logsUri != null && message.hasOwnProperty("logsUri")) - if (!$util.isString(message.logsUri)) - return "logsUri: string expected"; - if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) { - var error = $root.grafeas.v1.Source.verify(message.sourceProvenance); - if (error) - return "sourceProvenance." + error; - } - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - if (!$util.isString(message.triggerId)) - return "triggerId: string expected"; - if (message.buildOptions != null && message.hasOwnProperty("buildOptions")) { - if (!$util.isObject(message.buildOptions)) - return "buildOptions: object expected"; - var key = Object.keys(message.buildOptions); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.buildOptions[key[i]])) - return "buildOptions: string{k:string} expected"; - } - if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) - if (!$util.isString(message.builderVersion)) - return "builderVersion: string expected"; return null; }; /** - * Creates a BuildProvenance message from a plain object. Also converts values to their respective internal types. + * Creates a Recipe message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BuildProvenance} BuildProvenance + * @returns {grafeas.v1.Recipe} Recipe */ - BuildProvenance.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BuildProvenance) + Recipe.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Recipe) return object; - var message = new $root.grafeas.v1.BuildProvenance(); - if (object.id != null) - message.id = String(object.id); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.commands) { - if (!Array.isArray(object.commands)) - throw TypeError(".grafeas.v1.BuildProvenance.commands: array expected"); - message.commands = []; - for (var i = 0; i < object.commands.length; ++i) { - if (typeof object.commands[i] !== "object") - throw TypeError(".grafeas.v1.BuildProvenance.commands: object expected"); - message.commands[i] = $root.grafeas.v1.Command.fromObject(object.commands[i]); - } - } - if (object.builtArtifacts) { - if (!Array.isArray(object.builtArtifacts)) - throw TypeError(".grafeas.v1.BuildProvenance.builtArtifacts: array expected"); - message.builtArtifacts = []; - for (var i = 0; i < object.builtArtifacts.length; ++i) { - if (typeof object.builtArtifacts[i] !== "object") - throw TypeError(".grafeas.v1.BuildProvenance.builtArtifacts: object expected"); - message.builtArtifacts[i] = $root.grafeas.v1.Artifact.fromObject(object.builtArtifacts[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".grafeas.v1.BuildProvenance.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".grafeas.v1.BuildProvenance.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".grafeas.v1.BuildProvenance.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.creator != null) - message.creator = String(object.creator); - if (object.logsUri != null) - message.logsUri = String(object.logsUri); - if (object.sourceProvenance != null) { - if (typeof object.sourceProvenance !== "object") - throw TypeError(".grafeas.v1.BuildProvenance.sourceProvenance: object expected"); - message.sourceProvenance = $root.grafeas.v1.Source.fromObject(object.sourceProvenance); + var message = new $root.grafeas.v1.Recipe(); + if (object.type != null) + message.type = String(object.type); + if (object.definedInMaterial != null) + if ($util.Long) + (message.definedInMaterial = $util.Long.fromValue(object.definedInMaterial)).unsigned = false; + else if (typeof object.definedInMaterial === "string") + message.definedInMaterial = parseInt(object.definedInMaterial, 10); + else if (typeof object.definedInMaterial === "number") + message.definedInMaterial = object.definedInMaterial; + else if (typeof object.definedInMaterial === "object") + message.definedInMaterial = new $util.LongBits(object.definedInMaterial.low >>> 0, object.definedInMaterial.high >>> 0).toNumber(); + if (object.entryPoint != null) + message.entryPoint = String(object.entryPoint); + if (object["arguments"]) { + if (!Array.isArray(object["arguments"])) + throw TypeError(".grafeas.v1.Recipe.arguments: array expected"); + message["arguments"] = []; + for (var i = 0; i < object["arguments"].length; ++i) { + if (typeof object["arguments"][i] !== "object") + throw TypeError(".grafeas.v1.Recipe.arguments: object expected"); + message["arguments"][i] = $root.google.protobuf.Any.fromObject(object["arguments"][i]); + } } - if (object.triggerId != null) - message.triggerId = String(object.triggerId); - if (object.buildOptions) { - if (typeof object.buildOptions !== "object") - throw TypeError(".grafeas.v1.BuildProvenance.buildOptions: object expected"); - message.buildOptions = {}; - for (var keys = Object.keys(object.buildOptions), i = 0; i < keys.length; ++i) - message.buildOptions[keys[i]] = String(object.buildOptions[keys[i]]); + if (object.environment) { + if (!Array.isArray(object.environment)) + throw TypeError(".grafeas.v1.Recipe.environment: array expected"); + message.environment = []; + for (var i = 0; i < object.environment.length; ++i) { + if (typeof object.environment[i] !== "object") + throw TypeError(".grafeas.v1.Recipe.environment: object expected"); + message.environment[i] = $root.google.protobuf.Any.fromObject(object.environment[i]); + } } - if (object.builderVersion != null) - message.builderVersion = String(object.builderVersion); return message; }; /** - * Creates a plain object from a BuildProvenance message. Also converts values to other types if specified. + * Creates a plain object from a Recipe message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @static - * @param {grafeas.v1.BuildProvenance} message BuildProvenance + * @param {grafeas.v1.Recipe} message Recipe * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildProvenance.toObject = function toObject(message, options) { + Recipe.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.commands = []; - object.builtArtifacts = []; + object["arguments"] = []; + object.environment = []; } - if (options.objects || options.defaults) - object.buildOptions = {}; if (options.defaults) { - object.id = ""; - object.projectId = ""; - object.createTime = null; - object.startTime = null; - object.endTime = null; - object.creator = ""; - object.logsUri = ""; - object.sourceProvenance = null; - object.triggerId = ""; - object.builderVersion = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.commands && message.commands.length) { - object.commands = []; - for (var j = 0; j < message.commands.length; ++j) - object.commands[j] = $root.grafeas.v1.Command.toObject(message.commands[j], options); + object.type = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.definedInMaterial = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.definedInMaterial = options.longs === String ? "0" : 0; + object.entryPoint = ""; } - if (message.builtArtifacts && message.builtArtifacts.length) { - object.builtArtifacts = []; - for (var j = 0; j < message.builtArtifacts.length; ++j) - object.builtArtifacts[j] = $root.grafeas.v1.Artifact.toObject(message.builtArtifacts[j], options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) + if (typeof message.definedInMaterial === "number") + object.definedInMaterial = options.longs === String ? String(message.definedInMaterial) : message.definedInMaterial; + else + object.definedInMaterial = options.longs === String ? $util.Long.prototype.toString.call(message.definedInMaterial) : options.longs === Number ? new $util.LongBits(message.definedInMaterial.low >>> 0, message.definedInMaterial.high >>> 0).toNumber() : message.definedInMaterial; + if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) + object.entryPoint = message.entryPoint; + if (message["arguments"] && message["arguments"].length) { + object["arguments"] = []; + for (var j = 0; j < message["arguments"].length; ++j) + object["arguments"][j] = $root.google.protobuf.Any.toObject(message["arguments"][j], options); } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.logsUri != null && message.hasOwnProperty("logsUri")) - object.logsUri = message.logsUri; - if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) - object.sourceProvenance = $root.grafeas.v1.Source.toObject(message.sourceProvenance, options); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - object.triggerId = message.triggerId; - var keys2; - if (message.buildOptions && (keys2 = Object.keys(message.buildOptions)).length) { - object.buildOptions = {}; - for (var j = 0; j < keys2.length; ++j) - object.buildOptions[keys2[j]] = message.buildOptions[keys2[j]]; + if (message.environment && message.environment.length) { + object.environment = []; + for (var j = 0; j < message.environment.length; ++j) + object.environment[j] = $root.google.protobuf.Any.toObject(message.environment[j], options); } - if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) - object.builderVersion = message.builderVersion; return object; }; /** - * Converts this BuildProvenance to JSON. + * Converts this Recipe to JSON. * @function toJSON - * @memberof grafeas.v1.BuildProvenance + * @memberof grafeas.v1.Recipe * @instance * @returns {Object.} JSON object */ - BuildProvenance.prototype.toJSON = function toJSON() { + Recipe.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BuildProvenance; + return Recipe; })(); - v1.Source = (function() { + v1.Completeness = (function() { /** - * Properties of a Source. + * Properties of a Completeness. * @memberof grafeas.v1 - * @interface ISource - * @property {string|null} [artifactStorageSourceUri] Source artifactStorageSourceUri - * @property {Object.|null} [fileHashes] Source fileHashes - * @property {grafeas.v1.ISourceContext|null} [context] Source context - * @property {Array.|null} [additionalContexts] Source additionalContexts + * @interface ICompleteness + * @property {boolean|null} ["arguments"] Completeness arguments + * @property {boolean|null} [environment] Completeness environment + * @property {boolean|null} [materials] Completeness materials */ /** - * Constructs a new Source. + * Constructs a new Completeness. * @memberof grafeas.v1 - * @classdesc Represents a Source. - * @implements ISource + * @classdesc Represents a Completeness. + * @implements ICompleteness * @constructor - * @param {grafeas.v1.ISource=} [properties] Properties to set + * @param {grafeas.v1.ICompleteness=} [properties] Properties to set */ - function Source(properties) { - this.fileHashes = {}; - this.additionalContexts = []; + function Completeness(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10934,139 +8977,101 @@ } /** - * Source artifactStorageSourceUri. - * @member {string} artifactStorageSourceUri - * @memberof grafeas.v1.Source - * @instance - */ - Source.prototype.artifactStorageSourceUri = ""; - - /** - * Source fileHashes. - * @member {Object.} fileHashes - * @memberof grafeas.v1.Source + * Completeness arguments. + * @member {boolean} arguments + * @memberof grafeas.v1.Completeness * @instance */ - Source.prototype.fileHashes = $util.emptyObject; + Completeness.prototype["arguments"] = false; /** - * Source context. - * @member {grafeas.v1.ISourceContext|null|undefined} context - * @memberof grafeas.v1.Source + * Completeness environment. + * @member {boolean} environment + * @memberof grafeas.v1.Completeness * @instance */ - Source.prototype.context = null; + Completeness.prototype.environment = false; /** - * Source additionalContexts. - * @member {Array.} additionalContexts - * @memberof grafeas.v1.Source + * Completeness materials. + * @member {boolean} materials + * @memberof grafeas.v1.Completeness * @instance */ - Source.prototype.additionalContexts = $util.emptyArray; + Completeness.prototype.materials = false; /** - * Creates a new Source instance using the specified properties. + * Creates a new Completeness instance using the specified properties. * @function create - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static - * @param {grafeas.v1.ISource=} [properties] Properties to set - * @returns {grafeas.v1.Source} Source instance + * @param {grafeas.v1.ICompleteness=} [properties] Properties to set + * @returns {grafeas.v1.Completeness} Completeness instance */ - Source.create = function create(properties) { - return new Source(properties); + Completeness.create = function create(properties) { + return new Completeness(properties); }; /** - * Encodes the specified Source message. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. + * Encodes the specified Completeness message. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static - * @param {grafeas.v1.ISource} message Source message or plain object to encode + * @param {grafeas.v1.ICompleteness} message Completeness message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Source.encode = function encode(message, writer) { + Completeness.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.artifactStorageSourceUri != null && Object.hasOwnProperty.call(message, "artifactStorageSourceUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.artifactStorageSourceUri); - if (message.fileHashes != null && Object.hasOwnProperty.call(message, "fileHashes")) - for (var keys = Object.keys(message.fileHashes), 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.FileHashes.encode(message.fileHashes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.context != null && Object.hasOwnProperty.call(message, "context")) - $root.grafeas.v1.SourceContext.encode(message.context, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.additionalContexts != null && message.additionalContexts.length) - for (var i = 0; i < message.additionalContexts.length; ++i) - $root.grafeas.v1.SourceContext.encode(message.additionalContexts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message["arguments"]); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.environment); + if (message.materials != null && Object.hasOwnProperty.call(message, "materials")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.materials); return writer; }; /** - * Encodes the specified Source message, length delimited. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. + * Encodes the specified Completeness message, length delimited. Does not implicitly {@link grafeas.v1.Completeness.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static - * @param {grafeas.v1.ISource} message Source message or plain object to encode + * @param {grafeas.v1.ICompleteness} message Completeness message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Source.encodeDelimited = function encodeDelimited(message, writer) { + Completeness.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Source message from the specified reader or buffer. + * Decodes a Completeness message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Source} Source + * @returns {grafeas.v1.Completeness} Completeness * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Source.decode = function decode(reader, length) { + Completeness.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.Source(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Completeness(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.artifactStorageSourceUri = reader.string(); + message["arguments"] = reader.bool(); break; case 2: - if (message.fileHashes === $util.emptyObject) - message.fileHashes = {}; - 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.FileHashes.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fileHashes[key] = value; + message.environment = reader.bool(); break; case 3: - message.context = $root.grafeas.v1.SourceContext.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.additionalContexts && message.additionalContexts.length)) - message.additionalContexts = []; - message.additionalContexts.push($root.grafeas.v1.SourceContext.decode(reader, reader.uint32())); + message.materials = reader.bool(); break; default: reader.skipType(tag & 7); @@ -11077,176 +9082,128 @@ }; /** - * Decodes a Source message from the specified reader or buffer, length delimited. + * Decodes a Completeness message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Source} Source + * @returns {grafeas.v1.Completeness} Completeness * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Source.decodeDelimited = function decodeDelimited(reader) { + Completeness.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Source message. + * Verifies a Completeness message. * @function verify - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Source.verify = function verify(message) { + Completeness.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.artifactStorageSourceUri != null && message.hasOwnProperty("artifactStorageSourceUri")) - if (!$util.isString(message.artifactStorageSourceUri)) - return "artifactStorageSourceUri: string expected"; - if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) { - if (!$util.isObject(message.fileHashes)) - return "fileHashes: object expected"; - var key = Object.keys(message.fileHashes); - for (var i = 0; i < key.length; ++i) { - var error = $root.grafeas.v1.FileHashes.verify(message.fileHashes[key[i]]); - if (error) - return "fileHashes." + error; - } - } - if (message.context != null && message.hasOwnProperty("context")) { - var error = $root.grafeas.v1.SourceContext.verify(message.context); - if (error) - return "context." + error; - } - if (message.additionalContexts != null && message.hasOwnProperty("additionalContexts")) { - if (!Array.isArray(message.additionalContexts)) - return "additionalContexts: array expected"; - for (var i = 0; i < message.additionalContexts.length; ++i) { - var error = $root.grafeas.v1.SourceContext.verify(message.additionalContexts[i]); - if (error) - return "additionalContexts." + error; - } - } + if (message["arguments"] != null && message.hasOwnProperty("arguments")) + if (typeof message["arguments"] !== "boolean") + return "arguments: boolean expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (typeof message.environment !== "boolean") + return "environment: boolean expected"; + if (message.materials != null && message.hasOwnProperty("materials")) + if (typeof message.materials !== "boolean") + return "materials: boolean expected"; return null; }; /** - * Creates a Source message from a plain object. Also converts values to their respective internal types. + * Creates a Completeness message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Source} Source + * @returns {grafeas.v1.Completeness} Completeness */ - Source.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Source) + Completeness.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Completeness) return object; - var message = new $root.grafeas.v1.Source(); - if (object.artifactStorageSourceUri != null) - message.artifactStorageSourceUri = String(object.artifactStorageSourceUri); - if (object.fileHashes) { - if (typeof object.fileHashes !== "object") - throw TypeError(".grafeas.v1.Source.fileHashes: object expected"); - message.fileHashes = {}; - for (var keys = Object.keys(object.fileHashes), i = 0; i < keys.length; ++i) { - if (typeof object.fileHashes[keys[i]] !== "object") - throw TypeError(".grafeas.v1.Source.fileHashes: object expected"); - message.fileHashes[keys[i]] = $root.grafeas.v1.FileHashes.fromObject(object.fileHashes[keys[i]]); - } - } - if (object.context != null) { - if (typeof object.context !== "object") - throw TypeError(".grafeas.v1.Source.context: object expected"); - message.context = $root.grafeas.v1.SourceContext.fromObject(object.context); - } - if (object.additionalContexts) { - if (!Array.isArray(object.additionalContexts)) - throw TypeError(".grafeas.v1.Source.additionalContexts: array expected"); - message.additionalContexts = []; - for (var i = 0; i < object.additionalContexts.length; ++i) { - if (typeof object.additionalContexts[i] !== "object") - throw TypeError(".grafeas.v1.Source.additionalContexts: object expected"); - message.additionalContexts[i] = $root.grafeas.v1.SourceContext.fromObject(object.additionalContexts[i]); - } - } + var message = new $root.grafeas.v1.Completeness(); + if (object["arguments"] != null) + message["arguments"] = Boolean(object["arguments"]); + if (object.environment != null) + message.environment = Boolean(object.environment); + if (object.materials != null) + message.materials = Boolean(object.materials); return message; }; /** - * Creates a plain object from a Source message. Also converts values to other types if specified. + * Creates a plain object from a Completeness message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @static - * @param {grafeas.v1.Source} message Source + * @param {grafeas.v1.Completeness} message Completeness * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Source.toObject = function toObject(message, options) { + Completeness.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalContexts = []; - if (options.objects || options.defaults) - object.fileHashes = {}; if (options.defaults) { - object.artifactStorageSourceUri = ""; - object.context = null; - } - if (message.artifactStorageSourceUri != null && message.hasOwnProperty("artifactStorageSourceUri")) - object.artifactStorageSourceUri = message.artifactStorageSourceUri; - var keys2; - if (message.fileHashes && (keys2 = Object.keys(message.fileHashes)).length) { - object.fileHashes = {}; - for (var j = 0; j < keys2.length; ++j) - object.fileHashes[keys2[j]] = $root.grafeas.v1.FileHashes.toObject(message.fileHashes[keys2[j]], options); - } - if (message.context != null && message.hasOwnProperty("context")) - object.context = $root.grafeas.v1.SourceContext.toObject(message.context, options); - if (message.additionalContexts && message.additionalContexts.length) { - object.additionalContexts = []; - for (var j = 0; j < message.additionalContexts.length; ++j) - object.additionalContexts[j] = $root.grafeas.v1.SourceContext.toObject(message.additionalContexts[j], options); + object["arguments"] = false; + object.environment = false; + object.materials = false; } + if (message["arguments"] != null && message.hasOwnProperty("arguments")) + object["arguments"] = message["arguments"]; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.materials != null && message.hasOwnProperty("materials")) + object.materials = message.materials; return object; }; /** - * Converts this Source to JSON. + * Converts this Completeness to JSON. * @function toJSON - * @memberof grafeas.v1.Source + * @memberof grafeas.v1.Completeness * @instance * @returns {Object.} JSON object */ - Source.prototype.toJSON = function toJSON() { + Completeness.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Source; + return Completeness; })(); - v1.FileHashes = (function() { + v1.Metadata = (function() { /** - * Properties of a FileHashes. + * Properties of a Metadata. * @memberof grafeas.v1 - * @interface IFileHashes - * @property {Array.|null} [fileHash] FileHashes fileHash + * @interface IMetadata + * @property {string|null} [buildInvocationId] Metadata buildInvocationId + * @property {google.protobuf.ITimestamp|null} [buildStartedOn] Metadata buildStartedOn + * @property {google.protobuf.ITimestamp|null} [buildFinishedOn] Metadata buildFinishedOn + * @property {grafeas.v1.ICompleteness|null} [completeness] Metadata completeness + * @property {boolean|null} [reproducible] Metadata reproducible */ /** - * Constructs a new FileHashes. + * Constructs a new Metadata. * @memberof grafeas.v1 - * @classdesc Represents a FileHashes. - * @implements IFileHashes + * @classdesc Represents a Metadata. + * @implements IMetadata * @constructor - * @param {grafeas.v1.IFileHashes=} [properties] Properties to set + * @param {grafeas.v1.IMetadata=} [properties] Properties to set */ - function FileHashes(properties) { - this.fileHash = []; + function Metadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11254,78 +9211,127 @@ } /** - * FileHashes fileHash. - * @member {Array.} fileHash - * @memberof grafeas.v1.FileHashes + * Metadata buildInvocationId. + * @member {string} buildInvocationId + * @memberof grafeas.v1.Metadata * @instance */ - FileHashes.prototype.fileHash = $util.emptyArray; + Metadata.prototype.buildInvocationId = ""; /** - * Creates a new FileHashes instance using the specified properties. + * Metadata buildStartedOn. + * @member {google.protobuf.ITimestamp|null|undefined} buildStartedOn + * @memberof grafeas.v1.Metadata + * @instance + */ + Metadata.prototype.buildStartedOn = null; + + /** + * Metadata buildFinishedOn. + * @member {google.protobuf.ITimestamp|null|undefined} buildFinishedOn + * @memberof grafeas.v1.Metadata + * @instance + */ + Metadata.prototype.buildFinishedOn = null; + + /** + * Metadata completeness. + * @member {grafeas.v1.ICompleteness|null|undefined} completeness + * @memberof grafeas.v1.Metadata + * @instance + */ + Metadata.prototype.completeness = null; + + /** + * Metadata reproducible. + * @member {boolean} reproducible + * @memberof grafeas.v1.Metadata + * @instance + */ + Metadata.prototype.reproducible = false; + + /** + * Creates a new Metadata instance using the specified properties. * @function create - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static - * @param {grafeas.v1.IFileHashes=} [properties] Properties to set - * @returns {grafeas.v1.FileHashes} FileHashes instance + * @param {grafeas.v1.IMetadata=} [properties] Properties to set + * @returns {grafeas.v1.Metadata} Metadata instance */ - FileHashes.create = function create(properties) { - return new FileHashes(properties); + Metadata.create = function create(properties) { + return new Metadata(properties); }; /** - * Encodes the specified FileHashes message. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. + * Encodes the specified Metadata message. Does not implicitly {@link grafeas.v1.Metadata.verify|verify} messages. * @function encode - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static - * @param {grafeas.v1.IFileHashes} message FileHashes message or plain object to encode + * @param {grafeas.v1.IMetadata} message Metadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileHashes.encode = function encode(message, writer) { + Metadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fileHash != null && message.fileHash.length) - for (var i = 0; i < message.fileHash.length; ++i) - $root.grafeas.v1.Hash.encode(message.fileHash[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.buildInvocationId != null && Object.hasOwnProperty.call(message, "buildInvocationId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildInvocationId); + if (message.buildStartedOn != null && Object.hasOwnProperty.call(message, "buildStartedOn")) + $root.google.protobuf.Timestamp.encode(message.buildStartedOn, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.buildFinishedOn != null && Object.hasOwnProperty.call(message, "buildFinishedOn")) + $root.google.protobuf.Timestamp.encode(message.buildFinishedOn, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.completeness != null && Object.hasOwnProperty.call(message, "completeness")) + $root.grafeas.v1.Completeness.encode(message.completeness, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reproducible != null && Object.hasOwnProperty.call(message, "reproducible")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reproducible); return writer; }; /** - * Encodes the specified FileHashes message, length delimited. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link grafeas.v1.Metadata.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static - * @param {grafeas.v1.IFileHashes} message FileHashes message or plain object to encode + * @param {grafeas.v1.IMetadata} message Metadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileHashes.encodeDelimited = function encodeDelimited(message, writer) { + Metadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileHashes message from the specified reader or buffer. + * Decodes a Metadata message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.FileHashes} FileHashes + * @returns {grafeas.v1.Metadata} Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileHashes.decode = function decode(reader, length) { + Metadata.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.FileHashes(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Metadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.fileHash && message.fileHash.length)) - message.fileHash = []; - message.fileHash.push($root.grafeas.v1.Hash.decode(reader, reader.uint32())); + message.buildInvocationId = reader.string(); + break; + case 2: + message.buildStartedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.buildFinishedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.completeness = $root.grafeas.v1.Completeness.decode(reader, reader.uint32()); + break; + case 5: + message.reproducible = reader.bool(); break; default: reader.skipType(tag & 7); @@ -11336,125 +9342,155 @@ }; /** - * Decodes a FileHashes message from the specified reader or buffer, length delimited. + * Decodes a Metadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.FileHashes} FileHashes + * @returns {grafeas.v1.Metadata} Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileHashes.decodeDelimited = function decodeDelimited(reader) { + Metadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileHashes message. + * Verifies a Metadata message. * @function verify - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileHashes.verify = function verify(message) { + Metadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fileHash != null && message.hasOwnProperty("fileHash")) { - if (!Array.isArray(message.fileHash)) - return "fileHash: array expected"; - for (var i = 0; i < message.fileHash.length; ++i) { - var error = $root.grafeas.v1.Hash.verify(message.fileHash[i]); - if (error) - return "fileHash." + error; - } + if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) + if (!$util.isString(message.buildInvocationId)) + return "buildInvocationId: string expected"; + if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) { + var error = $root.google.protobuf.Timestamp.verify(message.buildStartedOn); + if (error) + return "buildStartedOn." + error; + } + if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) { + var error = $root.google.protobuf.Timestamp.verify(message.buildFinishedOn); + if (error) + return "buildFinishedOn." + error; + } + if (message.completeness != null && message.hasOwnProperty("completeness")) { + var error = $root.grafeas.v1.Completeness.verify(message.completeness); + if (error) + return "completeness." + error; } + if (message.reproducible != null && message.hasOwnProperty("reproducible")) + if (typeof message.reproducible !== "boolean") + return "reproducible: boolean expected"; return null; }; /** - * Creates a FileHashes message from a plain object. Also converts values to their respective internal types. + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.FileHashes} FileHashes + * @returns {grafeas.v1.Metadata} Metadata */ - FileHashes.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.FileHashes) + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Metadata) return object; - var message = new $root.grafeas.v1.FileHashes(); - if (object.fileHash) { - if (!Array.isArray(object.fileHash)) - throw TypeError(".grafeas.v1.FileHashes.fileHash: array expected"); - message.fileHash = []; - for (var i = 0; i < object.fileHash.length; ++i) { - if (typeof object.fileHash[i] !== "object") - throw TypeError(".grafeas.v1.FileHashes.fileHash: object expected"); - message.fileHash[i] = $root.grafeas.v1.Hash.fromObject(object.fileHash[i]); - } + var message = new $root.grafeas.v1.Metadata(); + if (object.buildInvocationId != null) + message.buildInvocationId = String(object.buildInvocationId); + if (object.buildStartedOn != null) { + if (typeof object.buildStartedOn !== "object") + throw TypeError(".grafeas.v1.Metadata.buildStartedOn: object expected"); + message.buildStartedOn = $root.google.protobuf.Timestamp.fromObject(object.buildStartedOn); + } + if (object.buildFinishedOn != null) { + if (typeof object.buildFinishedOn !== "object") + throw TypeError(".grafeas.v1.Metadata.buildFinishedOn: object expected"); + message.buildFinishedOn = $root.google.protobuf.Timestamp.fromObject(object.buildFinishedOn); + } + if (object.completeness != null) { + if (typeof object.completeness !== "object") + throw TypeError(".grafeas.v1.Metadata.completeness: object expected"); + message.completeness = $root.grafeas.v1.Completeness.fromObject(object.completeness); } + if (object.reproducible != null) + message.reproducible = Boolean(object.reproducible); return message; }; /** - * Creates a plain object from a FileHashes message. Also converts values to other types if specified. + * Creates a plain object from a Metadata message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @static - * @param {grafeas.v1.FileHashes} message FileHashes + * @param {grafeas.v1.Metadata} message Metadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileHashes.toObject = function toObject(message, options) { + Metadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.fileHash = []; - if (message.fileHash && message.fileHash.length) { - object.fileHash = []; - for (var j = 0; j < message.fileHash.length; ++j) - object.fileHash[j] = $root.grafeas.v1.Hash.toObject(message.fileHash[j], options); + if (options.defaults) { + object.buildInvocationId = ""; + object.buildStartedOn = null; + object.buildFinishedOn = null; + object.completeness = null; + object.reproducible = false; } + if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) + object.buildInvocationId = message.buildInvocationId; + if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) + object.buildStartedOn = $root.google.protobuf.Timestamp.toObject(message.buildStartedOn, options); + if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) + object.buildFinishedOn = $root.google.protobuf.Timestamp.toObject(message.buildFinishedOn, options); + if (message.completeness != null && message.hasOwnProperty("completeness")) + object.completeness = $root.grafeas.v1.Completeness.toObject(message.completeness, options); + if (message.reproducible != null && message.hasOwnProperty("reproducible")) + object.reproducible = message.reproducible; return object; }; /** - * Converts this FileHashes to JSON. + * Converts this Metadata to JSON. * @function toJSON - * @memberof grafeas.v1.FileHashes + * @memberof grafeas.v1.Metadata * @instance * @returns {Object.} JSON object */ - FileHashes.prototype.toJSON = function toJSON() { + Metadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileHashes; + return Metadata; })(); - v1.Hash = (function() { + v1.BuilderConfig = (function() { /** - * Properties of a Hash. + * Properties of a BuilderConfig. * @memberof grafeas.v1 - * @interface IHash - * @property {string|null} [type] Hash type - * @property {Uint8Array|null} [value] Hash value + * @interface IBuilderConfig + * @property {string|null} [id] BuilderConfig id */ /** - * Constructs a new Hash. + * Constructs a new BuilderConfig. * @memberof grafeas.v1 - * @classdesc Represents a Hash. - * @implements IHash + * @classdesc Represents a BuilderConfig. + * @implements IBuilderConfig * @constructor - * @param {grafeas.v1.IHash=} [properties] Properties to set + * @param {grafeas.v1.IBuilderConfig=} [properties] Properties to set */ - function Hash(properties) { + function BuilderConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11462,88 +9498,75 @@ } /** - * Hash type. - * @member {string} type - * @memberof grafeas.v1.Hash - * @instance - */ - Hash.prototype.type = ""; - - /** - * Hash value. - * @member {Uint8Array} value - * @memberof grafeas.v1.Hash + * BuilderConfig id. + * @member {string} id + * @memberof grafeas.v1.BuilderConfig * @instance */ - Hash.prototype.value = $util.newBuffer([]); + BuilderConfig.prototype.id = ""; /** - * Creates a new Hash instance using the specified properties. + * Creates a new BuilderConfig instance using the specified properties. * @function create - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static - * @param {grafeas.v1.IHash=} [properties] Properties to set - * @returns {grafeas.v1.Hash} Hash instance + * @param {grafeas.v1.IBuilderConfig=} [properties] Properties to set + * @returns {grafeas.v1.BuilderConfig} BuilderConfig instance */ - Hash.create = function create(properties) { - return new Hash(properties); + BuilderConfig.create = function create(properties) { + return new BuilderConfig(properties); }; /** - * Encodes the specified Hash message. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. + * Encodes the specified BuilderConfig message. Does not implicitly {@link grafeas.v1.BuilderConfig.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static - * @param {grafeas.v1.IHash} message Hash message or plain object to encode + * @param {grafeas.v1.IBuilderConfig} message BuilderConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Hash.encode = function encode(message, writer) { + BuilderConfig.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.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); return writer; }; /** - * Encodes the specified Hash message, length delimited. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. + * Encodes the specified BuilderConfig message, length delimited. Does not implicitly {@link grafeas.v1.BuilderConfig.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static - * @param {grafeas.v1.IHash} message Hash message or plain object to encode + * @param {grafeas.v1.IBuilderConfig} message BuilderConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Hash.encodeDelimited = function encodeDelimited(message, writer) { + BuilderConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Hash message from the specified reader or buffer. + * Decodes a BuilderConfig message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Hash} Hash + * @returns {grafeas.v1.BuilderConfig} BuilderConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Hash.decode = function decode(reader, length) { + BuilderConfig.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.Hash(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BuilderConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); - break; - case 2: - message.value = reader.bytes(); + message.id = reader.string(); break; default: reader.skipType(tag & 7); @@ -11554,133 +9577,111 @@ }; /** - * Decodes a Hash message from the specified reader or buffer, length delimited. + * Decodes a BuilderConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Hash} Hash + * @returns {grafeas.v1.BuilderConfig} BuilderConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Hash.decodeDelimited = function decodeDelimited(reader) { + BuilderConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Hash message. + * Verifies a BuilderConfig message. * @function verify - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Hash.verify = function verify(message) { + BuilderConfig.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.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; return null; }; /** - * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * Creates a BuilderConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Hash} Hash + * @returns {grafeas.v1.BuilderConfig} BuilderConfig */ - Hash.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Hash) + BuilderConfig.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BuilderConfig) return object; - var message = new $root.grafeas.v1.Hash(); - if (object.type != null) - message.type = String(object.type); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; + var message = new $root.grafeas.v1.BuilderConfig(); + if (object.id != null) + message.id = String(object.id); return message; }; /** - * Creates a plain object from a Hash message. Also converts values to other types if specified. + * Creates a plain object from a BuilderConfig message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @static - * @param {grafeas.v1.Hash} message Hash + * @param {grafeas.v1.BuilderConfig} message BuilderConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Hash.toObject = function toObject(message, options) { + BuilderConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; return object; }; /** - * Converts this Hash to JSON. + * Converts this BuilderConfig to JSON. * @function toJSON - * @memberof grafeas.v1.Hash + * @memberof grafeas.v1.BuilderConfig * @instance * @returns {Object.} JSON object */ - Hash.prototype.toJSON = function toJSON() { + BuilderConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Hash; + return BuilderConfig; })(); - v1.Command = (function() { + v1.InTotoProvenance = (function() { /** - * Properties of a Command. + * Properties of an InTotoProvenance. * @memberof grafeas.v1 - * @interface ICommand - * @property {string|null} [name] Command name - * @property {Array.|null} [env] Command env - * @property {Array.|null} [args] Command args - * @property {string|null} [dir] Command dir - * @property {string|null} [id] Command id - * @property {Array.|null} [waitFor] Command waitFor + * @interface IInTotoProvenance + * @property {grafeas.v1.IBuilderConfig|null} [builderConfig] InTotoProvenance builderConfig + * @property {grafeas.v1.IRecipe|null} [recipe] InTotoProvenance recipe + * @property {grafeas.v1.IMetadata|null} [metadata] InTotoProvenance metadata + * @property {Array.|null} [materials] InTotoProvenance materials */ /** - * Constructs a new Command. + * Constructs a new InTotoProvenance. * @memberof grafeas.v1 - * @classdesc Represents a Command. - * @implements ICommand + * @classdesc Represents an InTotoProvenance. + * @implements IInTotoProvenance * @constructor - * @param {grafeas.v1.ICommand=} [properties] Properties to set + * @param {grafeas.v1.IInTotoProvenance=} [properties] Properties to set */ - function Command(properties) { - this.env = []; - this.args = []; - this.waitFor = []; + function InTotoProvenance(properties) { + this.materials = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11688,149 +9689,117 @@ } /** - * Command name. - * @member {string} name - * @memberof grafeas.v1.Command - * @instance - */ - Command.prototype.name = ""; - - /** - * Command env. - * @member {Array.} env - * @memberof grafeas.v1.Command - * @instance - */ - Command.prototype.env = $util.emptyArray; - - /** - * Command args. - * @member {Array.} args - * @memberof grafeas.v1.Command + * InTotoProvenance builderConfig. + * @member {grafeas.v1.IBuilderConfig|null|undefined} builderConfig + * @memberof grafeas.v1.InTotoProvenance * @instance */ - Command.prototype.args = $util.emptyArray; + InTotoProvenance.prototype.builderConfig = null; /** - * Command dir. - * @member {string} dir - * @memberof grafeas.v1.Command + * InTotoProvenance recipe. + * @member {grafeas.v1.IRecipe|null|undefined} recipe + * @memberof grafeas.v1.InTotoProvenance * @instance */ - Command.prototype.dir = ""; + InTotoProvenance.prototype.recipe = null; /** - * Command id. - * @member {string} id - * @memberof grafeas.v1.Command + * InTotoProvenance metadata. + * @member {grafeas.v1.IMetadata|null|undefined} metadata + * @memberof grafeas.v1.InTotoProvenance * @instance */ - Command.prototype.id = ""; + InTotoProvenance.prototype.metadata = null; /** - * Command waitFor. - * @member {Array.} waitFor - * @memberof grafeas.v1.Command + * InTotoProvenance materials. + * @member {Array.} materials + * @memberof grafeas.v1.InTotoProvenance * @instance */ - Command.prototype.waitFor = $util.emptyArray; + InTotoProvenance.prototype.materials = $util.emptyArray; /** - * Creates a new Command instance using the specified properties. + * Creates a new InTotoProvenance instance using the specified properties. * @function create - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static - * @param {grafeas.v1.ICommand=} [properties] Properties to set - * @returns {grafeas.v1.Command} Command instance + * @param {grafeas.v1.IInTotoProvenance=} [properties] Properties to set + * @returns {grafeas.v1.InTotoProvenance} InTotoProvenance instance */ - Command.create = function create(properties) { - return new Command(properties); + InTotoProvenance.create = function create(properties) { + return new InTotoProvenance(properties); }; /** - * Encodes the specified Command message. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. + * Encodes the specified InTotoProvenance message. Does not implicitly {@link grafeas.v1.InTotoProvenance.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static - * @param {grafeas.v1.ICommand} message Command message or plain object to encode + * @param {grafeas.v1.IInTotoProvenance} message InTotoProvenance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Command.encode = function encode(message, writer) { + InTotoProvenance.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.env != null && message.env.length) - for (var i = 0; i < message.env.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.env[i]); - if (message.args != null && message.args.length) - for (var i = 0; i < message.args.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); - if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dir); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); - if (message.waitFor != null && message.waitFor.length) - for (var i = 0; i < message.waitFor.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.waitFor[i]); + if (message.builderConfig != null && Object.hasOwnProperty.call(message, "builderConfig")) + $root.grafeas.v1.BuilderConfig.encode(message.builderConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recipe != null && Object.hasOwnProperty.call(message, "recipe")) + $root.grafeas.v1.Recipe.encode(message.recipe, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.grafeas.v1.Metadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.materials != null && message.materials.length) + for (var i = 0; i < message.materials.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.materials[i]); return writer; }; /** - * Encodes the specified Command message, length delimited. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. + * Encodes the specified InTotoProvenance message, length delimited. Does not implicitly {@link grafeas.v1.InTotoProvenance.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static - * @param {grafeas.v1.ICommand} message Command message or plain object to encode + * @param {grafeas.v1.IInTotoProvenance} message InTotoProvenance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Command.encodeDelimited = function encodeDelimited(message, writer) { + InTotoProvenance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Command message from the specified reader or buffer. + * Decodes an InTotoProvenance message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Command} Command + * @returns {grafeas.v1.InTotoProvenance} InTotoProvenance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Command.decode = function decode(reader, length) { + InTotoProvenance.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.Command(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.InTotoProvenance(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.builderConfig = $root.grafeas.v1.BuilderConfig.decode(reader, reader.uint32()); break; case 2: - if (!(message.env && message.env.length)) - message.env = []; - message.env.push(reader.string()); + message.recipe = $root.grafeas.v1.Recipe.decode(reader, reader.uint32()); break; case 3: - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); + message.metadata = $root.grafeas.v1.Metadata.decode(reader, reader.uint32()); break; case 4: - message.dir = reader.string(); - break; - case 5: - message.id = reader.string(); - break; - case 6: - if (!(message.waitFor && message.waitFor.length)) - message.waitFor = []; - message.waitFor.push(reader.string()); + if (!(message.materials && message.materials.length)) + message.materials = []; + message.materials.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -11841,189 +9810,165 @@ }; /** - * Decodes a Command message from the specified reader or buffer, length delimited. + * Decodes an InTotoProvenance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Command} Command + * @returns {grafeas.v1.InTotoProvenance} InTotoProvenance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Command.decodeDelimited = function decodeDelimited(reader) { + InTotoProvenance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Command message. + * Verifies an InTotoProvenance message. * @function verify - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Command.verify = function verify(message) { + InTotoProvenance.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.env != null && message.hasOwnProperty("env")) { - if (!Array.isArray(message.env)) - return "env: array expected"; - for (var i = 0; i < message.env.length; ++i) - if (!$util.isString(message.env[i])) - return "env: string[] expected"; - } - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; + if (message.builderConfig != null && message.hasOwnProperty("builderConfig")) { + var error = $root.grafeas.v1.BuilderConfig.verify(message.builderConfig); + if (error) + return "builderConfig." + error; } - if (message.dir != null && message.hasOwnProperty("dir")) - if (!$util.isString(message.dir)) - return "dir: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.waitFor != null && message.hasOwnProperty("waitFor")) { - if (!Array.isArray(message.waitFor)) - return "waitFor: array expected"; - for (var i = 0; i < message.waitFor.length; ++i) - if (!$util.isString(message.waitFor[i])) - return "waitFor: string[] expected"; + if (message.recipe != null && message.hasOwnProperty("recipe")) { + var error = $root.grafeas.v1.Recipe.verify(message.recipe); + if (error) + return "recipe." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.grafeas.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.materials != null && message.hasOwnProperty("materials")) { + if (!Array.isArray(message.materials)) + return "materials: array expected"; + for (var i = 0; i < message.materials.length; ++i) + if (!$util.isString(message.materials[i])) + return "materials: string[] expected"; } return null; }; /** - * Creates a Command message from a plain object. Also converts values to their respective internal types. + * Creates an InTotoProvenance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Command} Command + * @returns {grafeas.v1.InTotoProvenance} InTotoProvenance */ - Command.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Command) + InTotoProvenance.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.InTotoProvenance) return object; - var message = new $root.grafeas.v1.Command(); - if (object.name != null) - message.name = String(object.name); - if (object.env) { - if (!Array.isArray(object.env)) - throw TypeError(".grafeas.v1.Command.env: array expected"); - message.env = []; - for (var i = 0; i < object.env.length; ++i) - message.env[i] = String(object.env[i]); + var message = new $root.grafeas.v1.InTotoProvenance(); + if (object.builderConfig != null) { + if (typeof object.builderConfig !== "object") + throw TypeError(".grafeas.v1.InTotoProvenance.builderConfig: object expected"); + message.builderConfig = $root.grafeas.v1.BuilderConfig.fromObject(object.builderConfig); } - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".grafeas.v1.Command.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); + if (object.recipe != null) { + if (typeof object.recipe !== "object") + throw TypeError(".grafeas.v1.InTotoProvenance.recipe: object expected"); + message.recipe = $root.grafeas.v1.Recipe.fromObject(object.recipe); } - if (object.dir != null) - message.dir = String(object.dir); - if (object.id != null) - message.id = String(object.id); - if (object.waitFor) { - if (!Array.isArray(object.waitFor)) - throw TypeError(".grafeas.v1.Command.waitFor: array expected"); - message.waitFor = []; - for (var i = 0; i < object.waitFor.length; ++i) - message.waitFor[i] = String(object.waitFor[i]); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".grafeas.v1.InTotoProvenance.metadata: object expected"); + message.metadata = $root.grafeas.v1.Metadata.fromObject(object.metadata); + } + if (object.materials) { + if (!Array.isArray(object.materials)) + throw TypeError(".grafeas.v1.InTotoProvenance.materials: array expected"); + message.materials = []; + for (var i = 0; i < object.materials.length; ++i) + message.materials[i] = String(object.materials[i]); } return message; }; /** - * Creates a plain object from a Command message. Also converts values to other types if specified. + * Creates a plain object from an InTotoProvenance message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @static - * @param {grafeas.v1.Command} message Command + * @param {grafeas.v1.InTotoProvenance} message InTotoProvenance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Command.toObject = function toObject(message, options) { + InTotoProvenance.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.env = []; - object.args = []; - object.waitFor = []; - } + if (options.arrays || options.defaults) + object.materials = []; if (options.defaults) { - object.name = ""; - object.dir = ""; - object.id = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.env && message.env.length) { - object.env = []; - for (var j = 0; j < message.env.length; ++j) - object.env[j] = message.env[j]; - } - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; + object.builderConfig = null; + object.recipe = null; + object.metadata = null; } - if (message.dir != null && message.hasOwnProperty("dir")) - object.dir = message.dir; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.waitFor && message.waitFor.length) { - object.waitFor = []; - for (var j = 0; j < message.waitFor.length; ++j) - object.waitFor[j] = message.waitFor[j]; + if (message.builderConfig != null && message.hasOwnProperty("builderConfig")) + object.builderConfig = $root.grafeas.v1.BuilderConfig.toObject(message.builderConfig, options); + if (message.recipe != null && message.hasOwnProperty("recipe")) + object.recipe = $root.grafeas.v1.Recipe.toObject(message.recipe, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.grafeas.v1.Metadata.toObject(message.metadata, options); + if (message.materials && message.materials.length) { + object.materials = []; + for (var j = 0; j < message.materials.length; ++j) + object.materials[j] = message.materials[j]; } return object; }; /** - * Converts this Command to JSON. + * Converts this InTotoProvenance to JSON. * @function toJSON - * @memberof grafeas.v1.Command + * @memberof grafeas.v1.InTotoProvenance * @instance * @returns {Object.} JSON object */ - Command.prototype.toJSON = function toJSON() { + InTotoProvenance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Command; + return InTotoProvenance; })(); - v1.Artifact = (function() { + v1.InTotoStatement = (function() { /** - * Properties of an Artifact. + * Properties of an InTotoStatement. * @memberof grafeas.v1 - * @interface IArtifact - * @property {string|null} [checksum] Artifact checksum - * @property {string|null} [id] Artifact id - * @property {Array.|null} [names] Artifact names + * @interface IInTotoStatement + * @property {string|null} [type] InTotoStatement type + * @property {Array.|null} [subject] InTotoStatement subject + * @property {string|null} [predicateType] InTotoStatement predicateType + * @property {grafeas.v1.IInTotoProvenance|null} [provenance] InTotoStatement provenance + * @property {grafeas.v1.ISlsaProvenance|null} [slsaProvenance] InTotoStatement slsaProvenance */ /** - * Constructs a new Artifact. + * Constructs a new InTotoStatement. * @memberof grafeas.v1 - * @classdesc Represents an Artifact. - * @implements IArtifact + * @classdesc Represents an InTotoStatement. + * @implements IInTotoStatement * @constructor - * @param {grafeas.v1.IArtifact=} [properties] Properties to set + * @param {grafeas.v1.IInTotoStatement=} [properties] Properties to set */ - function Artifact(properties) { - this.names = []; + function InTotoStatement(properties) { + this.subject = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12031,104 +9976,144 @@ } /** - * Artifact checksum. - * @member {string} checksum - * @memberof grafeas.v1.Artifact + * InTotoStatement type. + * @member {string} type + * @memberof grafeas.v1.InTotoStatement * @instance */ - Artifact.prototype.checksum = ""; + InTotoStatement.prototype.type = ""; /** - * Artifact id. - * @member {string} id - * @memberof grafeas.v1.Artifact + * InTotoStatement subject. + * @member {Array.} subject + * @memberof grafeas.v1.InTotoStatement * @instance */ - Artifact.prototype.id = ""; + InTotoStatement.prototype.subject = $util.emptyArray; /** - * Artifact names. - * @member {Array.} names - * @memberof grafeas.v1.Artifact + * InTotoStatement predicateType. + * @member {string} predicateType + * @memberof grafeas.v1.InTotoStatement * @instance */ - Artifact.prototype.names = $util.emptyArray; + InTotoStatement.prototype.predicateType = ""; /** - * Creates a new Artifact instance using the specified properties. + * InTotoStatement provenance. + * @member {grafeas.v1.IInTotoProvenance|null|undefined} provenance + * @memberof grafeas.v1.InTotoStatement + * @instance + */ + InTotoStatement.prototype.provenance = null; + + /** + * InTotoStatement slsaProvenance. + * @member {grafeas.v1.ISlsaProvenance|null|undefined} slsaProvenance + * @memberof grafeas.v1.InTotoStatement + * @instance + */ + InTotoStatement.prototype.slsaProvenance = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InTotoStatement predicate. + * @member {"provenance"|"slsaProvenance"|undefined} predicate + * @memberof grafeas.v1.InTotoStatement + * @instance + */ + Object.defineProperty(InTotoStatement.prototype, "predicate", { + get: $util.oneOfGetter($oneOfFields = ["provenance", "slsaProvenance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InTotoStatement instance using the specified properties. * @function create - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static - * @param {grafeas.v1.IArtifact=} [properties] Properties to set - * @returns {grafeas.v1.Artifact} Artifact instance + * @param {grafeas.v1.IInTotoStatement=} [properties] Properties to set + * @returns {grafeas.v1.InTotoStatement} InTotoStatement instance */ - Artifact.create = function create(properties) { - return new Artifact(properties); + InTotoStatement.create = function create(properties) { + return new InTotoStatement(properties); }; /** - * Encodes the specified Artifact message. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. + * Encodes the specified InTotoStatement message. Does not implicitly {@link grafeas.v1.InTotoStatement.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static - * @param {grafeas.v1.IArtifact} message Artifact message or plain object to encode + * @param {grafeas.v1.IInTotoStatement} message InTotoStatement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Artifact.encode = function encode(message, writer) { + InTotoStatement.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.checksum != null && Object.hasOwnProperty.call(message, "checksum")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.checksum); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.names != null && message.names.length) - for (var i = 0; i < message.names.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.subject != null && message.subject.length) + for (var i = 0; i < message.subject.length; ++i) + $root.grafeas.v1.Subject.encode(message.subject[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.predicateType != null && Object.hasOwnProperty.call(message, "predicateType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.predicateType); + if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance")) + $root.grafeas.v1.InTotoProvenance.encode(message.provenance, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.slsaProvenance != null && Object.hasOwnProperty.call(message, "slsaProvenance")) + $root.grafeas.v1.SlsaProvenance.encode(message.slsaProvenance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Artifact message, length delimited. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. + * Encodes the specified InTotoStatement message, length delimited. Does not implicitly {@link grafeas.v1.InTotoStatement.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static - * @param {grafeas.v1.IArtifact} message Artifact message or plain object to encode + * @param {grafeas.v1.IInTotoStatement} message InTotoStatement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Artifact.encodeDelimited = function encodeDelimited(message, writer) { + InTotoStatement.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Artifact message from the specified reader or buffer. + * Decodes an InTotoStatement message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.Artifact} Artifact + * @returns {grafeas.v1.InTotoStatement} InTotoStatement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Artifact.decode = function decode(reader, length) { + InTotoStatement.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.Artifact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.InTotoStatement(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.checksum = reader.string(); + message.type = reader.string(); break; case 2: - message.id = reader.string(); + if (!(message.subject && message.subject.length)) + message.subject = []; + message.subject.push($root.grafeas.v1.Subject.decode(reader, reader.uint32())); break; case 3: - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); + message.predicateType = reader.string(); + break; + case 4: + message.provenance = $root.grafeas.v1.InTotoProvenance.decode(reader, reader.uint32()); + break; + case 5: + message.slsaProvenance = $root.grafeas.v1.SlsaProvenance.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12139,141 +10124,183 @@ }; /** - * Decodes an Artifact message from the specified reader or buffer, length delimited. + * Decodes an InTotoStatement message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Artifact} Artifact + * @returns {grafeas.v1.InTotoStatement} InTotoStatement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Artifact.decodeDelimited = function decodeDelimited(reader) { + InTotoStatement.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Artifact message. + * Verifies an InTotoStatement message. * @function verify - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Artifact.verify = function verify(message) { + InTotoStatement.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.checksum != null && message.hasOwnProperty("checksum")) - if (!$util.isString(message.checksum)) - return "checksum: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (var i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + if (!Array.isArray(message.subject)) + return "subject: array expected"; + for (var i = 0; i < message.subject.length; ++i) { + var error = $root.grafeas.v1.Subject.verify(message.subject[i]); + if (error) + return "subject." + error; + } + } + if (message.predicateType != null && message.hasOwnProperty("predicateType")) + if (!$util.isString(message.predicateType)) + return "predicateType: string expected"; + if (message.provenance != null && message.hasOwnProperty("provenance")) { + properties.predicate = 1; + { + var error = $root.grafeas.v1.InTotoProvenance.verify(message.provenance); + if (error) + return "provenance." + error; + } + } + if (message.slsaProvenance != null && message.hasOwnProperty("slsaProvenance")) { + if (properties.predicate === 1) + return "predicate: multiple values"; + properties.predicate = 1; + { + var error = $root.grafeas.v1.SlsaProvenance.verify(message.slsaProvenance); + if (error) + return "slsaProvenance." + error; + } } return null; }; /** - * Creates an Artifact message from a plain object. Also converts values to their respective internal types. + * Creates an InTotoStatement message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Artifact} Artifact + * @returns {grafeas.v1.InTotoStatement} InTotoStatement */ - Artifact.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Artifact) + InTotoStatement.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.InTotoStatement) return object; - var message = new $root.grafeas.v1.Artifact(); - if (object.checksum != null) - message.checksum = String(object.checksum); - if (object.id != null) - message.id = String(object.id); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".grafeas.v1.Artifact.names: array expected"); - message.names = []; - for (var i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); + var message = new $root.grafeas.v1.InTotoStatement(); + if (object.type != null) + message.type = String(object.type); + if (object.subject) { + if (!Array.isArray(object.subject)) + throw TypeError(".grafeas.v1.InTotoStatement.subject: array expected"); + message.subject = []; + for (var i = 0; i < object.subject.length; ++i) { + if (typeof object.subject[i] !== "object") + throw TypeError(".grafeas.v1.InTotoStatement.subject: object expected"); + message.subject[i] = $root.grafeas.v1.Subject.fromObject(object.subject[i]); + } + } + if (object.predicateType != null) + message.predicateType = String(object.predicateType); + if (object.provenance != null) { + if (typeof object.provenance !== "object") + throw TypeError(".grafeas.v1.InTotoStatement.provenance: object expected"); + message.provenance = $root.grafeas.v1.InTotoProvenance.fromObject(object.provenance); + } + if (object.slsaProvenance != null) { + if (typeof object.slsaProvenance !== "object") + throw TypeError(".grafeas.v1.InTotoStatement.slsaProvenance: object expected"); + message.slsaProvenance = $root.grafeas.v1.SlsaProvenance.fromObject(object.slsaProvenance); } return message; }; /** - * Creates a plain object from an Artifact message. Also converts values to other types if specified. + * Creates a plain object from an InTotoStatement message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @static - * @param {grafeas.v1.Artifact} message Artifact + * @param {grafeas.v1.InTotoStatement} message InTotoStatement * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Artifact.toObject = function toObject(message, options) { + InTotoStatement.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.names = []; + object.subject = []; if (options.defaults) { - object.checksum = ""; - object.id = ""; + object.type = ""; + object.predicateType = ""; } - if (message.checksum != null && message.hasOwnProperty("checksum")) - object.checksum = message.checksum; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.names && message.names.length) { - object.names = []; - for (var j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.subject && message.subject.length) { + object.subject = []; + for (var j = 0; j < message.subject.length; ++j) + object.subject[j] = $root.grafeas.v1.Subject.toObject(message.subject[j], options); + } + if (message.predicateType != null && message.hasOwnProperty("predicateType")) + object.predicateType = message.predicateType; + if (message.provenance != null && message.hasOwnProperty("provenance")) { + object.provenance = $root.grafeas.v1.InTotoProvenance.toObject(message.provenance, options); + if (options.oneofs) + object.predicate = "provenance"; + } + if (message.slsaProvenance != null && message.hasOwnProperty("slsaProvenance")) { + object.slsaProvenance = $root.grafeas.v1.SlsaProvenance.toObject(message.slsaProvenance, options); + if (options.oneofs) + object.predicate = "slsaProvenance"; } return object; }; /** - * Converts this Artifact to JSON. + * Converts this InTotoStatement to JSON. * @function toJSON - * @memberof grafeas.v1.Artifact + * @memberof grafeas.v1.InTotoStatement * @instance * @returns {Object.} JSON object */ - Artifact.prototype.toJSON = function toJSON() { + InTotoStatement.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Artifact; + return InTotoStatement; })(); - v1.SourceContext = (function() { + v1.Subject = (function() { /** - * Properties of a SourceContext. + * Properties of a Subject. * @memberof grafeas.v1 - * @interface ISourceContext - * @property {grafeas.v1.ICloudRepoSourceContext|null} [cloudRepo] SourceContext cloudRepo - * @property {grafeas.v1.IGerritSourceContext|null} [gerrit] SourceContext gerrit - * @property {grafeas.v1.IGitSourceContext|null} [git] SourceContext git - * @property {Object.|null} [labels] SourceContext labels + * @interface ISubject + * @property {string|null} [name] Subject name + * @property {Object.|null} [digest] Subject digest */ /** - * Constructs a new SourceContext. + * Constructs a new Subject. * @memberof grafeas.v1 - * @classdesc Represents a SourceContext. - * @implements ISourceContext + * @classdesc Represents a Subject. + * @implements ISubject * @constructor - * @param {grafeas.v1.ISourceContext=} [properties] Properties to set + * @param {grafeas.v1.ISubject=} [properties] Properties to set */ - function SourceContext(properties) { - this.labels = {}; + function Subject(properties) { + this.digest = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12281,130 +10308,90 @@ } /** - * SourceContext cloudRepo. - * @member {grafeas.v1.ICloudRepoSourceContext|null|undefined} cloudRepo - * @memberof grafeas.v1.SourceContext - * @instance - */ - SourceContext.prototype.cloudRepo = null; - - /** - * SourceContext gerrit. - * @member {grafeas.v1.IGerritSourceContext|null|undefined} gerrit - * @memberof grafeas.v1.SourceContext - * @instance - */ - SourceContext.prototype.gerrit = null; - - /** - * SourceContext git. - * @member {grafeas.v1.IGitSourceContext|null|undefined} git - * @memberof grafeas.v1.SourceContext - * @instance - */ - SourceContext.prototype.git = null; - - /** - * SourceContext labels. - * @member {Object.} labels - * @memberof grafeas.v1.SourceContext + * Subject name. + * @member {string} name + * @memberof grafeas.v1.Subject * @instance */ - SourceContext.prototype.labels = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Subject.prototype.name = ""; /** - * SourceContext context. - * @member {"cloudRepo"|"gerrit"|"git"|undefined} context - * @memberof grafeas.v1.SourceContext + * Subject digest. + * @member {Object.} digest + * @memberof grafeas.v1.Subject * @instance */ - Object.defineProperty(SourceContext.prototype, "context", { - get: $util.oneOfGetter($oneOfFields = ["cloudRepo", "gerrit", "git"]), - set: $util.oneOfSetter($oneOfFields) - }); + Subject.prototype.digest = $util.emptyObject; /** - * Creates a new SourceContext instance using the specified properties. + * Creates a new Subject instance using the specified properties. * @function create - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static - * @param {grafeas.v1.ISourceContext=} [properties] Properties to set - * @returns {grafeas.v1.SourceContext} SourceContext instance + * @param {grafeas.v1.ISubject=} [properties] Properties to set + * @returns {grafeas.v1.Subject} Subject instance */ - SourceContext.create = function create(properties) { - return new SourceContext(properties); + Subject.create = function create(properties) { + return new Subject(properties); }; /** - * Encodes the specified SourceContext message. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. + * Encodes the specified Subject message. Does not implicitly {@link grafeas.v1.Subject.verify|verify} messages. * @function encode - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static - * @param {grafeas.v1.ISourceContext} message SourceContext message or plain object to encode + * @param {grafeas.v1.ISubject} message Subject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceContext.encode = function encode(message, writer) { + Subject.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudRepo != null && Object.hasOwnProperty.call(message, "cloudRepo")) - $root.grafeas.v1.CloudRepoSourceContext.encode(message.cloudRepo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gerrit != null && Object.hasOwnProperty.call(message, "gerrit")) - $root.grafeas.v1.GerritSourceContext.encode(message.gerrit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.git != null && Object.hasOwnProperty.call(message, "git")) - $root.grafeas.v1.GitSourceContext.encode(message.git, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) + for (var keys = Object.keys(message.digest), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.digest[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified SourceContext message, length delimited. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. + * Encodes the specified Subject message, length delimited. Does not implicitly {@link grafeas.v1.Subject.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static - * @param {grafeas.v1.ISourceContext} message SourceContext message or plain object to encode + * @param {grafeas.v1.ISubject} message Subject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceContext.encodeDelimited = function encodeDelimited(message, writer) { + Subject.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceContext message from the specified reader or buffer. + * Decodes a Subject message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.SourceContext} SourceContext + * @returns {grafeas.v1.Subject} Subject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceContext.decode = function decode(reader, length) { + Subject.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.SourceContext(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Subject(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cloudRepo = $root.grafeas.v1.CloudRepoSourceContext.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.gerrit = $root.grafeas.v1.GerritSourceContext.decode(reader, reader.uint32()); - break; - case 3: - message.git = $root.grafeas.v1.GitSourceContext.decode(reader, reader.uint32()); - break; - case 4: - if (message.labels === $util.emptyObject) - message.labels = {}; + if (message.digest === $util.emptyObject) + message.digest = {}; var end2 = reader.uint32() + reader.pos; key = ""; value = ""; @@ -12422,7 +10409,7 @@ break; } } - message.labels[key] = value; + message.digest[key] = value; break; default: reader.skipType(tag & 7); @@ -12433,181 +10420,134 @@ }; /** - * Decodes a SourceContext message from the specified reader or buffer, length delimited. + * Decodes a Subject message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.SourceContext} SourceContext + * @returns {grafeas.v1.Subject} Subject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceContext.decodeDelimited = function decodeDelimited(reader) { + Subject.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceContext message. + * Verifies a Subject message. * @function verify - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceContext.verify = function verify(message) { + Subject.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.cloudRepo != null && message.hasOwnProperty("cloudRepo")) { - properties.context = 1; - { - var error = $root.grafeas.v1.CloudRepoSourceContext.verify(message.cloudRepo); - if (error) - return "cloudRepo." + error; - } - } - if (message.gerrit != null && message.hasOwnProperty("gerrit")) { - if (properties.context === 1) - return "context: multiple values"; - properties.context = 1; - { - var error = $root.grafeas.v1.GerritSourceContext.verify(message.gerrit); - if (error) - return "gerrit." + error; - } - } - if (message.git != null && message.hasOwnProperty("git")) { - if (properties.context === 1) - return "context: multiple values"; - properties.context = 1; - { - var error = $root.grafeas.v1.GitSourceContext.verify(message.git); - if (error) - return "git." + error; - } - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.digest != null && message.hasOwnProperty("digest")) { + if (!$util.isObject(message.digest)) + return "digest: object expected"; + var key = Object.keys(message.digest); for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (!$util.isString(message.digest[key[i]])) + return "digest: string{k:string} expected"; } return null; }; /** - * Creates a SourceContext message from a plain object. Also converts values to their respective internal types. + * Creates a Subject message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.SourceContext} SourceContext + * @returns {grafeas.v1.Subject} Subject */ - SourceContext.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.SourceContext) + Subject.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Subject) return object; - var message = new $root.grafeas.v1.SourceContext(); - if (object.cloudRepo != null) { - if (typeof object.cloudRepo !== "object") - throw TypeError(".grafeas.v1.SourceContext.cloudRepo: object expected"); - message.cloudRepo = $root.grafeas.v1.CloudRepoSourceContext.fromObject(object.cloudRepo); - } - if (object.gerrit != null) { - if (typeof object.gerrit !== "object") - throw TypeError(".grafeas.v1.SourceContext.gerrit: object expected"); - message.gerrit = $root.grafeas.v1.GerritSourceContext.fromObject(object.gerrit); - } - if (object.git != null) { - if (typeof object.git !== "object") - throw TypeError(".grafeas.v1.SourceContext.git: object expected"); - message.git = $root.grafeas.v1.GitSourceContext.fromObject(object.git); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".grafeas.v1.SourceContext.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.grafeas.v1.Subject(); + if (object.name != null) + message.name = String(object.name); + if (object.digest) { + if (typeof object.digest !== "object") + throw TypeError(".grafeas.v1.Subject.digest: object expected"); + message.digest = {}; + for (var keys = Object.keys(object.digest), i = 0; i < keys.length; ++i) + message.digest[keys[i]] = String(object.digest[keys[i]]); } return message; }; /** - * Creates a plain object from a SourceContext message. Also converts values to other types if specified. + * Creates a plain object from a Subject message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @static - * @param {grafeas.v1.SourceContext} message SourceContext + * @param {grafeas.v1.Subject} message Subject * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceContext.toObject = function toObject(message, options) { + Subject.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.objects || options.defaults) - object.labels = {}; - if (message.cloudRepo != null && message.hasOwnProperty("cloudRepo")) { - object.cloudRepo = $root.grafeas.v1.CloudRepoSourceContext.toObject(message.cloudRepo, options); - if (options.oneofs) - object.context = "cloudRepo"; - } - if (message.gerrit != null && message.hasOwnProperty("gerrit")) { - object.gerrit = $root.grafeas.v1.GerritSourceContext.toObject(message.gerrit, options); - if (options.oneofs) - object.context = "gerrit"; - } - if (message.git != null && message.hasOwnProperty("git")) { - object.git = $root.grafeas.v1.GitSourceContext.toObject(message.git, options); - if (options.oneofs) - object.context = "git"; - } + object.digest = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; + if (message.digest && (keys2 = Object.keys(message.digest)).length) { + object.digest = {}; for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.digest[keys2[j]] = message.digest[keys2[j]]; } return object; }; /** - * Converts this SourceContext to JSON. + * Converts this Subject to JSON. * @function toJSON - * @memberof grafeas.v1.SourceContext + * @memberof grafeas.v1.Subject * @instance * @returns {Object.} JSON object */ - SourceContext.prototype.toJSON = function toJSON() { + Subject.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SourceContext; + return Subject; })(); - v1.AliasContext = (function() { + v1.SlsaProvenance = (function() { /** - * Properties of an AliasContext. + * Properties of a SlsaProvenance. * @memberof grafeas.v1 - * @interface IAliasContext - * @property {grafeas.v1.AliasContext.Kind|null} [kind] AliasContext kind - * @property {string|null} [name] AliasContext name + * @interface ISlsaProvenance + * @property {grafeas.v1.SlsaProvenance.ISlsaBuilder|null} [builder] SlsaProvenance builder + * @property {grafeas.v1.SlsaProvenance.ISlsaRecipe|null} [recipe] SlsaProvenance recipe + * @property {grafeas.v1.SlsaProvenance.ISlsaMetadata|null} [metadata] SlsaProvenance metadata + * @property {Array.|null} [materials] SlsaProvenance materials */ /** - * Constructs a new AliasContext. + * Constructs a new SlsaProvenance. * @memberof grafeas.v1 - * @classdesc Represents an AliasContext. - * @implements IAliasContext + * @classdesc Represents a SlsaProvenance. + * @implements ISlsaProvenance * @constructor - * @param {grafeas.v1.IAliasContext=} [properties] Properties to set + * @param {grafeas.v1.ISlsaProvenance=} [properties] Properties to set */ - function AliasContext(properties) { + function SlsaProvenance(properties) { + this.materials = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12615,88 +10555,117 @@ } /** - * AliasContext kind. - * @member {grafeas.v1.AliasContext.Kind} kind - * @memberof grafeas.v1.AliasContext + * SlsaProvenance builder. + * @member {grafeas.v1.SlsaProvenance.ISlsaBuilder|null|undefined} builder + * @memberof grafeas.v1.SlsaProvenance * @instance */ - AliasContext.prototype.kind = 0; + SlsaProvenance.prototype.builder = null; /** - * AliasContext name. - * @member {string} name - * @memberof grafeas.v1.AliasContext + * SlsaProvenance recipe. + * @member {grafeas.v1.SlsaProvenance.ISlsaRecipe|null|undefined} recipe + * @memberof grafeas.v1.SlsaProvenance * @instance */ - AliasContext.prototype.name = ""; + SlsaProvenance.prototype.recipe = null; /** - * Creates a new AliasContext instance using the specified properties. + * SlsaProvenance metadata. + * @member {grafeas.v1.SlsaProvenance.ISlsaMetadata|null|undefined} metadata + * @memberof grafeas.v1.SlsaProvenance + * @instance + */ + SlsaProvenance.prototype.metadata = null; + + /** + * SlsaProvenance materials. + * @member {Array.} materials + * @memberof grafeas.v1.SlsaProvenance + * @instance + */ + SlsaProvenance.prototype.materials = $util.emptyArray; + + /** + * Creates a new SlsaProvenance instance using the specified properties. * @function create - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static - * @param {grafeas.v1.IAliasContext=} [properties] Properties to set - * @returns {grafeas.v1.AliasContext} AliasContext instance + * @param {grafeas.v1.ISlsaProvenance=} [properties] Properties to set + * @returns {grafeas.v1.SlsaProvenance} SlsaProvenance instance */ - AliasContext.create = function create(properties) { - return new AliasContext(properties); + SlsaProvenance.create = function create(properties) { + return new SlsaProvenance(properties); }; /** - * Encodes the specified AliasContext message. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. + * Encodes the specified SlsaProvenance message. Does not implicitly {@link grafeas.v1.SlsaProvenance.verify|verify} messages. * @function encode - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static - * @param {grafeas.v1.IAliasContext} message AliasContext message or plain object to encode + * @param {grafeas.v1.ISlsaProvenance} message SlsaProvenance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AliasContext.encode = function encode(message, writer) { + SlsaProvenance.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.builder != null && Object.hasOwnProperty.call(message, "builder")) + $root.grafeas.v1.SlsaProvenance.SlsaBuilder.encode(message.builder, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recipe != null && Object.hasOwnProperty.call(message, "recipe")) + $root.grafeas.v1.SlsaProvenance.SlsaRecipe.encode(message.recipe, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.grafeas.v1.SlsaProvenance.SlsaMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.materials != null && message.materials.length) + for (var i = 0; i < message.materials.length; ++i) + $root.grafeas.v1.SlsaProvenance.Material.encode(message.materials[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified AliasContext message, length delimited. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. + * Encodes the specified SlsaProvenance message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static - * @param {grafeas.v1.IAliasContext} message AliasContext message or plain object to encode + * @param {grafeas.v1.ISlsaProvenance} message SlsaProvenance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AliasContext.encodeDelimited = function encodeDelimited(message, writer) { + SlsaProvenance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AliasContext message from the specified reader or buffer. + * Decodes a SlsaProvenance message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.AliasContext} AliasContext + * @returns {grafeas.v1.SlsaProvenance} SlsaProvenance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AliasContext.decode = function decode(reader, length) { + SlsaProvenance.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.AliasContext(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.SlsaProvenance(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.int32(); + message.builder = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.decode(reader, reader.uint32()); break; case 2: - message.name = reader.string(); + message.recipe = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.decode(reader, reader.uint32()); + break; + case 3: + message.metadata = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.materials && message.materials.length)) + message.materials = []; + message.materials.push($root.grafeas.v1.SlsaProvenance.Material.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -12707,1159 +10676,1435 @@ }; /** - * Decodes an AliasContext message from the specified reader or buffer, length delimited. + * Decodes a SlsaProvenance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.AliasContext} AliasContext + * @returns {grafeas.v1.SlsaProvenance} SlsaProvenance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AliasContext.decodeDelimited = function decodeDelimited(reader) { + SlsaProvenance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AliasContext message. + * Verifies a SlsaProvenance message. * @function verify - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AliasContext.verify = function verify(message) { + SlsaProvenance.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; + if (message.builder != null && message.hasOwnProperty("builder")) { + var error = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.verify(message.builder); + if (error) + return "builder." + error; + } + if (message.recipe != null && message.hasOwnProperty("recipe")) { + var error = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.verify(message.recipe); + if (error) + return "recipe." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.materials != null && message.hasOwnProperty("materials")) { + if (!Array.isArray(message.materials)) + return "materials: array expected"; + for (var i = 0; i < message.materials.length; ++i) { + var error = $root.grafeas.v1.SlsaProvenance.Material.verify(message.materials[i]); + if (error) + return "materials." + error; } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + } return null; }; /** - * Creates an AliasContext message from a plain object. Also converts values to their respective internal types. + * Creates a SlsaProvenance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.AliasContext} AliasContext + * @returns {grafeas.v1.SlsaProvenance} SlsaProvenance */ - AliasContext.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.AliasContext) + SlsaProvenance.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.SlsaProvenance) return object; - var message = new $root.grafeas.v1.AliasContext(); - switch (object.kind) { - case "KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "FIXED": - case 1: - message.kind = 1; - break; - case "MOVABLE": - case 2: - message.kind = 2; - break; - case "OTHER": - case 4: - message.kind = 4; - break; + var message = new $root.grafeas.v1.SlsaProvenance(); + if (object.builder != null) { + if (typeof object.builder !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.builder: object expected"); + message.builder = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.fromObject(object.builder); + } + if (object.recipe != null) { + if (typeof object.recipe !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.recipe: object expected"); + message.recipe = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.fromObject(object.recipe); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.metadata: object expected"); + message.metadata = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.fromObject(object.metadata); + } + if (object.materials) { + if (!Array.isArray(object.materials)) + throw TypeError(".grafeas.v1.SlsaProvenance.materials: array expected"); + message.materials = []; + for (var i = 0; i < object.materials.length; ++i) { + if (typeof object.materials[i] !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.materials: object expected"); + message.materials[i] = $root.grafeas.v1.SlsaProvenance.Material.fromObject(object.materials[i]); + } } - if (object.name != null) - message.name = String(object.name); return message; }; /** - * Creates a plain object from an AliasContext message. Also converts values to other types if specified. + * Creates a plain object from a SlsaProvenance message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @static - * @param {grafeas.v1.AliasContext} message AliasContext + * @param {grafeas.v1.SlsaProvenance} message SlsaProvenance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AliasContext.toObject = function toObject(message, options) { + SlsaProvenance.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.materials = []; if (options.defaults) { - object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; - object.name = ""; + object.builder = null; + object.recipe = null; + object.metadata = null; + } + if (message.builder != null && message.hasOwnProperty("builder")) + object.builder = $root.grafeas.v1.SlsaProvenance.SlsaBuilder.toObject(message.builder, options); + if (message.recipe != null && message.hasOwnProperty("recipe")) + object.recipe = $root.grafeas.v1.SlsaProvenance.SlsaRecipe.toObject(message.recipe, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.grafeas.v1.SlsaProvenance.SlsaMetadata.toObject(message.metadata, options); + if (message.materials && message.materials.length) { + object.materials = []; + for (var j = 0; j < message.materials.length; ++j) + object.materials[j] = $root.grafeas.v1.SlsaProvenance.Material.toObject(message.materials[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.grafeas.v1.AliasContext.Kind[message.kind] : message.kind; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this AliasContext to JSON. + * Converts this SlsaProvenance to JSON. * @function toJSON - * @memberof grafeas.v1.AliasContext + * @memberof grafeas.v1.SlsaProvenance * @instance * @returns {Object.} JSON object */ - AliasContext.prototype.toJSON = function toJSON() { + SlsaProvenance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Kind enum. - * @name grafeas.v1.AliasContext.Kind - * @enum {number} - * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value - * @property {number} FIXED=1 FIXED value - * @property {number} MOVABLE=2 MOVABLE value - * @property {number} OTHER=4 OTHER value - */ - AliasContext.Kind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIXED"] = 1; - values[valuesById[2] = "MOVABLE"] = 2; - values[valuesById[4] = "OTHER"] = 4; - return values; - })(); + SlsaProvenance.SlsaRecipe = (function() { + + /** + * Properties of a SlsaRecipe. + * @memberof grafeas.v1.SlsaProvenance + * @interface ISlsaRecipe + * @property {string|null} [type] SlsaRecipe type + * @property {number|Long|null} [definedInMaterial] SlsaRecipe definedInMaterial + * @property {string|null} [entryPoint] SlsaRecipe entryPoint + * @property {google.protobuf.IAny|null} ["arguments"] SlsaRecipe arguments + * @property {google.protobuf.IAny|null} [environment] SlsaRecipe environment + */ + + /** + * Constructs a new SlsaRecipe. + * @memberof grafeas.v1.SlsaProvenance + * @classdesc Represents a SlsaRecipe. + * @implements ISlsaRecipe + * @constructor + * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe=} [properties] Properties to set + */ + function SlsaRecipe(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]]; + } + + /** + * SlsaRecipe type. + * @member {string} type + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @instance + */ + SlsaRecipe.prototype.type = ""; + + /** + * SlsaRecipe definedInMaterial. + * @member {number|Long} definedInMaterial + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @instance + */ + SlsaRecipe.prototype.definedInMaterial = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SlsaRecipe entryPoint. + * @member {string} entryPoint + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @instance + */ + SlsaRecipe.prototype.entryPoint = ""; + + /** + * SlsaRecipe arguments. + * @member {google.protobuf.IAny|null|undefined} arguments + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @instance + */ + SlsaRecipe.prototype["arguments"] = null; + + /** + * SlsaRecipe environment. + * @member {google.protobuf.IAny|null|undefined} environment + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @instance + */ + SlsaRecipe.prototype.environment = null; - return AliasContext; - })(); + /** + * Creates a new SlsaRecipe instance using the specified properties. + * @function create + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe=} [properties] Properties to set + * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe instance + */ + SlsaRecipe.create = function create(properties) { + return new SlsaRecipe(properties); + }; - v1.CloudRepoSourceContext = (function() { + /** + * Encodes the specified SlsaRecipe message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe} message SlsaRecipe message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaRecipe.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.definedInMaterial != null && Object.hasOwnProperty.call(message, "definedInMaterial")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.definedInMaterial); + if (message.entryPoint != null && Object.hasOwnProperty.call(message, "entryPoint")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryPoint); + if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) + $root.google.protobuf.Any.encode(message["arguments"], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.protobuf.Any.encode(message.environment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Properties of a CloudRepoSourceContext. - * @memberof grafeas.v1 - * @interface ICloudRepoSourceContext - * @property {grafeas.v1.IRepoId|null} [repoId] CloudRepoSourceContext repoId - * @property {string|null} [revisionId] CloudRepoSourceContext revisionId - * @property {grafeas.v1.IAliasContext|null} [aliasContext] CloudRepoSourceContext aliasContext - */ + /** + * Encodes the specified SlsaRecipe message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaRecipe.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaRecipe} message SlsaRecipe message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaRecipe.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new CloudRepoSourceContext. - * @memberof grafeas.v1 - * @classdesc Represents a CloudRepoSourceContext. - * @implements ICloudRepoSourceContext - * @constructor - * @param {grafeas.v1.ICloudRepoSourceContext=} [properties] Properties to set - */ - function CloudRepoSourceContext(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 a SlsaRecipe message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaRecipe.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.SlsaProvenance.SlsaRecipe(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.definedInMaterial = reader.int64(); + break; + case 3: + message.entryPoint = reader.string(); + break; + case 4: + message["arguments"] = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 5: + message.environment = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * CloudRepoSourceContext repoId. - * @member {grafeas.v1.IRepoId|null|undefined} repoId - * @memberof grafeas.v1.CloudRepoSourceContext - * @instance - */ - CloudRepoSourceContext.prototype.repoId = null; + /** + * Decodes a SlsaRecipe message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaRecipe.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * CloudRepoSourceContext revisionId. - * @member {string|null|undefined} revisionId - * @memberof grafeas.v1.CloudRepoSourceContext - * @instance - */ - CloudRepoSourceContext.prototype.revisionId = null; + /** + * Verifies a SlsaRecipe message. + * @function verify + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SlsaRecipe.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.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) + if (!$util.isInteger(message.definedInMaterial) && !(message.definedInMaterial && $util.isInteger(message.definedInMaterial.low) && $util.isInteger(message.definedInMaterial.high))) + return "definedInMaterial: integer|Long expected"; + if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) + if (!$util.isString(message.entryPoint)) + return "entryPoint: string expected"; + if (message["arguments"] != null && message.hasOwnProperty("arguments")) { + var error = $root.google.protobuf.Any.verify(message["arguments"]); + if (error) + return "arguments." + error; + } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.protobuf.Any.verify(message.environment); + if (error) + return "environment." + error; + } + return null; + }; - /** - * CloudRepoSourceContext aliasContext. - * @member {grafeas.v1.IAliasContext|null|undefined} aliasContext - * @memberof grafeas.v1.CloudRepoSourceContext - * @instance - */ - CloudRepoSourceContext.prototype.aliasContext = null; + /** + * Creates a SlsaRecipe message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.SlsaProvenance.SlsaRecipe} SlsaRecipe + */ + SlsaRecipe.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaRecipe) + return object; + var message = new $root.grafeas.v1.SlsaProvenance.SlsaRecipe(); + if (object.type != null) + message.type = String(object.type); + if (object.definedInMaterial != null) + if ($util.Long) + (message.definedInMaterial = $util.Long.fromValue(object.definedInMaterial)).unsigned = false; + else if (typeof object.definedInMaterial === "string") + message.definedInMaterial = parseInt(object.definedInMaterial, 10); + else if (typeof object.definedInMaterial === "number") + message.definedInMaterial = object.definedInMaterial; + else if (typeof object.definedInMaterial === "object") + message.definedInMaterial = new $util.LongBits(object.definedInMaterial.low >>> 0, object.definedInMaterial.high >>> 0).toNumber(); + if (object.entryPoint != null) + message.entryPoint = String(object.entryPoint); + if (object["arguments"] != null) { + if (typeof object["arguments"] !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.SlsaRecipe.arguments: object expected"); + message["arguments"] = $root.google.protobuf.Any.fromObject(object["arguments"]); + } + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.SlsaRecipe.environment: object expected"); + message.environment = $root.google.protobuf.Any.fromObject(object.environment); + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a plain object from a SlsaRecipe message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @static + * @param {grafeas.v1.SlsaProvenance.SlsaRecipe} message SlsaRecipe + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SlsaRecipe.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.definedInMaterial = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.definedInMaterial = options.longs === String ? "0" : 0; + object.entryPoint = ""; + object["arguments"] = null; + object.environment = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.definedInMaterial != null && message.hasOwnProperty("definedInMaterial")) + if (typeof message.definedInMaterial === "number") + object.definedInMaterial = options.longs === String ? String(message.definedInMaterial) : message.definedInMaterial; + else + object.definedInMaterial = options.longs === String ? $util.Long.prototype.toString.call(message.definedInMaterial) : options.longs === Number ? new $util.LongBits(message.definedInMaterial.low >>> 0, message.definedInMaterial.high >>> 0).toNumber() : message.definedInMaterial; + if (message.entryPoint != null && message.hasOwnProperty("entryPoint")) + object.entryPoint = message.entryPoint; + if (message["arguments"] != null && message.hasOwnProperty("arguments")) + object["arguments"] = $root.google.protobuf.Any.toObject(message["arguments"], options); + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.protobuf.Any.toObject(message.environment, options); + return object; + }; - /** - * CloudRepoSourceContext revision. - * @member {"revisionId"|"aliasContext"|undefined} revision - * @memberof grafeas.v1.CloudRepoSourceContext - * @instance - */ - Object.defineProperty(CloudRepoSourceContext.prototype, "revision", { - get: $util.oneOfGetter($oneOfFields = ["revisionId", "aliasContext"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this SlsaRecipe to JSON. + * @function toJSON + * @memberof grafeas.v1.SlsaProvenance.SlsaRecipe + * @instance + * @returns {Object.} JSON object + */ + SlsaRecipe.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new CloudRepoSourceContext instance using the specified properties. - * @function create - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {grafeas.v1.ICloudRepoSourceContext=} [properties] Properties to set - * @returns {grafeas.v1.CloudRepoSourceContext} CloudRepoSourceContext instance - */ - CloudRepoSourceContext.create = function create(properties) { - return new CloudRepoSourceContext(properties); - }; + return SlsaRecipe; + })(); - /** - * Encodes the specified CloudRepoSourceContext message. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {grafeas.v1.ICloudRepoSourceContext} message CloudRepoSourceContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRepoSourceContext.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.repoId != null && Object.hasOwnProperty.call(message, "repoId")) - $root.grafeas.v1.RepoId.encode(message.repoId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); - if (message.aliasContext != null && Object.hasOwnProperty.call(message, "aliasContext")) - $root.grafeas.v1.AliasContext.encode(message.aliasContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + SlsaProvenance.SlsaCompleteness = (function() { - /** - * Encodes the specified CloudRepoSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {grafeas.v1.ICloudRepoSourceContext} message CloudRepoSourceContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRepoSourceContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a SlsaCompleteness. + * @memberof grafeas.v1.SlsaProvenance + * @interface ISlsaCompleteness + * @property {boolean|null} ["arguments"] SlsaCompleteness arguments + * @property {boolean|null} [environment] SlsaCompleteness environment + * @property {boolean|null} [materials] SlsaCompleteness materials + */ - /** - * Decodes a CloudRepoSourceContext message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.CloudRepoSourceContext} CloudRepoSourceContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRepoSourceContext.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.CloudRepoSourceContext(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.repoId = $root.grafeas.v1.RepoId.decode(reader, reader.uint32()); - break; - case 2: - message.revisionId = reader.string(); - break; - case 3: - message.aliasContext = $root.grafeas.v1.AliasContext.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new SlsaCompleteness. + * @memberof grafeas.v1.SlsaProvenance + * @classdesc Represents a SlsaCompleteness. + * @implements ISlsaCompleteness + * @constructor + * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness=} [properties] Properties to set + */ + function SlsaCompleteness(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]]; } - return message; - }; - /** - * Decodes a CloudRepoSourceContext message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.CloudRepoSourceContext} CloudRepoSourceContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRepoSourceContext.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SlsaCompleteness arguments. + * @member {boolean} arguments + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @instance + */ + SlsaCompleteness.prototype["arguments"] = false; - /** - * Verifies a CloudRepoSourceContext message. - * @function verify - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRepoSourceContext.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.repoId != null && message.hasOwnProperty("repoId")) { - var error = $root.grafeas.v1.RepoId.verify(message.repoId); - if (error) - return "repoId." + error; - } - if (message.revisionId != null && message.hasOwnProperty("revisionId")) { - properties.revision = 1; - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - } - if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { - if (properties.revision === 1) - return "revision: multiple values"; - properties.revision = 1; - { - var error = $root.grafeas.v1.AliasContext.verify(message.aliasContext); - if (error) - return "aliasContext." + error; + /** + * SlsaCompleteness environment. + * @member {boolean} environment + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @instance + */ + SlsaCompleteness.prototype.environment = false; + + /** + * SlsaCompleteness materials. + * @member {boolean} materials + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @instance + */ + SlsaCompleteness.prototype.materials = false; + + /** + * Creates a new SlsaCompleteness instance using the specified properties. + * @function create + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness=} [properties] Properties to set + * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness instance + */ + SlsaCompleteness.create = function create(properties) { + return new SlsaCompleteness(properties); + }; + + /** + * Encodes the specified SlsaCompleteness message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness} message SlsaCompleteness message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaCompleteness.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["arguments"] != null && Object.hasOwnProperty.call(message, "arguments")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message["arguments"]); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.environment); + if (message.materials != null && Object.hasOwnProperty.call(message, "materials")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.materials); + return writer; + }; + + /** + * Encodes the specified SlsaCompleteness message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaCompleteness.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaCompleteness} message SlsaCompleteness message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaCompleteness.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SlsaCompleteness message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaCompleteness.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.SlsaProvenance.SlsaCompleteness(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["arguments"] = reader.bool(); + break; + case 2: + message.environment = reader.bool(); + break; + case 3: + message.materials = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return null; - }; + return message; + }; - /** - * Creates a CloudRepoSourceContext message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.CloudRepoSourceContext} CloudRepoSourceContext - */ - CloudRepoSourceContext.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.CloudRepoSourceContext) - return object; - var message = new $root.grafeas.v1.CloudRepoSourceContext(); - if (object.repoId != null) { - if (typeof object.repoId !== "object") - throw TypeError(".grafeas.v1.CloudRepoSourceContext.repoId: object expected"); - message.repoId = $root.grafeas.v1.RepoId.fromObject(object.repoId); - } - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.aliasContext != null) { - if (typeof object.aliasContext !== "object") - throw TypeError(".grafeas.v1.CloudRepoSourceContext.aliasContext: object expected"); - message.aliasContext = $root.grafeas.v1.AliasContext.fromObject(object.aliasContext); - } - return message; - }; + /** + * Decodes a SlsaCompleteness message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaCompleteness.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a CloudRepoSourceContext message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.CloudRepoSourceContext - * @static - * @param {grafeas.v1.CloudRepoSourceContext} message CloudRepoSourceContext - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRepoSourceContext.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.repoId = null; - if (message.repoId != null && message.hasOwnProperty("repoId")) - object.repoId = $root.grafeas.v1.RepoId.toObject(message.repoId, options); - if (message.revisionId != null && message.hasOwnProperty("revisionId")) { - object.revisionId = message.revisionId; - if (options.oneofs) - object.revision = "revisionId"; - } - if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { - object.aliasContext = $root.grafeas.v1.AliasContext.toObject(message.aliasContext, options); - if (options.oneofs) - object.revision = "aliasContext"; - } - return object; - }; + /** + * Verifies a SlsaCompleteness message. + * @function verify + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SlsaCompleteness.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["arguments"] != null && message.hasOwnProperty("arguments")) + if (typeof message["arguments"] !== "boolean") + return "arguments: boolean expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (typeof message.environment !== "boolean") + return "environment: boolean expected"; + if (message.materials != null && message.hasOwnProperty("materials")) + if (typeof message.materials !== "boolean") + return "materials: boolean expected"; + return null; + }; - /** - * Converts this CloudRepoSourceContext to JSON. - * @function toJSON - * @memberof grafeas.v1.CloudRepoSourceContext - * @instance - * @returns {Object.} JSON object - */ - CloudRepoSourceContext.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a SlsaCompleteness message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.SlsaProvenance.SlsaCompleteness} SlsaCompleteness + */ + SlsaCompleteness.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaCompleteness) + return object; + var message = new $root.grafeas.v1.SlsaProvenance.SlsaCompleteness(); + if (object["arguments"] != null) + message["arguments"] = Boolean(object["arguments"]); + if (object.environment != null) + message.environment = Boolean(object.environment); + if (object.materials != null) + message.materials = Boolean(object.materials); + return message; + }; - return CloudRepoSourceContext; - })(); + /** + * Creates a plain object from a SlsaCompleteness message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @static + * @param {grafeas.v1.SlsaProvenance.SlsaCompleteness} message SlsaCompleteness + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SlsaCompleteness.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["arguments"] = false; + object.environment = false; + object.materials = false; + } + if (message["arguments"] != null && message.hasOwnProperty("arguments")) + object["arguments"] = message["arguments"]; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.materials != null && message.hasOwnProperty("materials")) + object.materials = message.materials; + return object; + }; - v1.GerritSourceContext = (function() { + /** + * Converts this SlsaCompleteness to JSON. + * @function toJSON + * @memberof grafeas.v1.SlsaProvenance.SlsaCompleteness + * @instance + * @returns {Object.} JSON object + */ + SlsaCompleteness.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a GerritSourceContext. - * @memberof grafeas.v1 - * @interface IGerritSourceContext - * @property {string|null} [hostUri] GerritSourceContext hostUri - * @property {string|null} [gerritProject] GerritSourceContext gerritProject - * @property {string|null} [revisionId] GerritSourceContext revisionId - * @property {grafeas.v1.IAliasContext|null} [aliasContext] GerritSourceContext aliasContext - */ + return SlsaCompleteness; + })(); - /** - * Constructs a new GerritSourceContext. - * @memberof grafeas.v1 - * @classdesc Represents a GerritSourceContext. - * @implements IGerritSourceContext - * @constructor - * @param {grafeas.v1.IGerritSourceContext=} [properties] Properties to set - */ - function GerritSourceContext(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]]; - } + SlsaProvenance.SlsaMetadata = (function() { - /** - * GerritSourceContext hostUri. - * @member {string} hostUri - * @memberof grafeas.v1.GerritSourceContext - * @instance - */ - GerritSourceContext.prototype.hostUri = ""; + /** + * Properties of a SlsaMetadata. + * @memberof grafeas.v1.SlsaProvenance + * @interface ISlsaMetadata + * @property {string|null} [buildInvocationId] SlsaMetadata buildInvocationId + * @property {google.protobuf.ITimestamp|null} [buildStartedOn] SlsaMetadata buildStartedOn + * @property {google.protobuf.ITimestamp|null} [buildFinishedOn] SlsaMetadata buildFinishedOn + * @property {grafeas.v1.SlsaProvenance.ISlsaCompleteness|null} [completeness] SlsaMetadata completeness + * @property {boolean|null} [reproducible] SlsaMetadata reproducible + */ - /** - * GerritSourceContext gerritProject. - * @member {string} gerritProject - * @memberof grafeas.v1.GerritSourceContext - * @instance - */ - GerritSourceContext.prototype.gerritProject = ""; + /** + * Constructs a new SlsaMetadata. + * @memberof grafeas.v1.SlsaProvenance + * @classdesc Represents a SlsaMetadata. + * @implements ISlsaMetadata + * @constructor + * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata=} [properties] Properties to set + */ + function SlsaMetadata(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]]; + } - /** - * GerritSourceContext revisionId. - * @member {string|null|undefined} revisionId - * @memberof grafeas.v1.GerritSourceContext - * @instance - */ - GerritSourceContext.prototype.revisionId = null; + /** + * SlsaMetadata buildInvocationId. + * @member {string} buildInvocationId + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @instance + */ + SlsaMetadata.prototype.buildInvocationId = ""; - /** - * GerritSourceContext aliasContext. - * @member {grafeas.v1.IAliasContext|null|undefined} aliasContext - * @memberof grafeas.v1.GerritSourceContext - * @instance - */ - GerritSourceContext.prototype.aliasContext = null; + /** + * SlsaMetadata buildStartedOn. + * @member {google.protobuf.ITimestamp|null|undefined} buildStartedOn + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @instance + */ + SlsaMetadata.prototype.buildStartedOn = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * SlsaMetadata buildFinishedOn. + * @member {google.protobuf.ITimestamp|null|undefined} buildFinishedOn + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @instance + */ + SlsaMetadata.prototype.buildFinishedOn = null; - /** - * GerritSourceContext revision. - * @member {"revisionId"|"aliasContext"|undefined} revision - * @memberof grafeas.v1.GerritSourceContext - * @instance - */ - Object.defineProperty(GerritSourceContext.prototype, "revision", { - get: $util.oneOfGetter($oneOfFields = ["revisionId", "aliasContext"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * SlsaMetadata completeness. + * @member {grafeas.v1.SlsaProvenance.ISlsaCompleteness|null|undefined} completeness + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @instance + */ + SlsaMetadata.prototype.completeness = null; - /** - * Creates a new GerritSourceContext instance using the specified properties. - * @function create - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {grafeas.v1.IGerritSourceContext=} [properties] Properties to set - * @returns {grafeas.v1.GerritSourceContext} GerritSourceContext instance - */ - GerritSourceContext.create = function create(properties) { - return new GerritSourceContext(properties); - }; + /** + * SlsaMetadata reproducible. + * @member {boolean} reproducible + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @instance + */ + SlsaMetadata.prototype.reproducible = false; - /** - * Encodes the specified GerritSourceContext message. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {grafeas.v1.IGerritSourceContext} message GerritSourceContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GerritSourceContext.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostUri != null && Object.hasOwnProperty.call(message, "hostUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostUri); - if (message.gerritProject != null && Object.hasOwnProperty.call(message, "gerritProject")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gerritProject); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.revisionId); - if (message.aliasContext != null && Object.hasOwnProperty.call(message, "aliasContext")) - $root.grafeas.v1.AliasContext.encode(message.aliasContext, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Creates a new SlsaMetadata instance using the specified properties. + * @function create + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata=} [properties] Properties to set + * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata instance + */ + SlsaMetadata.create = function create(properties) { + return new SlsaMetadata(properties); + }; - /** - * Encodes the specified GerritSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {grafeas.v1.IGerritSourceContext} message GerritSourceContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GerritSourceContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SlsaMetadata message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata} message SlsaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buildInvocationId != null && Object.hasOwnProperty.call(message, "buildInvocationId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildInvocationId); + if (message.buildStartedOn != null && Object.hasOwnProperty.call(message, "buildStartedOn")) + $root.google.protobuf.Timestamp.encode(message.buildStartedOn, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.buildFinishedOn != null && Object.hasOwnProperty.call(message, "buildFinishedOn")) + $root.google.protobuf.Timestamp.encode(message.buildFinishedOn, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.completeness != null && Object.hasOwnProperty.call(message, "completeness")) + $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.encode(message.completeness, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reproducible != null && Object.hasOwnProperty.call(message, "reproducible")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reproducible); + return writer; + }; - /** - * Decodes a GerritSourceContext message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.GerritSourceContext} GerritSourceContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GerritSourceContext.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.GerritSourceContext(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hostUri = reader.string(); - break; - case 2: - message.gerritProject = reader.string(); - break; - case 3: - message.revisionId = reader.string(); - break; - case 4: - message.aliasContext = $root.grafeas.v1.AliasContext.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified SlsaMetadata message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaMetadata} message SlsaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GerritSourceContext message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GerritSourceContext} GerritSourceContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GerritSourceContext.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SlsaMetadata message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaMetadata.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.SlsaProvenance.SlsaMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.buildInvocationId = reader.string(); + break; + case 2: + message.buildStartedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.buildFinishedOn = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.completeness = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.decode(reader, reader.uint32()); + break; + case 5: + message.reproducible = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a GerritSourceContext message. - * @function verify - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GerritSourceContext.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.hostUri != null && message.hasOwnProperty("hostUri")) - if (!$util.isString(message.hostUri)) - return "hostUri: string expected"; - if (message.gerritProject != null && message.hasOwnProperty("gerritProject")) - if (!$util.isString(message.gerritProject)) - return "gerritProject: string expected"; - if (message.revisionId != null && message.hasOwnProperty("revisionId")) { - properties.revision = 1; - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - } - if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { - if (properties.revision === 1) - return "revision: multiple values"; - properties.revision = 1; - { - var error = $root.grafeas.v1.AliasContext.verify(message.aliasContext); + /** + * Decodes a SlsaMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SlsaMetadata message. + * @function verify + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SlsaMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) + if (!$util.isString(message.buildInvocationId)) + return "buildInvocationId: string expected"; + if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) { + var error = $root.google.protobuf.Timestamp.verify(message.buildStartedOn); if (error) - return "aliasContext." + error; + return "buildStartedOn." + error; } - } - return null; - }; - - /** - * Creates a GerritSourceContext message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.GerritSourceContext} GerritSourceContext - */ - GerritSourceContext.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GerritSourceContext) - return object; - var message = new $root.grafeas.v1.GerritSourceContext(); - if (object.hostUri != null) - message.hostUri = String(object.hostUri); - if (object.gerritProject != null) - message.gerritProject = String(object.gerritProject); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.aliasContext != null) { - if (typeof object.aliasContext !== "object") - throw TypeError(".grafeas.v1.GerritSourceContext.aliasContext: object expected"); - message.aliasContext = $root.grafeas.v1.AliasContext.fromObject(object.aliasContext); - } - return message; - }; + if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) { + var error = $root.google.protobuf.Timestamp.verify(message.buildFinishedOn); + if (error) + return "buildFinishedOn." + error; + } + if (message.completeness != null && message.hasOwnProperty("completeness")) { + var error = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.verify(message.completeness); + if (error) + return "completeness." + error; + } + if (message.reproducible != null && message.hasOwnProperty("reproducible")) + if (typeof message.reproducible !== "boolean") + return "reproducible: boolean expected"; + return null; + }; - /** - * Creates a plain object from a GerritSourceContext message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.GerritSourceContext - * @static - * @param {grafeas.v1.GerritSourceContext} message GerritSourceContext - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GerritSourceContext.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostUri = ""; - object.gerritProject = ""; - } - if (message.hostUri != null && message.hasOwnProperty("hostUri")) - object.hostUri = message.hostUri; - if (message.gerritProject != null && message.hasOwnProperty("gerritProject")) - object.gerritProject = message.gerritProject; - if (message.revisionId != null && message.hasOwnProperty("revisionId")) { - object.revisionId = message.revisionId; - if (options.oneofs) - object.revision = "revisionId"; - } - if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { - object.aliasContext = $root.grafeas.v1.AliasContext.toObject(message.aliasContext, options); - if (options.oneofs) - object.revision = "aliasContext"; - } - return object; - }; + /** + * Creates a SlsaMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.SlsaProvenance.SlsaMetadata} SlsaMetadata + */ + SlsaMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaMetadata) + return object; + var message = new $root.grafeas.v1.SlsaProvenance.SlsaMetadata(); + if (object.buildInvocationId != null) + message.buildInvocationId = String(object.buildInvocationId); + if (object.buildStartedOn != null) { + if (typeof object.buildStartedOn !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.SlsaMetadata.buildStartedOn: object expected"); + message.buildStartedOn = $root.google.protobuf.Timestamp.fromObject(object.buildStartedOn); + } + if (object.buildFinishedOn != null) { + if (typeof object.buildFinishedOn !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.SlsaMetadata.buildFinishedOn: object expected"); + message.buildFinishedOn = $root.google.protobuf.Timestamp.fromObject(object.buildFinishedOn); + } + if (object.completeness != null) { + if (typeof object.completeness !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.SlsaMetadata.completeness: object expected"); + message.completeness = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.fromObject(object.completeness); + } + if (object.reproducible != null) + message.reproducible = Boolean(object.reproducible); + return message; + }; - /** - * Converts this GerritSourceContext to JSON. - * @function toJSON - * @memberof grafeas.v1.GerritSourceContext - * @instance - * @returns {Object.} JSON object - */ - GerritSourceContext.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a SlsaMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @static + * @param {grafeas.v1.SlsaProvenance.SlsaMetadata} message SlsaMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SlsaMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.buildInvocationId = ""; + object.buildStartedOn = null; + object.buildFinishedOn = null; + object.completeness = null; + object.reproducible = false; + } + if (message.buildInvocationId != null && message.hasOwnProperty("buildInvocationId")) + object.buildInvocationId = message.buildInvocationId; + if (message.buildStartedOn != null && message.hasOwnProperty("buildStartedOn")) + object.buildStartedOn = $root.google.protobuf.Timestamp.toObject(message.buildStartedOn, options); + if (message.buildFinishedOn != null && message.hasOwnProperty("buildFinishedOn")) + object.buildFinishedOn = $root.google.protobuf.Timestamp.toObject(message.buildFinishedOn, options); + if (message.completeness != null && message.hasOwnProperty("completeness")) + object.completeness = $root.grafeas.v1.SlsaProvenance.SlsaCompleteness.toObject(message.completeness, options); + if (message.reproducible != null && message.hasOwnProperty("reproducible")) + object.reproducible = message.reproducible; + return object; + }; - return GerritSourceContext; - })(); + /** + * Converts this SlsaMetadata to JSON. + * @function toJSON + * @memberof grafeas.v1.SlsaProvenance.SlsaMetadata + * @instance + * @returns {Object.} JSON object + */ + SlsaMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.GitSourceContext = (function() { + return SlsaMetadata; + })(); - /** - * Properties of a GitSourceContext. - * @memberof grafeas.v1 - * @interface IGitSourceContext - * @property {string|null} [url] GitSourceContext url - * @property {string|null} [revisionId] GitSourceContext revisionId - */ + SlsaProvenance.SlsaBuilder = (function() { - /** - * Constructs a new GitSourceContext. - * @memberof grafeas.v1 - * @classdesc Represents a GitSourceContext. - * @implements IGitSourceContext - * @constructor - * @param {grafeas.v1.IGitSourceContext=} [properties] Properties to set - */ - function GitSourceContext(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 SlsaBuilder. + * @memberof grafeas.v1.SlsaProvenance + * @interface ISlsaBuilder + * @property {string|null} [id] SlsaBuilder id + */ - /** - * GitSourceContext url. - * @member {string} url - * @memberof grafeas.v1.GitSourceContext - * @instance - */ - GitSourceContext.prototype.url = ""; + /** + * Constructs a new SlsaBuilder. + * @memberof grafeas.v1.SlsaProvenance + * @classdesc Represents a SlsaBuilder. + * @implements ISlsaBuilder + * @constructor + * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder=} [properties] Properties to set + */ + function SlsaBuilder(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]]; + } - /** - * GitSourceContext revisionId. - * @member {string} revisionId - * @memberof grafeas.v1.GitSourceContext - * @instance - */ - GitSourceContext.prototype.revisionId = ""; + /** + * SlsaBuilder id. + * @member {string} id + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @instance + */ + SlsaBuilder.prototype.id = ""; - /** - * Creates a new GitSourceContext instance using the specified properties. - * @function create - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {grafeas.v1.IGitSourceContext=} [properties] Properties to set - * @returns {grafeas.v1.GitSourceContext} GitSourceContext instance - */ - GitSourceContext.create = function create(properties) { - return new GitSourceContext(properties); - }; + /** + * Creates a new SlsaBuilder instance using the specified properties. + * @function create + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder=} [properties] Properties to set + * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder instance + */ + SlsaBuilder.create = function create(properties) { + return new SlsaBuilder(properties); + }; - /** - * Encodes the specified GitSourceContext message. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {grafeas.v1.IGitSourceContext} message GitSourceContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitSourceContext.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); - return writer; - }; + /** + * Encodes the specified SlsaBuilder message. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder} message SlsaBuilder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaBuilder.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + return writer; + }; - /** - * Encodes the specified GitSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {grafeas.v1.IGitSourceContext} message GitSourceContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitSourceContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SlsaBuilder message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.SlsaBuilder.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {grafeas.v1.SlsaProvenance.ISlsaBuilder} message SlsaBuilder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlsaBuilder.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GitSourceContext message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.GitSourceContext} GitSourceContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitSourceContext.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.GitSourceContext(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.revisionId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a SlsaBuilder message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaBuilder.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.SlsaProvenance.SlsaBuilder(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a GitSourceContext message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GitSourceContext} GitSourceContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitSourceContext.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SlsaBuilder message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlsaBuilder.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GitSourceContext message. - * @function verify - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GitSourceContext.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - return null; - }; + /** + * Verifies a SlsaBuilder message. + * @function verify + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SlsaBuilder.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a SlsaBuilder message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.SlsaProvenance.SlsaBuilder} SlsaBuilder + */ + SlsaBuilder.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.SlsaProvenance.SlsaBuilder) + return object; + var message = new $root.grafeas.v1.SlsaProvenance.SlsaBuilder(); + if (object.id != null) + message.id = String(object.id); + return message; + }; - /** - * Creates a GitSourceContext message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.GitSourceContext} GitSourceContext - */ - GitSourceContext.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GitSourceContext) + /** + * Creates a plain object from a SlsaBuilder message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @static + * @param {grafeas.v1.SlsaProvenance.SlsaBuilder} message SlsaBuilder + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SlsaBuilder.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; return object; - var message = new $root.grafeas.v1.GitSourceContext(); - if (object.url != null) - message.url = String(object.url); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - return message; - }; - - /** - * Creates a plain object from a GitSourceContext message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.GitSourceContext - * @static - * @param {grafeas.v1.GitSourceContext} message GitSourceContext - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GitSourceContext.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.url = ""; - object.revisionId = ""; - } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - object.revisionId = message.revisionId; - return object; - }; + }; - /** - * Converts this GitSourceContext to JSON. - * @function toJSON - * @memberof grafeas.v1.GitSourceContext - * @instance - * @returns {Object.} JSON object - */ - GitSourceContext.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this SlsaBuilder to JSON. + * @function toJSON + * @memberof grafeas.v1.SlsaProvenance.SlsaBuilder + * @instance + * @returns {Object.} JSON object + */ + SlsaBuilder.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GitSourceContext; - })(); + return SlsaBuilder; + })(); - v1.RepoId = (function() { + SlsaProvenance.Material = (function() { - /** - * Properties of a RepoId. - * @memberof grafeas.v1 - * @interface IRepoId - * @property {grafeas.v1.IProjectRepoId|null} [projectRepoId] RepoId projectRepoId - * @property {string|null} [uid] RepoId uid - */ + /** + * Properties of a Material. + * @memberof grafeas.v1.SlsaProvenance + * @interface IMaterial + * @property {string|null} [uri] Material uri + * @property {Object.|null} [digest] Material digest + */ - /** - * Constructs a new RepoId. - * @memberof grafeas.v1 - * @classdesc Represents a RepoId. - * @implements IRepoId - * @constructor - * @param {grafeas.v1.IRepoId=} [properties] Properties to set - */ - function RepoId(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]]; - } + /** + * Constructs a new Material. + * @memberof grafeas.v1.SlsaProvenance + * @classdesc Represents a Material. + * @implements IMaterial + * @constructor + * @param {grafeas.v1.SlsaProvenance.IMaterial=} [properties] Properties to set + */ + function Material(properties) { + this.digest = {}; + 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]]; + } - /** - * RepoId projectRepoId. - * @member {grafeas.v1.IProjectRepoId|null|undefined} projectRepoId - * @memberof grafeas.v1.RepoId - * @instance - */ - RepoId.prototype.projectRepoId = null; + /** + * Material uri. + * @member {string} uri + * @memberof grafeas.v1.SlsaProvenance.Material + * @instance + */ + Material.prototype.uri = ""; - /** - * RepoId uid. - * @member {string|null|undefined} uid - * @memberof grafeas.v1.RepoId - * @instance - */ - RepoId.prototype.uid = null; + /** + * Material digest. + * @member {Object.} digest + * @memberof grafeas.v1.SlsaProvenance.Material + * @instance + */ + Material.prototype.digest = $util.emptyObject; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a new Material instance using the specified properties. + * @function create + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {grafeas.v1.SlsaProvenance.IMaterial=} [properties] Properties to set + * @returns {grafeas.v1.SlsaProvenance.Material} Material instance + */ + Material.create = function create(properties) { + return new Material(properties); + }; - /** - * RepoId id. - * @member {"projectRepoId"|"uid"|undefined} id - * @memberof grafeas.v1.RepoId - * @instance - */ - Object.defineProperty(RepoId.prototype, "id", { - get: $util.oneOfGetter($oneOfFields = ["projectRepoId", "uid"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified Material message. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {grafeas.v1.SlsaProvenance.IMaterial} message Material message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Material.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) + for (var keys = Object.keys(message.digest), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.digest[keys[i]]).ldelim(); + return writer; + }; - /** - * Creates a new RepoId instance using the specified properties. - * @function create - * @memberof grafeas.v1.RepoId - * @static - * @param {grafeas.v1.IRepoId=} [properties] Properties to set - * @returns {grafeas.v1.RepoId} RepoId instance - */ - RepoId.create = function create(properties) { - return new RepoId(properties); - }; + /** + * Encodes the specified Material message, length delimited. Does not implicitly {@link grafeas.v1.SlsaProvenance.Material.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {grafeas.v1.SlsaProvenance.IMaterial} message Material message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Material.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified RepoId message. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.RepoId - * @static - * @param {grafeas.v1.IRepoId} message RepoId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RepoId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectRepoId != null && Object.hasOwnProperty.call(message, "projectRepoId")) - $root.grafeas.v1.ProjectRepoId.encode(message.projectRepoId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - return writer; - }; + /** + * Decodes a Material message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.SlsaProvenance.Material} Material + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Material.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.SlsaProvenance.Material(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + if (message.digest === $util.emptyObject) + message.digest = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.digest[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified RepoId message, length delimited. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.RepoId - * @static - * @param {grafeas.v1.IRepoId} message RepoId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RepoId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Material message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.SlsaProvenance.Material} Material + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Material.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a RepoId message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.RepoId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.RepoId} RepoId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RepoId.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.RepoId(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.projectRepoId = $root.grafeas.v1.ProjectRepoId.decode(reader, reader.uint32()); - break; - case 2: - message.uid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a Material message. + * @function verify + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Material.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.digest != null && message.hasOwnProperty("digest")) { + if (!$util.isObject(message.digest)) + return "digest: object expected"; + var key = Object.keys(message.digest); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.digest[key[i]])) + return "digest: string{k:string} expected"; } - } - return message; - }; - - /** - * Decodes a RepoId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.RepoId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.RepoId} RepoId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RepoId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return null; + }; - /** - * Verifies a RepoId message. - * @function verify - * @memberof grafeas.v1.RepoId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RepoId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.projectRepoId != null && message.hasOwnProperty("projectRepoId")) { - properties.id = 1; - { - var error = $root.grafeas.v1.ProjectRepoId.verify(message.projectRepoId); - if (error) - return "projectRepoId." + error; + /** + * Creates a Material message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.SlsaProvenance.Material} Material + */ + Material.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.SlsaProvenance.Material) + return object; + var message = new $root.grafeas.v1.SlsaProvenance.Material(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.digest) { + if (typeof object.digest !== "object") + throw TypeError(".grafeas.v1.SlsaProvenance.Material.digest: object expected"); + message.digest = {}; + for (var keys = Object.keys(object.digest), i = 0; i < keys.length; ++i) + message.digest[keys[i]] = String(object.digest[keys[i]]); } - } - if (message.uid != null && message.hasOwnProperty("uid")) { - if (properties.id === 1) - return "id: multiple values"; - properties.id = 1; - if (!$util.isString(message.uid)) - return "uid: string expected"; - } - return null; - }; + return message; + }; - /** - * Creates a RepoId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.RepoId - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.RepoId} RepoId - */ - RepoId.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.RepoId) + /** + * Creates a plain object from a Material message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.SlsaProvenance.Material + * @static + * @param {grafeas.v1.SlsaProvenance.Material} message Material + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Material.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.digest = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + var keys2; + if (message.digest && (keys2 = Object.keys(message.digest)).length) { + object.digest = {}; + for (var j = 0; j < keys2.length; ++j) + object.digest[keys2[j]] = message.digest[keys2[j]]; + } return object; - var message = new $root.grafeas.v1.RepoId(); - if (object.projectRepoId != null) { - if (typeof object.projectRepoId !== "object") - throw TypeError(".grafeas.v1.RepoId.projectRepoId: object expected"); - message.projectRepoId = $root.grafeas.v1.ProjectRepoId.fromObject(object.projectRepoId); - } - if (object.uid != null) - message.uid = String(object.uid); - return message; - }; + }; - /** - * Creates a plain object from a RepoId message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.RepoId - * @static - * @param {grafeas.v1.RepoId} message RepoId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RepoId.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.projectRepoId != null && message.hasOwnProperty("projectRepoId")) { - object.projectRepoId = $root.grafeas.v1.ProjectRepoId.toObject(message.projectRepoId, options); - if (options.oneofs) - object.id = "projectRepoId"; - } - if (message.uid != null && message.hasOwnProperty("uid")) { - object.uid = message.uid; - if (options.oneofs) - object.id = "uid"; - } - return object; - }; + /** + * Converts this Material to JSON. + * @function toJSON + * @memberof grafeas.v1.SlsaProvenance.Material + * @instance + * @returns {Object.} JSON object + */ + Material.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this RepoId to JSON. - * @function toJSON - * @memberof grafeas.v1.RepoId - * @instance - * @returns {Object.} JSON object - */ - RepoId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Material; + })(); - return RepoId; + return SlsaProvenance; })(); - v1.ProjectRepoId = (function() { + v1.BuildProvenance = (function() { /** - * Properties of a ProjectRepoId. + * Properties of a BuildProvenance. * @memberof grafeas.v1 - * @interface IProjectRepoId - * @property {string|null} [projectId] ProjectRepoId projectId - * @property {string|null} [repoName] ProjectRepoId repoName + * @interface IBuildProvenance + * @property {string|null} [id] BuildProvenance id + * @property {string|null} [projectId] BuildProvenance projectId + * @property {Array.|null} [commands] BuildProvenance commands + * @property {Array.|null} [builtArtifacts] BuildProvenance builtArtifacts + * @property {google.protobuf.ITimestamp|null} [createTime] BuildProvenance createTime + * @property {google.protobuf.ITimestamp|null} [startTime] BuildProvenance startTime + * @property {google.protobuf.ITimestamp|null} [endTime] BuildProvenance endTime + * @property {string|null} [creator] BuildProvenance creator + * @property {string|null} [logsUri] BuildProvenance logsUri + * @property {grafeas.v1.ISource|null} [sourceProvenance] BuildProvenance sourceProvenance + * @property {string|null} [triggerId] BuildProvenance triggerId + * @property {Object.|null} [buildOptions] BuildProvenance buildOptions + * @property {string|null} [builderVersion] BuildProvenance builderVersion */ /** - * Constructs a new ProjectRepoId. + * Constructs a new BuildProvenance. * @memberof grafeas.v1 - * @classdesc Represents a ProjectRepoId. - * @implements IProjectRepoId + * @classdesc Represents a BuildProvenance. + * @implements IBuildProvenance * @constructor - * @param {grafeas.v1.IProjectRepoId=} [properties] Properties to set + * @param {grafeas.v1.IBuildProvenance=} [properties] Properties to set */ - function ProjectRepoId(properties) { + function BuildProvenance(properties) { + this.commands = []; + this.builtArtifacts = []; + this.buildOptions = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13867,386 +12112,257 @@ } /** - * ProjectRepoId projectId. - * @member {string} projectId - * @memberof grafeas.v1.ProjectRepoId + * BuildProvenance id. + * @member {string} id + * @memberof grafeas.v1.BuildProvenance * @instance */ - ProjectRepoId.prototype.projectId = ""; + BuildProvenance.prototype.id = ""; /** - * ProjectRepoId repoName. - * @member {string} repoName - * @memberof grafeas.v1.ProjectRepoId + * BuildProvenance projectId. + * @member {string} projectId + * @memberof grafeas.v1.BuildProvenance * @instance */ - ProjectRepoId.prototype.repoName = ""; - - /** - * Creates a new ProjectRepoId instance using the specified properties. - * @function create - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {grafeas.v1.IProjectRepoId=} [properties] Properties to set - * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId instance - */ - ProjectRepoId.create = function create(properties) { - return new ProjectRepoId(properties); - }; - - /** - * Encodes the specified ProjectRepoId message. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {grafeas.v1.IProjectRepoId} message ProjectRepoId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProjectRepoId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.repoName != null && Object.hasOwnProperty.call(message, "repoName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.repoName); - return writer; - }; - - /** - * Encodes the specified ProjectRepoId message, length delimited. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {grafeas.v1.IProjectRepoId} message ProjectRepoId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProjectRepoId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProjectRepoId message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProjectRepoId.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.ProjectRepoId(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.projectId = reader.string(); - break; - case 2: - message.repoName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProjectRepoId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProjectRepoId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProjectRepoId message. - * @function verify - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProjectRepoId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.repoName != null && message.hasOwnProperty("repoName")) - if (!$util.isString(message.repoName)) - return "repoName: string expected"; - return null; - }; - - /** - * Creates a ProjectRepoId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId - */ - ProjectRepoId.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ProjectRepoId) - return object; - var message = new $root.grafeas.v1.ProjectRepoId(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.repoName != null) - message.repoName = String(object.repoName); - return message; - }; - - /** - * Creates a plain object from a ProjectRepoId message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.ProjectRepoId - * @static - * @param {grafeas.v1.ProjectRepoId} message ProjectRepoId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProjectRepoId.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.repoName = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.repoName != null && message.hasOwnProperty("repoName")) - object.repoName = message.repoName; - return object; - }; + BuildProvenance.prototype.projectId = ""; /** - * Converts this ProjectRepoId to JSON. - * @function toJSON - * @memberof grafeas.v1.ProjectRepoId + * BuildProvenance commands. + * @member {Array.} commands + * @memberof grafeas.v1.BuildProvenance * @instance - * @returns {Object.} JSON object */ - ProjectRepoId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProjectRepoId; - })(); - - v1.ComplianceNote = (function() { + BuildProvenance.prototype.commands = $util.emptyArray; /** - * Properties of a ComplianceNote. - * @memberof grafeas.v1 - * @interface IComplianceNote - * @property {string|null} [title] ComplianceNote title - * @property {string|null} [description] ComplianceNote description - * @property {Array.|null} [version] ComplianceNote version - * @property {string|null} [rationale] ComplianceNote rationale - * @property {string|null} [remediation] ComplianceNote remediation - * @property {grafeas.v1.ComplianceNote.ICisBenchmark|null} [cisBenchmark] ComplianceNote cisBenchmark - * @property {Uint8Array|null} [scanInstructions] ComplianceNote scanInstructions + * BuildProvenance builtArtifacts. + * @member {Array.} builtArtifacts + * @memberof grafeas.v1.BuildProvenance + * @instance */ + BuildProvenance.prototype.builtArtifacts = $util.emptyArray; /** - * Constructs a new ComplianceNote. - * @memberof grafeas.v1 - * @classdesc Represents a ComplianceNote. - * @implements IComplianceNote - * @constructor - * @param {grafeas.v1.IComplianceNote=} [properties] Properties to set + * BuildProvenance createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof grafeas.v1.BuildProvenance + * @instance */ - function ComplianceNote(properties) { - this.version = []; - 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]]; - } + BuildProvenance.prototype.createTime = null; /** - * ComplianceNote title. - * @member {string} title - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof grafeas.v1.BuildProvenance * @instance */ - ComplianceNote.prototype.title = ""; + BuildProvenance.prototype.startTime = null; /** - * ComplianceNote description. - * @member {string} description - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof grafeas.v1.BuildProvenance * @instance */ - ComplianceNote.prototype.description = ""; + BuildProvenance.prototype.endTime = null; /** - * ComplianceNote version. - * @member {Array.} version - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance creator. + * @member {string} creator + * @memberof grafeas.v1.BuildProvenance * @instance */ - ComplianceNote.prototype.version = $util.emptyArray; + BuildProvenance.prototype.creator = ""; /** - * ComplianceNote rationale. - * @member {string} rationale - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance logsUri. + * @member {string} logsUri + * @memberof grafeas.v1.BuildProvenance * @instance */ - ComplianceNote.prototype.rationale = ""; + BuildProvenance.prototype.logsUri = ""; /** - * ComplianceNote remediation. - * @member {string} remediation - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance sourceProvenance. + * @member {grafeas.v1.ISource|null|undefined} sourceProvenance + * @memberof grafeas.v1.BuildProvenance * @instance */ - ComplianceNote.prototype.remediation = ""; + BuildProvenance.prototype.sourceProvenance = null; /** - * ComplianceNote cisBenchmark. - * @member {grafeas.v1.ComplianceNote.ICisBenchmark|null|undefined} cisBenchmark - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance triggerId. + * @member {string} triggerId + * @memberof grafeas.v1.BuildProvenance * @instance */ - ComplianceNote.prototype.cisBenchmark = null; + BuildProvenance.prototype.triggerId = ""; /** - * ComplianceNote scanInstructions. - * @member {Uint8Array} scanInstructions - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance buildOptions. + * @member {Object.} buildOptions + * @memberof grafeas.v1.BuildProvenance * @instance */ - ComplianceNote.prototype.scanInstructions = $util.newBuffer([]); - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BuildProvenance.prototype.buildOptions = $util.emptyObject; /** - * ComplianceNote complianceType. - * @member {"cisBenchmark"|undefined} complianceType - * @memberof grafeas.v1.ComplianceNote + * BuildProvenance builderVersion. + * @member {string} builderVersion + * @memberof grafeas.v1.BuildProvenance * @instance */ - Object.defineProperty(ComplianceNote.prototype, "complianceType", { - get: $util.oneOfGetter($oneOfFields = ["cisBenchmark"]), - set: $util.oneOfSetter($oneOfFields) - }); + BuildProvenance.prototype.builderVersion = ""; /** - * Creates a new ComplianceNote instance using the specified properties. + * Creates a new BuildProvenance instance using the specified properties. * @function create - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @static - * @param {grafeas.v1.IComplianceNote=} [properties] Properties to set - * @returns {grafeas.v1.ComplianceNote} ComplianceNote instance + * @param {grafeas.v1.IBuildProvenance=} [properties] Properties to set + * @returns {grafeas.v1.BuildProvenance} BuildProvenance instance */ - ComplianceNote.create = function create(properties) { - return new ComplianceNote(properties); + BuildProvenance.create = function create(properties) { + return new BuildProvenance(properties); }; /** - * Encodes the specified ComplianceNote message. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. + * Encodes the specified BuildProvenance message. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @static - * @param {grafeas.v1.IComplianceNote} message ComplianceNote message or plain object to encode + * @param {grafeas.v1.IBuildProvenance} message BuildProvenance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComplianceNote.encode = function encode(message, writer) { + BuildProvenance.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.version != null && message.version.length) - for (var i = 0; i < message.version.length; ++i) - $root.grafeas.v1.ComplianceVersion.encode(message.version[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.rationale != null && Object.hasOwnProperty.call(message, "rationale")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.rationale); - if (message.remediation != null && Object.hasOwnProperty.call(message, "remediation")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.remediation); - if (message.cisBenchmark != null && Object.hasOwnProperty.call(message, "cisBenchmark")) - $root.grafeas.v1.ComplianceNote.CisBenchmark.encode(message.cisBenchmark, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.scanInstructions != null && Object.hasOwnProperty.call(message, "scanInstructions")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.scanInstructions); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.commands != null && message.commands.length) + for (var i = 0; i < message.commands.length; ++i) + $root.grafeas.v1.Command.encode(message.commands[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.builtArtifacts != null && message.builtArtifacts.length) + for (var i = 0; i < message.builtArtifacts.length; ++i) + $root.grafeas.v1.Artifact.encode(message.builtArtifacts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.creator); + if (message.logsUri != null && Object.hasOwnProperty.call(message, "logsUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.logsUri); + if (message.sourceProvenance != null && Object.hasOwnProperty.call(message, "sourceProvenance")) + $root.grafeas.v1.Source.encode(message.sourceProvenance, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerId); + if (message.buildOptions != null && Object.hasOwnProperty.call(message, "buildOptions")) + for (var keys = Object.keys(message.buildOptions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.buildOptions[keys[i]]).ldelim(); + if (message.builderVersion != null && Object.hasOwnProperty.call(message, "builderVersion")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.builderVersion); return writer; }; /** - * Encodes the specified ComplianceNote message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. + * Encodes the specified BuildProvenance message, length delimited. Does not implicitly {@link grafeas.v1.BuildProvenance.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @static - * @param {grafeas.v1.IComplianceNote} message ComplianceNote message or plain object to encode + * @param {grafeas.v1.IBuildProvenance} message BuildProvenance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComplianceNote.encodeDelimited = function encodeDelimited(message, writer) { + BuildProvenance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComplianceNote message from the specified reader or buffer. + * Decodes a BuildProvenance message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ComplianceNote} ComplianceNote + * @returns {grafeas.v1.BuildProvenance} BuildProvenance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComplianceNote.decode = function decode(reader, length) { + BuildProvenance.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.ComplianceNote(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.BuildProvenance(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + message.id = reader.string(); break; case 2: - message.description = reader.string(); + message.projectId = reader.string(); break; case 3: - if (!(message.version && message.version.length)) - message.version = []; - message.version.push($root.grafeas.v1.ComplianceVersion.decode(reader, reader.uint32())); + if (!(message.commands && message.commands.length)) + message.commands = []; + message.commands.push($root.grafeas.v1.Command.decode(reader, reader.uint32())); break; case 4: - message.rationale = reader.string(); + if (!(message.builtArtifacts && message.builtArtifacts.length)) + message.builtArtifacts = []; + message.builtArtifacts.push($root.grafeas.v1.Artifact.decode(reader, reader.uint32())); break; case 5: - message.remediation = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 6: - message.cisBenchmark = $root.grafeas.v1.ComplianceNote.CisBenchmark.decode(reader, reader.uint32()); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 7: - message.scanInstructions = reader.bytes(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.creator = reader.string(); + break; + case 9: + message.logsUri = reader.string(); + break; + case 10: + message.sourceProvenance = $root.grafeas.v1.Source.decode(reader, reader.uint32()); + break; + case 11: + message.triggerId = reader.string(); + break; + case 12: + if (message.buildOptions === $util.emptyObject) + message.buildOptions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.buildOptions[key] = value; + break; + case 13: + message.builderVersion = reader.string(); break; default: reader.skipType(tag & 7); @@ -14257,438 +12373,600 @@ }; /** - * Decodes a ComplianceNote message from the specified reader or buffer, length delimited. + * Decodes a BuildProvenance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ComplianceNote} ComplianceNote + * @returns {grafeas.v1.BuildProvenance} BuildProvenance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComplianceNote.decodeDelimited = function decodeDelimited(reader) { + BuildProvenance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComplianceNote message. + * Verifies a BuildProvenance message. * @function verify - * @memberof grafeas.v1.ComplianceNote - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComplianceNote.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - 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.version != null && message.hasOwnProperty("version")) { - if (!Array.isArray(message.version)) - return "version: array expected"; - for (var i = 0; i < message.version.length; ++i) { - var error = $root.grafeas.v1.ComplianceVersion.verify(message.version[i]); + * @memberof grafeas.v1.BuildProvenance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildProvenance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.commands != null && message.hasOwnProperty("commands")) { + if (!Array.isArray(message.commands)) + return "commands: array expected"; + for (var i = 0; i < message.commands.length; ++i) { + var error = $root.grafeas.v1.Command.verify(message.commands[i]); if (error) - return "version." + error; + return "commands." + error; } } - if (message.rationale != null && message.hasOwnProperty("rationale")) - if (!$util.isString(message.rationale)) - return "rationale: string expected"; - if (message.remediation != null && message.hasOwnProperty("remediation")) - if (!$util.isString(message.remediation)) - return "remediation: string expected"; - if (message.cisBenchmark != null && message.hasOwnProperty("cisBenchmark")) { - properties.complianceType = 1; - { - var error = $root.grafeas.v1.ComplianceNote.CisBenchmark.verify(message.cisBenchmark); + if (message.builtArtifacts != null && message.hasOwnProperty("builtArtifacts")) { + if (!Array.isArray(message.builtArtifacts)) + return "builtArtifacts: array expected"; + for (var i = 0; i < message.builtArtifacts.length; ++i) { + var error = $root.grafeas.v1.Artifact.verify(message.builtArtifacts[i]); if (error) - return "cisBenchmark." + error; + return "builtArtifacts." + error; } } - if (message.scanInstructions != null && message.hasOwnProperty("scanInstructions")) - if (!(message.scanInstructions && typeof message.scanInstructions.length === "number" || $util.isString(message.scanInstructions))) - return "scanInstructions: buffer expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.creator != null && message.hasOwnProperty("creator")) + if (!$util.isString(message.creator)) + return "creator: string expected"; + if (message.logsUri != null && message.hasOwnProperty("logsUri")) + if (!$util.isString(message.logsUri)) + return "logsUri: string expected"; + if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) { + var error = $root.grafeas.v1.Source.verify(message.sourceProvenance); + if (error) + return "sourceProvenance." + error; + } + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + if (message.buildOptions != null && message.hasOwnProperty("buildOptions")) { + if (!$util.isObject(message.buildOptions)) + return "buildOptions: object expected"; + var key = Object.keys(message.buildOptions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.buildOptions[key[i]])) + return "buildOptions: string{k:string} expected"; + } + if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) + if (!$util.isString(message.builderVersion)) + return "builderVersion: string expected"; return null; }; /** - * Creates a ComplianceNote message from a plain object. Also converts values to their respective internal types. + * Creates a BuildProvenance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ComplianceNote} ComplianceNote + * @returns {grafeas.v1.BuildProvenance} BuildProvenance */ - ComplianceNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ComplianceNote) + BuildProvenance.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.BuildProvenance) return object; - var message = new $root.grafeas.v1.ComplianceNote(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.version) { - if (!Array.isArray(object.version)) - throw TypeError(".grafeas.v1.ComplianceNote.version: array expected"); - message.version = []; - for (var i = 0; i < object.version.length; ++i) { - if (typeof object.version[i] !== "object") - throw TypeError(".grafeas.v1.ComplianceNote.version: object expected"); - message.version[i] = $root.grafeas.v1.ComplianceVersion.fromObject(object.version[i]); + var message = new $root.grafeas.v1.BuildProvenance(); + if (object.id != null) + message.id = String(object.id); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.commands) { + if (!Array.isArray(object.commands)) + throw TypeError(".grafeas.v1.BuildProvenance.commands: array expected"); + message.commands = []; + for (var i = 0; i < object.commands.length; ++i) { + if (typeof object.commands[i] !== "object") + throw TypeError(".grafeas.v1.BuildProvenance.commands: object expected"); + message.commands[i] = $root.grafeas.v1.Command.fromObject(object.commands[i]); } } - if (object.rationale != null) - message.rationale = String(object.rationale); - if (object.remediation != null) - message.remediation = String(object.remediation); - if (object.cisBenchmark != null) { - if (typeof object.cisBenchmark !== "object") - throw TypeError(".grafeas.v1.ComplianceNote.cisBenchmark: object expected"); - message.cisBenchmark = $root.grafeas.v1.ComplianceNote.CisBenchmark.fromObject(object.cisBenchmark); + if (object.builtArtifacts) { + if (!Array.isArray(object.builtArtifacts)) + throw TypeError(".grafeas.v1.BuildProvenance.builtArtifacts: array expected"); + message.builtArtifacts = []; + for (var i = 0; i < object.builtArtifacts.length; ++i) { + if (typeof object.builtArtifacts[i] !== "object") + throw TypeError(".grafeas.v1.BuildProvenance.builtArtifacts: object expected"); + message.builtArtifacts[i] = $root.grafeas.v1.Artifact.fromObject(object.builtArtifacts[i]); + } } - if (object.scanInstructions != null) - if (typeof object.scanInstructions === "string") - $util.base64.decode(object.scanInstructions, message.scanInstructions = $util.newBuffer($util.base64.length(object.scanInstructions)), 0); - else if (object.scanInstructions.length) - message.scanInstructions = object.scanInstructions; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".grafeas.v1.BuildProvenance.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".grafeas.v1.BuildProvenance.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".grafeas.v1.BuildProvenance.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.creator != null) + message.creator = String(object.creator); + if (object.logsUri != null) + message.logsUri = String(object.logsUri); + if (object.sourceProvenance != null) { + if (typeof object.sourceProvenance !== "object") + throw TypeError(".grafeas.v1.BuildProvenance.sourceProvenance: object expected"); + message.sourceProvenance = $root.grafeas.v1.Source.fromObject(object.sourceProvenance); + } + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + if (object.buildOptions) { + if (typeof object.buildOptions !== "object") + throw TypeError(".grafeas.v1.BuildProvenance.buildOptions: object expected"); + message.buildOptions = {}; + for (var keys = Object.keys(object.buildOptions), i = 0; i < keys.length; ++i) + message.buildOptions[keys[i]] = String(object.buildOptions[keys[i]]); + } + if (object.builderVersion != null) + message.builderVersion = String(object.builderVersion); return message; }; /** - * Creates a plain object from a ComplianceNote message. Also converts values to other types if specified. + * Creates a plain object from a BuildProvenance message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @static - * @param {grafeas.v1.ComplianceNote} message ComplianceNote + * @param {grafeas.v1.BuildProvenance} message BuildProvenance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComplianceNote.toObject = function toObject(message, options) { + BuildProvenance.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.version = []; + if (options.arrays || options.defaults) { + object.commands = []; + object.builtArtifacts = []; + } + if (options.objects || options.defaults) + object.buildOptions = {}; if (options.defaults) { - object.title = ""; - object.description = ""; - object.rationale = ""; - object.remediation = ""; - if (options.bytes === String) - object.scanInstructions = ""; - else { - object.scanInstructions = []; - if (options.bytes !== Array) - object.scanInstructions = $util.newBuffer(object.scanInstructions); - } + object.id = ""; + object.projectId = ""; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.creator = ""; + object.logsUri = ""; + object.sourceProvenance = null; + object.triggerId = ""; + object.builderVersion = ""; } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.version && message.version.length) { - object.version = []; - for (var j = 0; j < message.version.length; ++j) - object.version[j] = $root.grafeas.v1.ComplianceVersion.toObject(message.version[j], options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.commands && message.commands.length) { + object.commands = []; + for (var j = 0; j < message.commands.length; ++j) + object.commands[j] = $root.grafeas.v1.Command.toObject(message.commands[j], options); } - if (message.rationale != null && message.hasOwnProperty("rationale")) - object.rationale = message.rationale; - if (message.remediation != null && message.hasOwnProperty("remediation")) - object.remediation = message.remediation; - if (message.cisBenchmark != null && message.hasOwnProperty("cisBenchmark")) { - object.cisBenchmark = $root.grafeas.v1.ComplianceNote.CisBenchmark.toObject(message.cisBenchmark, options); - if (options.oneofs) - object.complianceType = "cisBenchmark"; + if (message.builtArtifacts && message.builtArtifacts.length) { + object.builtArtifacts = []; + for (var j = 0; j < message.builtArtifacts.length; ++j) + object.builtArtifacts[j] = $root.grafeas.v1.Artifact.toObject(message.builtArtifacts[j], options); } - if (message.scanInstructions != null && message.hasOwnProperty("scanInstructions")) - object.scanInstructions = options.bytes === String ? $util.base64.encode(message.scanInstructions, 0, message.scanInstructions.length) : options.bytes === Array ? Array.prototype.slice.call(message.scanInstructions) : message.scanInstructions; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.creator != null && message.hasOwnProperty("creator")) + object.creator = message.creator; + if (message.logsUri != null && message.hasOwnProperty("logsUri")) + object.logsUri = message.logsUri; + if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) + object.sourceProvenance = $root.grafeas.v1.Source.toObject(message.sourceProvenance, options); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + var keys2; + if (message.buildOptions && (keys2 = Object.keys(message.buildOptions)).length) { + object.buildOptions = {}; + for (var j = 0; j < keys2.length; ++j) + object.buildOptions[keys2[j]] = message.buildOptions[keys2[j]]; + } + if (message.builderVersion != null && message.hasOwnProperty("builderVersion")) + object.builderVersion = message.builderVersion; return object; }; /** - * Converts this ComplianceNote to JSON. + * Converts this BuildProvenance to JSON. * @function toJSON - * @memberof grafeas.v1.ComplianceNote + * @memberof grafeas.v1.BuildProvenance * @instance * @returns {Object.} JSON object */ - ComplianceNote.prototype.toJSON = function toJSON() { + BuildProvenance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ComplianceNote.CisBenchmark = (function() { - - /** - * Properties of a CisBenchmark. - * @memberof grafeas.v1.ComplianceNote - * @interface ICisBenchmark - * @property {number|null} [profileLevel] CisBenchmark profileLevel - * @property {grafeas.v1.Severity|null} [severity] CisBenchmark severity - */ + return BuildProvenance; + })(); - /** - * Constructs a new CisBenchmark. - * @memberof grafeas.v1.ComplianceNote - * @classdesc Represents a CisBenchmark. - * @implements ICisBenchmark - * @constructor - * @param {grafeas.v1.ComplianceNote.ICisBenchmark=} [properties] Properties to set - */ - function CisBenchmark(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]]; - } + v1.Source = (function() { - /** - * CisBenchmark profileLevel. - * @member {number} profileLevel - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @instance - */ - CisBenchmark.prototype.profileLevel = 0; + /** + * Properties of a Source. + * @memberof grafeas.v1 + * @interface ISource + * @property {string|null} [artifactStorageSourceUri] Source artifactStorageSourceUri + * @property {Object.|null} [fileHashes] Source fileHashes + * @property {grafeas.v1.ISourceContext|null} [context] Source context + * @property {Array.|null} [additionalContexts] Source additionalContexts + */ - /** - * CisBenchmark severity. - * @member {grafeas.v1.Severity} severity - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @instance - */ - CisBenchmark.prototype.severity = 0; + /** + * Constructs a new Source. + * @memberof grafeas.v1 + * @classdesc Represents a Source. + * @implements ISource + * @constructor + * @param {grafeas.v1.ISource=} [properties] Properties to set + */ + function Source(properties) { + this.fileHashes = {}; + this.additionalContexts = []; + 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 CisBenchmark instance using the specified properties. - * @function create - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {grafeas.v1.ComplianceNote.ICisBenchmark=} [properties] Properties to set - * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark instance - */ - CisBenchmark.create = function create(properties) { - return new CisBenchmark(properties); - }; + /** + * Source artifactStorageSourceUri. + * @member {string} artifactStorageSourceUri + * @memberof grafeas.v1.Source + * @instance + */ + Source.prototype.artifactStorageSourceUri = ""; - /** - * Encodes the specified CisBenchmark message. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {grafeas.v1.ComplianceNote.ICisBenchmark} message CisBenchmark message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CisBenchmark.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.profileLevel != null && Object.hasOwnProperty.call(message, "profileLevel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.profileLevel); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); - return writer; - }; + /** + * Source fileHashes. + * @member {Object.} fileHashes + * @memberof grafeas.v1.Source + * @instance + */ + Source.prototype.fileHashes = $util.emptyObject; - /** - * Encodes the specified CisBenchmark message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {grafeas.v1.ComplianceNote.ICisBenchmark} message CisBenchmark message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CisBenchmark.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Source context. + * @member {grafeas.v1.ISourceContext|null|undefined} context + * @memberof grafeas.v1.Source + * @instance + */ + Source.prototype.context = null; - /** - * Decodes a CisBenchmark message from the specified reader or buffer. - * @function decode - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CisBenchmark.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.ComplianceNote.CisBenchmark(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.profileLevel = reader.int32(); - break; - case 2: - message.severity = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Source additionalContexts. + * @member {Array.} additionalContexts + * @memberof grafeas.v1.Source + * @instance + */ + Source.prototype.additionalContexts = $util.emptyArray; - /** - * Decodes a CisBenchmark message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CisBenchmark.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new Source instance using the specified properties. + * @function create + * @memberof grafeas.v1.Source + * @static + * @param {grafeas.v1.ISource=} [properties] Properties to set + * @returns {grafeas.v1.Source} Source instance + */ + Source.create = function create(properties) { + return new Source(properties); + }; - /** - * Verifies a CisBenchmark message. - * @function verify - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CisBenchmark.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.profileLevel != null && message.hasOwnProperty("profileLevel")) - if (!$util.isInteger(message.profileLevel)) - return "profileLevel: integer 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; - }; + /** + * Encodes the specified Source message. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.Source + * @static + * @param {grafeas.v1.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.artifactStorageSourceUri != null && Object.hasOwnProperty.call(message, "artifactStorageSourceUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.artifactStorageSourceUri); + if (message.fileHashes != null && Object.hasOwnProperty.call(message, "fileHashes")) + for (var keys = Object.keys(message.fileHashes), 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.FileHashes.encode(message.fileHashes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.grafeas.v1.SourceContext.encode(message.context, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.additionalContexts != null && message.additionalContexts.length) + for (var i = 0; i < message.additionalContexts.length; ++i) + $root.grafeas.v1.SourceContext.encode(message.additionalContexts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Creates a CisBenchmark message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark - */ - CisBenchmark.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ComplianceNote.CisBenchmark) - return object; - var message = new $root.grafeas.v1.ComplianceNote.CisBenchmark(); - if (object.profileLevel != null) - message.profileLevel = object.profileLevel | 0; - switch (object.severity) { - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "MINIMAL": + /** + * Encodes the specified Source message, length delimited. Does not implicitly {@link grafeas.v1.Source.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.Source + * @static + * @param {grafeas.v1.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Source message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.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.Source(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.severity = 1; + message.artifactStorageSourceUri = reader.string(); break; - case "LOW": case 2: - message.severity = 2; + if (message.fileHashes === $util.emptyObject) + message.fileHashes = {}; + 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.FileHashes.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fileHashes[key] = value; break; - case "MEDIUM": case 3: - message.severity = 3; + message.context = $root.grafeas.v1.SourceContext.decode(reader, reader.uint32()); break; - case "HIGH": case 4: - message.severity = 4; + if (!(message.additionalContexts && message.additionalContexts.length)) + message.additionalContexts = []; + message.additionalContexts.push($root.grafeas.v1.SourceContext.decode(reader, reader.uint32())); break; - case "CRITICAL": - case 5: - message.severity = 5; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a CisBenchmark message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @static - * @param {grafeas.v1.ComplianceNote.CisBenchmark} message CisBenchmark - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CisBenchmark.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.profileLevel = 0; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + /** + * Decodes a Source message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Source message. + * @function verify + * @memberof grafeas.v1.Source + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Source.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.artifactStorageSourceUri != null && message.hasOwnProperty("artifactStorageSourceUri")) + if (!$util.isString(message.artifactStorageSourceUri)) + return "artifactStorageSourceUri: string expected"; + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) { + if (!$util.isObject(message.fileHashes)) + return "fileHashes: object expected"; + var key = Object.keys(message.fileHashes); + for (var i = 0; i < key.length; ++i) { + var error = $root.grafeas.v1.FileHashes.verify(message.fileHashes[key[i]]); + if (error) + return "fileHashes." + error; } - if (message.profileLevel != null && message.hasOwnProperty("profileLevel")) - object.profileLevel = message.profileLevel; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.grafeas.v1.Severity[message.severity] : message.severity; + } + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.grafeas.v1.SourceContext.verify(message.context); + if (error) + return "context." + error; + } + if (message.additionalContexts != null && message.hasOwnProperty("additionalContexts")) { + if (!Array.isArray(message.additionalContexts)) + return "additionalContexts: array expected"; + for (var i = 0; i < message.additionalContexts.length; ++i) { + var error = $root.grafeas.v1.SourceContext.verify(message.additionalContexts[i]); + if (error) + return "additionalContexts." + error; + } + } + return null; + }; + + /** + * Creates a Source message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.Source + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.Source} Source + */ + Source.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Source) return object; - }; + var message = new $root.grafeas.v1.Source(); + if (object.artifactStorageSourceUri != null) + message.artifactStorageSourceUri = String(object.artifactStorageSourceUri); + if (object.fileHashes) { + if (typeof object.fileHashes !== "object") + throw TypeError(".grafeas.v1.Source.fileHashes: object expected"); + message.fileHashes = {}; + for (var keys = Object.keys(object.fileHashes), i = 0; i < keys.length; ++i) { + if (typeof object.fileHashes[keys[i]] !== "object") + throw TypeError(".grafeas.v1.Source.fileHashes: object expected"); + message.fileHashes[keys[i]] = $root.grafeas.v1.FileHashes.fromObject(object.fileHashes[keys[i]]); + } + } + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".grafeas.v1.Source.context: object expected"); + message.context = $root.grafeas.v1.SourceContext.fromObject(object.context); + } + if (object.additionalContexts) { + if (!Array.isArray(object.additionalContexts)) + throw TypeError(".grafeas.v1.Source.additionalContexts: array expected"); + message.additionalContexts = []; + for (var i = 0; i < object.additionalContexts.length; ++i) { + if (typeof object.additionalContexts[i] !== "object") + throw TypeError(".grafeas.v1.Source.additionalContexts: object expected"); + message.additionalContexts[i] = $root.grafeas.v1.SourceContext.fromObject(object.additionalContexts[i]); + } + } + return message; + }; - /** - * Converts this CisBenchmark to JSON. - * @function toJSON - * @memberof grafeas.v1.ComplianceNote.CisBenchmark - * @instance - * @returns {Object.} JSON object - */ - CisBenchmark.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.Source + * @static + * @param {grafeas.v1.Source} message Source + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Source.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalContexts = []; + if (options.objects || options.defaults) + object.fileHashes = {}; + if (options.defaults) { + object.artifactStorageSourceUri = ""; + object.context = null; + } + if (message.artifactStorageSourceUri != null && message.hasOwnProperty("artifactStorageSourceUri")) + object.artifactStorageSourceUri = message.artifactStorageSourceUri; + var keys2; + if (message.fileHashes && (keys2 = Object.keys(message.fileHashes)).length) { + object.fileHashes = {}; + for (var j = 0; j < keys2.length; ++j) + object.fileHashes[keys2[j]] = $root.grafeas.v1.FileHashes.toObject(message.fileHashes[keys2[j]], options); + } + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.grafeas.v1.SourceContext.toObject(message.context, options); + if (message.additionalContexts && message.additionalContexts.length) { + object.additionalContexts = []; + for (var j = 0; j < message.additionalContexts.length; ++j) + object.additionalContexts[j] = $root.grafeas.v1.SourceContext.toObject(message.additionalContexts[j], options); + } + return object; + }; - return CisBenchmark; - })(); + /** + * Converts this Source to JSON. + * @function toJSON + * @memberof grafeas.v1.Source + * @instance + * @returns {Object.} JSON object + */ + Source.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ComplianceNote; + return Source; })(); - v1.ComplianceVersion = (function() { + v1.FileHashes = (function() { /** - * Properties of a ComplianceVersion. + * Properties of a FileHashes. * @memberof grafeas.v1 - * @interface IComplianceVersion - * @property {string|null} [cpeUri] ComplianceVersion cpeUri - * @property {string|null} [version] ComplianceVersion version + * @interface IFileHashes + * @property {Array.|null} [fileHash] FileHashes fileHash */ /** - * Constructs a new ComplianceVersion. + * Constructs a new FileHashes. * @memberof grafeas.v1 - * @classdesc Represents a ComplianceVersion. - * @implements IComplianceVersion + * @classdesc Represents a FileHashes. + * @implements IFileHashes * @constructor - * @param {grafeas.v1.IComplianceVersion=} [properties] Properties to set + * @param {grafeas.v1.IFileHashes=} [properties] Properties to set */ - function ComplianceVersion(properties) { + function FileHashes(properties) { + this.fileHash = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14696,88 +12974,78 @@ } /** - * ComplianceVersion cpeUri. - * @member {string} cpeUri - * @memberof grafeas.v1.ComplianceVersion - * @instance - */ - ComplianceVersion.prototype.cpeUri = ""; - - /** - * ComplianceVersion version. - * @member {string} version - * @memberof grafeas.v1.ComplianceVersion + * FileHashes fileHash. + * @member {Array.} fileHash + * @memberof grafeas.v1.FileHashes * @instance */ - ComplianceVersion.prototype.version = ""; + FileHashes.prototype.fileHash = $util.emptyArray; /** - * Creates a new ComplianceVersion instance using the specified properties. + * Creates a new FileHashes instance using the specified properties. * @function create - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static - * @param {grafeas.v1.IComplianceVersion=} [properties] Properties to set - * @returns {grafeas.v1.ComplianceVersion} ComplianceVersion instance + * @param {grafeas.v1.IFileHashes=} [properties] Properties to set + * @returns {grafeas.v1.FileHashes} FileHashes instance */ - ComplianceVersion.create = function create(properties) { - return new ComplianceVersion(properties); + FileHashes.create = function create(properties) { + return new FileHashes(properties); }; /** - * Encodes the specified ComplianceVersion message. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. + * Encodes the specified FileHashes message. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static - * @param {grafeas.v1.IComplianceVersion} message ComplianceVersion message or plain object to encode + * @param {grafeas.v1.IFileHashes} message FileHashes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComplianceVersion.encode = function encode(message, writer) { + FileHashes.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")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.fileHash != null && message.fileHash.length) + for (var i = 0; i < message.fileHash.length; ++i) + $root.grafeas.v1.Hash.encode(message.fileHash[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ComplianceVersion message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. + * Encodes the specified FileHashes message, length delimited. Does not implicitly {@link grafeas.v1.FileHashes.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static - * @param {grafeas.v1.IComplianceVersion} message ComplianceVersion message or plain object to encode + * @param {grafeas.v1.IFileHashes} message FileHashes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComplianceVersion.encodeDelimited = function encodeDelimited(message, writer) { + FileHashes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComplianceVersion message from the specified reader or buffer. + * Decodes a FileHashes message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ComplianceVersion} ComplianceVersion + * @returns {grafeas.v1.FileHashes} FileHashes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComplianceVersion.decode = function decode(reader, length) { + FileHashes.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.ComplianceVersion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.FileHashes(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cpeUri = reader.string(); - break; - case 2: - message.version = reader.string(); + if (!(message.fileHash && message.fileHash.length)) + message.fileHash = []; + message.fileHash.push($root.grafeas.v1.Hash.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -14788,118 +13056,125 @@ }; /** - * Decodes a ComplianceVersion message from the specified reader or buffer, length delimited. + * Decodes a FileHashes message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ComplianceVersion} ComplianceVersion + * @returns {grafeas.v1.FileHashes} FileHashes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComplianceVersion.decodeDelimited = function decodeDelimited(reader) { + FileHashes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComplianceVersion message. + * Verifies a FileHashes message. * @function verify - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComplianceVersion.verify = function verify(message) { + FileHashes.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")) - if (!$util.isString(message.version)) - return "version: string expected"; + if (message.fileHash != null && message.hasOwnProperty("fileHash")) { + if (!Array.isArray(message.fileHash)) + return "fileHash: array expected"; + for (var i = 0; i < message.fileHash.length; ++i) { + var error = $root.grafeas.v1.Hash.verify(message.fileHash[i]); + if (error) + return "fileHash." + error; + } + } return null; }; /** - * Creates a ComplianceVersion message from a plain object. Also converts values to their respective internal types. + * Creates a FileHashes message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ComplianceVersion} ComplianceVersion + * @returns {grafeas.v1.FileHashes} FileHashes */ - ComplianceVersion.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ComplianceVersion) + FileHashes.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.FileHashes) return object; - var message = new $root.grafeas.v1.ComplianceVersion(); - if (object.cpeUri != null) - message.cpeUri = String(object.cpeUri); - if (object.version != null) - message.version = String(object.version); + var message = new $root.grafeas.v1.FileHashes(); + if (object.fileHash) { + if (!Array.isArray(object.fileHash)) + throw TypeError(".grafeas.v1.FileHashes.fileHash: array expected"); + message.fileHash = []; + for (var i = 0; i < object.fileHash.length; ++i) { + if (typeof object.fileHash[i] !== "object") + throw TypeError(".grafeas.v1.FileHashes.fileHash: object expected"); + message.fileHash[i] = $root.grafeas.v1.Hash.fromObject(object.fileHash[i]); + } + } return message; }; /** - * Creates a plain object from a ComplianceVersion message. Also converts values to other types if specified. + * Creates a plain object from a FileHashes message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @static - * @param {grafeas.v1.ComplianceVersion} message ComplianceVersion + * @param {grafeas.v1.FileHashes} message FileHashes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComplianceVersion.toObject = function toObject(message, options) { + FileHashes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.cpeUri = ""; - object.version = ""; + if (options.arrays || options.defaults) + object.fileHash = []; + if (message.fileHash && message.fileHash.length) { + object.fileHash = []; + for (var j = 0; j < message.fileHash.length; ++j) + object.fileHash[j] = $root.grafeas.v1.Hash.toObject(message.fileHash[j], options); } - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - object.cpeUri = message.cpeUri; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; return object; }; /** - * Converts this ComplianceVersion to JSON. + * Converts this FileHashes to JSON. * @function toJSON - * @memberof grafeas.v1.ComplianceVersion + * @memberof grafeas.v1.FileHashes * @instance * @returns {Object.} JSON object */ - ComplianceVersion.prototype.toJSON = function toJSON() { + FileHashes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ComplianceVersion; + return FileHashes; })(); - v1.ComplianceOccurrence = (function() { + v1.Hash = (function() { /** - * Properties of a ComplianceOccurrence. + * Properties of a Hash. * @memberof grafeas.v1 - * @interface IComplianceOccurrence - * @property {Array.|null} [nonCompliantFiles] ComplianceOccurrence nonCompliantFiles - * @property {string|null} [nonComplianceReason] ComplianceOccurrence nonComplianceReason + * @interface IHash + * @property {string|null} [type] Hash type + * @property {Uint8Array|null} [value] Hash value */ /** - * Constructs a new ComplianceOccurrence. + * Constructs a new Hash. * @memberof grafeas.v1 - * @classdesc Represents a ComplianceOccurrence. - * @implements IComplianceOccurrence + * @classdesc Represents a Hash. + * @implements IHash * @constructor - * @param {grafeas.v1.IComplianceOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IHash=} [properties] Properties to set */ - function ComplianceOccurrence(properties) { - this.nonCompliantFiles = []; + function Hash(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14907,91 +13182,88 @@ } /** - * ComplianceOccurrence nonCompliantFiles. - * @member {Array.} nonCompliantFiles - * @memberof grafeas.v1.ComplianceOccurrence + * Hash type. + * @member {string} type + * @memberof grafeas.v1.Hash * @instance */ - ComplianceOccurrence.prototype.nonCompliantFiles = $util.emptyArray; + Hash.prototype.type = ""; /** - * ComplianceOccurrence nonComplianceReason. - * @member {string} nonComplianceReason - * @memberof grafeas.v1.ComplianceOccurrence + * Hash value. + * @member {Uint8Array} value + * @memberof grafeas.v1.Hash * @instance */ - ComplianceOccurrence.prototype.nonComplianceReason = ""; + Hash.prototype.value = $util.newBuffer([]); /** - * Creates a new ComplianceOccurrence instance using the specified properties. + * Creates a new Hash instance using the specified properties. * @function create - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static - * @param {grafeas.v1.IComplianceOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence instance + * @param {grafeas.v1.IHash=} [properties] Properties to set + * @returns {grafeas.v1.Hash} Hash instance */ - ComplianceOccurrence.create = function create(properties) { - return new ComplianceOccurrence(properties); + Hash.create = function create(properties) { + return new Hash(properties); }; /** - * Encodes the specified ComplianceOccurrence message. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. + * Encodes the specified Hash message. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static - * @param {grafeas.v1.IComplianceOccurrence} message ComplianceOccurrence message or plain object to encode + * @param {grafeas.v1.IHash} message Hash message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComplianceOccurrence.encode = function encode(message, writer) { + Hash.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nonCompliantFiles != null && message.nonCompliantFiles.length) - for (var i = 0; i < message.nonCompliantFiles.length; ++i) - $root.grafeas.v1.NonCompliantFile.encode(message.nonCompliantFiles[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nonComplianceReason != null && Object.hasOwnProperty.call(message, "nonComplianceReason")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nonComplianceReason); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified ComplianceOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. + * Encodes the specified Hash message, length delimited. Does not implicitly {@link grafeas.v1.Hash.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static - * @param {grafeas.v1.IComplianceOccurrence} message ComplianceOccurrence message or plain object to encode + * @param {grafeas.v1.IHash} message Hash message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComplianceOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + Hash.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComplianceOccurrence message from the specified reader or buffer. + * Decodes a Hash message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence + * @returns {grafeas.v1.Hash} Hash * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComplianceOccurrence.decode = function decode(reader, length) { + Hash.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.ComplianceOccurrence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Hash(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.nonCompliantFiles && message.nonCompliantFiles.length)) - message.nonCompliantFiles = []; - message.nonCompliantFiles.push($root.grafeas.v1.NonCompliantFile.decode(reader, reader.uint32())); + case 1: + message.type = reader.string(); break; - case 3: - message.nonComplianceReason = reader.string(); + case 2: + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -15002,135 +13274,133 @@ }; /** - * Decodes a ComplianceOccurrence message from the specified reader or buffer, length delimited. + * Decodes a Hash message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence + * @returns {grafeas.v1.Hash} Hash * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComplianceOccurrence.decodeDelimited = function decodeDelimited(reader) { + Hash.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComplianceOccurrence message. + * Verifies a Hash message. * @function verify - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComplianceOccurrence.verify = function verify(message) { + Hash.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.nonCompliantFiles != null && message.hasOwnProperty("nonCompliantFiles")) { - if (!Array.isArray(message.nonCompliantFiles)) - return "nonCompliantFiles: array expected"; - for (var i = 0; i < message.nonCompliantFiles.length; ++i) { - var error = $root.grafeas.v1.NonCompliantFile.verify(message.nonCompliantFiles[i]); - if (error) - return "nonCompliantFiles." + error; - } - } - if (message.nonComplianceReason != null && message.hasOwnProperty("nonComplianceReason")) - if (!$util.isString(message.nonComplianceReason)) - return "nonComplianceReason: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a ComplianceOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a Hash message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence + * @returns {grafeas.v1.Hash} Hash */ - ComplianceOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ComplianceOccurrence) + Hash.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Hash) return object; - var message = new $root.grafeas.v1.ComplianceOccurrence(); - if (object.nonCompliantFiles) { - if (!Array.isArray(object.nonCompliantFiles)) - throw TypeError(".grafeas.v1.ComplianceOccurrence.nonCompliantFiles: array expected"); - message.nonCompliantFiles = []; - for (var i = 0; i < object.nonCompliantFiles.length; ++i) { - if (typeof object.nonCompliantFiles[i] !== "object") - throw TypeError(".grafeas.v1.ComplianceOccurrence.nonCompliantFiles: object expected"); - message.nonCompliantFiles[i] = $root.grafeas.v1.NonCompliantFile.fromObject(object.nonCompliantFiles[i]); - } - } - if (object.nonComplianceReason != null) - message.nonComplianceReason = String(object.nonComplianceReason); + var message = new $root.grafeas.v1.Hash(); + if (object.type != null) + message.type = String(object.type); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; return message; }; /** - * Creates a plain object from a ComplianceOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a Hash message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @static - * @param {grafeas.v1.ComplianceOccurrence} message ComplianceOccurrence + * @param {grafeas.v1.Hash} message Hash * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComplianceOccurrence.toObject = function toObject(message, options) { + Hash.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.nonCompliantFiles = []; - if (options.defaults) - object.nonComplianceReason = ""; - if (message.nonCompliantFiles && message.nonCompliantFiles.length) { - object.nonCompliantFiles = []; - for (var j = 0; j < message.nonCompliantFiles.length; ++j) - object.nonCompliantFiles[j] = $root.grafeas.v1.NonCompliantFile.toObject(message.nonCompliantFiles[j], options); + if (options.defaults) { + object.type = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.nonComplianceReason != null && message.hasOwnProperty("nonComplianceReason")) - object.nonComplianceReason = message.nonComplianceReason; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this ComplianceOccurrence to JSON. + * Converts this Hash to JSON. * @function toJSON - * @memberof grafeas.v1.ComplianceOccurrence + * @memberof grafeas.v1.Hash * @instance * @returns {Object.} JSON object */ - ComplianceOccurrence.prototype.toJSON = function toJSON() { + Hash.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ComplianceOccurrence; + return Hash; })(); - v1.NonCompliantFile = (function() { + v1.Command = (function() { /** - * Properties of a NonCompliantFile. + * Properties of a Command. * @memberof grafeas.v1 - * @interface INonCompliantFile - * @property {string|null} [path] NonCompliantFile path - * @property {string|null} [displayCommand] NonCompliantFile displayCommand - * @property {string|null} [reason] NonCompliantFile reason + * @interface ICommand + * @property {string|null} [name] Command name + * @property {Array.|null} [env] Command env + * @property {Array.|null} [args] Command args + * @property {string|null} [dir] Command dir + * @property {string|null} [id] Command id + * @property {Array.|null} [waitFor] Command waitFor */ /** - * Constructs a new NonCompliantFile. + * Constructs a new Command. * @memberof grafeas.v1 - * @classdesc Represents a NonCompliantFile. - * @implements INonCompliantFile + * @classdesc Represents a Command. + * @implements ICommand * @constructor - * @param {grafeas.v1.INonCompliantFile=} [properties] Properties to set + * @param {grafeas.v1.ICommand=} [properties] Properties to set */ - function NonCompliantFile(properties) { + function Command(properties) { + this.env = []; + this.args = []; + this.waitFor = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15138,101 +13408,149 @@ } /** - * NonCompliantFile path. - * @member {string} path - * @memberof grafeas.v1.NonCompliantFile + * Command name. + * @member {string} name + * @memberof grafeas.v1.Command * @instance */ - NonCompliantFile.prototype.path = ""; + Command.prototype.name = ""; /** - * NonCompliantFile displayCommand. - * @member {string} displayCommand - * @memberof grafeas.v1.NonCompliantFile + * Command env. + * @member {Array.} env + * @memberof grafeas.v1.Command * @instance */ - NonCompliantFile.prototype.displayCommand = ""; + Command.prototype.env = $util.emptyArray; /** - * NonCompliantFile reason. - * @member {string} reason - * @memberof grafeas.v1.NonCompliantFile + * Command args. + * @member {Array.} args + * @memberof grafeas.v1.Command * @instance */ - NonCompliantFile.prototype.reason = ""; + Command.prototype.args = $util.emptyArray; /** - * Creates a new NonCompliantFile instance using the specified properties. + * Command dir. + * @member {string} dir + * @memberof grafeas.v1.Command + * @instance + */ + Command.prototype.dir = ""; + + /** + * Command id. + * @member {string} id + * @memberof grafeas.v1.Command + * @instance + */ + Command.prototype.id = ""; + + /** + * Command waitFor. + * @member {Array.} waitFor + * @memberof grafeas.v1.Command + * @instance + */ + Command.prototype.waitFor = $util.emptyArray; + + /** + * Creates a new Command instance using the specified properties. * @function create - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static - * @param {grafeas.v1.INonCompliantFile=} [properties] Properties to set - * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile instance + * @param {grafeas.v1.ICommand=} [properties] Properties to set + * @returns {grafeas.v1.Command} Command instance */ - NonCompliantFile.create = function create(properties) { - return new NonCompliantFile(properties); + Command.create = function create(properties) { + return new Command(properties); }; /** - * Encodes the specified NonCompliantFile message. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. + * Encodes the specified Command message. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. * @function encode - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static - * @param {grafeas.v1.INonCompliantFile} message NonCompliantFile message or plain object to encode + * @param {grafeas.v1.ICommand} message Command message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NonCompliantFile.encode = function encode(message, writer) { + Command.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.displayCommand != null && Object.hasOwnProperty.call(message, "displayCommand")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayCommand); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.reason); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.env != null && message.env.length) + for (var i = 0; i < message.env.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.env[i]); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); + if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dir); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); + if (message.waitFor != null && message.waitFor.length) + for (var i = 0; i < message.waitFor.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.waitFor[i]); return writer; }; /** - * Encodes the specified NonCompliantFile message, length delimited. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. + * Encodes the specified Command message, length delimited. Does not implicitly {@link grafeas.v1.Command.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static - * @param {grafeas.v1.INonCompliantFile} message NonCompliantFile message or plain object to encode + * @param {grafeas.v1.ICommand} message Command message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NonCompliantFile.encodeDelimited = function encodeDelimited(message, writer) { + Command.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NonCompliantFile message from the specified reader or buffer. + * Decodes a Command message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile + * @returns {grafeas.v1.Command} Command * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NonCompliantFile.decode = function decode(reader, length) { + Command.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.NonCompliantFile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Command(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.path = reader.string(); + message.name = reader.string(); break; case 2: - message.displayCommand = reader.string(); + if (!(message.env && message.env.length)) + message.env = []; + message.env.push(reader.string()); break; case 3: - message.reason = reader.string(); + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + case 4: + message.dir = reader.string(); + break; + case 5: + message.id = reader.string(); + break; + case 6: + if (!(message.waitFor && message.waitFor.length)) + message.waitFor = []; + message.waitFor.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -15243,125 +13561,189 @@ }; /** - * Decodes a NonCompliantFile message from the specified reader or buffer, length delimited. + * Decodes a Command message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile + * @returns {grafeas.v1.Command} Command * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NonCompliantFile.decodeDelimited = function decodeDelimited(reader) { + Command.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NonCompliantFile message. + * Verifies a Command message. * @function verify - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NonCompliantFile.verify = function verify(message) { + Command.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.displayCommand != null && message.hasOwnProperty("displayCommand")) - if (!$util.isString(message.displayCommand)) - return "displayCommand: string expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.env != null && message.hasOwnProperty("env")) { + if (!Array.isArray(message.env)) + return "env: array expected"; + for (var i = 0; i < message.env.length; ++i) + if (!$util.isString(message.env[i])) + return "env: string[] expected"; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.dir != null && message.hasOwnProperty("dir")) + if (!$util.isString(message.dir)) + return "dir: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.waitFor != null && message.hasOwnProperty("waitFor")) { + if (!Array.isArray(message.waitFor)) + return "waitFor: array expected"; + for (var i = 0; i < message.waitFor.length; ++i) + if (!$util.isString(message.waitFor[i])) + return "waitFor: string[] expected"; + } return null; }; /** - * Creates a NonCompliantFile message from a plain object. Also converts values to their respective internal types. + * Creates a Command message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile + * @returns {grafeas.v1.Command} Command */ - NonCompliantFile.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.NonCompliantFile) + Command.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Command) return object; - var message = new $root.grafeas.v1.NonCompliantFile(); - if (object.path != null) - message.path = String(object.path); - if (object.displayCommand != null) - message.displayCommand = String(object.displayCommand); - if (object.reason != null) - message.reason = String(object.reason); + var message = new $root.grafeas.v1.Command(); + if (object.name != null) + message.name = String(object.name); + if (object.env) { + if (!Array.isArray(object.env)) + throw TypeError(".grafeas.v1.Command.env: array expected"); + message.env = []; + for (var i = 0; i < object.env.length; ++i) + message.env[i] = String(object.env[i]); + } + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".grafeas.v1.Command.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + if (object.dir != null) + message.dir = String(object.dir); + if (object.id != null) + message.id = String(object.id); + if (object.waitFor) { + if (!Array.isArray(object.waitFor)) + throw TypeError(".grafeas.v1.Command.waitFor: array expected"); + message.waitFor = []; + for (var i = 0; i < object.waitFor.length; ++i) + message.waitFor[i] = String(object.waitFor[i]); + } return message; }; /** - * Creates a plain object from a NonCompliantFile message. Also converts values to other types if specified. + * Creates a plain object from a Command message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @static - * @param {grafeas.v1.NonCompliantFile} message NonCompliantFile + * @param {grafeas.v1.Command} message Command * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NonCompliantFile.toObject = function toObject(message, options) { + Command.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.env = []; + object.args = []; + object.waitFor = []; + } if (options.defaults) { - object.path = ""; - object.displayCommand = ""; - object.reason = ""; + object.name = ""; + object.dir = ""; + object.id = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.env && message.env.length) { + object.env = []; + for (var j = 0; j < message.env.length; ++j) + object.env[j] = message.env[j]; + } + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.dir != null && message.hasOwnProperty("dir")) + object.dir = message.dir; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.waitFor && message.waitFor.length) { + object.waitFor = []; + for (var j = 0; j < message.waitFor.length; ++j) + object.waitFor[j] = message.waitFor[j]; } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.displayCommand != null && message.hasOwnProperty("displayCommand")) - object.displayCommand = message.displayCommand; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; return object; }; /** - * Converts this NonCompliantFile to JSON. + * Converts this Command to JSON. * @function toJSON - * @memberof grafeas.v1.NonCompliantFile + * @memberof grafeas.v1.Command * @instance * @returns {Object.} JSON object */ - NonCompliantFile.prototype.toJSON = function toJSON() { + Command.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NonCompliantFile; + return Command; })(); - v1.DeploymentNote = (function() { + v1.Artifact = (function() { /** - * Properties of a DeploymentNote. + * Properties of an Artifact. * @memberof grafeas.v1 - * @interface IDeploymentNote - * @property {Array.|null} [resourceUri] DeploymentNote resourceUri + * @interface IArtifact + * @property {string|null} [checksum] Artifact checksum + * @property {string|null} [id] Artifact id + * @property {Array.|null} [names] Artifact names */ /** - * Constructs a new DeploymentNote. + * Constructs a new Artifact. * @memberof grafeas.v1 - * @classdesc Represents a DeploymentNote. - * @implements IDeploymentNote + * @classdesc Represents an Artifact. + * @implements IArtifact * @constructor - * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set + * @param {grafeas.v1.IArtifact=} [properties] Properties to set */ - function DeploymentNote(properties) { - this.resourceUri = []; + function Artifact(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15369,78 +13751,104 @@ } /** - * DeploymentNote resourceUri. - * @member {Array.} resourceUri - * @memberof grafeas.v1.DeploymentNote + * Artifact checksum. + * @member {string} checksum + * @memberof grafeas.v1.Artifact * @instance */ - DeploymentNote.prototype.resourceUri = $util.emptyArray; + Artifact.prototype.checksum = ""; /** - * Creates a new DeploymentNote instance using the specified properties. + * Artifact id. + * @member {string} id + * @memberof grafeas.v1.Artifact + * @instance + */ + Artifact.prototype.id = ""; + + /** + * Artifact names. + * @member {Array.} names + * @memberof grafeas.v1.Artifact + * @instance + */ + Artifact.prototype.names = $util.emptyArray; + + /** + * Creates a new Artifact instance using the specified properties. * @function create - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @static - * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set - * @returns {grafeas.v1.DeploymentNote} DeploymentNote instance + * @param {grafeas.v1.IArtifact=} [properties] Properties to set + * @returns {grafeas.v1.Artifact} Artifact instance */ - DeploymentNote.create = function create(properties) { - return new DeploymentNote(properties); + Artifact.create = function create(properties) { + return new Artifact(properties); }; /** - * Encodes the specified DeploymentNote message. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. + * Encodes the specified Artifact message. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @static - * @param {grafeas.v1.IDeploymentNote} message DeploymentNote message or plain object to encode + * @param {grafeas.v1.IArtifact} message Artifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentNote.encode = function encode(message, writer) { + Artifact.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]); + if (message.checksum != null && Object.hasOwnProperty.call(message, "checksum")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.checksum); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); return writer; }; /** - * Encodes the specified DeploymentNote message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. + * Encodes the specified Artifact message, length delimited. Does not implicitly {@link grafeas.v1.Artifact.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @static - * @param {grafeas.v1.IDeploymentNote} message DeploymentNote message or plain object to encode + * @param {grafeas.v1.IArtifact} message Artifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentNote.encodeDelimited = function encodeDelimited(message, writer) { + Artifact.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeploymentNote message from the specified reader or buffer. + * Decodes an Artifact message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @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 + * @returns {grafeas.v1.Artifact} Artifact * @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) { + Artifact.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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grafeas.v1.Artifact(); 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()); + message.checksum = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + case 3: + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -15451,126 +13859,141 @@ }; /** - * Decodes a DeploymentNote message from the specified reader or buffer, length delimited. + * Decodes an Artifact message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeploymentNote} DeploymentNote + * @returns {grafeas.v1.Artifact} Artifact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeploymentNote.decodeDelimited = function decodeDelimited(reader) { + Artifact.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeploymentNote message. + * Verifies an Artifact message. * @function verify - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @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) { + Artifact.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"; + if (message.checksum != null && message.hasOwnProperty("checksum")) + if (!$util.isString(message.checksum)) + return "checksum: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates a DeploymentNote message from a plain object. Also converts values to their respective internal types. + * Creates an Artifact message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DeploymentNote} DeploymentNote + * @returns {grafeas.v1.Artifact} Artifact */ - DeploymentNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeploymentNote) + Artifact.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Artifact) 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]); + var message = new $root.grafeas.v1.Artifact(); + if (object.checksum != null) + message.checksum = String(object.checksum); + if (object.id != null) + message.id = String(object.id); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".grafeas.v1.Artifact.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } return message; }; /** - * Creates a plain object from a DeploymentNote message. Also converts values to other types if specified. + * Creates a plain object from an Artifact message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @static - * @param {grafeas.v1.DeploymentNote} message DeploymentNote + * @param {grafeas.v1.Artifact} message Artifact * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeploymentNote.toObject = function toObject(message, options) { + Artifact.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]; + object.names = []; + if (options.defaults) { + object.checksum = ""; + object.id = ""; + } + if (message.checksum != null && message.hasOwnProperty("checksum")) + object.checksum = message.checksum; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } return object; }; /** - * Converts this DeploymentNote to JSON. + * Converts this Artifact to JSON. * @function toJSON - * @memberof grafeas.v1.DeploymentNote + * @memberof grafeas.v1.Artifact * @instance * @returns {Object.} JSON object */ - DeploymentNote.prototype.toJSON = function toJSON() { + Artifact.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeploymentNote; + return Artifact; })(); - v1.DeploymentOccurrence = (function() { + v1.SourceContext = (function() { /** - * Properties of a DeploymentOccurrence. + * Properties of a SourceContext. * @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 + * @interface ISourceContext + * @property {grafeas.v1.ICloudRepoSourceContext|null} [cloudRepo] SourceContext cloudRepo + * @property {grafeas.v1.IGerritSourceContext|null} [gerrit] SourceContext gerrit + * @property {grafeas.v1.IGitSourceContext|null} [git] SourceContext git + * @property {Object.|null} [labels] SourceContext labels */ /** - * Constructs a new DeploymentOccurrence. + * Constructs a new SourceContext. * @memberof grafeas.v1 - * @classdesc Represents a DeploymentOccurrence. - * @implements IDeploymentOccurrence + * @classdesc Represents a SourceContext. + * @implements ISourceContext * @constructor - * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set + * @param {grafeas.v1.ISourceContext=} [properties] Properties to set */ - function DeploymentOccurrence(properties) { - this.resourceUri = []; + function SourceContext(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15578,156 +14001,148 @@ } /** - * DeploymentOccurrence userEmail. - * @member {string} userEmail - * @memberof grafeas.v1.DeploymentOccurrence - * @instance - */ - DeploymentOccurrence.prototype.userEmail = ""; - - /** - * DeploymentOccurrence deployTime. - * @member {google.protobuf.ITimestamp|null|undefined} deployTime - * @memberof grafeas.v1.DeploymentOccurrence + * SourceContext cloudRepo. + * @member {grafeas.v1.ICloudRepoSourceContext|null|undefined} cloudRepo + * @memberof grafeas.v1.SourceContext * @instance */ - DeploymentOccurrence.prototype.deployTime = null; + SourceContext.prototype.cloudRepo = null; /** - * DeploymentOccurrence undeployTime. - * @member {google.protobuf.ITimestamp|null|undefined} undeployTime - * @memberof grafeas.v1.DeploymentOccurrence + * SourceContext gerrit. + * @member {grafeas.v1.IGerritSourceContext|null|undefined} gerrit + * @memberof grafeas.v1.SourceContext * @instance */ - DeploymentOccurrence.prototype.undeployTime = null; + SourceContext.prototype.gerrit = null; /** - * DeploymentOccurrence config. - * @member {string} config - * @memberof grafeas.v1.DeploymentOccurrence + * SourceContext git. + * @member {grafeas.v1.IGitSourceContext|null|undefined} git + * @memberof grafeas.v1.SourceContext * @instance */ - DeploymentOccurrence.prototype.config = ""; + SourceContext.prototype.git = null; /** - * DeploymentOccurrence address. - * @member {string} address - * @memberof grafeas.v1.DeploymentOccurrence + * SourceContext labels. + * @member {Object.} labels + * @memberof grafeas.v1.SourceContext * @instance */ - DeploymentOccurrence.prototype.address = ""; + SourceContext.prototype.labels = $util.emptyObject; - /** - * DeploymentOccurrence resourceUri. - * @member {Array.} resourceUri - * @memberof grafeas.v1.DeploymentOccurrence - * @instance - */ - DeploymentOccurrence.prototype.resourceUri = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DeploymentOccurrence platform. - * @member {grafeas.v1.DeploymentOccurrence.Platform} platform - * @memberof grafeas.v1.DeploymentOccurrence + * SourceContext context. + * @member {"cloudRepo"|"gerrit"|"git"|undefined} context + * @memberof grafeas.v1.SourceContext * @instance */ - DeploymentOccurrence.prototype.platform = 0; + Object.defineProperty(SourceContext.prototype, "context", { + get: $util.oneOfGetter($oneOfFields = ["cloudRepo", "gerrit", "git"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DeploymentOccurrence instance using the specified properties. + * Creates a new SourceContext instance using the specified properties. * @function create - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @static - * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence instance + * @param {grafeas.v1.ISourceContext=} [properties] Properties to set + * @returns {grafeas.v1.SourceContext} SourceContext instance */ - DeploymentOccurrence.create = function create(properties) { - return new DeploymentOccurrence(properties); + SourceContext.create = function create(properties) { + return new SourceContext(properties); }; /** - * Encodes the specified DeploymentOccurrence message. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * Encodes the specified SourceContext message. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @static - * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode + * @param {grafeas.v1.ISourceContext} message SourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentOccurrence.encode = function encode(message, writer) { + SourceContext.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.cloudRepo != null && Object.hasOwnProperty.call(message, "cloudRepo")) + $root.grafeas.v1.CloudRepoSourceContext.encode(message.cloudRepo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gerrit != null && Object.hasOwnProperty.call(message, "gerrit")) + $root.grafeas.v1.GerritSourceContext.encode(message.gerrit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.git != null && Object.hasOwnProperty.call(message, "git")) + $root.grafeas.v1.GitSourceContext.encode(message.git, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified DeploymentOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. + * Encodes the specified SourceContext message, length delimited. Does not implicitly {@link grafeas.v1.SourceContext.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @static - * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode + * @param {grafeas.v1.ISourceContext} message SourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + SourceContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer. + * Decodes a SourceContext message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @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.SourceContext} SourceContext * @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) { + SourceContext.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.SourceContext(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.userEmail = reader.string(); + message.cloudRepo = $root.grafeas.v1.CloudRepoSourceContext.decode(reader, reader.uint32()); break; case 2: - message.deployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.gerrit = $root.grafeas.v1.GerritSourceContext.decode(reader, reader.uint32()); break; case 3: - message.undeployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.git = $root.grafeas.v1.GitSourceContext.decode(reader, reader.uint32()); break; case 4: - message.config = reader.string(); - break; - case 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(); + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; default: reader.skipType(tag & 7); @@ -15738,220 +14153,181 @@ }; /** - * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. + * Decodes a SourceContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + * @returns {grafeas.v1.SourceContext} SourceContext * @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) { + SourceContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeploymentOccurrence message. + * Verifies a SourceContext message. * @function verify - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @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) { + SourceContext.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; + var properties = {}; + if (message.cloudRepo != null && message.hasOwnProperty("cloudRepo")) { + properties.context = 1; + { + var error = $root.grafeas.v1.CloudRepoSourceContext.verify(message.cloudRepo); + if (error) + return "cloudRepo." + 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.gerrit != null && message.hasOwnProperty("gerrit")) { + if (properties.context === 1) + return "context: multiple values"; + properties.context = 1; + { + var error = $root.grafeas.v1.GerritSourceContext.verify(message.gerrit); + if (error) + return "gerrit." + error; + } } - 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; + if (message.git != null && message.hasOwnProperty("git")) { + if (properties.context === 1) + return "context: multiple values"; + properties.context = 1; + { + var error = $root.grafeas.v1.GitSourceContext.verify(message.git); + if (error) + return "git." + error; } + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; /** - * Creates a DeploymentOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a SourceContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence + * @returns {grafeas.v1.SourceContext} SourceContext */ - DeploymentOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeploymentOccurrence) + SourceContext.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.SourceContext) 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); + var message = new $root.grafeas.v1.SourceContext(); + if (object.cloudRepo != null) { + if (typeof object.cloudRepo !== "object") + throw TypeError(".grafeas.v1.SourceContext.cloudRepo: object expected"); + message.cloudRepo = $root.grafeas.v1.CloudRepoSourceContext.fromObject(object.cloudRepo); } - 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.gerrit != null) { + if (typeof object.gerrit !== "object") + throw TypeError(".grafeas.v1.SourceContext.gerrit: object expected"); + message.gerrit = $root.grafeas.v1.GerritSourceContext.fromObject(object.gerrit); } - 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]); + if (object.git != null) { + if (typeof object.git !== "object") + throw TypeError(".grafeas.v1.SourceContext.git: object expected"); + message.git = $root.grafeas.v1.GitSourceContext.fromObject(object.git); } - 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; + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".grafeas.v1.SourceContext.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a DeploymentOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a SourceContext message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @static - * @param {grafeas.v1.DeploymentOccurrence} message DeploymentOccurrence + * @param {grafeas.v1.SourceContext} message SourceContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeploymentOccurrence.toObject = function toObject(message, options) { + SourceContext.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 (options.objects || options.defaults) + object.labels = {}; + if (message.cloudRepo != null && message.hasOwnProperty("cloudRepo")) { + object.cloudRepo = $root.grafeas.v1.CloudRepoSourceContext.toObject(message.cloudRepo, options); + if (options.oneofs) + object.context = "cloudRepo"; } - 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.gerrit != null && message.hasOwnProperty("gerrit")) { + object.gerrit = $root.grafeas.v1.GerritSourceContext.toObject(message.gerrit, options); + if (options.oneofs) + object.context = "gerrit"; + } + if (message.git != null && message.hasOwnProperty("git")) { + object.git = $root.grafeas.v1.GitSourceContext.toObject(message.git, options); + if (options.oneofs) + object.context = "git"; + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - 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 SourceContext to JSON. * @function toJSON - * @memberof grafeas.v1.DeploymentOccurrence + * @memberof grafeas.v1.SourceContext * @instance * @returns {Object.} JSON object */ - DeploymentOccurrence.prototype.toJSON = function toJSON() { + SourceContext.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 SourceContext; })(); - v1.DiscoveryNote = (function() { + v1.AliasContext = (function() { /** - * Properties of a DiscoveryNote. + * Properties of an AliasContext. * @memberof grafeas.v1 - * @interface IDiscoveryNote - * @property {grafeas.v1.NoteKind|null} [analysisKind] DiscoveryNote analysisKind + * @interface IAliasContext + * @property {grafeas.v1.AliasContext.Kind|null} [kind] AliasContext kind + * @property {string|null} [name] AliasContext name */ /** - * Constructs a new DiscoveryNote. + * Constructs a new AliasContext. * @memberof grafeas.v1 - * @classdesc Represents a DiscoveryNote. - * @implements IDiscoveryNote + * @classdesc Represents an AliasContext. + * @implements IAliasContext * @constructor - * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set + * @param {grafeas.v1.IAliasContext=} [properties] Properties to set */ - function DiscoveryNote(properties) { + function AliasContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15959,75 +14335,88 @@ } /** - * DiscoveryNote analysisKind. - * @member {grafeas.v1.NoteKind} analysisKind - * @memberof grafeas.v1.DiscoveryNote + * AliasContext kind. + * @member {grafeas.v1.AliasContext.Kind} kind + * @memberof grafeas.v1.AliasContext * @instance */ - DiscoveryNote.prototype.analysisKind = 0; + AliasContext.prototype.kind = 0; /** - * Creates a new DiscoveryNote instance using the specified properties. + * AliasContext name. + * @member {string} name + * @memberof grafeas.v1.AliasContext + * @instance + */ + AliasContext.prototype.name = ""; + + /** + * Creates a new AliasContext instance using the specified properties. * @function create - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @static - * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set - * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote instance + * @param {grafeas.v1.IAliasContext=} [properties] Properties to set + * @returns {grafeas.v1.AliasContext} AliasContext instance */ - DiscoveryNote.create = function create(properties) { - return new DiscoveryNote(properties); + AliasContext.create = function create(properties) { + return new AliasContext(properties); }; /** - * Encodes the specified DiscoveryNote message. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. + * Encodes the specified AliasContext message. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @static - * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode + * @param {grafeas.v1.IAliasContext} message AliasContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryNote.encode = function encode(message, writer) { + AliasContext.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.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).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 AliasContext message, length delimited. Does not implicitly {@link grafeas.v1.AliasContext.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @static - * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode + * @param {grafeas.v1.IAliasContext} message AliasContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryNote.encodeDelimited = function encodeDelimited(message, writer) { + AliasContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryNote message from the specified reader or buffer. + * Decodes an AliasContext message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @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.AliasContext} AliasContext * @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) { + AliasContext.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.AliasContext(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.analysisKind = reader.int32(); + message.kind = reader.int32(); + break; + case 2: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -16038,169 +14427,159 @@ }; /** - * Decodes a DiscoveryNote message from the specified reader or buffer, length delimited. + * Decodes an AliasContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote + * @returns {grafeas.v1.AliasContext} AliasContext * @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) { + AliasContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryNote message. + * Verifies an AliasContext message. * @function verify - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @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) { + AliasContext.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.analysisKind != null && message.hasOwnProperty("analysisKind")) - switch (message.analysisKind) { + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { default: - return "analysisKind: 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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a DiscoveryNote message from a plain object. Also converts values to their respective internal types. + * Creates an AliasContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote + * @returns {grafeas.v1.AliasContext} AliasContext */ - DiscoveryNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DiscoveryNote) + AliasContext.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.AliasContext) return object; - var message = new $root.grafeas.v1.DiscoveryNote(); - switch (object.analysisKind) { - case "NOTE_KIND_UNSPECIFIED": + var message = new $root.grafeas.v1.AliasContext(); + switch (object.kind) { + case "KIND_UNSPECIFIED": case 0: - message.analysisKind = 0; + message.kind = 0; break; - case "VULNERABILITY": + case "FIXED": case 1: - message.analysisKind = 1; + message.kind = 1; break; - case "BUILD": + case "MOVABLE": case 2: - message.analysisKind = 2; - break; - case "IMAGE": - case 3: - message.analysisKind = 3; + message.kind = 2; break; - case "PACKAGE": + case "OTHER": 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; + message.kind = 4; break; } + 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 an AliasContext message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @static - * @param {grafeas.v1.DiscoveryNote} message DiscoveryNote + * @param {grafeas.v1.AliasContext} message AliasContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryNote.toObject = function toObject(message, options) { + AliasContext.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; + if (options.defaults) { + object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; + object.name = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.grafeas.v1.AliasContext.Kind[message.kind] : message.kind; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DiscoveryNote to JSON. + * Converts this AliasContext to JSON. * @function toJSON - * @memberof grafeas.v1.DiscoveryNote + * @memberof grafeas.v1.AliasContext * @instance * @returns {Object.} JSON object */ - DiscoveryNote.prototype.toJSON = function toJSON() { + AliasContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DiscoveryNote; + /** + * Kind enum. + * @name grafeas.v1.AliasContext.Kind + * @enum {number} + * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value + * @property {number} FIXED=1 FIXED value + * @property {number} MOVABLE=2 MOVABLE value + * @property {number} OTHER=4 OTHER value + */ + AliasContext.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIXED"] = 1; + values[valuesById[2] = "MOVABLE"] = 2; + values[valuesById[4] = "OTHER"] = 4; + return values; + })(); + + return AliasContext; })(); - v1.DiscoveryOccurrence = (function() { + v1.CloudRepoSourceContext = (function() { /** - * Properties of a DiscoveryOccurrence. + * Properties of a CloudRepoSourceContext. * @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 ICloudRepoSourceContext + * @property {grafeas.v1.IRepoId|null} [repoId] CloudRepoSourceContext repoId + * @property {string|null} [revisionId] CloudRepoSourceContext revisionId + * @property {grafeas.v1.IAliasContext|null} [aliasContext] CloudRepoSourceContext aliasContext */ /** - * Constructs a new DiscoveryOccurrence. + * Constructs a new CloudRepoSourceContext. * @memberof grafeas.v1 - * @classdesc Represents a DiscoveryOccurrence. - * @implements IDiscoveryOccurrence + * @classdesc Represents a CloudRepoSourceContext. + * @implements ICloudRepoSourceContext * @constructor - * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set + * @param {grafeas.v1.ICloudRepoSourceContext=} [properties] Properties to set */ - function DiscoveryOccurrence(properties) { + function CloudRepoSourceContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16208,127 +14587,115 @@ } /** - * DiscoveryOccurrence continuousAnalysis. - * @member {grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} continuousAnalysis - * @memberof grafeas.v1.DiscoveryOccurrence + * CloudRepoSourceContext repoId. + * @member {grafeas.v1.IRepoId|null|undefined} repoId + * @memberof grafeas.v1.CloudRepoSourceContext * @instance */ - DiscoveryOccurrence.prototype.continuousAnalysis = 0; + CloudRepoSourceContext.prototype.repoId = null; /** - * DiscoveryOccurrence analysisStatus. - * @member {grafeas.v1.DiscoveryOccurrence.AnalysisStatus} analysisStatus - * @memberof grafeas.v1.DiscoveryOccurrence + * CloudRepoSourceContext revisionId. + * @member {string|null|undefined} revisionId + * @memberof grafeas.v1.CloudRepoSourceContext * @instance */ - DiscoveryOccurrence.prototype.analysisStatus = 0; + CloudRepoSourceContext.prototype.revisionId = null; /** - * DiscoveryOccurrence analysisStatusError. - * @member {google.rpc.IStatus|null|undefined} analysisStatusError - * @memberof grafeas.v1.DiscoveryOccurrence + * CloudRepoSourceContext aliasContext. + * @member {grafeas.v1.IAliasContext|null|undefined} aliasContext + * @memberof grafeas.v1.CloudRepoSourceContext * @instance */ - DiscoveryOccurrence.prototype.analysisStatusError = null; + CloudRepoSourceContext.prototype.aliasContext = null; - /** - * DiscoveryOccurrence cpe. - * @member {string} cpe - * @memberof grafeas.v1.DiscoveryOccurrence - * @instance - */ - DiscoveryOccurrence.prototype.cpe = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DiscoveryOccurrence lastScanTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastScanTime - * @memberof grafeas.v1.DiscoveryOccurrence + * CloudRepoSourceContext revision. + * @member {"revisionId"|"aliasContext"|undefined} revision + * @memberof grafeas.v1.CloudRepoSourceContext * @instance */ - DiscoveryOccurrence.prototype.lastScanTime = null; + Object.defineProperty(CloudRepoSourceContext.prototype, "revision", { + get: $util.oneOfGetter($oneOfFields = ["revisionId", "aliasContext"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DiscoveryOccurrence instance using the specified properties. + * Creates a new CloudRepoSourceContext instance using the specified properties. * @function create - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @static - * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence instance + * @param {grafeas.v1.ICloudRepoSourceContext=} [properties] Properties to set + * @returns {grafeas.v1.CloudRepoSourceContext} CloudRepoSourceContext instance */ - DiscoveryOccurrence.create = function create(properties) { - return new DiscoveryOccurrence(properties); + CloudRepoSourceContext.create = function create(properties) { + return new CloudRepoSourceContext(properties); }; /** - * Encodes the specified DiscoveryOccurrence message. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * Encodes the specified CloudRepoSourceContext message. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @static - * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode + * @param {grafeas.v1.ICloudRepoSourceContext} message CloudRepoSourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryOccurrence.encode = function encode(message, writer) { + CloudRepoSourceContext.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.repoId != null && Object.hasOwnProperty.call(message, "repoId")) + $root.grafeas.v1.RepoId.encode(message.repoId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); + if (message.aliasContext != null && Object.hasOwnProperty.call(message, "aliasContext")) + $root.grafeas.v1.AliasContext.encode(message.aliasContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. + * Encodes the specified CloudRepoSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.CloudRepoSourceContext.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @static - * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode + * @param {grafeas.v1.ICloudRepoSourceContext} message CloudRepoSourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + CloudRepoSourceContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer. + * Decodes a CloudRepoSourceContext message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @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.CloudRepoSourceContext} CloudRepoSourceContext * @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) { + CloudRepoSourceContext.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.CloudRepoSourceContext(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.continuousAnalysis = reader.int32(); + message.repoId = $root.grafeas.v1.RepoId.decode(reader, reader.uint32()); break; case 2: - message.analysisStatus = reader.int32(); + message.revisionId = reader.string(); 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()); + message.aliasContext = $root.grafeas.v1.AliasContext.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -16339,239 +14706,148 @@ }; /** - * Decodes a DiscoveryOccurrence message from the specified reader or buffer, length delimited. + * Decodes a CloudRepoSourceContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence + * @returns {grafeas.v1.CloudRepoSourceContext} CloudRepoSourceContext * @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) { + CloudRepoSourceContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryOccurrence message. + * Verifies a CloudRepoSourceContext message. * @function verify - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @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) { + CloudRepoSourceContext.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); + var properties = {}; + if (message.repoId != null && message.hasOwnProperty("repoId")) { + var error = $root.grafeas.v1.RepoId.verify(message.repoId); if (error) - return "analysisStatusError." + error; + return "repoId." + 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.revisionId != null && message.hasOwnProperty("revisionId")) { + properties.revision = 1; + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + } + if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { + if (properties.revision === 1) + return "revision: multiple values"; + properties.revision = 1; + { + var error = $root.grafeas.v1.AliasContext.verify(message.aliasContext); + if (error) + return "aliasContext." + error; + } } return null; }; /** - * Creates a DiscoveryOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a CloudRepoSourceContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence + * @returns {grafeas.v1.CloudRepoSourceContext} CloudRepoSourceContext */ - DiscoveryOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DiscoveryOccurrence) + CloudRepoSourceContext.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CloudRepoSourceContext) 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.CloudRepoSourceContext(); + if (object.repoId != null) { + if (typeof object.repoId !== "object") + throw TypeError(".grafeas.v1.CloudRepoSourceContext.repoId: object expected"); + message.repoId = $root.grafeas.v1.RepoId.fromObject(object.repoId); + } + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.aliasContext != null) { + if (typeof object.aliasContext !== "object") + throw TypeError(".grafeas.v1.CloudRepoSourceContext.aliasContext: object expected"); + message.aliasContext = $root.grafeas.v1.AliasContext.fromObject(object.aliasContext); } return message; }; /** - * Creates a plain object from a DiscoveryOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a CloudRepoSourceContext message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @static - * @param {grafeas.v1.DiscoveryOccurrence} message DiscoveryOccurrence + * @param {grafeas.v1.CloudRepoSourceContext} message CloudRepoSourceContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryOccurrence.toObject = function toObject(message, options) { + CloudRepoSourceContext.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; + if (options.defaults) + object.repoId = null; + if (message.repoId != null && message.hasOwnProperty("repoId")) + object.repoId = $root.grafeas.v1.RepoId.toObject(message.repoId, options); + if (message.revisionId != null && message.hasOwnProperty("revisionId")) { + object.revisionId = message.revisionId; + if (options.oneofs) + object.revision = "revisionId"; + } + if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { + object.aliasContext = $root.grafeas.v1.AliasContext.toObject(message.aliasContext, options); + if (options.oneofs) + object.revision = "aliasContext"; } - 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); return object; }; /** - * Converts this DiscoveryOccurrence to JSON. + * Converts this CloudRepoSourceContext to JSON. * @function toJSON - * @memberof grafeas.v1.DiscoveryOccurrence + * @memberof grafeas.v1.CloudRepoSourceContext * @instance * @returns {Object.} JSON object */ - DiscoveryOccurrence.prototype.toJSON = function toJSON() { + CloudRepoSourceContext.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 CloudRepoSourceContext; })(); - v1.DSSEAttestationNote = (function() { + v1.GerritSourceContext = (function() { /** - * Properties of a DSSEAttestationNote. + * Properties of a GerritSourceContext. * @memberof grafeas.v1 - * @interface IDSSEAttestationNote - * @property {grafeas.v1.DSSEAttestationNote.IDSSEHint|null} [hint] DSSEAttestationNote hint + * @interface IGerritSourceContext + * @property {string|null} [hostUri] GerritSourceContext hostUri + * @property {string|null} [gerritProject] GerritSourceContext gerritProject + * @property {string|null} [revisionId] GerritSourceContext revisionId + * @property {grafeas.v1.IAliasContext|null} [aliasContext] GerritSourceContext aliasContext */ /** - * Constructs a new DSSEAttestationNote. + * Constructs a new GerritSourceContext. * @memberof grafeas.v1 - * @classdesc Represents a DSSEAttestationNote. - * @implements IDSSEAttestationNote + * @classdesc Represents a GerritSourceContext. + * @implements IGerritSourceContext * @constructor - * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set + * @param {grafeas.v1.IGerritSourceContext=} [properties] Properties to set */ - function DSSEAttestationNote(properties) { + function GerritSourceContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16579,75 +14855,128 @@ } /** - * DSSEAttestationNote hint. - * @member {grafeas.v1.DSSEAttestationNote.IDSSEHint|null|undefined} hint - * @memberof grafeas.v1.DSSEAttestationNote + * GerritSourceContext hostUri. + * @member {string} hostUri + * @memberof grafeas.v1.GerritSourceContext * @instance */ - DSSEAttestationNote.prototype.hint = null; + GerritSourceContext.prototype.hostUri = ""; /** - * Creates a new DSSEAttestationNote instance using the specified properties. + * GerritSourceContext gerritProject. + * @member {string} gerritProject + * @memberof grafeas.v1.GerritSourceContext + * @instance + */ + GerritSourceContext.prototype.gerritProject = ""; + + /** + * GerritSourceContext revisionId. + * @member {string|null|undefined} revisionId + * @memberof grafeas.v1.GerritSourceContext + * @instance + */ + GerritSourceContext.prototype.revisionId = null; + + /** + * GerritSourceContext aliasContext. + * @member {grafeas.v1.IAliasContext|null|undefined} aliasContext + * @memberof grafeas.v1.GerritSourceContext + * @instance + */ + GerritSourceContext.prototype.aliasContext = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GerritSourceContext revision. + * @member {"revisionId"|"aliasContext"|undefined} revision + * @memberof grafeas.v1.GerritSourceContext + * @instance + */ + Object.defineProperty(GerritSourceContext.prototype, "revision", { + get: $util.oneOfGetter($oneOfFields = ["revisionId", "aliasContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GerritSourceContext instance using the specified properties. * @function create - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @static - * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set - * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote instance + * @param {grafeas.v1.IGerritSourceContext=} [properties] Properties to set + * @returns {grafeas.v1.GerritSourceContext} GerritSourceContext instance */ - DSSEAttestationNote.create = function create(properties) { - return new DSSEAttestationNote(properties); + GerritSourceContext.create = function create(properties) { + return new GerritSourceContext(properties); }; /** - * Encodes the specified DSSEAttestationNote message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. + * Encodes the specified GerritSourceContext message. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @static - * @param {grafeas.v1.IDSSEAttestationNote} message DSSEAttestationNote message or plain object to encode + * @param {grafeas.v1.IGerritSourceContext} message GerritSourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationNote.encode = function encode(message, writer) { + GerritSourceContext.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.hostUri != null && Object.hasOwnProperty.call(message, "hostUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostUri); + if (message.gerritProject != null && Object.hasOwnProperty.call(message, "gerritProject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gerritProject); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.revisionId); + if (message.aliasContext != null && Object.hasOwnProperty.call(message, "aliasContext")) + $root.grafeas.v1.AliasContext.encode(message.aliasContext, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified DSSEAttestationNote message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. + * Encodes the specified GerritSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GerritSourceContext.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @static - * @param {grafeas.v1.IDSSEAttestationNote} message DSSEAttestationNote message or plain object to encode + * @param {grafeas.v1.IGerritSourceContext} message GerritSourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationNote.encodeDelimited = function encodeDelimited(message, writer) { + GerritSourceContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer. + * Decodes a GerritSourceContext message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @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.GerritSourceContext} GerritSourceContext * @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) { + GerritSourceContext.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.GerritSourceContext(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.decode(reader, reader.uint32()); + message.hostUri = reader.string(); + break; + case 2: + message.gerritProject = reader.string(); + break; + case 3: + message.revisionId = reader.string(); + break; + case 4: + message.aliasContext = $root.grafeas.v1.AliasContext.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -16658,300 +14987,150 @@ }; /** - * Decodes a DSSEAttestationNote message from the specified reader or buffer, length delimited. + * Decodes a GerritSourceContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote + * @returns {grafeas.v1.GerritSourceContext} GerritSourceContext * @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) { + GerritSourceContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DSSEAttestationNote message. + * Verifies a GerritSourceContext message. * @function verify - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @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) { + GerritSourceContext.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; + var properties = {}; + if (message.hostUri != null && message.hasOwnProperty("hostUri")) + if (!$util.isString(message.hostUri)) + return "hostUri: string expected"; + if (message.gerritProject != null && message.hasOwnProperty("gerritProject")) + if (!$util.isString(message.gerritProject)) + return "gerritProject: string expected"; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) { + properties.revision = 1; + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + } + if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { + if (properties.revision === 1) + return "revision: multiple values"; + properties.revision = 1; + { + var error = $root.grafeas.v1.AliasContext.verify(message.aliasContext); + if (error) + return "aliasContext." + error; + } } return null; }; /** - * Creates a DSSEAttestationNote message from a plain object. Also converts values to their respective internal types. + * Creates a GerritSourceContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote + * @returns {grafeas.v1.GerritSourceContext} GerritSourceContext */ - DSSEAttestationNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DSSEAttestationNote) + GerritSourceContext.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GerritSourceContext) 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); + var message = new $root.grafeas.v1.GerritSourceContext(); + if (object.hostUri != null) + message.hostUri = String(object.hostUri); + if (object.gerritProject != null) + message.gerritProject = String(object.gerritProject); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.aliasContext != null) { + if (typeof object.aliasContext !== "object") + throw TypeError(".grafeas.v1.GerritSourceContext.aliasContext: object expected"); + message.aliasContext = $root.grafeas.v1.AliasContext.fromObject(object.aliasContext); } return message; }; /** - * Creates a plain object from a DSSEAttestationNote message. Also converts values to other types if specified. + * Creates a plain object from a GerritSourceContext message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @static - * @param {grafeas.v1.DSSEAttestationNote} message DSSEAttestationNote + * @param {grafeas.v1.GerritSourceContext} message GerritSourceContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DSSEAttestationNote.toObject = function toObject(message, options) { + GerritSourceContext.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); + if (options.defaults) { + object.hostUri = ""; + object.gerritProject = ""; + } + if (message.hostUri != null && message.hasOwnProperty("hostUri")) + object.hostUri = message.hostUri; + if (message.gerritProject != null && message.hasOwnProperty("gerritProject")) + object.gerritProject = message.gerritProject; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) { + object.revisionId = message.revisionId; + if (options.oneofs) + object.revision = "revisionId"; + } + if (message.aliasContext != null && message.hasOwnProperty("aliasContext")) { + object.aliasContext = $root.grafeas.v1.AliasContext.toObject(message.aliasContext, options); + if (options.oneofs) + object.revision = "aliasContext"; + } return object; }; /** - * Converts this DSSEAttestationNote to JSON. + * Converts this GerritSourceContext to JSON. * @function toJSON - * @memberof grafeas.v1.DSSEAttestationNote + * @memberof grafeas.v1.GerritSourceContext * @instance * @returns {Object.} JSON object */ - DSSEAttestationNote.prototype.toJSON = function toJSON() { + GerritSourceContext.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; - }; - - /** - * 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; - }; - - /** - * 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); - }; - - return DSSEHint; - })(); - - return DSSEAttestationNote; + return GerritSourceContext; })(); - v1.DSSEAttestationOccurrence = (function() { + v1.GitSourceContext = (function() { /** - * Properties of a DSSEAttestationOccurrence. + * Properties of a GitSourceContext. * @memberof grafeas.v1 - * @interface IDSSEAttestationOccurrence - * @property {grafeas.v1.IEnvelope|null} [envelope] DSSEAttestationOccurrence envelope - * @property {grafeas.v1.IInTotoStatement|null} [statement] DSSEAttestationOccurrence statement + * @interface IGitSourceContext + * @property {string|null} [url] GitSourceContext url + * @property {string|null} [revisionId] GitSourceContext revisionId */ /** - * Constructs a new DSSEAttestationOccurrence. + * Constructs a new GitSourceContext. * @memberof grafeas.v1 - * @classdesc Represents a DSSEAttestationOccurrence. - * @implements IDSSEAttestationOccurrence + * @classdesc Represents a GitSourceContext. + * @implements IGitSourceContext * @constructor - * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set + * @param {grafeas.v1.IGitSourceContext=} [properties] Properties to set */ - function DSSEAttestationOccurrence(properties) { + function GitSourceContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16959,102 +15138,88 @@ } /** - * 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 + * GitSourceContext url. + * @member {string} url + * @memberof grafeas.v1.GitSourceContext * @instance */ - DSSEAttestationOccurrence.prototype.statement = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GitSourceContext.prototype.url = ""; /** - * DSSEAttestationOccurrence decodedPayload. - * @member {"statement"|undefined} decodedPayload - * @memberof grafeas.v1.DSSEAttestationOccurrence + * GitSourceContext revisionId. + * @member {string} revisionId + * @memberof grafeas.v1.GitSourceContext * @instance */ - Object.defineProperty(DSSEAttestationOccurrence.prototype, "decodedPayload", { - get: $util.oneOfGetter($oneOfFields = ["statement"]), - set: $util.oneOfSetter($oneOfFields) - }); + GitSourceContext.prototype.revisionId = ""; /** - * Creates a new DSSEAttestationOccurrence instance using the specified properties. + * Creates a new GitSourceContext instance using the specified properties. * @function create - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @static - * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence instance + * @param {grafeas.v1.IGitSourceContext=} [properties] Properties to set + * @returns {grafeas.v1.GitSourceContext} GitSourceContext instance */ - DSSEAttestationOccurrence.create = function create(properties) { - return new DSSEAttestationOccurrence(properties); + GitSourceContext.create = function create(properties) { + return new GitSourceContext(properties); }; /** - * Encodes the specified DSSEAttestationOccurrence message. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. + * Encodes the specified GitSourceContext message. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @static - * @param {grafeas.v1.IDSSEAttestationOccurrence} message DSSEAttestationOccurrence message or plain object to encode + * @param {grafeas.v1.IGitSourceContext} message GitSourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationOccurrence.encode = function encode(message, writer) { + GitSourceContext.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.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); return writer; }; /** - * Encodes the specified DSSEAttestationOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. + * Encodes the specified GitSourceContext message, length delimited. Does not implicitly {@link grafeas.v1.GitSourceContext.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @static - * @param {grafeas.v1.IDSSEAttestationOccurrence} message DSSEAttestationOccurrence message or plain object to encode + * @param {grafeas.v1.IGitSourceContext} message GitSourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DSSEAttestationOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + GitSourceContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer. + * Decodes a GitSourceContext message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @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.GitSourceContext} GitSourceContext * @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) { + GitSourceContext.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.GitSourceContext(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.envelope = $root.grafeas.v1.Envelope.decode(reader, reader.uint32()); + message.url = reader.string(); break; case 2: - message.statement = $root.grafeas.v1.InTotoStatement.decode(reader, reader.uint32()); + message.revisionId = reader.string(); break; default: reader.skipType(tag & 7); @@ -17065,956 +15230,1274 @@ }; /** - * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer, length delimited. + * Decodes a GitSourceContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence + * @returns {grafeas.v1.GitSourceContext} GitSourceContext * @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) { + GitSourceContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DSSEAttestationOccurrence message. + * Verifies a GitSourceContext message. * @function verify - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @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) { + GitSourceContext.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.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; return null; }; /** - * Creates a DSSEAttestationOccurrence message from a plain object. Also converts values to their respective internal types. + * Creates a GitSourceContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence + * @returns {grafeas.v1.GitSourceContext} GitSourceContext */ - DSSEAttestationOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DSSEAttestationOccurrence) + GitSourceContext.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.GitSourceContext) 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); - } + var message = new $root.grafeas.v1.GitSourceContext(); + if (object.url != null) + message.url = String(object.url); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); return message; }; /** - * Creates a plain object from a DSSEAttestationOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a GitSourceContext message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @static - * @param {grafeas.v1.DSSEAttestationOccurrence} message DSSEAttestationOccurrence + * @param {grafeas.v1.GitSourceContext} message GitSourceContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DSSEAttestationOccurrence.toObject = function toObject(message, options) { + GitSourceContext.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"; + if (options.defaults) { + object.url = ""; + object.revisionId = ""; } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; return object; }; /** - * Converts this DSSEAttestationOccurrence to JSON. + * Converts this GitSourceContext to JSON. * @function toJSON - * @memberof grafeas.v1.DSSEAttestationOccurrence + * @memberof grafeas.v1.GitSourceContext * @instance * @returns {Object.} JSON object */ - DSSEAttestationOccurrence.prototype.toJSON = function toJSON() { + GitSourceContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DSSEAttestationOccurrence; + return GitSourceContext; })(); - v1.Grafeas = (function() { + v1.RepoId = (function() { /** - * Constructs a new Grafeas service. + * Properties of a RepoId. * @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 + * @interface IRepoId + * @property {grafeas.v1.IProjectRepoId|null} [projectRepoId] RepoId projectRepoId + * @property {string|null} [uid] RepoId uid */ /** - * 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 + * Constructs a new RepoId. + * @memberof grafeas.v1 + * @classdesc Represents a RepoId. + * @implements IRepoId + * @constructor + * @param {grafeas.v1.IRepoId=} [properties] Properties to set */ + function RepoId(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 DeleteOccurrence. - * @function deleteOccurrence - * @memberof grafeas.v1.Grafeas + * RepoId projectRepoId. + * @member {grafeas.v1.IProjectRepoId|null|undefined} projectRepoId + * @memberof grafeas.v1.RepoId * @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" }); + RepoId.prototype.projectRepoId = null; /** - * Calls DeleteOccurrence. - * @function deleteOccurrence - * @memberof grafeas.v1.Grafeas + * RepoId uid. + * @member {string|null|undefined} uid + * @memberof grafeas.v1.RepoId * @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 */ + RepoId.prototype.uid = null; - /** - * 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" }); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls CreateOccurrence. - * @function createOccurrence - * @memberof grafeas.v1.Grafeas + * RepoId id. + * @member {"projectRepoId"|"uid"|undefined} id + * @memberof grafeas.v1.RepoId * @instance - * @param {grafeas.v1.ICreateOccurrenceRequest} request CreateOccurrenceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Object.defineProperty(RepoId.prototype, "id", { + get: $util.oneOfGetter($oneOfFields = ["projectRepoId", "uid"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * 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 new RepoId instance using the specified properties. + * @function create + * @memberof grafeas.v1.RepoId + * @static + * @param {grafeas.v1.IRepoId=} [properties] Properties to set + * @returns {grafeas.v1.RepoId} RepoId instance */ + RepoId.create = function create(properties) { + return new RepoId(properties); + }; /** - * 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 + * Encodes the specified RepoId message. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.RepoId + * @static + * @param {grafeas.v1.IRepoId} message RepoId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - 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" }); + RepoId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectRepoId != null && Object.hasOwnProperty.call(message, "projectRepoId")) + $root.grafeas.v1.ProjectRepoId.encode(message.projectRepoId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + return writer; + }; /** - * Calls BatchCreateOccurrences. - * @function batchCreateOccurrences - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IBatchCreateOccurrencesRequest} request BatchCreateOccurrencesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified RepoId message, length delimited. Does not implicitly {@link grafeas.v1.RepoId.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.RepoId + * @static + * @param {grafeas.v1.IRepoId} message RepoId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + RepoId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * 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 + * Decodes a RepoId message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.RepoId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.RepoId} RepoId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + RepoId.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.RepoId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectRepoId = $root.grafeas.v1.ProjectRepoId.decode(reader, reader.uint32()); + break; + case 2: + message.uid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * 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 + * Decodes a RepoId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.RepoId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.RepoId} RepoId + * @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.updateOccurrence = function updateOccurrence(request, callback) { - return this.rpcCall(updateOccurrence, $root.grafeas.v1.UpdateOccurrenceRequest, $root.grafeas.v1.Occurrence, request, callback); - }, "name", { value: "UpdateOccurrence" }); + RepoId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateOccurrence. - * @function updateOccurrence - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IUpdateOccurrenceRequest} request UpdateOccurrenceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a RepoId message. + * @function verify + * @memberof grafeas.v1.RepoId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + RepoId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.projectRepoId != null && message.hasOwnProperty("projectRepoId")) { + properties.id = 1; + { + var error = $root.grafeas.v1.ProjectRepoId.verify(message.projectRepoId); + if (error) + return "projectRepoId." + error; + } + } + if (message.uid != null && message.hasOwnProperty("uid")) { + if (properties.id === 1) + return "id: multiple values"; + properties.id = 1; + if (!$util.isString(message.uid)) + return "uid: string expected"; + } + return null; + }; /** - * 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 + * Creates a RepoId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.RepoId + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.RepoId} RepoId */ + RepoId.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.RepoId) + return object; + var message = new $root.grafeas.v1.RepoId(); + if (object.projectRepoId != null) { + if (typeof object.projectRepoId !== "object") + throw TypeError(".grafeas.v1.RepoId.projectRepoId: object expected"); + message.projectRepoId = $root.grafeas.v1.ProjectRepoId.fromObject(object.projectRepoId); + } + if (object.uid != null) + message.uid = String(object.uid); + return message; + }; /** - * 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 + * Creates a plain object from a RepoId message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.RepoId + * @static + * @param {grafeas.v1.RepoId} message RepoId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - 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" }); + RepoId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.projectRepoId != null && message.hasOwnProperty("projectRepoId")) { + object.projectRepoId = $root.grafeas.v1.ProjectRepoId.toObject(message.projectRepoId, options); + if (options.oneofs) + object.id = "projectRepoId"; + } + if (message.uid != null && message.hasOwnProperty("uid")) { + object.uid = message.uid; + if (options.oneofs) + object.id = "uid"; + } + return object; + }; /** - * Calls GetOccurrenceNote. - * @function getOccurrenceNote - * @memberof grafeas.v1.Grafeas + * Converts this RepoId to JSON. + * @function toJSON + * @memberof grafeas.v1.RepoId * @instance - * @param {grafeas.v1.IGetOccurrenceNoteRequest} request GetOccurrenceNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + RepoId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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 - */ + return RepoId; + })(); - /** - * 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 - */ - 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" }); + v1.ProjectRepoId = (function() { /** - * Calls GetNote. - * @function getNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IGetNoteRequest} request GetNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a ProjectRepoId. + * @memberof grafeas.v1 + * @interface IProjectRepoId + * @property {string|null} [projectId] ProjectRepoId projectId + * @property {string|null} [repoName] ProjectRepoId repoName */ /** - * 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 + * Constructs a new ProjectRepoId. + * @memberof grafeas.v1 + * @classdesc Represents a ProjectRepoId. + * @implements IProjectRepoId + * @constructor + * @param {grafeas.v1.IProjectRepoId=} [properties] Properties to set */ + function ProjectRepoId(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 ListNotes. - * @function listNotes - * @memberof grafeas.v1.Grafeas + * ProjectRepoId projectId. + * @member {string} projectId + * @memberof grafeas.v1.ProjectRepoId * @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 */ - 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" }); + ProjectRepoId.prototype.projectId = ""; /** - * Calls ListNotes. - * @function listNotes - * @memberof grafeas.v1.Grafeas + * ProjectRepoId repoName. + * @member {string} repoName + * @memberof grafeas.v1.ProjectRepoId * @instance - * @param {grafeas.v1.IListNotesRequest} request ListNotesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ProjectRepoId.prototype.repoName = ""; /** - * 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 a new ProjectRepoId instance using the specified properties. + * @function create + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {grafeas.v1.IProjectRepoId=} [properties] Properties to set + * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId instance */ + ProjectRepoId.create = function create(properties) { + return new ProjectRepoId(properties); + }; /** - * 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 + * Encodes the specified ProjectRepoId message. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {grafeas.v1.IProjectRepoId} message ProjectRepoId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - 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" }); + ProjectRepoId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.repoName != null && Object.hasOwnProperty.call(message, "repoName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repoName); + return writer; + }; /** - * Calls DeleteNote. - * @function deleteNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.IDeleteNoteRequest} request DeleteNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ProjectRepoId message, length delimited. Does not implicitly {@link grafeas.v1.ProjectRepoId.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {grafeas.v1.IProjectRepoId} message ProjectRepoId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ProjectRepoId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * 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 + * Decodes a ProjectRepoId message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ProjectRepoId.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.ProjectRepoId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.repoName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * 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 + * Decodes a ProjectRepoId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId + * @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.createNote = function createNote(request, callback) { - return this.rpcCall(createNote, $root.grafeas.v1.CreateNoteRequest, $root.grafeas.v1.Note, request, callback); - }, "name", { value: "CreateNote" }); + ProjectRepoId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateNote. - * @function createNote - * @memberof grafeas.v1.Grafeas - * @instance - * @param {grafeas.v1.ICreateNoteRequest} request CreateNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ProjectRepoId message. + * @function verify + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ProjectRepoId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.repoName != null && message.hasOwnProperty("repoName")) + if (!$util.isString(message.repoName)) + return "repoName: string expected"; + return null; + }; /** - * 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 ProjectRepoId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.ProjectRepoId} ProjectRepoId */ + ProjectRepoId.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ProjectRepoId) + return object; + var message = new $root.grafeas.v1.ProjectRepoId(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.repoName != null) + message.repoName = String(object.repoName); + return message; + }; /** - * 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 + * Creates a plain object from a ProjectRepoId message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.ProjectRepoId + * @static + * @param {grafeas.v1.ProjectRepoId} message ProjectRepoId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - 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" }); + ProjectRepoId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.repoName = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.repoName != null && message.hasOwnProperty("repoName")) + object.repoName = message.repoName; + return object; + }; /** - * Calls BatchCreateNotes. - * @function batchCreateNotes - * @memberof grafeas.v1.Grafeas + * Converts this ProjectRepoId to JSON. + * @function toJSON + * @memberof grafeas.v1.ProjectRepoId * @instance - * @param {grafeas.v1.IBatchCreateNotesRequest} request BatchCreateNotesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ProjectRepoId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProjectRepoId; + })(); + + v1.ComplianceNote = (function() { /** - * 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 + * Properties of a ComplianceNote. + * @memberof grafeas.v1 + * @interface IComplianceNote + * @property {string|null} [title] ComplianceNote title + * @property {string|null} [description] ComplianceNote description + * @property {Array.|null} [version] ComplianceNote version + * @property {string|null} [rationale] ComplianceNote rationale + * @property {string|null} [remediation] ComplianceNote remediation + * @property {grafeas.v1.ComplianceNote.ICisBenchmark|null} [cisBenchmark] ComplianceNote cisBenchmark + * @property {Uint8Array|null} [scanInstructions] ComplianceNote scanInstructions */ /** - * 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 + * Constructs a new ComplianceNote. + * @memberof grafeas.v1 + * @classdesc Represents a ComplianceNote. + * @implements IComplianceNote + * @constructor + * @param {grafeas.v1.IComplianceNote=} [properties] Properties to set */ - 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" }); + function ComplianceNote(properties) { + this.version = []; + 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 UpdateNote. - * @function updateNote - * @memberof grafeas.v1.Grafeas + * ComplianceNote title. + * @member {string} title + * @memberof grafeas.v1.ComplianceNote * @instance - * @param {grafeas.v1.IUpdateNoteRequest} request UpdateNoteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ComplianceNote.prototype.title = ""; /** - * 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 + * ComplianceNote description. + * @member {string} description + * @memberof grafeas.v1.ComplianceNote + * @instance */ + ComplianceNote.prototype.description = ""; /** - * Calls ListNoteOccurrences. - * @function listNoteOccurrences - * @memberof grafeas.v1.Grafeas + * ComplianceNote version. + * @member {Array.} version + * @memberof grafeas.v1.ComplianceNote * @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 */ - 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" }); + ComplianceNote.prototype.version = $util.emptyArray; /** - * Calls ListNoteOccurrences. - * @function listNoteOccurrences - * @memberof grafeas.v1.Grafeas + * ComplianceNote rationale. + * @member {string} rationale + * @memberof grafeas.v1.ComplianceNote * @instance - * @param {grafeas.v1.IListNoteOccurrencesRequest} request ListNoteOccurrencesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ - - return Grafeas; - })(); - - v1.Occurrence = (function() { + ComplianceNote.prototype.rationale = ""; /** - * Properties of an Occurrence. - * @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 + * ComplianceNote remediation. + * @member {string} remediation + * @memberof grafeas.v1.ComplianceNote + * @instance */ + ComplianceNote.prototype.remediation = ""; /** - * Constructs a new Occurrence. - * @memberof grafeas.v1 - * @classdesc Represents an Occurrence. - * @implements IOccurrence - * @constructor - * @param {grafeas.v1.IOccurrence=} [properties] Properties to set + * ComplianceNote cisBenchmark. + * @member {grafeas.v1.ComplianceNote.ICisBenchmark|null|undefined} cisBenchmark + * @memberof grafeas.v1.ComplianceNote + * @instance */ - function Occurrence(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]]; - } + ComplianceNote.prototype.cisBenchmark = null; /** - * Occurrence name. - * @member {string} name - * @memberof grafeas.v1.Occurrence + * ComplianceNote scanInstructions. + * @member {Uint8Array} scanInstructions + * @memberof grafeas.v1.ComplianceNote * @instance */ - Occurrence.prototype.name = ""; + ComplianceNote.prototype.scanInstructions = $util.newBuffer([]); + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Occurrence resourceUri. - * @member {string} resourceUri - * @memberof grafeas.v1.Occurrence + * ComplianceNote complianceType. + * @member {"cisBenchmark"|undefined} complianceType + * @memberof grafeas.v1.ComplianceNote * @instance */ - Occurrence.prototype.resourceUri = ""; + Object.defineProperty(ComplianceNote.prototype, "complianceType", { + get: $util.oneOfGetter($oneOfFields = ["cisBenchmark"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Occurrence noteName. - * @member {string} noteName - * @memberof grafeas.v1.Occurrence - * @instance + * Creates a new ComplianceNote instance using the specified properties. + * @function create + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {grafeas.v1.IComplianceNote=} [properties] Properties to set + * @returns {grafeas.v1.ComplianceNote} ComplianceNote instance */ - Occurrence.prototype.noteName = ""; + ComplianceNote.create = function create(properties) { + return new ComplianceNote(properties); + }; /** - * Occurrence kind. - * @member {grafeas.v1.NoteKind} kind - * @memberof grafeas.v1.Occurrence - * @instance + * Encodes the specified ComplianceNote message. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {grafeas.v1.IComplianceNote} message ComplianceNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Occurrence.prototype.kind = 0; + ComplianceNote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.version != null && message.version.length) + for (var i = 0; i < message.version.length; ++i) + $root.grafeas.v1.ComplianceVersion.encode(message.version[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rationale != null && Object.hasOwnProperty.call(message, "rationale")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.rationale); + if (message.remediation != null && Object.hasOwnProperty.call(message, "remediation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.remediation); + if (message.cisBenchmark != null && Object.hasOwnProperty.call(message, "cisBenchmark")) + $root.grafeas.v1.ComplianceNote.CisBenchmark.encode(message.cisBenchmark, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.scanInstructions != null && Object.hasOwnProperty.call(message, "scanInstructions")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.scanInstructions); + return writer; + }; /** - * Occurrence remediation. - * @member {string} remediation - * @memberof grafeas.v1.Occurrence - * @instance + * Encodes the specified ComplianceNote message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {grafeas.v1.IComplianceNote} message ComplianceNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Occurrence.prototype.remediation = ""; + ComplianceNote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Occurrence createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof grafeas.v1.Occurrence - * @instance + * Decodes a ComplianceNote message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.ComplianceNote} ComplianceNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Occurrence.prototype.createTime = null; + ComplianceNote.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.ComplianceNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.version && message.version.length)) + message.version = []; + message.version.push($root.grafeas.v1.ComplianceVersion.decode(reader, reader.uint32())); + break; + case 4: + message.rationale = reader.string(); + break; + case 5: + message.remediation = reader.string(); + break; + case 6: + message.cisBenchmark = $root.grafeas.v1.ComplianceNote.CisBenchmark.decode(reader, reader.uint32()); + break; + case 7: + message.scanInstructions = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Occurrence updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof grafeas.v1.Occurrence - * @instance + * Decodes a ComplianceNote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.ComplianceNote} ComplianceNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Occurrence.prototype.updateTime = null; + ComplianceNote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Occurrence vulnerability. - * @member {grafeas.v1.IVulnerabilityOccurrence|null|undefined} vulnerability - * @memberof grafeas.v1.Occurrence - * @instance + * Verifies a ComplianceNote message. + * @function verify + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Occurrence.prototype.vulnerability = null; + ComplianceNote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + 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.version != null && message.hasOwnProperty("version")) { + if (!Array.isArray(message.version)) + return "version: array expected"; + for (var i = 0; i < message.version.length; ++i) { + var error = $root.grafeas.v1.ComplianceVersion.verify(message.version[i]); + if (error) + return "version." + error; + } + } + if (message.rationale != null && message.hasOwnProperty("rationale")) + if (!$util.isString(message.rationale)) + return "rationale: string expected"; + if (message.remediation != null && message.hasOwnProperty("remediation")) + if (!$util.isString(message.remediation)) + return "remediation: string expected"; + if (message.cisBenchmark != null && message.hasOwnProperty("cisBenchmark")) { + properties.complianceType = 1; + { + var error = $root.grafeas.v1.ComplianceNote.CisBenchmark.verify(message.cisBenchmark); + if (error) + return "cisBenchmark." + error; + } + } + if (message.scanInstructions != null && message.hasOwnProperty("scanInstructions")) + if (!(message.scanInstructions && typeof message.scanInstructions.length === "number" || $util.isString(message.scanInstructions))) + return "scanInstructions: buffer expected"; + return null; + }; /** - * Occurrence build. - * @member {grafeas.v1.IBuildOccurrence|null|undefined} build - * @memberof grafeas.v1.Occurrence - * @instance + * Creates a ComplianceNote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.ComplianceNote} ComplianceNote */ - Occurrence.prototype.build = null; + ComplianceNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ComplianceNote) + return object; + var message = new $root.grafeas.v1.ComplianceNote(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.version) { + if (!Array.isArray(object.version)) + throw TypeError(".grafeas.v1.ComplianceNote.version: array expected"); + message.version = []; + for (var i = 0; i < object.version.length; ++i) { + if (typeof object.version[i] !== "object") + throw TypeError(".grafeas.v1.ComplianceNote.version: object expected"); + message.version[i] = $root.grafeas.v1.ComplianceVersion.fromObject(object.version[i]); + } + } + if (object.rationale != null) + message.rationale = String(object.rationale); + if (object.remediation != null) + message.remediation = String(object.remediation); + if (object.cisBenchmark != null) { + if (typeof object.cisBenchmark !== "object") + throw TypeError(".grafeas.v1.ComplianceNote.cisBenchmark: object expected"); + message.cisBenchmark = $root.grafeas.v1.ComplianceNote.CisBenchmark.fromObject(object.cisBenchmark); + } + if (object.scanInstructions != null) + if (typeof object.scanInstructions === "string") + $util.base64.decode(object.scanInstructions, message.scanInstructions = $util.newBuffer($util.base64.length(object.scanInstructions)), 0); + else if (object.scanInstructions.length) + message.scanInstructions = object.scanInstructions; + return message; + }; /** - * Occurrence image. - * @member {grafeas.v1.IImageOccurrence|null|undefined} image - * @memberof grafeas.v1.Occurrence - * @instance + * Creates a plain object from a ComplianceNote message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.ComplianceNote + * @static + * @param {grafeas.v1.ComplianceNote} message ComplianceNote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Occurrence.prototype.image = null; + ComplianceNote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.version = []; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.rationale = ""; + object.remediation = ""; + if (options.bytes === String) + object.scanInstructions = ""; + else { + object.scanInstructions = []; + if (options.bytes !== Array) + object.scanInstructions = $util.newBuffer(object.scanInstructions); + } + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.version && message.version.length) { + object.version = []; + for (var j = 0; j < message.version.length; ++j) + object.version[j] = $root.grafeas.v1.ComplianceVersion.toObject(message.version[j], options); + } + if (message.rationale != null && message.hasOwnProperty("rationale")) + object.rationale = message.rationale; + if (message.remediation != null && message.hasOwnProperty("remediation")) + object.remediation = message.remediation; + if (message.cisBenchmark != null && message.hasOwnProperty("cisBenchmark")) { + object.cisBenchmark = $root.grafeas.v1.ComplianceNote.CisBenchmark.toObject(message.cisBenchmark, options); + if (options.oneofs) + object.complianceType = "cisBenchmark"; + } + if (message.scanInstructions != null && message.hasOwnProperty("scanInstructions")) + object.scanInstructions = options.bytes === String ? $util.base64.encode(message.scanInstructions, 0, message.scanInstructions.length) : options.bytes === Array ? Array.prototype.slice.call(message.scanInstructions) : message.scanInstructions; + return object; + }; /** - * Occurrence package. - * @member {grafeas.v1.IPackageOccurrence|null|undefined} package - * @memberof grafeas.v1.Occurrence + * Converts this ComplianceNote to JSON. + * @function toJSON + * @memberof grafeas.v1.ComplianceNote * @instance + * @returns {Object.} JSON object */ - Occurrence.prototype["package"] = null; + ComplianceNote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ComplianceNote.CisBenchmark = (function() { + + /** + * Properties of a CisBenchmark. + * @memberof grafeas.v1.ComplianceNote + * @interface ICisBenchmark + * @property {number|null} [profileLevel] CisBenchmark profileLevel + * @property {grafeas.v1.Severity|null} [severity] CisBenchmark severity + */ + + /** + * Constructs a new CisBenchmark. + * @memberof grafeas.v1.ComplianceNote + * @classdesc Represents a CisBenchmark. + * @implements ICisBenchmark + * @constructor + * @param {grafeas.v1.ComplianceNote.ICisBenchmark=} [properties] Properties to set + */ + function CisBenchmark(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]]; + } + + /** + * CisBenchmark profileLevel. + * @member {number} profileLevel + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @instance + */ + CisBenchmark.prototype.profileLevel = 0; + + /** + * CisBenchmark severity. + * @member {grafeas.v1.Severity} severity + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @instance + */ + CisBenchmark.prototype.severity = 0; + + /** + * Creates a new CisBenchmark instance using the specified properties. + * @function create + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {grafeas.v1.ComplianceNote.ICisBenchmark=} [properties] Properties to set + * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark instance + */ + CisBenchmark.create = function create(properties) { + return new CisBenchmark(properties); + }; + + /** + * Encodes the specified CisBenchmark message. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {grafeas.v1.ComplianceNote.ICisBenchmark} message CisBenchmark message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CisBenchmark.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.profileLevel != null && Object.hasOwnProperty.call(message, "profileLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.profileLevel); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); + return writer; + }; + + /** + * Encodes the specified CisBenchmark message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceNote.CisBenchmark.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {grafeas.v1.ComplianceNote.ICisBenchmark} message CisBenchmark message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CisBenchmark.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CisBenchmark message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CisBenchmark.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.ComplianceNote.CisBenchmark(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.profileLevel = reader.int32(); + break; + case 2: + message.severity = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CisBenchmark message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CisBenchmark.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CisBenchmark message. + * @function verify + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CisBenchmark.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.profileLevel != null && message.hasOwnProperty("profileLevel")) + if (!$util.isInteger(message.profileLevel)) + return "profileLevel: integer 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; + }; + + /** + * Creates a CisBenchmark message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.ComplianceNote.CisBenchmark} CisBenchmark + */ + CisBenchmark.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ComplianceNote.CisBenchmark) + return object; + var message = new $root.grafeas.v1.ComplianceNote.CisBenchmark(); + if (object.profileLevel != null) + message.profileLevel = object.profileLevel | 0; + 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 message; + }; + + /** + * Creates a plain object from a CisBenchmark message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @static + * @param {grafeas.v1.ComplianceNote.CisBenchmark} message CisBenchmark + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CisBenchmark.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.profileLevel = 0; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + } + if (message.profileLevel != null && message.hasOwnProperty("profileLevel")) + object.profileLevel = message.profileLevel; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.grafeas.v1.Severity[message.severity] : message.severity; + return object; + }; - /** - * Occurrence deployment. - * @member {grafeas.v1.IDeploymentOccurrence|null|undefined} deployment - * @memberof grafeas.v1.Occurrence - * @instance - */ - Occurrence.prototype.deployment = null; + /** + * Converts this CisBenchmark to JSON. + * @function toJSON + * @memberof grafeas.v1.ComplianceNote.CisBenchmark + * @instance + * @returns {Object.} JSON object + */ + CisBenchmark.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Occurrence discovery. - * @member {grafeas.v1.IDiscoveryOccurrence|null|undefined} discovery - * @memberof grafeas.v1.Occurrence - * @instance - */ - Occurrence.prototype.discovery = null; + return CisBenchmark; + })(); - /** - * Occurrence attestation. - * @member {grafeas.v1.IAttestationOccurrence|null|undefined} attestation - * @memberof grafeas.v1.Occurrence - * @instance - */ - Occurrence.prototype.attestation = null; + return ComplianceNote; + })(); - /** - * Occurrence upgrade. - * @member {grafeas.v1.IUpgradeOccurrence|null|undefined} upgrade - * @memberof grafeas.v1.Occurrence - * @instance - */ - Occurrence.prototype.upgrade = null; + v1.ComplianceVersion = (function() { /** - * Occurrence compliance. - * @member {grafeas.v1.IComplianceOccurrence|null|undefined} compliance - * @memberof grafeas.v1.Occurrence - * @instance + * Properties of a ComplianceVersion. + * @memberof grafeas.v1 + * @interface IComplianceVersion + * @property {string|null} [cpeUri] ComplianceVersion cpeUri + * @property {string|null} [version] ComplianceVersion version */ - Occurrence.prototype.compliance = null; /** - * Occurrence dsseAttestation. - * @member {grafeas.v1.IDSSEAttestationOccurrence|null|undefined} dsseAttestation - * @memberof grafeas.v1.Occurrence - * @instance + * Constructs a new ComplianceVersion. + * @memberof grafeas.v1 + * @classdesc Represents a ComplianceVersion. + * @implements IComplianceVersion + * @constructor + * @param {grafeas.v1.IComplianceVersion=} [properties] Properties to set */ - Occurrence.prototype.dsseAttestation = null; + function ComplianceVersion(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 envelope. - * @member {grafeas.v1.IEnvelope|null|undefined} envelope - * @memberof grafeas.v1.Occurrence + * ComplianceVersion cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.ComplianceVersion * @instance */ - Occurrence.prototype.envelope = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ComplianceVersion.prototype.cpeUri = ""; /** - * Occurrence details. - * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} details - * @memberof grafeas.v1.Occurrence + * ComplianceVersion version. + * @member {string} version + * @memberof grafeas.v1.ComplianceVersion * @instance */ - Object.defineProperty(Occurrence.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["vulnerability", "build", "image", "package", "deployment", "discovery", "attestation", "upgrade", "compliance", "dsseAttestation"]), - set: $util.oneOfSetter($oneOfFields) - }); + ComplianceVersion.prototype.version = ""; /** - * Creates a new Occurrence instance using the specified properties. + * Creates a new ComplianceVersion instance using the specified properties. * @function create - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceVersion * @static - * @param {grafeas.v1.IOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.Occurrence} Occurrence instance + * @param {grafeas.v1.IComplianceVersion=} [properties] Properties to set + * @returns {grafeas.v1.ComplianceVersion} ComplianceVersion instance */ - Occurrence.create = function create(properties) { - return new Occurrence(properties); + ComplianceVersion.create = function create(properties) { + return new ComplianceVersion(properties); }; /** - * Encodes the specified Occurrence message. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. + * Encodes the specified ComplianceVersion message. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceVersion * @static - * @param {grafeas.v1.IOccurrence} message Occurrence message or plain object to encode + * @param {grafeas.v1.IComplianceVersion} message ComplianceVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Occurrence.encode = function encode(message, writer) { + ComplianceVersion.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(); + 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")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); return writer; }; /** - * Encodes the specified Occurrence message, length delimited. Does not implicitly {@link grafeas.v1.Occurrence.verify|verify} messages. + * Encodes the specified ComplianceVersion message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceVersion.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceVersion * @static - * @param {grafeas.v1.IOccurrence} message Occurrence message or plain object to encode + * @param {grafeas.v1.IComplianceVersion} message ComplianceVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Occurrence.encodeDelimited = function encodeDelimited(message, writer) { + ComplianceVersion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Occurrence message from the specified reader or buffer. + * Decodes a ComplianceVersion message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceVersion * @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.ComplianceVersion} ComplianceVersion * @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) { + ComplianceVersion.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.ComplianceVersion(); 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.resourceUri = reader.string(); - break; - case 3: - message.noteName = reader.string(); - 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.version = reader.string(); break; default: reader.skipType(tag & 7); @@ -18025,456 +16508,349 @@ }; /** - * Decodes an Occurrence message from the specified reader or buffer, length delimited. + * Decodes a ComplianceVersion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Occurrence} Occurrence + * @returns {grafeas.v1.ComplianceVersion} ComplianceVersion * @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) { + ComplianceVersion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Occurrence message. + * Verifies a ComplianceVersion message. * @function verify - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceVersion * @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) { + ComplianceVersion.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.cpeUri != null && message.hasOwnProperty("cpeUri")) + if (!$util.isString(message.cpeUri)) + return "cpeUri: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a ComplianceVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.ComplianceVersion + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.ComplianceVersion} ComplianceVersion + */ + ComplianceVersion.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ComplianceVersion) + return object; + var message = new $root.grafeas.v1.ComplianceVersion(); + if (object.cpeUri != null) + message.cpeUri = String(object.cpeUri); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a ComplianceVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.ComplianceVersion + * @static + * @param {grafeas.v1.ComplianceVersion} message ComplianceVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComplianceVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpeUri = ""; + object.version = ""; } - 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.cpeUri != null && message.hasOwnProperty("cpeUri")) + object.cpeUri = message.cpeUri; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this ComplianceVersion to JSON. + * @function toJSON + * @memberof grafeas.v1.ComplianceVersion + * @instance + * @returns {Object.} JSON object + */ + ComplianceVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ComplianceVersion; + })(); + + v1.ComplianceOccurrence = (function() { + + /** + * Properties of a ComplianceOccurrence. + * @memberof grafeas.v1 + * @interface IComplianceOccurrence + * @property {Array.|null} [nonCompliantFiles] ComplianceOccurrence nonCompliantFiles + * @property {string|null} [nonComplianceReason] ComplianceOccurrence nonComplianceReason + */ + + /** + * Constructs a new ComplianceOccurrence. + * @memberof grafeas.v1 + * @classdesc Represents a ComplianceOccurrence. + * @implements IComplianceOccurrence + * @constructor + * @param {grafeas.v1.IComplianceOccurrence=} [properties] Properties to set + */ + function ComplianceOccurrence(properties) { + this.nonCompliantFiles = []; + 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]]; + } + + /** + * ComplianceOccurrence nonCompliantFiles. + * @member {Array.} nonCompliantFiles + * @memberof grafeas.v1.ComplianceOccurrence + * @instance + */ + ComplianceOccurrence.prototype.nonCompliantFiles = $util.emptyArray; + + /** + * ComplianceOccurrence nonComplianceReason. + * @member {string} nonComplianceReason + * @memberof grafeas.v1.ComplianceOccurrence + * @instance + */ + ComplianceOccurrence.prototype.nonComplianceReason = ""; + + /** + * Creates a new ComplianceOccurrence instance using the specified properties. + * @function create + * @memberof grafeas.v1.ComplianceOccurrence + * @static + * @param {grafeas.v1.IComplianceOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence instance + */ + ComplianceOccurrence.create = function create(properties) { + return new ComplianceOccurrence(properties); + }; + + /** + * Encodes the specified ComplianceOccurrence message. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.ComplianceOccurrence + * @static + * @param {grafeas.v1.IComplianceOccurrence} message ComplianceOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceOccurrence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nonCompliantFiles != null && message.nonCompliantFiles.length) + for (var i = 0; i < message.nonCompliantFiles.length; ++i) + $root.grafeas.v1.NonCompliantFile.encode(message.nonCompliantFiles[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nonComplianceReason != null && Object.hasOwnProperty.call(message, "nonComplianceReason")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nonComplianceReason); + return writer; + }; + + /** + * Encodes the specified ComplianceOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.ComplianceOccurrence.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.ComplianceOccurrence + * @static + * @param {grafeas.v1.IComplianceOccurrence} message ComplianceOccurrence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComplianceOccurrence message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.ComplianceOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceOccurrence.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.ComplianceOccurrence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.nonCompliantFiles && message.nonCompliantFiles.length)) + message.nonCompliantFiles = []; + message.nonCompliantFiles.push($root.grafeas.v1.NonCompliantFile.decode(reader, reader.uint32())); + break; + case 3: + message.nonComplianceReason = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } - 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); + return message; + }; + + /** + * Decodes a ComplianceOccurrence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.ComplianceOccurrence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceOccurrence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComplianceOccurrence message. + * @function verify + * @memberof grafeas.v1.ComplianceOccurrence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComplianceOccurrence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nonCompliantFiles != null && message.hasOwnProperty("nonCompliantFiles")) { + if (!Array.isArray(message.nonCompliantFiles)) + return "nonCompliantFiles: array expected"; + for (var i = 0; i < message.nonCompliantFiles.length; ++i) { + var error = $root.grafeas.v1.NonCompliantFile.verify(message.nonCompliantFiles[i]); if (error) - return "dsseAttestation." + error; + return "nonCompliantFiles." + error; } } - if (message.envelope != null && message.hasOwnProperty("envelope")) { - var error = $root.grafeas.v1.Envelope.verify(message.envelope); - if (error) - return "envelope." + error; - } + if (message.nonComplianceReason != null && message.hasOwnProperty("nonComplianceReason")) + if (!$util.isString(message.nonComplianceReason)) + return "nonComplianceReason: string expected"; return null; }; /** - * Creates an Occurrence message from a plain object. Also converts values to their respective internal types. + * Creates a ComplianceOccurrence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Occurrence} Occurrence + * @returns {grafeas.v1.ComplianceOccurrence} ComplianceOccurrence */ - Occurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Occurrence) + ComplianceOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ComplianceOccurrence) 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.ComplianceOccurrence(); + if (object.nonCompliantFiles) { + if (!Array.isArray(object.nonCompliantFiles)) + throw TypeError(".grafeas.v1.ComplianceOccurrence.nonCompliantFiles: array expected"); + message.nonCompliantFiles = []; + for (var i = 0; i < object.nonCompliantFiles.length; ++i) { + if (typeof object.nonCompliantFiles[i] !== "object") + throw TypeError(".grafeas.v1.ComplianceOccurrence.nonCompliantFiles: object expected"); + message.nonCompliantFiles[i] = $root.grafeas.v1.NonCompliantFile.fromObject(object.nonCompliantFiles[i]); + } } + if (object.nonComplianceReason != null) + message.nonComplianceReason = String(object.nonComplianceReason); return message; }; /** - * Creates a plain object from an Occurrence message. Also converts values to other types if specified. + * Creates a plain object from a ComplianceOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceOccurrence * @static - * @param {grafeas.v1.Occurrence} message Occurrence + * @param {grafeas.v1.ComplianceOccurrence} message ComplianceOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Occurrence.toObject = function toObject(message, options) { + ComplianceOccurrence.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"; + if (options.arrays || options.defaults) + object.nonCompliantFiles = []; + if (options.defaults) + object.nonComplianceReason = ""; + if (message.nonCompliantFiles && message.nonCompliantFiles.length) { + object.nonCompliantFiles = []; + for (var j = 0; j < message.nonCompliantFiles.length; ++j) + object.nonCompliantFiles[j] = $root.grafeas.v1.NonCompliantFile.toObject(message.nonCompliantFiles[j], options); } - if (message.envelope != null && message.hasOwnProperty("envelope")) - object.envelope = $root.grafeas.v1.Envelope.toObject(message.envelope, options); + if (message.nonComplianceReason != null && message.hasOwnProperty("nonComplianceReason")) + object.nonComplianceReason = message.nonComplianceReason; return object; }; /** - * Converts this Occurrence to JSON. + * Converts this ComplianceOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.Occurrence + * @memberof grafeas.v1.ComplianceOccurrence * @instance * @returns {Object.} JSON object */ - Occurrence.prototype.toJSON = function toJSON() { + ComplianceOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Occurrence; + return ComplianceOccurrence; })(); - v1.Note = (function() { + v1.NonCompliantFile = (function() { /** - * Properties of a Note. + * Properties of a NonCompliantFile. * @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 INonCompliantFile + * @property {string|null} [path] NonCompliantFile path + * @property {string|null} [displayCommand] NonCompliantFile displayCommand + * @property {string|null} [reason] NonCompliantFile reason */ /** - * Constructs a new Note. + * Constructs a new NonCompliantFile. * @memberof grafeas.v1 - * @classdesc Represents a Note. - * @implements INote + * @classdesc Represents a NonCompliantFile. + * @implements INonCompliantFile * @constructor - * @param {grafeas.v1.INote=} [properties] Properties to set + * @param {grafeas.v1.INonCompliantFile=} [properties] Properties to set */ - function Note(properties) { - this.relatedUrl = []; - this.relatedNoteNames = []; + function NonCompliantFile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18482,329 +16858,331 @@ } /** - * 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 + * NonCompliantFile path. + * @member {string} path + * @memberof grafeas.v1.NonCompliantFile * @instance */ - Note.prototype.kind = 0; + NonCompliantFile.prototype.path = ""; /** - * Note relatedUrl. - * @member {Array.} relatedUrl - * @memberof grafeas.v1.Note + * NonCompliantFile displayCommand. + * @member {string} displayCommand + * @memberof grafeas.v1.NonCompliantFile * @instance */ - Note.prototype.relatedUrl = $util.emptyArray; + NonCompliantFile.prototype.displayCommand = ""; /** - * Note expirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} expirationTime - * @memberof grafeas.v1.Note + * NonCompliantFile reason. + * @member {string} reason + * @memberof grafeas.v1.NonCompliantFile * @instance */ - Note.prototype.expirationTime = null; + NonCompliantFile.prototype.reason = ""; /** - * Note createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof grafeas.v1.Note - * @instance + * Creates a new NonCompliantFile instance using the specified properties. + * @function create + * @memberof grafeas.v1.NonCompliantFile + * @static + * @param {grafeas.v1.INonCompliantFile=} [properties] Properties to set + * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile instance */ - Note.prototype.createTime = null; + NonCompliantFile.create = function create(properties) { + return new NonCompliantFile(properties); + }; /** - * Note updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof grafeas.v1.Note - * @instance + * Encodes the specified NonCompliantFile message. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. + * @function encode + * @memberof grafeas.v1.NonCompliantFile + * @static + * @param {grafeas.v1.INonCompliantFile} message NonCompliantFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Note.prototype.updateTime = null; + NonCompliantFile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.displayCommand != null && Object.hasOwnProperty.call(message, "displayCommand")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayCommand); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.reason); + return writer; + }; /** - * Note relatedNoteNames. - * @member {Array.} relatedNoteNames - * @memberof grafeas.v1.Note - * @instance + * Encodes the specified NonCompliantFile message, length delimited. Does not implicitly {@link grafeas.v1.NonCompliantFile.verify|verify} messages. + * @function encodeDelimited + * @memberof grafeas.v1.NonCompliantFile + * @static + * @param {grafeas.v1.INonCompliantFile} message NonCompliantFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Note.prototype.relatedNoteNames = $util.emptyArray; + NonCompliantFile.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 NonCompliantFile message from the specified reader or buffer. + * @function decode + * @memberof grafeas.v1.NonCompliantFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile + * @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; + NonCompliantFile.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.NonCompliantFile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.path = reader.string(); + break; + case 2: + message.displayCommand = reader.string(); + break; + case 3: + message.reason = 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 NonCompliantFile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof grafeas.v1.NonCompliantFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile + * @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; + NonCompliantFile.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 NonCompliantFile message. + * @function verify + * @memberof grafeas.v1.NonCompliantFile + * @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; + NonCompliantFile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.displayCommand != null && message.hasOwnProperty("displayCommand")) + if (!$util.isString(message.displayCommand)) + return "displayCommand: string expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + return null; + }; /** - * Note package. - * @member {grafeas.v1.IPackageNote|null|undefined} package - * @memberof grafeas.v1.Note - * @instance + * Creates a NonCompliantFile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof grafeas.v1.NonCompliantFile + * @static + * @param {Object.} object Plain object + * @returns {grafeas.v1.NonCompliantFile} NonCompliantFile */ - Note.prototype["package"] = null; + NonCompliantFile.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.NonCompliantFile) + return object; + var message = new $root.grafeas.v1.NonCompliantFile(); + if (object.path != null) + message.path = String(object.path); + if (object.displayCommand != null) + message.displayCommand = String(object.displayCommand); + if (object.reason != null) + message.reason = String(object.reason); + return message; + }; /** - * Note deployment. - * @member {grafeas.v1.IDeploymentNote|null|undefined} deployment - * @memberof grafeas.v1.Note - * @instance + * Creates a plain object from a NonCompliantFile message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.NonCompliantFile + * @static + * @param {grafeas.v1.NonCompliantFile} message NonCompliantFile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Note.prototype.deployment = null; + NonCompliantFile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.displayCommand = ""; + object.reason = ""; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.displayCommand != null && message.hasOwnProperty("displayCommand")) + object.displayCommand = message.displayCommand; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + return object; + }; /** - * Note discovery. - * @member {grafeas.v1.IDiscoveryNote|null|undefined} discovery - * @memberof grafeas.v1.Note + * Converts this NonCompliantFile to JSON. + * @function toJSON + * @memberof grafeas.v1.NonCompliantFile * @instance + * @returns {Object.} JSON object */ - Note.prototype.discovery = null; + NonCompliantFile.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 NonCompliantFile; + })(); - /** - * Note upgrade. - * @member {grafeas.v1.IUpgradeNote|null|undefined} upgrade - * @memberof grafeas.v1.Note - * @instance - */ - Note.prototype.upgrade = null; + /** + * Severity enum. + * @name grafeas.v1.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} MINIMAL=1 MINIMAL value + * @property {number} LOW=2 LOW value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} HIGH=4 HIGH value + * @property {number} CRITICAL=5 CRITICAL value + */ + v1.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "MINIMAL"] = 1; + values[valuesById[2] = "LOW"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "HIGH"] = 4; + values[valuesById[5] = "CRITICAL"] = 5; + return values; + })(); + + v1.DeploymentNote = (function() { /** - * Note compliance. - * @member {grafeas.v1.IComplianceNote|null|undefined} compliance - * @memberof grafeas.v1.Note - * @instance + * Properties of a DeploymentNote. + * @memberof grafeas.v1 + * @interface IDeploymentNote + * @property {Array.|null} [resourceUri] DeploymentNote resourceUri */ - Note.prototype.compliance = null; /** - * Note dsseAttestation. - * @member {grafeas.v1.IDSSEAttestationNote|null|undefined} dsseAttestation - * @memberof grafeas.v1.Note - * @instance + * Constructs a new DeploymentNote. + * @memberof grafeas.v1 + * @classdesc Represents a DeploymentNote. + * @implements IDeploymentNote + * @constructor + * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set */ - Note.prototype.dsseAttestation = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + 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]]; + } /** - * Note type. - * @member {"vulnerability"|"build"|"image"|"package"|"deployment"|"discovery"|"attestation"|"upgrade"|"compliance"|"dsseAttestation"|undefined} type - * @memberof grafeas.v1.Note + * DeploymentNote resourceUri. + * @member {Array.} resourceUri + * @memberof grafeas.v1.DeploymentNote * @instance */ - Object.defineProperty(Note.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["vulnerability", "build", "image", "package", "deployment", "discovery", "attestation", "upgrade", "compliance", "dsseAttestation"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeploymentNote.prototype.resourceUri = $util.emptyArray; /** - * Creates a new Note instance using the specified properties. + * Creates a new DeploymentNote instance using the specified properties. * @function create - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.DeploymentNote * @static - * @param {grafeas.v1.INote=} [properties] Properties to set - * @returns {grafeas.v1.Note} Note instance + * @param {grafeas.v1.IDeploymentNote=} [properties] Properties to set + * @returns {grafeas.v1.DeploymentNote} DeploymentNote instance */ - Note.create = function create(properties) { - return new Note(properties); + DeploymentNote.create = function create(properties) { + return new DeploymentNote(properties); }; /** - * Encodes the specified Note message. Does not implicitly {@link grafeas.v1.Note.verify|verify} messages. + * Encodes the specified DeploymentNote message. Does not implicitly {@link grafeas.v1.DeploymentNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.DeploymentNote * @static - * @param {grafeas.v1.INote} message Note 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 */ - Note.encode = function encode(message, writer) { + DeploymentNote.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(); + 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 Note message, length delimited. Does not implicitly {@link grafeas.v1.Note.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.Note + * @memberof grafeas.v1.DeploymentNote * @static - * @param {grafeas.v1.INote} message Note 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 */ - Note.encodeDelimited = function encodeDelimited(message, writer) { + DeploymentNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Note message from the specified reader or buffer. + * Decodes a DeploymentNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Note + * @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.Note} Note + * @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.decode = function decode(reader, length) { + 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.Note(); + 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: - 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()); + if (!(message.resourceUri && message.resourceUri.length)) + message.resourceUri = []; + message.resourceUri.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -18815,475 +17193,126 @@ }; /** - * Decodes a Note 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.Note + * @memberof grafeas.v1.DeploymentNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Note} Note + * @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.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 Note message. + * Verifies a DeploymentNote message. * @function verify - * @memberof grafeas.v1.Note + * @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 */ - Note.verify = function verify(message) { + DeploymentNote.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; - } + 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; }; /** - * Creates a Note 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.Note + * @memberof grafeas.v1.DeploymentNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Note} Note + * @returns {grafeas.v1.DeploymentNote} DeploymentNote */ - Note.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Note) + DeploymentNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeploymentNote) 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); - } - 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); + 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; }; /** - * Creates a plain object from a Note 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.Note + * @memberof grafeas.v1.DeploymentNote * @static - * @param {grafeas.v1.Note} message Note + * @param {grafeas.v1.DeploymentNote} message DeploymentNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Note.toObject = function toObject(message, options) { + DeploymentNote.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"; + 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; }; /** - * Converts this Note to JSON. + * Converts this DeploymentNote to JSON. * @function toJSON - * @memberof grafeas.v1.Note + * @memberof grafeas.v1.DeploymentNote * @instance * @returns {Object.} JSON object */ - Note.prototype.toJSON = function toJSON() { + DeploymentNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Note; + return DeploymentNote; })(); - v1.GetOccurrenceRequest = (function() { + v1.DeploymentOccurrence = (function() { /** - * Properties of a GetOccurrenceRequest. + * Properties of a DeploymentOccurrence. * @memberof grafeas.v1 - * @interface IGetOccurrenceRequest - * @property {string|null} [name] GetOccurrenceRequest name + * @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 */ /** - * Constructs a new GetOccurrenceRequest. + * Constructs a new DeploymentOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a GetOccurrenceRequest. - * @implements IGetOccurrenceRequest + * @classdesc Represents a DeploymentOccurrence. + * @implements IDeploymentOccurrence * @constructor - * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set + * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set */ - function GetOccurrenceRequest(properties) { + function DeploymentOccurrence(properties) { + this.resourceUri = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19291,75 +17320,156 @@ } /** - * GetOccurrenceRequest name. - * @member {string} name - * @memberof grafeas.v1.GetOccurrenceRequest + * DeploymentOccurrence userEmail. + * @member {string} userEmail + * @memberof grafeas.v1.DeploymentOccurrence * @instance */ - GetOccurrenceRequest.prototype.name = ""; + DeploymentOccurrence.prototype.userEmail = ""; /** - * Creates a new GetOccurrenceRequest instance using the specified properties. + * DeploymentOccurrence deployTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployTime + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.deployTime = null; + + /** + * DeploymentOccurrence undeployTime. + * @member {google.protobuf.ITimestamp|null|undefined} undeployTime + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.undeployTime = null; + + /** + * DeploymentOccurrence config. + * @member {string} config + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.config = ""; + + /** + * DeploymentOccurrence address. + * @member {string} address + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.address = ""; + + /** + * DeploymentOccurrence resourceUri. + * @member {Array.} resourceUri + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.resourceUri = $util.emptyArray; + + /** + * DeploymentOccurrence platform. + * @member {grafeas.v1.DeploymentOccurrence.Platform} platform + * @memberof grafeas.v1.DeploymentOccurrence + * @instance + */ + DeploymentOccurrence.prototype.platform = 0; + + /** + * Creates a new DeploymentOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.DeploymentOccurrence * @static - * @param {grafeas.v1.IGetOccurrenceRequest=} [properties] Properties to set - * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest instance + * @param {grafeas.v1.IDeploymentOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence instance */ - GetOccurrenceRequest.create = function create(properties) { - return new GetOccurrenceRequest(properties); + DeploymentOccurrence.create = function create(properties) { + return new DeploymentOccurrence(properties); }; /** - * Encodes the specified GetOccurrenceRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. + * Encodes the specified DeploymentOccurrence message. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.DeploymentOccurrence * @static - * @param {grafeas.v1.IGetOccurrenceRequest} message GetOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOccurrenceRequest.encode = function encode(message, writer) { + DeploymentOccurrence.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.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 GetOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceRequest.verify|verify} messages. + * Encodes the specified DeploymentOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DeploymentOccurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.DeploymentOccurrence * @static - * @param {grafeas.v1.IGetOccurrenceRequest} message GetOccurrenceRequest message or plain object to encode + * @param {grafeas.v1.IDeploymentOccurrence} message DeploymentOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeploymentOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer. + * Decodes a DeploymentOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.GetOccurrenceRequest + * @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.GetOccurrenceRequest} GetOccurrenceRequest + * @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 */ - GetOccurrenceRequest.decode = function decode(reader, length) { + 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.GetOccurrenceRequest(); + 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.name = reader.string(); + message.userEmail = reader.string(); + break; + case 2: + message.deployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.undeployTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.config = reader.string(); + break; + case 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); @@ -19370,110 +17480,220 @@ }; /** - * Decodes a GetOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeploymentOccurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.DeploymentOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest + * @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 */ - GetOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + DeploymentOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOccurrenceRequest message. + * Verifies a DeploymentOccurrence message. * @function verify - * @memberof grafeas.v1.GetOccurrenceRequest + * @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 */ - GetOccurrenceRequest.verify = function verify(message) { + DeploymentOccurrence.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.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; }; /** - * Creates a GetOccurrenceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeploymentOccurrence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.DeploymentOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.GetOccurrenceRequest} GetOccurrenceRequest + * @returns {grafeas.v1.DeploymentOccurrence} DeploymentOccurrence */ - GetOccurrenceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GetOccurrenceRequest) + DeploymentOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DeploymentOccurrence) return object; - var message = new $root.grafeas.v1.GetOccurrenceRequest(); - if (object.name != null) - message.name = String(object.name); + 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; }; /** - * Creates a plain object from a GetOccurrenceRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeploymentOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.DeploymentOccurrence * @static - * @param {grafeas.v1.GetOccurrenceRequest} message GetOccurrenceRequest + * @param {grafeas.v1.DeploymentOccurrence} message DeploymentOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOccurrenceRequest.toObject = function toObject(message, options) { + DeploymentOccurrence.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.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; }; /** - * Converts this GetOccurrenceRequest to JSON. + * Converts this DeploymentOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.GetOccurrenceRequest + * @memberof grafeas.v1.DeploymentOccurrence * @instance * @returns {Object.} JSON object */ - GetOccurrenceRequest.prototype.toJSON = function toJSON() { + DeploymentOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetOccurrenceRequest; + /** + * 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; })(); - v1.ListOccurrencesRequest = (function() { + v1.DiscoveryNote = (function() { /** - * Properties of a ListOccurrencesRequest. + * Properties of a DiscoveryNote. * @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 IDiscoveryNote + * @property {grafeas.v1.NoteKind|null} [analysisKind] DiscoveryNote analysisKind */ /** - * Constructs a new ListOccurrencesRequest. + * Constructs a new DiscoveryNote. * @memberof grafeas.v1 - * @classdesc Represents a ListOccurrencesRequest. - * @implements IListOccurrencesRequest + * @classdesc Represents a DiscoveryNote. + * @implements IDiscoveryNote * @constructor - * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set + * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set */ - function ListOccurrencesRequest(properties) { + function DiscoveryNote(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19481,114 +17701,75 @@ } /** - * ListOccurrencesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.ListOccurrencesRequest - * @instance - */ - ListOccurrencesRequest.prototype.parent = ""; - - /** - * ListOccurrencesRequest filter. - * @member {string} filter - * @memberof grafeas.v1.ListOccurrencesRequest - * @instance - */ - ListOccurrencesRequest.prototype.filter = ""; - - /** - * ListOccurrencesRequest pageSize. - * @member {number} pageSize - * @memberof grafeas.v1.ListOccurrencesRequest - * @instance - */ - ListOccurrencesRequest.prototype.pageSize = 0; - - /** - * ListOccurrencesRequest pageToken. - * @member {string} pageToken - * @memberof grafeas.v1.ListOccurrencesRequest + * DiscoveryNote analysisKind. + * @member {grafeas.v1.NoteKind} analysisKind + * @memberof grafeas.v1.DiscoveryNote * @instance */ - ListOccurrencesRequest.prototype.pageToken = ""; + DiscoveryNote.prototype.analysisKind = 0; /** - * Creates a new ListOccurrencesRequest instance using the specified properties. + * Creates a new DiscoveryNote instance using the specified properties. * @function create - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.DiscoveryNote * @static - * @param {grafeas.v1.IListOccurrencesRequest=} [properties] Properties to set - * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest instance + * @param {grafeas.v1.IDiscoveryNote=} [properties] Properties to set + * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote instance */ - ListOccurrencesRequest.create = function create(properties) { - return new ListOccurrencesRequest(properties); + DiscoveryNote.create = function create(properties) { + return new DiscoveryNote(properties); }; /** - * Encodes the specified ListOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. + * Encodes the specified DiscoveryNote message. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.DiscoveryNote * @static - * @param {grafeas.v1.IListOccurrencesRequest} message ListOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesRequest.encode = function encode(message, writer) { + DiscoveryNote.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.analysisKind != null && Object.hasOwnProperty.call(message, "analysisKind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.analysisKind); return writer; }; /** - * Encodes the specified ListOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesRequest.verify|verify} messages. + * Encodes the specified DiscoveryNote message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryNote.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.DiscoveryNote * @static - * @param {grafeas.v1.IListOccurrencesRequest} message ListOccurrencesRequest message or plain object to encode + * @param {grafeas.v1.IDiscoveryNote} message DiscoveryNote message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOccurrencesRequest message from the specified reader or buffer. + * Decodes a DiscoveryNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListOccurrencesRequest + * @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.ListOccurrencesRequest} ListOccurrencesRequest + * @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 */ - ListOccurrencesRequest.decode = function decode(reader, length) { + 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.ListOccurrencesRequest(); + 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.parent = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + message.analysisKind = reader.int32(); break; default: reader.skipType(tag & 7); @@ -19599,134 +17780,170 @@ }; /** - * Decodes a ListOccurrencesRequest message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryNote message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.DiscoveryNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest + * @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 */ - ListOccurrencesRequest.decodeDelimited = function decodeDelimited(reader) { + DiscoveryNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOccurrencesRequest message. + * Verifies a DiscoveryNote message. * @function verify - * @memberof grafeas.v1.ListOccurrencesRequest + * @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 */ - ListOccurrencesRequest.verify = function verify(message) { + DiscoveryNote.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.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 ListOccurrencesRequest 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. * @function fromObject - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.DiscoveryNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListOccurrencesRequest} ListOccurrencesRequest + * @returns {grafeas.v1.DiscoveryNote} DiscoveryNote */ - ListOccurrencesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListOccurrencesRequest) + DiscoveryNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DiscoveryNote) return object; - 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); + 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; }; /** - * Creates a plain object from a ListOccurrencesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryNote message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.DiscoveryNote * @static - * @param {grafeas.v1.ListOccurrencesRequest} message ListOccurrencesRequest + * @param {grafeas.v1.DiscoveryNote} message DiscoveryNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOccurrencesRequest.toObject = function toObject(message, options) { + DiscoveryNote.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - 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 (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; }; /** - * Converts this ListOccurrencesRequest to JSON. + * Converts this DiscoveryNote to JSON. * @function toJSON - * @memberof grafeas.v1.ListOccurrencesRequest + * @memberof grafeas.v1.DiscoveryNote * @instance * @returns {Object.} JSON object */ - ListOccurrencesRequest.prototype.toJSON = function toJSON() { + DiscoveryNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListOccurrencesRequest; + return DiscoveryNote; })(); - v1.ListOccurrencesResponse = (function() { + v1.DiscoveryOccurrence = (function() { /** - * Properties of a ListOccurrencesResponse. + * Properties of a DiscoveryOccurrence. * @memberof grafeas.v1 - * @interface IListOccurrencesResponse - * @property {Array.|null} [occurrences] ListOccurrencesResponse occurrences - * @property {string|null} [nextPageToken] ListOccurrencesResponse nextPageToken + * @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 ListOccurrencesResponse. + * Constructs a new DiscoveryOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a ListOccurrencesResponse. - * @implements IListOccurrencesResponse + * @classdesc Represents a DiscoveryOccurrence. + * @implements IDiscoveryOccurrence * @constructor - * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set + * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set */ - function ListOccurrencesResponse(properties) { - this.occurrences = []; + function DiscoveryOccurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19734,91 +17951,140 @@ } /** - * ListOccurrencesResponse occurrences. - * @member {Array.} occurrences - * @memberof grafeas.v1.ListOccurrencesResponse + * DiscoveryOccurrence continuousAnalysis. + * @member {grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis} continuousAnalysis + * @memberof grafeas.v1.DiscoveryOccurrence * @instance */ - ListOccurrencesResponse.prototype.occurrences = $util.emptyArray; + DiscoveryOccurrence.prototype.continuousAnalysis = 0; /** - * ListOccurrencesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof grafeas.v1.ListOccurrencesResponse + * DiscoveryOccurrence analysisStatus. + * @member {grafeas.v1.DiscoveryOccurrence.AnalysisStatus} analysisStatus + * @memberof grafeas.v1.DiscoveryOccurrence * @instance */ - ListOccurrencesResponse.prototype.nextPageToken = ""; + DiscoveryOccurrence.prototype.analysisStatus = 0; /** - * Creates a new ListOccurrencesResponse instance using the specified properties. + * 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.ListOccurrencesResponse + * @memberof grafeas.v1.DiscoveryOccurrence * @static - * @param {grafeas.v1.IListOccurrencesResponse=} [properties] Properties to set - * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse instance + * @param {grafeas.v1.IDiscoveryOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence instance */ - ListOccurrencesResponse.create = function create(properties) { - return new ListOccurrencesResponse(properties); + DiscoveryOccurrence.create = function create(properties) { + return new DiscoveryOccurrence(properties); }; /** - * Encodes the specified ListOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. + * Encodes the specified DiscoveryOccurrence message. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.DiscoveryOccurrence * @static - * @param {grafeas.v1.IListOccurrencesResponse} message ListOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesResponse.encode = function encode(message, writer) { + DiscoveryOccurrence.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.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 ListOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListOccurrencesResponse.verify|verify} messages. + * Encodes the specified DiscoveryOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.DiscoveryOccurrence.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.DiscoveryOccurrence * @static - * @param {grafeas.v1.IListOccurrencesResponse} message ListOccurrencesResponse message or plain object to encode + * @param {grafeas.v1.IDiscoveryOccurrence} message DiscoveryOccurrence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOccurrencesResponse message from the specified reader or buffer. + * Decodes a DiscoveryOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListOccurrencesResponse + * @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.ListOccurrencesResponse} ListOccurrencesResponse + * @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 */ - ListOccurrencesResponse.decode = function decode(reader, length) { + 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.ListOccurrencesResponse(); + 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: - if (!(message.occurrences && message.occurrences.length)) - message.occurrences = []; - message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + message.continuousAnalysis = reader.int32(); break; case 2: - message.nextPageToken = reader.string(); + 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); @@ -19829,133 +18095,252 @@ }; /** - * Decodes a ListOccurrencesResponse message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryOccurrence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.DiscoveryOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse + * @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 */ - ListOccurrencesResponse.decodeDelimited = function decodeDelimited(reader) { + DiscoveryOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOccurrencesResponse message. + * Verifies a DiscoveryOccurrence message. * @function verify - * @memberof grafeas.v1.ListOccurrencesResponse + * @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 */ - ListOccurrencesResponse.verify = function verify(message) { + DiscoveryOccurrence.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 (error) - return "occurrences." + error; + 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; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListOccurrencesResponse 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. * @function fromObject - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.DiscoveryOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListOccurrencesResponse} ListOccurrencesResponse + * @returns {grafeas.v1.DiscoveryOccurrence} DiscoveryOccurrence */ - ListOccurrencesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListOccurrencesResponse) + DiscoveryOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DiscoveryOccurrence) 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]); - } + 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); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListOccurrencesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryOccurrence message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.DiscoveryOccurrence * @static - * @param {grafeas.v1.ListOccurrencesResponse} message ListOccurrencesResponse + * @param {grafeas.v1.DiscoveryOccurrence} message DiscoveryOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOccurrencesResponse.toObject = function toObject(message, options) { + DiscoveryOccurrence.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 (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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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; }; /** - * Converts this ListOccurrencesResponse to JSON. + * Converts this DiscoveryOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.ListOccurrencesResponse + * @memberof grafeas.v1.DiscoveryOccurrence * @instance * @returns {Object.} JSON object */ - ListOccurrencesResponse.prototype.toJSON = function toJSON() { + DiscoveryOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListOccurrencesResponse; + /** + * 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; })(); - v1.DeleteOccurrenceRequest = (function() { + v1.DSSEAttestationNote = (function() { /** - * Properties of a DeleteOccurrenceRequest. + * Properties of a DSSEAttestationNote. * @memberof grafeas.v1 - * @interface IDeleteOccurrenceRequest - * @property {string|null} [name] DeleteOccurrenceRequest name + * @interface IDSSEAttestationNote + * @property {grafeas.v1.DSSEAttestationNote.IDSSEHint|null} [hint] DSSEAttestationNote hint */ /** - * Constructs a new DeleteOccurrenceRequest. + * Constructs a new DSSEAttestationNote. * @memberof grafeas.v1 - * @classdesc Represents a DeleteOccurrenceRequest. - * @implements IDeleteOccurrenceRequest + * @classdesc Represents a DSSEAttestationNote. + * @implements IDSSEAttestationNote * @constructor - * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set + * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set */ - function DeleteOccurrenceRequest(properties) { + function DSSEAttestationNote(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19963,75 +18348,75 @@ } /** - * DeleteOccurrenceRequest name. - * @member {string} name - * @memberof grafeas.v1.DeleteOccurrenceRequest + * DSSEAttestationNote hint. + * @member {grafeas.v1.DSSEAttestationNote.IDSSEHint|null|undefined} hint + * @memberof grafeas.v1.DSSEAttestationNote * @instance */ - DeleteOccurrenceRequest.prototype.name = ""; + DSSEAttestationNote.prototype.hint = null; /** - * Creates a new DeleteOccurrenceRequest instance using the specified properties. + * Creates a new DSSEAttestationNote instance using the specified properties. * @function create - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.IDeleteOccurrenceRequest=} [properties] Properties to set - * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest instance + * @param {grafeas.v1.IDSSEAttestationNote=} [properties] Properties to set + * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote instance */ - DeleteOccurrenceRequest.create = function create(properties) { - return new DeleteOccurrenceRequest(properties); + DSSEAttestationNote.create = function create(properties) { + return new DSSEAttestationNote(properties); }; /** - * Encodes the specified DeleteOccurrenceRequest message. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.verify|verify} messages. + * Encodes the specified DSSEAttestationNote message. Does not implicitly {@link grafeas.v1.DSSEAttestationNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.IDeleteOccurrenceRequest} message DeleteOccurrenceRequest 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 */ - DeleteOccurrenceRequest.encode = function encode(message, writer) { + DSSEAttestationNote.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.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 DeleteOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteOccurrenceRequest.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.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.IDeleteOccurrenceRequest} message DeleteOccurrenceRequest 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 */ - DeleteOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DSSEAttestationNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer. + * Decodes a DSSEAttestationNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @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.DeleteOccurrenceRequest} DeleteOccurrenceRequest + * @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 */ - DeleteOccurrenceRequest.decode = function decode(reader, length) { + 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.DeleteOccurrenceRequest(); + 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: - message.name = reader.string(); + message.hint = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -20042,324 +18427,300 @@ }; /** - * Decodes a DeleteOccurrenceRequest message from the specified reader or buffer, length delimited. + * Decodes a DSSEAttestationNote message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest + * @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 */ - DeleteOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + DSSEAttestationNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteOccurrenceRequest message. + * Verifies a DSSEAttestationNote message. * @function verify - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @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) { + DSSEAttestationNote.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.hint != null && message.hasOwnProperty("hint")) { + var error = $root.grafeas.v1.DSSEAttestationNote.DSSEHint.verify(message.hint); + if (error) + return "hint." + error; + } return null; }; /** - * Creates a DeleteOccurrenceRequest 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. * @function fromObject - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DeleteOccurrenceRequest} DeleteOccurrenceRequest + * @returns {grafeas.v1.DSSEAttestationNote} DSSEAttestationNote */ - DeleteOccurrenceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeleteOccurrenceRequest) + DSSEAttestationNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DSSEAttestationNote) return object; - var message = new $root.grafeas.v1.DeleteOccurrenceRequest(); - if (object.name != null) - message.name = String(object.name); + 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 DeleteOccurrenceRequest message. Also converts values to other types if specified. + * Creates a plain object from a DSSEAttestationNote message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @static - * @param {grafeas.v1.DeleteOccurrenceRequest} message DeleteOccurrenceRequest + * @param {grafeas.v1.DSSEAttestationNote} message DSSEAttestationNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOccurrenceRequest.toObject = function toObject(message, options) { + DSSEAttestationNote.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; + 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 DeleteOccurrenceRequest to JSON. + * Converts this DSSEAttestationNote to JSON. * @function toJSON - * @memberof grafeas.v1.DeleteOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationNote * @instance * @returns {Object.} JSON object */ - DeleteOccurrenceRequest.prototype.toJSON = function toJSON() { + DSSEAttestationNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteOccurrenceRequest; - })(); - - v1.CreateOccurrenceRequest = (function() { - - /** - * Properties of a CreateOccurrenceRequest. - * @memberof grafeas.v1 - * @interface ICreateOccurrenceRequest - * @property {string|null} [parent] CreateOccurrenceRequest parent - * @property {grafeas.v1.IOccurrence|null} [occurrence] CreateOccurrenceRequest occurrence - */ + DSSEAttestationNote.DSSEHint = (function() { - /** - * 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]]; - } + /** + * Properties of a DSSEHint. + * @memberof grafeas.v1.DSSEAttestationNote + * @interface IDSSEHint + * @property {string|null} [humanReadableName] DSSEHint humanReadableName + */ - /** - * CreateOccurrenceRequest parent. - * @member {string} parent - * @memberof grafeas.v1.CreateOccurrenceRequest - * @instance - */ - CreateOccurrenceRequest.prototype.parent = ""; + /** + * 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]]; + } - /** - * CreateOccurrenceRequest occurrence. - * @member {grafeas.v1.IOccurrence|null|undefined} occurrence - * @memberof grafeas.v1.CreateOccurrenceRequest - * @instance - */ - CreateOccurrenceRequest.prototype.occurrence = null; + /** + * DSSEHint humanReadableName. + * @member {string} humanReadableName + * @memberof grafeas.v1.DSSEAttestationNote.DSSEHint + * @instance + */ + DSSEHint.prototype.humanReadableName = ""; - /** - * 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); - }; + /** + * 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 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 - */ - 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; - }; + /** + * 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 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(); - }; + /** + * 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 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; + /** + * 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; - }; + 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()); + }; - /** - * 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 - */ - CreateOccurrenceRequest.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; + }; - /** - * 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; - }; + /** + * 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 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) + /** + * 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; - 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; - }; + }; - /** - * 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 - */ - 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; - }; + /** + * 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); + }; - /** - * Converts this CreateOccurrenceRequest to JSON. - * @function toJSON - * @memberof grafeas.v1.CreateOccurrenceRequest - * @instance - * @returns {Object.} JSON object - */ - CreateOccurrenceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return DSSEHint; + })(); - return CreateOccurrenceRequest; + return DSSEAttestationNote; })(); - v1.UpdateOccurrenceRequest = (function() { + v1.DSSEAttestationOccurrence = (function() { /** - * Properties of an UpdateOccurrenceRequest. + * Properties of a DSSEAttestationOccurrence. * @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 IDSSEAttestationOccurrence + * @property {grafeas.v1.IEnvelope|null} [envelope] DSSEAttestationOccurrence envelope + * @property {grafeas.v1.IInTotoStatement|null} [statement] DSSEAttestationOccurrence statement */ /** - * Constructs a new UpdateOccurrenceRequest. + * Constructs a new DSSEAttestationOccurrence. * @memberof grafeas.v1 - * @classdesc Represents an UpdateOccurrenceRequest. - * @implements IUpdateOccurrenceRequest + * @classdesc Represents a DSSEAttestationOccurrence. + * @implements IDSSEAttestationOccurrence * @constructor - * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set + * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set */ - function UpdateOccurrenceRequest(properties) { + function DSSEAttestationOccurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20367,101 +18728,102 @@ } /** - * UpdateOccurrenceRequest name. - * @member {string} name - * @memberof grafeas.v1.UpdateOccurrenceRequest + * DSSEAttestationOccurrence envelope. + * @member {grafeas.v1.IEnvelope|null|undefined} envelope + * @memberof grafeas.v1.DSSEAttestationOccurrence * @instance */ - UpdateOccurrenceRequest.prototype.name = ""; + DSSEAttestationOccurrence.prototype.envelope = null; /** - * UpdateOccurrenceRequest occurrence. - * @member {grafeas.v1.IOccurrence|null|undefined} occurrence - * @memberof grafeas.v1.UpdateOccurrenceRequest + * DSSEAttestationOccurrence statement. + * @member {grafeas.v1.IInTotoStatement|null|undefined} statement + * @memberof grafeas.v1.DSSEAttestationOccurrence * @instance */ - UpdateOccurrenceRequest.prototype.occurrence = null; + DSSEAttestationOccurrence.prototype.statement = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * UpdateOccurrenceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof grafeas.v1.UpdateOccurrenceRequest + * DSSEAttestationOccurrence decodedPayload. + * @member {"statement"|undefined} decodedPayload + * @memberof grafeas.v1.DSSEAttestationOccurrence * @instance */ - UpdateOccurrenceRequest.prototype.updateMask = null; + Object.defineProperty(DSSEAttestationOccurrence.prototype, "decodedPayload", { + get: $util.oneOfGetter($oneOfFields = ["statement"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new UpdateOccurrenceRequest instance using the specified properties. + * Creates a new DSSEAttestationOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.IUpdateOccurrenceRequest=} [properties] Properties to set - * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest instance + * @param {grafeas.v1.IDSSEAttestationOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence instance */ - UpdateOccurrenceRequest.create = function create(properties) { - return new UpdateOccurrenceRequest(properties); + DSSEAttestationOccurrence.create = function create(properties) { + return new DSSEAttestationOccurrence(properties); }; /** - * Encodes the specified UpdateOccurrenceRequest message. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.verify|verify} messages. + * Encodes the specified DSSEAttestationOccurrence message. Does not implicitly {@link grafeas.v1.DSSEAttestationOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest 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 */ - UpdateOccurrenceRequest.encode = function encode(message, writer) { + DSSEAttestationOccurrence.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.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 UpdateOccurrenceRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateOccurrenceRequest.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.UpdateOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.IUpdateOccurrenceRequest} message UpdateOccurrenceRequest 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 */ - UpdateOccurrenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DSSEAttestationOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateOccurrenceRequest message from the specified reader or buffer. + * Decodes a DSSEAttestationOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @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.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @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 */ - UpdateOccurrenceRequest.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.UpdateOccurrenceRequest(); + 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.name = reader.string(); + message.envelope = $root.grafeas.v1.Envelope.decode(reader, reader.uint32()); 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()); + message.statement = $root.grafeas.v1.InTotoStatement.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -20472,134 +18834,132 @@ }; /** - * Decodes an UpdateOccurrenceRequest 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.UpdateOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @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 */ - UpdateOccurrenceRequest.decodeDelimited = function decodeDelimited(reader) { + DSSEAttestationOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateOccurrenceRequest message. + * Verifies a DSSEAttestationOccurrence message. * @function verify - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @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 */ - UpdateOccurrenceRequest.verify = function verify(message) { + DSSEAttestationOccurrence.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); + var properties = {}; + if (message.envelope != null && message.hasOwnProperty("envelope")) { + var error = $root.grafeas.v1.Envelope.verify(message.envelope); if (error) - return "occurrence." + error; + return "envelope." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + 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; + } } return null; }; /** - * Creates an UpdateOccurrenceRequest 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.UpdateOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.UpdateOccurrenceRequest} UpdateOccurrenceRequest + * @returns {grafeas.v1.DSSEAttestationOccurrence} DSSEAttestationOccurrence */ - UpdateOccurrenceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpdateOccurrenceRequest) + DSSEAttestationOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.DSSEAttestationOccurrence) 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); + 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.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".grafeas.v1.UpdateOccurrenceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + 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); } return message; }; /** - * Creates a plain object from an UpdateOccurrenceRequest 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.UpdateOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationOccurrence * @static - * @param {grafeas.v1.UpdateOccurrenceRequest} message UpdateOccurrenceRequest + * @param {grafeas.v1.DSSEAttestationOccurrence} message DSSEAttestationOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateOccurrenceRequest.toObject = function toObject(message, options) { + DSSEAttestationOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.occurrence = null; - object.updateMask = null; + 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.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 DSSEAttestationOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.UpdateOccurrenceRequest + * @memberof grafeas.v1.DSSEAttestationOccurrence * @instance * @returns {Object.} JSON object */ - UpdateOccurrenceRequest.prototype.toJSON = function toJSON() { + DSSEAttestationOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateOccurrenceRequest; + return DSSEAttestationOccurrence; })(); - v1.GetNoteRequest = (function() { + v1.Layer = (function() { /** - * Properties of a GetNoteRequest. + * Properties of a Layer. * @memberof grafeas.v1 - * @interface IGetNoteRequest - * @property {string|null} [name] GetNoteRequest name + * @interface ILayer + * @property {string|null} [directive] Layer directive + * @property {string|null} ["arguments"] Layer arguments */ /** - * Constructs a new GetNoteRequest. + * Constructs a new Layer. * @memberof grafeas.v1 - * @classdesc Represents a GetNoteRequest. - * @implements IGetNoteRequest + * @classdesc Represents a Layer. + * @implements ILayer * @constructor - * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.ILayer=} [properties] Properties to set */ - function GetNoteRequest(properties) { + function Layer(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20607,75 +18967,88 @@ } /** - * GetNoteRequest name. - * @member {string} name - * @memberof grafeas.v1.GetNoteRequest + * Layer directive. + * @member {string} directive + * @memberof grafeas.v1.Layer * @instance */ - GetNoteRequest.prototype.name = ""; + Layer.prototype.directive = ""; /** - * Creates a new GetNoteRequest 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.GetNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.IGetNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest instance + * @param {grafeas.v1.ILayer=} [properties] Properties to set + * @returns {grafeas.v1.Layer} Layer instance */ - GetNoteRequest.create = function create(properties) { - return new GetNoteRequest(properties); + Layer.create = function create(properties) { + return new Layer(properties); }; /** - * Encodes the specified GetNoteRequest message. Does not implicitly {@link grafeas.v1.GetNoteRequest.verify|verify} messages. + * Encodes the specified Layer message. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. * @function encode - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest 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 */ - GetNoteRequest.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 GetNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetNoteRequest.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.GetNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.IGetNoteRequest} message GetNoteRequest 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 */ - GetNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Layer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetNoteRequest message from the specified reader or buffer. + * Decodes a Layer message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.GetNoteRequest + * @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.GetNoteRequest} GetNoteRequest + * @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 */ - GetNoteRequest.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.GetNoteRequest(); + 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); @@ -20686,107 +19059,119 @@ }; /** - * Decodes a GetNoteRequest 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.GetNoteRequest + * @memberof grafeas.v1.Layer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest + * @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 */ - GetNoteRequest.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 GetNoteRequest message. + * Verifies a Layer message. * @function verify - * @memberof grafeas.v1.GetNoteRequest + * @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 */ - GetNoteRequest.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 GetNoteRequest 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.GetNoteRequest + * @memberof grafeas.v1.Layer * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.GetNoteRequest} GetNoteRequest + * @returns {grafeas.v1.Layer} Layer */ - GetNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GetNoteRequest) + Layer.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Layer) return object; - var message = new $root.grafeas.v1.GetNoteRequest(); - 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 GetNoteRequest 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.GetNoteRequest + * @memberof grafeas.v1.Layer * @static - * @param {grafeas.v1.GetNoteRequest} message GetNoteRequest + * @param {grafeas.v1.Layer} message Layer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetNoteRequest.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 GetNoteRequest to JSON. + * Converts this Layer to JSON. * @function toJSON - * @memberof grafeas.v1.GetNoteRequest + * @memberof grafeas.v1.Layer * @instance * @returns {Object.} JSON object */ - GetNoteRequest.prototype.toJSON = function toJSON() { + Layer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetNoteRequest; + return Layer; })(); - v1.GetOccurrenceNoteRequest = (function() { + v1.Fingerprint = (function() { /** - * Properties of a GetOccurrenceNoteRequest. + * Properties of a Fingerprint. * @memberof grafeas.v1 - * @interface IGetOccurrenceNoteRequest - * @property {string|null} [name] GetOccurrenceNoteRequest name + * @interface IFingerprint + * @property {string|null} [v1Name] Fingerprint v1Name + * @property {Array.|null} [v2Blob] Fingerprint v2Blob + * @property {string|null} [v2Name] Fingerprint v2Name */ /** - * Constructs a new GetOccurrenceNoteRequest. + * Constructs a new Fingerprint. * @memberof grafeas.v1 - * @classdesc Represents a GetOccurrenceNoteRequest. - * @implements IGetOccurrenceNoteRequest + * @classdesc Represents a Fingerprint. + * @implements IFingerprint * @constructor - * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.IFingerprint=} [properties] Properties to set */ - function GetOccurrenceNoteRequest(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) @@ -20794,75 +19179,104 @@ } /** - * GetOccurrenceNoteRequest name. - * @member {string} name - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * Fingerprint v1Name. + * @member {string} v1Name + * @memberof grafeas.v1.Fingerprint * @instance */ - GetOccurrenceNoteRequest.prototype.name = ""; + Fingerprint.prototype.v1Name = ""; /** - * Creates a new GetOccurrenceNoteRequest instance using the specified properties. + * Fingerprint v2Blob. + * @member {Array.} v2Blob + * @memberof grafeas.v1.Fingerprint + * @instance + */ + Fingerprint.prototype.v2Blob = $util.emptyArray; + + /** + * Fingerprint v2Name. + * @member {string} v2Name + * @memberof grafeas.v1.Fingerprint + * @instance + */ + Fingerprint.prototype.v2Name = ""; + + /** + * Creates a new Fingerprint instance using the specified properties. * @function create - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.IGetOccurrenceNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest instance + * @param {grafeas.v1.IFingerprint=} [properties] Properties to set + * @returns {grafeas.v1.Fingerprint} Fingerprint instance */ - GetOccurrenceNoteRequest.create = function create(properties) { - return new GetOccurrenceNoteRequest(properties); + Fingerprint.create = function create(properties) { + return new Fingerprint(properties); }; /** - * Encodes the specified GetOccurrenceNoteRequest message. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.verify|verify} messages. + * Encodes the specified Fingerprint message. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. * @function encode - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest 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 */ - GetOccurrenceNoteRequest.encode = function encode(message, writer) { + Fingerprint.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.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 GetOccurrenceNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.GetOccurrenceNoteRequest.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.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.IGetOccurrenceNoteRequest} message GetOccurrenceNoteRequest 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 */ - GetOccurrenceNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Fingerprint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOccurrenceNoteRequest message from the specified reader or buffer. + * Decodes a Fingerprint message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @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.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @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 */ - GetOccurrenceNoteRequest.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.GetOccurrenceNoteRequest(); + 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.name = reader.string(); + message.v1Name = reader.string(); + break; + case 2: + if (!(message.v2Blob && message.v2Blob.length)) + message.v2Blob = []; + message.v2Blob.push(reader.string()); + break; + case 3: + message.v2Name = reader.string(); break; default: reader.skipType(tag & 7); @@ -20873,110 +19287,138 @@ }; /** - * Decodes a GetOccurrenceNoteRequest 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.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Fingerprint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @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 */ - GetOccurrenceNoteRequest.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 GetOccurrenceNoteRequest message. + * Verifies a Fingerprint message. * @function verify - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @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 */ - GetOccurrenceNoteRequest.verify = function verify(message) { + Fingerprint.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.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 GetOccurrenceNoteRequest 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.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Fingerprint * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.GetOccurrenceNoteRequest} GetOccurrenceNoteRequest + * @returns {grafeas.v1.Fingerprint} Fingerprint */ - GetOccurrenceNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.GetOccurrenceNoteRequest) + Fingerprint.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Fingerprint) return object; - var message = new $root.grafeas.v1.GetOccurrenceNoteRequest(); - if (object.name != null) - message.name = String(object.name); + 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 GetOccurrenceNoteRequest 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.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Fingerprint * @static - * @param {grafeas.v1.GetOccurrenceNoteRequest} message GetOccurrenceNoteRequest + * @param {grafeas.v1.Fingerprint} message Fingerprint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOccurrenceNoteRequest.toObject = function toObject(message, options) { + Fingerprint.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.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]; + } + if (message.v2Name != null && message.hasOwnProperty("v2Name")) + object.v2Name = message.v2Name; return object; }; /** - * Converts this GetOccurrenceNoteRequest to JSON. + * Converts this Fingerprint to JSON. * @function toJSON - * @memberof grafeas.v1.GetOccurrenceNoteRequest + * @memberof grafeas.v1.Fingerprint * @instance * @returns {Object.} JSON object */ - GetOccurrenceNoteRequest.prototype.toJSON = function toJSON() { + Fingerprint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetOccurrenceNoteRequest; + return Fingerprint; })(); - v1.ListNotesRequest = (function() { + v1.ImageNote = (function() { /** - * Properties of a ListNotesRequest. + * Properties of an ImageNote. * @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 IImageNote + * @property {string|null} [resourceUrl] ImageNote resourceUrl + * @property {grafeas.v1.IFingerprint|null} [fingerprint] ImageNote fingerprint */ /** - * Constructs a new ListNotesRequest. + * Constructs a new ImageNote. * @memberof grafeas.v1 - * @classdesc Represents a ListNotesRequest. - * @implements IListNotesRequest + * @classdesc Represents an ImageNote. + * @implements IImageNote * @constructor - * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set + * @param {grafeas.v1.IImageNote=} [properties] Properties to set */ - function ListNotesRequest(properties) { + function ImageNote(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20984,114 +19426,88 @@ } /** - * ListNotesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.ListNotesRequest - * @instance - */ - ListNotesRequest.prototype.parent = ""; - - /** - * ListNotesRequest filter. - * @member {string} filter - * @memberof grafeas.v1.ListNotesRequest - * @instance - */ - ListNotesRequest.prototype.filter = ""; - - /** - * ListNotesRequest pageSize. - * @member {number} pageSize - * @memberof grafeas.v1.ListNotesRequest + * ImageNote resourceUrl. + * @member {string} resourceUrl + * @memberof grafeas.v1.ImageNote * @instance */ - ListNotesRequest.prototype.pageSize = 0; + ImageNote.prototype.resourceUrl = ""; /** - * ListNotesRequest pageToken. - * @member {string} pageToken - * @memberof grafeas.v1.ListNotesRequest + * ImageNote fingerprint. + * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint + * @memberof grafeas.v1.ImageNote * @instance */ - ListNotesRequest.prototype.pageToken = ""; + ImageNote.prototype.fingerprint = null; /** - * Creates a new ListNotesRequest instance using the specified properties. + * Creates a new ImageNote instance using the specified properties. * @function create - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.IListNotesRequest=} [properties] Properties to set - * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest instance + * @param {grafeas.v1.IImageNote=} [properties] Properties to set + * @returns {grafeas.v1.ImageNote} ImageNote instance */ - ListNotesRequest.create = function create(properties) { - return new ListNotesRequest(properties); + ImageNote.create = function create(properties) { + return new ImageNote(properties); }; /** - * Encodes the specified ListNotesRequest message. Does not implicitly {@link grafeas.v1.ListNotesRequest.verify|verify} messages. + * Encodes the specified ImageNote message. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.IListNotesRequest} message ListNotesRequest 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 */ - ListNotesRequest.encode = function encode(message, writer) { + ImageNote.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.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 ListNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesRequest.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.ListNotesRequest + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.IListNotesRequest} message ListNotesRequest 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 */ - ListNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImageNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotesRequest message from the specified reader or buffer. + * Decodes an ImageNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNotesRequest + * @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.ListNotesRequest} ListNotesRequest + * @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 */ - ListNotesRequest.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.ListNotesRequest(); + 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: - message.parent = reader.string(); + message.resourceUrl = reader.string(); break; case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + message.fingerprint = $root.grafeas.v1.Fingerprint.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21102,134 +19518,125 @@ }; /** - * Decodes a ListNotesRequest 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.ListNotesRequest + * @memberof grafeas.v1.ImageNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest + * @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 */ - ListNotesRequest.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 ListNotesRequest message. + * Verifies an ImageNote message. * @function verify - * @memberof grafeas.v1.ListNotesRequest + * @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 */ - ListNotesRequest.verify = function verify(message) { + ImageNote.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.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; + } return null; }; /** - * Creates a ListNotesRequest 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.ListNotesRequest + * @memberof grafeas.v1.ImageNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNotesRequest} ListNotesRequest + * @returns {grafeas.v1.ImageNote} ImageNote */ - ListNotesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNotesRequest) + ImageNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ImageNote) 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.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); + } return message; }; /** - * Creates a plain object from a ListNotesRequest 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.ListNotesRequest + * @memberof grafeas.v1.ImageNote * @static - * @param {grafeas.v1.ListNotesRequest} message ListNotesRequest + * @param {grafeas.v1.ImageNote} message ImageNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotesRequest.toObject = function toObject(message, options) { + ImageNote.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.resourceUrl = ""; + object.fingerprint = null; } - 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.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 ListNotesRequest to JSON. + * Converts this ImageNote to JSON. * @function toJSON - * @memberof grafeas.v1.ListNotesRequest + * @memberof grafeas.v1.ImageNote * @instance * @returns {Object.} JSON object */ - ListNotesRequest.prototype.toJSON = function toJSON() { + ImageNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotesRequest; + return ImageNote; })(); - v1.ListNotesResponse = (function() { + v1.ImageOccurrence = (function() { /** - * Properties of a ListNotesResponse. + * Properties of an ImageOccurrence. * @memberof grafeas.v1 - * @interface IListNotesResponse - * @property {Array.|null} [notes] ListNotesResponse notes - * @property {string|null} [nextPageToken] ListNotesResponse nextPageToken + * @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 ListNotesResponse. + * Constructs a new ImageOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a ListNotesResponse. - * @implements IListNotesResponse + * @classdesc Represents an ImageOccurrence. + * @implements IImageOccurrence * @constructor - * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set + * @param {grafeas.v1.IImageOccurrence=} [properties] Properties to set */ - function ListNotesResponse(properties) { - this.notes = []; + function ImageOccurrence(properties) { + this.layerInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21237,91 +19644,117 @@ } /** - * ListNotesResponse notes. - * @member {Array.} notes - * @memberof grafeas.v1.ListNotesResponse + * ImageOccurrence fingerprint. + * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint + * @memberof grafeas.v1.ImageOccurrence * @instance */ - ListNotesResponse.prototype.notes = $util.emptyArray; + ImageOccurrence.prototype.fingerprint = null; /** - * ListNotesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof grafeas.v1.ListNotesResponse + * ImageOccurrence distance. + * @member {number} distance + * @memberof grafeas.v1.ImageOccurrence * @instance */ - ListNotesResponse.prototype.nextPageToken = ""; + ImageOccurrence.prototype.distance = 0; /** - * Creates a new ListNotesResponse instance using the specified properties. + * 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.ListNotesResponse + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.IListNotesResponse=} [properties] Properties to set - * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse instance + * @param {grafeas.v1.IImageOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence instance */ - ListNotesResponse.create = function create(properties) { - return new ListNotesResponse(properties); + ImageOccurrence.create = function create(properties) { + return new ImageOccurrence(properties); }; /** - * Encodes the specified ListNotesResponse message. Does not implicitly {@link grafeas.v1.ListNotesResponse.verify|verify} messages. + * Encodes the specified ImageOccurrence message. Does not implicitly {@link grafeas.v1.ImageOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse 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 */ - ListNotesResponse.encode = function encode(message, writer) { + ImageOccurrence.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.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 ListNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNotesResponse.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.ListNotesResponse + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.IListNotesResponse} message ListNotesResponse 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 */ - ListNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImageOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotesResponse message from the specified reader or buffer. + * Decodes an ImageOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNotesResponse + * @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.ListNotesResponse} ListNotesResponse + * @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 */ - ListNotesResponse.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.ListNotesResponse(); + 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: - if (!(message.notes && message.notes.length)) - message.notes = []; - message.notes.push($root.grafeas.v1.Note.decode(reader, reader.uint32())); + message.fingerprint = $root.grafeas.v1.Fingerprint.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + 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); @@ -21332,133 +19765,176 @@ }; /** - * Decodes a ListNotesResponse 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.ListNotesResponse + * @memberof grafeas.v1.ImageOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse + * @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 */ - ListNotesResponse.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 ListNotesResponse message. + * Verifies an ImageOccurrence message. * @function verify - * @memberof grafeas.v1.ListNotesResponse + * @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 */ - ListNotesResponse.verify = function verify(message) { + ImageOccurrence.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.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 "notes." + error; + return "layerInfo." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.baseResourceUrl != null && message.hasOwnProperty("baseResourceUrl")) + if (!$util.isString(message.baseResourceUrl)) + return "baseResourceUrl: string expected"; return null; }; /** - * Creates a ListNotesResponse 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.ListNotesResponse + * @memberof grafeas.v1.ImageOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNotesResponse} ListNotesResponse + * @returns {grafeas.v1.ImageOccurrence} ImageOccurrence */ - ListNotesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNotesResponse) + ImageOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.ImageOccurrence) 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.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.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.baseResourceUrl != null) + message.baseResourceUrl = String(object.baseResourceUrl); return message; }; /** - * Creates a plain object from a ListNotesResponse 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.ListNotesResponse + * @memberof grafeas.v1.ImageOccurrence * @static - * @param {grafeas.v1.ListNotesResponse} message ListNotesResponse + * @param {grafeas.v1.ImageOccurrence} message ImageOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotesResponse.toObject = function toObject(message, options) { + ImageOccurrence.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); + object.layerInfo = []; + if (options.defaults) { + object.fingerprint = null; + object.distance = 0; + object.baseResourceUrl = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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 ListNotesResponse to JSON. + * Converts this ImageOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.ListNotesResponse + * @memberof grafeas.v1.ImageOccurrence * @instance * @returns {Object.} JSON object */ - ListNotesResponse.prototype.toJSON = function toJSON() { + ImageOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotesResponse; + return ImageOccurrence; })(); - v1.DeleteNoteRequest = (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 DeleteNoteRequest. + * Properties of a Distribution. * @memberof grafeas.v1 - * @interface IDeleteNoteRequest - * @property {string|null} [name] DeleteNoteRequest name + * @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 DeleteNoteRequest. + * Constructs a new Distribution. * @memberof grafeas.v1 - * @classdesc Represents a DeleteNoteRequest. - * @implements IDeleteNoteRequest + * @classdesc Represents a Distribution. + * @implements IDistribution * @constructor - * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.IDistribution=} [properties] Properties to set */ - function DeleteNoteRequest(properties) { + function Distribution(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21466,75 +19942,140 @@ } /** - * DeleteNoteRequest name. - * @member {string} name - * @memberof grafeas.v1.DeleteNoteRequest + * Distribution cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.Distribution * @instance */ - DeleteNoteRequest.prototype.name = ""; + Distribution.prototype.cpeUri = ""; /** - * Creates a new DeleteNoteRequest instance using the specified properties. + * 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 + * @instance + */ + Distribution.prototype.latestVersion = null; + + /** + * 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.DeleteNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.IDeleteNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest instance + * @param {grafeas.v1.IDistribution=} [properties] Properties to set + * @returns {grafeas.v1.Distribution} Distribution instance */ - DeleteNoteRequest.create = function create(properties) { - return new DeleteNoteRequest(properties); + Distribution.create = function create(properties) { + return new Distribution(properties); }; /** - * Encodes the specified DeleteNoteRequest message. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.verify|verify} messages. + * Encodes the specified Distribution message. Does not implicitly {@link grafeas.v1.Distribution.verify|verify} messages. * @function encode - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.IDeleteNoteRequest} message DeleteNoteRequest 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 */ - DeleteNoteRequest.encode = function encode(message, writer) { + Distribution.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.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 DeleteNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.DeleteNoteRequest.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.DeleteNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.IDeleteNoteRequest} message DeleteNoteRequest 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 */ - DeleteNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Distribution.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteNoteRequest message from the specified reader or buffer. + * Decodes a Distribution message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.DeleteNoteRequest + * @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.DeleteNoteRequest} DeleteNoteRequest + * @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 */ - DeleteNoteRequest.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.DeleteNoteRequest(); + 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.name = reader.string(); + message.cpeUri = reader.string(); + 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(); break; default: reader.skipType(tag & 7); @@ -21545,109 +20086,173 @@ }; /** - * Decodes a DeleteNoteRequest 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.DeleteNoteRequest + * @memberof grafeas.v1.Distribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest + * @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 */ - DeleteNoteRequest.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 DeleteNoteRequest message. + * Verifies a Distribution message. * @function verify - * @memberof grafeas.v1.DeleteNoteRequest + * @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 */ - DeleteNoteRequest.verify = function verify(message) { + Distribution.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.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 "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 DeleteNoteRequest 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.DeleteNoteRequest + * @memberof grafeas.v1.Distribution * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.DeleteNoteRequest} DeleteNoteRequest + * @returns {grafeas.v1.Distribution} Distribution */ - DeleteNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.DeleteNoteRequest) + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Distribution) return object; - var message = new $root.grafeas.v1.DeleteNoteRequest(); - if (object.name != null) - message.name = String(object.name); + 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 DeleteNoteRequest 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.DeleteNoteRequest + * @memberof grafeas.v1.Distribution * @static - * @param {grafeas.v1.DeleteNoteRequest} message DeleteNoteRequest + * @param {grafeas.v1.Distribution} message Distribution * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteNoteRequest.toObject = function toObject(message, options) { + Distribution.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.cpeUri = ""; + object.architecture = options.enums === String ? "ARCHITECTURE_UNSPECIFIED" : 0; + object.latestVersion = null; + object.maintainer = ""; + object.url = ""; + object.description = ""; + } + 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 DeleteNoteRequest to JSON. + * Converts this Distribution to JSON. * @function toJSON - * @memberof grafeas.v1.DeleteNoteRequest + * @memberof grafeas.v1.Distribution * @instance * @returns {Object.} JSON object */ - DeleteNoteRequest.prototype.toJSON = function toJSON() { + Distribution.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteNoteRequest; + return Distribution; })(); - v1.CreateNoteRequest = (function() { + v1.Location = (function() { /** - * Properties of a CreateNoteRequest. + * Properties of a Location. * @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 ILocation + * @property {string|null} [cpeUri] Location cpeUri + * @property {grafeas.v1.IVersion|null} [version] Location version + * @property {string|null} [path] Location path */ /** - * Constructs a new CreateNoteRequest. + * Constructs a new Location. * @memberof grafeas.v1 - * @classdesc Represents a CreateNoteRequest. - * @implements ICreateNoteRequest + * @classdesc Represents a Location. + * @implements ILocation * @constructor - * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.ILocation=} [properties] Properties to set */ - function CreateNoteRequest(properties) { + function Location(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21655,101 +20260,101 @@ } /** - * CreateNoteRequest parent. - * @member {string} parent - * @memberof grafeas.v1.CreateNoteRequest + * Location cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.Location * @instance */ - CreateNoteRequest.prototype.parent = ""; + Location.prototype.cpeUri = ""; /** - * CreateNoteRequest noteId. - * @member {string} noteId - * @memberof grafeas.v1.CreateNoteRequest + * Location version. + * @member {grafeas.v1.IVersion|null|undefined} version + * @memberof grafeas.v1.Location * @instance */ - CreateNoteRequest.prototype.noteId = ""; + Location.prototype.version = null; /** - * CreateNoteRequest note. - * @member {grafeas.v1.INote|null|undefined} note - * @memberof grafeas.v1.CreateNoteRequest + * Location path. + * @member {string} path + * @memberof grafeas.v1.Location * @instance */ - CreateNoteRequest.prototype.note = null; + Location.prototype.path = ""; /** - * Creates a new CreateNoteRequest instance using the specified properties. + * Creates a new Location instance using the specified properties. * @function create - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.ICreateNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest instance + * @param {grafeas.v1.ILocation=} [properties] Properties to set + * @returns {grafeas.v1.Location} Location instance */ - CreateNoteRequest.create = function create(properties) { - return new CreateNoteRequest(properties); + Location.create = function create(properties) { + return new Location(properties); }; /** - * Encodes the specified CreateNoteRequest message. Does not implicitly {@link grafeas.v1.CreateNoteRequest.verify|verify} messages. + * Encodes the specified Location message. Does not implicitly {@link grafeas.v1.Location.verify|verify} messages. * @function encode - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest 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 */ - CreateNoteRequest.encode = function encode(message, writer) { + Location.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.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 CreateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.CreateNoteRequest.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.CreateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.ICreateNoteRequest} message CreateNoteRequest 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 */ - CreateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateNoteRequest message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.CreateNoteRequest + * @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.CreateNoteRequest} CreateNoteRequest + * @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 */ - CreateNoteRequest.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.CreateNoteRequest(); + 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.parent = reader.string(); + message.cpeUri = reader.string(); break; case 2: - message.noteId = reader.string(); + message.version = $root.grafeas.v1.Version.decode(reader, reader.uint32()); break; case 3: - message.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -21760,131 +20365,131 @@ }; /** - * Decodes a CreateNoteRequest 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.CreateNoteRequest + * @memberof grafeas.v1.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + * @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 */ - CreateNoteRequest.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateNoteRequest message. + * Verifies a Location message. * @function verify - * @memberof grafeas.v1.CreateNoteRequest + * @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 */ - CreateNoteRequest.verify = function verify(message) { + Location.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.version != null && message.hasOwnProperty("version")) { + var error = $root.grafeas.v1.Version.verify(message.version); if (error) - return "note." + error; + return "version." + error; } + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a CreateNoteRequest 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.CreateNoteRequest + * @memberof grafeas.v1.Location * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.CreateNoteRequest} CreateNoteRequest + * @returns {grafeas.v1.Location} Location */ - CreateNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.CreateNoteRequest) + Location.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Location) 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.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 CreateNoteRequest 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.CreateNoteRequest + * @memberof grafeas.v1.Location * @static - * @param {grafeas.v1.CreateNoteRequest} message CreateNoteRequest + * @param {grafeas.v1.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateNoteRequest.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.noteId = ""; - object.note = null; + object.cpeUri = ""; + object.version = null; + object.path = ""; } - 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.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 CreateNoteRequest to JSON. + * Converts this Location to JSON. * @function toJSON - * @memberof grafeas.v1.CreateNoteRequest + * @memberof grafeas.v1.Location * @instance * @returns {Object.} JSON object */ - CreateNoteRequest.prototype.toJSON = function toJSON() { + Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateNoteRequest; + return Location; })(); - v1.UpdateNoteRequest = (function() { + v1.PackageNote = (function() { /** - * Properties of an UpdateNoteRequest. + * Properties of a PackageNote. * @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 IPackageNote + * @property {string|null} [name] PackageNote name + * @property {Array.|null} [distribution] PackageNote distribution */ /** - * Constructs a new UpdateNoteRequest. + * Constructs a new PackageNote. * @memberof grafeas.v1 - * @classdesc Represents an UpdateNoteRequest. - * @implements IUpdateNoteRequest + * @classdesc Represents a PackageNote. + * @implements IPackageNote * @constructor - * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set + * @param {grafeas.v1.IPackageNote=} [properties] Properties to set */ - function UpdateNoteRequest(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) @@ -21892,101 +20497,91 @@ } /** - * UpdateNoteRequest name. + * PackageNote name. * @member {string} name - * @memberof grafeas.v1.UpdateNoteRequest - * @instance - */ - UpdateNoteRequest.prototype.name = ""; - - /** - * UpdateNoteRequest note. - * @member {grafeas.v1.INote|null|undefined} note - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @instance */ - UpdateNoteRequest.prototype.note = null; + PackageNote.prototype.name = ""; /** - * UpdateNoteRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof grafeas.v1.UpdateNoteRequest + * PackageNote distribution. + * @member {Array.} distribution + * @memberof grafeas.v1.PackageNote * @instance */ - UpdateNoteRequest.prototype.updateMask = null; + PackageNote.prototype.distribution = $util.emptyArray; /** - * Creates a new UpdateNoteRequest instance using the specified properties. + * Creates a new PackageNote instance using the specified properties. * @function create - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.IUpdateNoteRequest=} [properties] Properties to set - * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest instance + * @param {grafeas.v1.IPackageNote=} [properties] Properties to set + * @returns {grafeas.v1.PackageNote} PackageNote instance */ - UpdateNoteRequest.create = function create(properties) { - return new UpdateNoteRequest(properties); + PackageNote.create = function create(properties) { + return new PackageNote(properties); }; /** - * Encodes the specified UpdateNoteRequest message. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.verify|verify} messages. + * Encodes the specified PackageNote message. Does not implicitly {@link grafeas.v1.PackageNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.IUpdateNoteRequest} message UpdateNoteRequest 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 */ - UpdateNoteRequest.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.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.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 UpdateNoteRequest message, length delimited. Does not implicitly {@link grafeas.v1.UpdateNoteRequest.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.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.IUpdateNoteRequest} message UpdateNoteRequest 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 */ - UpdateNoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + PackageNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateNoteRequest message from the specified reader or buffer. + * Decodes a PackageNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.UpdateNoteRequest + * @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.UpdateNoteRequest} UpdateNoteRequest + * @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 */ - UpdateNoteRequest.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.UpdateNoteRequest(); + 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.note = $root.grafeas.v1.Note.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + 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); @@ -21997,137 +20592,135 @@ }; /** - * Decodes an UpdateNoteRequest 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.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest + * @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 */ - UpdateNoteRequest.decodeDelimited = function decodeDelimited(reader) { + PackageNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateNoteRequest message. + * Verifies a PackageNote message. * @function verify - * @memberof grafeas.v1.UpdateNoteRequest + * @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 */ - UpdateNoteRequest.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.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; + 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 an UpdateNoteRequest 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.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.UpdateNoteRequest} UpdateNoteRequest + * @returns {grafeas.v1.PackageNote} PackageNote */ - UpdateNoteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpdateNoteRequest) + PackageNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.PackageNote) return object; - var message = new $root.grafeas.v1.UpdateNoteRequest(); + var message = new $root.grafeas.v1.PackageNote(); 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); + 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 an UpdateNoteRequest 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.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @static - * @param {grafeas.v1.UpdateNoteRequest} message UpdateNoteRequest + * @param {grafeas.v1.PackageNote} message PackageNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateNoteRequest.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.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); + 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 UpdateNoteRequest to JSON. + * Converts this PackageNote to JSON. * @function toJSON - * @memberof grafeas.v1.UpdateNoteRequest + * @memberof grafeas.v1.PackageNote * @instance * @returns {Object.} JSON object */ - UpdateNoteRequest.prototype.toJSON = function toJSON() { + PackageNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateNoteRequest; + return PackageNote; })(); - v1.ListNoteOccurrencesRequest = (function() { + v1.PackageOccurrence = (function() { /** - * Properties of a ListNoteOccurrencesRequest. + * Properties of a PackageOccurrence. * @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 IPackageOccurrence + * @property {string|null} [name] PackageOccurrence name + * @property {Array.|null} [location] PackageOccurrence location */ /** - * Constructs a new ListNoteOccurrencesRequest. + * Constructs a new PackageOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a ListNoteOccurrencesRequest. - * @implements IListNoteOccurrencesRequest + * @classdesc Represents a PackageOccurrence. + * @implements IPackageOccurrence * @constructor - * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set + * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set */ - function ListNoteOccurrencesRequest(properties) { + function PackageOccurrence(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22135,100 +20728,81 @@ } /** - * ListNoteOccurrencesRequest name. + * PackageOccurrence 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.PackageOccurrence * @instance */ - ListNoteOccurrencesRequest.prototype.pageSize = 0; + PackageOccurrence.prototype.name = ""; /** - * ListNoteOccurrencesRequest pageToken. - * @member {string} pageToken - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * PackageOccurrence location. + * @member {Array.} location + * @memberof grafeas.v1.PackageOccurrence * @instance */ - ListNoteOccurrencesRequest.prototype.pageToken = ""; + PackageOccurrence.prototype.location = $util.emptyArray; /** - * Creates a new ListNoteOccurrencesRequest instance using the specified properties. + * Creates a new PackageOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.IListNoteOccurrencesRequest=} [properties] Properties to set - * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest instance + * @param {grafeas.v1.IPackageOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence instance */ - ListNoteOccurrencesRequest.create = function create(properties) { - return new ListNoteOccurrencesRequest(properties); + PackageOccurrence.create = function create(properties) { + return new PackageOccurrence(properties); }; /** - * Encodes the specified ListNoteOccurrencesRequest message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.verify|verify} messages. + * Encodes the specified PackageOccurrence message. Does not implicitly {@link grafeas.v1.PackageOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.IListNoteOccurrencesRequest} message ListNoteOccurrencesRequest 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 */ - ListNoteOccurrencesRequest.encode = function encode(message, 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.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.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 ListNoteOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesRequest.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.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.IListNoteOccurrencesRequest} message ListNoteOccurrencesRequest 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 */ - ListNoteOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + PackageOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNoteOccurrencesRequest message from the specified reader or buffer. + * Decodes a PackageOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @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.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest + * @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 */ - ListNoteOccurrencesRequest.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.ListNoteOccurrencesRequest(); + 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) { @@ -22236,13 +20810,9 @@ 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(); + 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); @@ -22253,134 +20823,138 @@ }; /** - * Decodes a ListNoteOccurrencesRequest 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.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest + * @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 */ - ListNoteOccurrencesRequest.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 ListNoteOccurrencesRequest message. + * Verifies a PackageOccurrence message. * @function verify - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @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 */ - ListNoteOccurrencesRequest.verify = function verify(message) { + 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.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.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; }; /** - * Creates a ListNoteOccurrencesRequest 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.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNoteOccurrencesRequest} ListNoteOccurrencesRequest + * @returns {grafeas.v1.PackageOccurrence} PackageOccurrence */ - ListNoteOccurrencesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNoteOccurrencesRequest) + PackageOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.PackageOccurrence) return object; - var message = new $root.grafeas.v1.ListNoteOccurrencesRequest(); + var message = new $root.grafeas.v1.PackageOccurrence(); 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.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; }; /** - * Creates a plain object from a ListNoteOccurrencesRequest 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.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageOccurrence * @static - * @param {grafeas.v1.ListNoteOccurrencesRequest} message ListNoteOccurrencesRequest + * @param {grafeas.v1.PackageOccurrence} message PackageOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNoteOccurrencesRequest.toObject = function toObject(message, options) { + PackageOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.arrays || options.defaults) + object.location = []; + 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.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; }; /** - * Converts this ListNoteOccurrencesRequest to JSON. + * Converts this PackageOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.ListNoteOccurrencesRequest + * @memberof grafeas.v1.PackageOccurrence * @instance * @returns {Object.} JSON object */ - ListNoteOccurrencesRequest.prototype.toJSON = function toJSON() { + PackageOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNoteOccurrencesRequest; + return PackageOccurrence; })(); - v1.ListNoteOccurrencesResponse = (function() { + v1.Version = (function() { /** - * Properties of a ListNoteOccurrencesResponse. + * Properties of a Version. * @memberof grafeas.v1 - * @interface IListNoteOccurrencesResponse - * @property {Array.|null} [occurrences] ListNoteOccurrencesResponse occurrences - * @property {string|null} [nextPageToken] ListNoteOccurrencesResponse nextPageToken + * @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 ListNoteOccurrencesResponse. + * Constructs a new Version. * @memberof grafeas.v1 - * @classdesc Represents a ListNoteOccurrencesResponse. - * @implements IListNoteOccurrencesResponse + * @classdesc Represents a Version. + * @implements IVersion * @constructor - * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set + * @param {grafeas.v1.IVersion=} [properties] Properties to set */ - function ListNoteOccurrencesResponse(properties) { - this.occurrences = []; + function Version(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22388,91 +20962,140 @@ } /** - * ListNoteOccurrencesResponse occurrences. - * @member {Array.} occurrences - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * Version epoch. + * @member {number} epoch + * @memberof grafeas.v1.Version * @instance */ - ListNoteOccurrencesResponse.prototype.occurrences = $util.emptyArray; + Version.prototype.epoch = 0; /** - * ListNoteOccurrencesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * Version name. + * @member {string} name + * @memberof grafeas.v1.Version * @instance */ - ListNoteOccurrencesResponse.prototype.nextPageToken = ""; + Version.prototype.name = ""; /** - * Creates a new ListNoteOccurrencesResponse instance using the specified properties. + * Version revision. + * @member {string} revision + * @memberof grafeas.v1.Version + * @instance + */ + Version.prototype.revision = ""; + + /** + * Version inclusive. + * @member {boolean} inclusive + * @memberof grafeas.v1.Version + * @instance + */ + Version.prototype.inclusive = false; + + /** + * Version kind. + * @member {grafeas.v1.Version.VersionKind} kind + * @memberof grafeas.v1.Version + * @instance + */ + Version.prototype.kind = 0; + + /** + * Version fullName. + * @member {string} fullName + * @memberof grafeas.v1.Version + * @instance + */ + Version.prototype.fullName = ""; + + /** + * Creates a new Version instance using the specified properties. * @function create - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.IListNoteOccurrencesResponse=} [properties] Properties to set - * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse instance + * @param {grafeas.v1.IVersion=} [properties] Properties to set + * @returns {grafeas.v1.Version} Version instance */ - ListNoteOccurrencesResponse.create = function create(properties) { - return new ListNoteOccurrencesResponse(properties); + Version.create = function create(properties) { + return new Version(properties); }; /** - * Encodes the specified ListNoteOccurrencesResponse message. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.verify|verify} messages. + * Encodes the specified Version message. Does not implicitly {@link grafeas.v1.Version.verify|verify} messages. * @function encode - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.IListNoteOccurrencesResponse} message ListNoteOccurrencesResponse 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 */ - ListNoteOccurrencesResponse.encode = function encode(message, writer) { + Version.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.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 ListNoteOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.ListNoteOccurrencesResponse.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.ListNoteOccurrencesResponse + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.IListNoteOccurrencesResponse} message ListNoteOccurrencesResponse 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 */ - ListNoteOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + Version.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNoteOccurrencesResponse message from the specified reader or buffer. + * Decodes a Version message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @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.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse + * @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 */ - ListNoteOccurrencesResponse.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.ListNoteOccurrencesResponse(); + 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: - if (!(message.occurrences && message.occurrences.length)) - message.occurrences = []; - message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + message.epoch = reader.int32(); break; case 2: - message.nextPageToken = reader.string(); + 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); @@ -22483,135 +21106,193 @@ }; /** - * Decodes a ListNoteOccurrencesResponse 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.ListNoteOccurrencesResponse + * @memberof grafeas.v1.Version * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse + * @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 */ - ListNoteOccurrencesResponse.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 ListNoteOccurrencesResponse message. + * Verifies a Version message. * @function verify - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @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 */ - ListNoteOccurrencesResponse.verify = function verify(message) { + Version.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 (error) - return "occurrences." + 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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; return null; }; /** - * Creates a ListNoteOccurrencesResponse 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.ListNoteOccurrencesResponse + * @memberof grafeas.v1.Version * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.ListNoteOccurrencesResponse} ListNoteOccurrencesResponse + * @returns {grafeas.v1.Version} Version */ - ListNoteOccurrencesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ListNoteOccurrencesResponse) + Version.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.Version) 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.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.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.fullName != null) + message.fullName = String(object.fullName); return message; }; /** - * Creates a plain object from a ListNoteOccurrencesResponse 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.ListNoteOccurrencesResponse + * @memberof grafeas.v1.Version * @static - * @param {grafeas.v1.ListNoteOccurrencesResponse} message ListNoteOccurrencesResponse + * @param {grafeas.v1.Version} message Version * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNoteOccurrencesResponse.toObject = function toObject(message, options) { + Version.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 (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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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 ListNoteOccurrencesResponse to JSON. + * Converts this Version to JSON. * @function toJSON - * @memberof grafeas.v1.ListNoteOccurrencesResponse + * @memberof grafeas.v1.Version * @instance * @returns {Object.} JSON object */ - ListNoteOccurrencesResponse.prototype.toJSON = function toJSON() { + Version.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNoteOccurrencesResponse; + /** + * 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.BatchCreateNotesRequest = (function() { + v1.UpgradeNote = (function() { /** - * Properties of a BatchCreateNotesRequest. + * Properties of an UpgradeNote. * @memberof grafeas.v1 - * @interface IBatchCreateNotesRequest - * @property {string|null} [parent] BatchCreateNotesRequest parent - * @property {Object.|null} [notes] BatchCreateNotesRequest 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 BatchCreateNotesRequest. + * Constructs a new UpgradeNote. * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateNotesRequest. - * @implements IBatchCreateNotesRequest + * @classdesc Represents an UpgradeNote. + * @implements IUpgradeNote * @constructor - * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set + * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set */ - function BatchCreateNotesRequest(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) @@ -22619,110 +21300,117 @@ } /** - * BatchCreateNotesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.BatchCreateNotesRequest + * UpgradeNote package. + * @member {string} package + * @memberof grafeas.v1.UpgradeNote * @instance */ - BatchCreateNotesRequest.prototype.parent = ""; + UpgradeNote.prototype["package"] = ""; /** - * BatchCreateNotesRequest notes. - * @member {Object.} notes - * @memberof grafeas.v1.BatchCreateNotesRequest + * UpgradeNote version. + * @member {grafeas.v1.IVersion|null|undefined} version + * @memberof grafeas.v1.UpgradeNote * @instance */ - BatchCreateNotesRequest.prototype.notes = $util.emptyObject; + UpgradeNote.prototype.version = null; /** - * Creates a new BatchCreateNotesRequest instance using the specified properties. + * 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.BatchCreateNotesRequest + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.IBatchCreateNotesRequest=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest instance + * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set + * @returns {grafeas.v1.UpgradeNote} UpgradeNote instance */ - BatchCreateNotesRequest.create = function create(properties) { - return new BatchCreateNotesRequest(properties); + UpgradeNote.create = function create(properties) { + return new UpgradeNote(properties); }; /** - * Encodes the specified BatchCreateNotesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.verify|verify} messages. + * Encodes the specified UpgradeNote message. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.IBatchCreateNotesRequest} message BatchCreateNotesRequest 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 */ - BatchCreateNotesRequest.encode = function encode(message, writer) { + UpgradeNote.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["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 BatchCreateNotesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesRequest.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.BatchCreateNotesRequest + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.IBatchCreateNotesRequest} message BatchCreateNotesRequest 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 */ - BatchCreateNotesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpgradeNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateNotesRequest message from the specified reader or buffer. + * Decodes an UpgradeNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateNotesRequest + * @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.BatchCreateNotesRequest} BatchCreateNotesRequest + * @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 */ - BatchCreateNotesRequest.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.BatchCreateNotesRequest(), key, value; + 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.parent = reader.string(); + message["package"] = 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; + 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); @@ -22733,136 +21421,164 @@ }; /** - * Decodes a BatchCreateNotesRequest 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.BatchCreateNotesRequest + * @memberof grafeas.v1.UpgradeNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest + * @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 */ - BatchCreateNotesRequest.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 BatchCreateNotesRequest message. + * Verifies an UpgradeNote message. * @function verify - * @memberof grafeas.v1.BatchCreateNotesRequest + * @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 */ - BatchCreateNotesRequest.verify = function verify(message) { + UpgradeNote.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 (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 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]); } } - return null; - }; - - /** - * Creates a BatchCreateNotesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.BatchCreateNotesRequest - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateNotesRequest} BatchCreateNotesRequest - */ - BatchCreateNotesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateNotesRequest) - 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]]); - } + 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 BatchCreateNotesRequest 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.BatchCreateNotesRequest + * @memberof grafeas.v1.UpgradeNote * @static - * @param {grafeas.v1.BatchCreateNotesRequest} message BatchCreateNotesRequest + * @param {grafeas.v1.UpgradeNote} message UpgradeNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateNotesRequest.toObject = function toObject(message, options) { + UpgradeNote.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.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; }; /** - * Converts this BatchCreateNotesRequest to JSON. + * Converts this UpgradeNote to JSON. * @function toJSON - * @memberof grafeas.v1.BatchCreateNotesRequest + * @memberof grafeas.v1.UpgradeNote * @instance * @returns {Object.} JSON object */ - BatchCreateNotesRequest.prototype.toJSON = function toJSON() { + UpgradeNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateNotesRequest; + return UpgradeNote; })(); - v1.BatchCreateNotesResponse = (function() { + v1.UpgradeDistribution = (function() { /** - * Properties of a BatchCreateNotesResponse. + * Properties of an UpgradeDistribution. * @memberof grafeas.v1 - * @interface IBatchCreateNotesResponse - * @property {Array.|null} [notes] BatchCreateNotesResponse notes + * @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 BatchCreateNotesResponse. + * Constructs a new UpgradeDistribution. * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateNotesResponse. - * @implements IBatchCreateNotesResponse + * @classdesc Represents an UpgradeDistribution. + * @implements IUpgradeDistribution * @constructor - * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set + * @param {grafeas.v1.IUpgradeDistribution=} [properties] Properties to set */ - function BatchCreateNotesResponse(properties) { - this.notes = []; + function UpgradeDistribution(properties) { + this.cve = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22870,78 +21586,117 @@ } /** - * BatchCreateNotesResponse notes. - * @member {Array.} notes - * @memberof grafeas.v1.BatchCreateNotesResponse + * UpgradeDistribution cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.UpgradeDistribution * @instance */ - BatchCreateNotesResponse.prototype.notes = $util.emptyArray; + UpgradeDistribution.prototype.cpeUri = ""; /** - * Creates a new BatchCreateNotesResponse instance using the specified properties. + * UpgradeDistribution classification. + * @member {string} classification + * @memberof grafeas.v1.UpgradeDistribution + * @instance + */ + UpgradeDistribution.prototype.classification = ""; + + /** + * 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.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.IBatchCreateNotesResponse=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse instance + * @param {grafeas.v1.IUpgradeDistribution=} [properties] Properties to set + * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution instance */ - BatchCreateNotesResponse.create = function create(properties) { - return new BatchCreateNotesResponse(properties); + UpgradeDistribution.create = function create(properties) { + return new UpgradeDistribution(properties); }; /** - * Encodes the specified BatchCreateNotesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.verify|verify} messages. + * Encodes the specified UpgradeDistribution message. Does not implicitly {@link grafeas.v1.UpgradeDistribution.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.IBatchCreateNotesResponse} message BatchCreateNotesResponse 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 */ - BatchCreateNotesResponse.encode = function encode(message, writer) { + UpgradeDistribution.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.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 BatchCreateNotesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateNotesResponse.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.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.IBatchCreateNotesResponse} message BatchCreateNotesResponse 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 */ - BatchCreateNotesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpgradeDistribution.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateNotesResponse message from the specified reader or buffer. + * Decodes an UpgradeDistribution message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateNotesResponse + * @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.BatchCreateNotesResponse} BatchCreateNotesResponse + * @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 */ - BatchCreateNotesResponse.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.BatchCreateNotesResponse(); + 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: - if (!(message.notes && message.notes.length)) - message.notes = []; - message.notes.push($root.grafeas.v1.Note.decode(reader, reader.uint32())); + 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); @@ -22952,126 +21707,153 @@ }; /** - * Decodes a BatchCreateNotesResponse 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.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeDistribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse + * @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 */ - BatchCreateNotesResponse.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 BatchCreateNotesResponse message. + * Verifies an UpgradeDistribution message. * @function verify - * @memberof grafeas.v1.BatchCreateNotesResponse + * @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 */ - BatchCreateNotesResponse.verify = function verify(message) { + UpgradeDistribution.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.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 BatchCreateNotesResponse 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.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeDistribution * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateNotesResponse} BatchCreateNotesResponse + * @returns {grafeas.v1.UpgradeDistribution} UpgradeDistribution */ - BatchCreateNotesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateNotesResponse) + UpgradeDistribution.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpgradeDistribution) 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.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 BatchCreateNotesResponse 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.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeDistribution * @static - * @param {grafeas.v1.BatchCreateNotesResponse} message BatchCreateNotesResponse + * @param {grafeas.v1.UpgradeDistribution} message UpgradeDistribution * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateNotesResponse.toObject = function toObject(message, options) { + UpgradeDistribution.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.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 BatchCreateNotesResponse to JSON. + * Converts this UpgradeDistribution to JSON. * @function toJSON - * @memberof grafeas.v1.BatchCreateNotesResponse + * @memberof grafeas.v1.UpgradeDistribution * @instance * @returns {Object.} JSON object */ - BatchCreateNotesResponse.prototype.toJSON = function toJSON() { + UpgradeDistribution.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateNotesResponse; + return UpgradeDistribution; })(); - v1.BatchCreateOccurrencesRequest = (function() { + v1.WindowsUpdate = (function() { /** - * Properties of a BatchCreateOccurrencesRequest. + * Properties of a WindowsUpdate. * @memberof grafeas.v1 - * @interface IBatchCreateOccurrencesRequest - * @property {string|null} [parent] BatchCreateOccurrencesRequest parent - * @property {Array.|null} [occurrences] BatchCreateOccurrencesRequest 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 BatchCreateOccurrencesRequest. + * Constructs a new WindowsUpdate. * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateOccurrencesRequest. - * @implements IBatchCreateOccurrencesRequest + * @classdesc Represents a WindowsUpdate. + * @implements IWindowsUpdate * @constructor - * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set + * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set */ - function BatchCreateOccurrencesRequest(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) @@ -23079,91 +21861,159 @@ } /** - * BatchCreateOccurrencesRequest parent. - * @member {string} parent - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * WindowsUpdate identity. + * @member {grafeas.v1.WindowsUpdate.IIdentity|null|undefined} identity + * @memberof grafeas.v1.WindowsUpdate * @instance */ - BatchCreateOccurrencesRequest.prototype.parent = ""; + WindowsUpdate.prototype.identity = null; /** - * BatchCreateOccurrencesRequest occurrences. - * @member {Array.} occurrences - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * WindowsUpdate title. + * @member {string} title + * @memberof grafeas.v1.WindowsUpdate * @instance */ - BatchCreateOccurrencesRequest.prototype.occurrences = $util.emptyArray; + WindowsUpdate.prototype.title = ""; /** - * Creates a new BatchCreateOccurrencesRequest instance using the specified properties. + * 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.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.IBatchCreateOccurrencesRequest=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest instance + * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set + * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate instance */ - BatchCreateOccurrencesRequest.create = function create(properties) { - return new BatchCreateOccurrencesRequest(properties); + WindowsUpdate.create = function create(properties) { + return new WindowsUpdate(properties); }; /** - * Encodes the specified BatchCreateOccurrencesRequest message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.verify|verify} messages. + * Encodes the specified WindowsUpdate message. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.IBatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest 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 */ - BatchCreateOccurrencesRequest.encode = function encode(message, writer) { + WindowsUpdate.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.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 BatchCreateOccurrencesRequest message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesRequest.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.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.IBatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest 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 */ - BatchCreateOccurrencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + WindowsUpdate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateOccurrencesRequest message from the specified reader or buffer. + * Decodes a WindowsUpdate message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @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.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest + * @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 */ - BatchCreateOccurrencesRequest.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.BatchCreateOccurrencesRequest(); + 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: - message.parent = reader.string(); + message.identity = $root.grafeas.v1.WindowsUpdate.Identity.decode(reader, reader.uint32()); break; case 2: - if (!(message.occurrences && message.occurrences.length)) - message.occurrences = []; - message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + 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); @@ -23174,134 +22024,620 @@ }; /** - * Decodes a BatchCreateOccurrencesRequest 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.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.WindowsUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest + * @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 */ - BatchCreateOccurrencesRequest.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 BatchCreateOccurrencesRequest message. + * Verifies a WindowsUpdate message. * @function verify - * @memberof grafeas.v1.BatchCreateOccurrencesRequest + * @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 */ - BatchCreateOccurrencesRequest.verify = function verify(message) { + WindowsUpdate.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 (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 BatchCreateOccurrencesRequest 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.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.WindowsUpdate * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateOccurrencesRequest} BatchCreateOccurrencesRequest + * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate */ - BatchCreateOccurrencesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesRequest) + WindowsUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.WindowsUpdate) 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.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 BatchCreateOccurrencesRequest 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.BatchCreateOccurrencesRequest + * @memberof grafeas.v1.WindowsUpdate * @static - * @param {grafeas.v1.BatchCreateOccurrencesRequest} message BatchCreateOccurrencesRequest + * @param {grafeas.v1.WindowsUpdate} message WindowsUpdate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateOccurrencesRequest.toObject = function toObject(message, options) { + WindowsUpdate.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); + 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 BatchCreateOccurrencesRequest to JSON. - * @function toJSON - * @memberof grafeas.v1.BatchCreateOccurrencesRequest - * @instance - * @returns {Object.} JSON object - */ - BatchCreateOccurrencesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this WindowsUpdate to JSON. + * @function toJSON + * @memberof grafeas.v1.WindowsUpdate + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdate.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; + }; + + /** + * 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); + }; + + return Identity; + })(); + + WindowsUpdate.Category = (function() { + + /** + * Properties of a Category. + * @memberof grafeas.v1.WindowsUpdate + * @interface ICategory + * @property {string|null} [categoryId] Category categoryId + * @property {string|null} [name] Category name + */ + + /** + * 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]]; + } + + /** + * Category categoryId. + * @member {string} categoryId + * @memberof grafeas.v1.WindowsUpdate.Category + * @instance + */ + Category.prototype.categoryId = ""; + + /** + * Category name. + * @member {string} name + * @memberof grafeas.v1.WindowsUpdate.Category + * @instance + */ + Category.prototype.name = ""; + + /** + * 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 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; + }; + + /** + * 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; + }; + + /** + * 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 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 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; + }; + + /** + * 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 BatchCreateOccurrencesRequest; + return Category; + })(); + + return WindowsUpdate; })(); - v1.BatchCreateOccurrencesResponse = (function() { + v1.UpgradeOccurrence = (function() { /** - * Properties of a BatchCreateOccurrencesResponse. + * Properties of an UpgradeOccurrence. * @memberof grafeas.v1 - * @interface IBatchCreateOccurrencesResponse - * @property {Array.|null} [occurrences] BatchCreateOccurrencesResponse occurrences + * @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 BatchCreateOccurrencesResponse. + * Constructs a new UpgradeOccurrence. * @memberof grafeas.v1 - * @classdesc Represents a BatchCreateOccurrencesResponse. - * @implements IBatchCreateOccurrencesResponse + * @classdesc Represents an UpgradeOccurrence. + * @implements IUpgradeOccurrence * @constructor - * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set + * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set */ - function BatchCreateOccurrencesResponse(properties) { - this.occurrences = []; + function UpgradeOccurrence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23309,78 +22645,114 @@ } /** - * BatchCreateOccurrencesResponse occurrences. - * @member {Array.} occurrences - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * UpgradeOccurrence package. + * @member {string} package + * @memberof grafeas.v1.UpgradeOccurrence * @instance */ - BatchCreateOccurrencesResponse.prototype.occurrences = $util.emptyArray; + UpgradeOccurrence.prototype["package"] = ""; /** - * Creates a new BatchCreateOccurrencesResponse instance using the specified properties. + * 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.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.IBatchCreateOccurrencesResponse=} [properties] Properties to set - * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse instance + * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence instance */ - BatchCreateOccurrencesResponse.create = function create(properties) { - return new BatchCreateOccurrencesResponse(properties); + UpgradeOccurrence.create = function create(properties) { + return new UpgradeOccurrence(properties); }; /** - * Encodes the specified BatchCreateOccurrencesResponse message. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.verify|verify} messages. + * Encodes the specified UpgradeOccurrence message. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse 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 */ - BatchCreateOccurrencesResponse.encode = function encode(message, writer) { + UpgradeOccurrence.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["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 BatchCreateOccurrencesResponse message, length delimited. Does not implicitly {@link grafeas.v1.BatchCreateOccurrencesResponse.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.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.IBatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse 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 */ - BatchCreateOccurrencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpgradeOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateOccurrencesResponse message from the specified reader or buffer. + * Decodes an UpgradeOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @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.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + * @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 */ - BatchCreateOccurrencesResponse.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.BatchCreateOccurrencesResponse(); + 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: - if (!(message.occurrences && message.occurrences.length)) - message.occurrences = []; - message.occurrences.push($root.grafeas.v1.Occurrence.decode(reader, reader.uint32())); + message["package"] = reader.string(); + break; + case 3: + 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); @@ -23391,125 +22763,154 @@ }; /** - * Decodes a BatchCreateOccurrencesResponse 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.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.UpgradeOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + * @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 */ - BatchCreateOccurrencesResponse.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 BatchCreateOccurrencesResponse message. + * Verifies an UpgradeOccurrence message. * @function verify - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @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 */ - BatchCreateOccurrencesResponse.verify = function verify(message) { + UpgradeOccurrence.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 (error) - return "occurrences." + error; - } + 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; }; /** - * Creates a BatchCreateOccurrencesResponse 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.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.UpgradeOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.BatchCreateOccurrencesResponse} BatchCreateOccurrencesResponse + * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence */ - BatchCreateOccurrencesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.BatchCreateOccurrencesResponse) + UpgradeOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.UpgradeOccurrence) 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.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 a BatchCreateOccurrencesResponse 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.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.UpgradeOccurrence * @static - * @param {grafeas.v1.BatchCreateOccurrencesResponse} message BatchCreateOccurrencesResponse + * @param {grafeas.v1.UpgradeOccurrence} message UpgradeOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateOccurrencesResponse.toObject = function toObject(message, options) { + UpgradeOccurrence.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.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 BatchCreateOccurrencesResponse to JSON. + * Converts this UpgradeOccurrence to JSON. * @function toJSON - * @memberof grafeas.v1.BatchCreateOccurrencesResponse + * @memberof grafeas.v1.UpgradeOccurrence * @instance * @returns {Object.} JSON object */ - BatchCreateOccurrencesResponse.prototype.toJSON = function toJSON() { + UpgradeOccurrence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateOccurrencesResponse; + return UpgradeOccurrence; })(); - v1.Layer = (function() { + v1.VulnerabilityNote = (function() { /** - * Properties of a Layer. + * Properties of a VulnerabilityNote. * @memberof grafeas.v1 - * @interface ILayer - * @property {string|null} [directive] Layer directive - * @property {string|null} ["arguments"] Layer arguments + * @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 Layer. + * Constructs a new VulnerabilityNote. * @memberof grafeas.v1 - * @classdesc Represents a Layer. - * @implements ILayer + * @classdesc Represents a VulnerabilityNote. + * @implements IVulnerabilityNote * @constructor - * @param {grafeas.v1.ILayer=} [properties] Properties to set + * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set */ - function Layer(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) @@ -23517,88 +22918,146 @@ } /** - * Layer directive. - * @member {string} directive - * @memberof grafeas.v1.Layer + * VulnerabilityNote cvssScore. + * @member {number} cvssScore + * @memberof grafeas.v1.VulnerabilityNote * @instance */ - Layer.prototype.directive = ""; + VulnerabilityNote.prototype.cvssScore = 0; /** - * Layer arguments. - * @member {string} arguments - * @memberof grafeas.v1.Layer + * VulnerabilityNote severity. + * @member {grafeas.v1.Severity} severity + * @memberof grafeas.v1.VulnerabilityNote * @instance */ - Layer.prototype["arguments"] = ""; + VulnerabilityNote.prototype.severity = 0; /** - * Creates a new Layer 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.Layer + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.ILayer=} [properties] Properties to set - * @returns {grafeas.v1.Layer} Layer instance + * @param {grafeas.v1.IVulnerabilityNote=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote instance */ - Layer.create = function create(properties) { - return new Layer(properties); + VulnerabilityNote.create = function create(properties) { + return new VulnerabilityNote(properties); }; /** - * Encodes the specified Layer message. Does not implicitly {@link grafeas.v1.Layer.verify|verify} messages. + * Encodes the specified VulnerabilityNote message. Does not implicitly {@link grafeas.v1.VulnerabilityNote.verify|verify} messages. * @function encode - * @memberof grafeas.v1.Layer + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.ILayer} message Layer 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 */ - Layer.encode = function encode(message, writer) { + VulnerabilityNote.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"]); + 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 Layer message, length delimited. Does not implicitly {@link grafeas.v1.Layer.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.Layer + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.ILayer} message Layer 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 */ - Layer.encodeDelimited = function encodeDelimited(message, writer) { + VulnerabilityNote.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Layer message from the specified reader or buffer. + * Decodes a VulnerabilityNote message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.Layer + * @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.Layer} Layer + * @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 */ - Layer.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.Layer(); + 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.directive = reader.string(); + message.cvssScore = reader.float(); break; case 2: - message["arguments"] = reader.string(); + 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); @@ -23609,983 +23068,1417 @@ }; /** - * Decodes a Layer 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.Layer + * @memberof grafeas.v1.VulnerabilityNote * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.Layer} Layer + * @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 */ - Layer.decodeDelimited = function decodeDelimited(reader) { + VulnerabilityNote.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Layer message. + * Verifies a VulnerabilityNote message. * @function verify - * @memberof grafeas.v1.Layer + * @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 */ - Layer.verify = function verify(message) { + VulnerabilityNote.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"; + 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 "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 a Layer 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.Layer + * @memberof grafeas.v1.VulnerabilityNote * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.Layer} Layer + * @returns {grafeas.v1.VulnerabilityNote} VulnerabilityNote */ - Layer.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Layer) + VulnerabilityNote.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityNote) 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"]); + 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 a Layer 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.Layer + * @memberof grafeas.v1.VulnerabilityNote * @static - * @param {grafeas.v1.Layer} message Layer + * @param {grafeas.v1.VulnerabilityNote} message VulnerabilityNote * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Layer.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.directive = ""; - object["arguments"] = ""; + object.cvssScore = 0; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.cvssV3 = null; + object.sourceUpdateTime = null; } - if (message.directive != null && message.hasOwnProperty("directive")) - object.directive = message.directive; - if (message["arguments"] != null && message.hasOwnProperty("arguments")) - object["arguments"] = message["arguments"]; + 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 Layer to JSON. + * Converts this VulnerabilityNote to JSON. * @function toJSON - * @memberof grafeas.v1.Layer + * @memberof grafeas.v1.VulnerabilityNote * @instance * @returns {Object.} JSON object */ - Layer.prototype.toJSON = function toJSON() { + VulnerabilityNote.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Layer; - })(); + VulnerabilityNote.Detail = (function() { - v1.Fingerprint = (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 + */ - /** - * Properties of a Fingerprint. - * @memberof grafeas.v1 - * @interface IFingerprint - * @property {string|null} [v1Name] Fingerprint v1Name - * @property {Array.|null} [v2Blob] Fingerprint v2Blob - * @property {string|null} [v2Name] Fingerprint v2Name - */ + /** + * 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]]; + } - /** - * Constructs a new Fingerprint. - * @memberof grafeas.v1 - * @classdesc Represents a Fingerprint. - * @implements IFingerprint - * @constructor - * @param {grafeas.v1.IFingerprint=} [properties] Properties to set - */ - function Fingerprint(properties) { - this.v2Blob = []; - 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 severityName. + * @member {string} severityName + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.severityName = ""; - /** - * Fingerprint v1Name. - * @member {string} v1Name - * @memberof grafeas.v1.Fingerprint - * @instance - */ - Fingerprint.prototype.v1Name = ""; + /** + * Detail description. + * @member {string} description + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.description = ""; - /** - * Fingerprint v2Blob. - * @member {Array.} v2Blob - * @memberof grafeas.v1.Fingerprint - * @instance - */ - Fingerprint.prototype.v2Blob = $util.emptyArray; + /** + * Detail packageType. + * @member {string} packageType + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.packageType = ""; - /** - * Fingerprint v2Name. - * @member {string} v2Name - * @memberof grafeas.v1.Fingerprint - * @instance - */ - Fingerprint.prototype.v2Name = ""; + /** + * Detail affectedCpeUri. + * @member {string} affectedCpeUri + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedCpeUri = ""; - /** - * Creates a new Fingerprint instance using the specified properties. - * @function create - * @memberof grafeas.v1.Fingerprint - * @static - * @param {grafeas.v1.IFingerprint=} [properties] Properties to set - * @returns {grafeas.v1.Fingerprint} Fingerprint instance - */ - Fingerprint.create = function create(properties) { - return new Fingerprint(properties); - }; + /** + * Detail affectedPackage. + * @member {string} affectedPackage + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedPackage = ""; - /** - * Encodes the specified Fingerprint message. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.Fingerprint - * @static - * @param {grafeas.v1.IFingerprint} message Fingerprint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fingerprint.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); - return writer; - }; + /** + * Detail affectedVersionStart. + * @member {grafeas.v1.IVersion|null|undefined} affectedVersionStart + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedVersionStart = null; + + /** + * Detail affectedVersionEnd. + * @member {grafeas.v1.IVersion|null|undefined} affectedVersionEnd + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.affectedVersionEnd = null; + + /** + * Detail fixedCpeUri. + * @member {string} fixedCpeUri + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.fixedCpeUri = ""; + + /** + * Detail fixedPackage. + * @member {string} fixedPackage + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.fixedPackage = ""; + + /** + * Detail fixedVersion. + * @member {grafeas.v1.IVersion|null|undefined} fixedVersion + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.fixedVersion = null; + + /** + * Detail isObsolete. + * @member {boolean} isObsolete + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.isObsolete = false; + + /** + * Detail sourceUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} sourceUpdateTime + * @memberof grafeas.v1.VulnerabilityNote.Detail + * @instance + */ + Detail.prototype.sourceUpdateTime = null; + + /** + * 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 = ""; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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; + }; + + /** + * 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()); + }; + + /** + * 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; + }; - /** - * Encodes the specified Fingerprint message, length delimited. Does not implicitly {@link grafeas.v1.Fingerprint.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.Fingerprint - * @static - * @param {grafeas.v1.IFingerprint} message Fingerprint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fingerprint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes a Fingerprint message from the specified reader or buffer. - * @function decode - * @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.Fingerprint} Fingerprint - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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.v1Name = reader.string(); - break; - case 2: - if (!(message.v2Blob && message.v2Blob.length)) - message.v2Blob = []; - message.v2Blob.push(reader.string()); - break; - case 3: - message.v2Name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * 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 = ""; } - } - return message; - }; + 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; + }; - /** - * Decodes a Fingerprint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.Fingerprint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Fingerprint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies a Fingerprint message. - * @function verify - * @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 - */ - Fingerprint.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.v2Name != null && message.hasOwnProperty("v2Name")) - if (!$util.isString(message.v2Name)) - return "v2Name: string expected"; - return null; - }; + return Detail; + })(); - /** - * Creates a Fingerprint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.Fingerprint - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.Fingerprint} Fingerprint - */ - Fingerprint.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.Fingerprint) - 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]); - } - if (object.v2Name != null) - message.v2Name = String(object.v2Name); - return message; - }; + VulnerabilityNote.WindowsDetail = (function() { - /** - * Creates a plain object from a Fingerprint message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.Fingerprint - * @static - * @param {grafeas.v1.Fingerprint} message Fingerprint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fingerprint.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]; + /** + * 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 + */ + + /** + * 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]]; } - if (message.v2Name != null && message.hasOwnProperty("v2Name")) - object.v2Name = message.v2Name; - return object; - }; - /** - * Converts this Fingerprint to JSON. - * @function toJSON - * @memberof grafeas.v1.Fingerprint - * @instance - * @returns {Object.} JSON object - */ - Fingerprint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * WindowsDetail cpeUri. + * @member {string} cpeUri + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.cpeUri = ""; - return Fingerprint; - })(); + /** + * WindowsDetail name. + * @member {string} name + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.name = ""; - v1.ImageNote = (function() { + /** + * WindowsDetail description. + * @member {string} description + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.description = ""; - /** - * Properties of an ImageNote. - * @memberof grafeas.v1 - * @interface IImageNote - * @property {string|null} [resourceUrl] ImageNote resourceUrl - * @property {grafeas.v1.IFingerprint|null} [fingerprint] ImageNote fingerprint - */ + /** + * WindowsDetail fixingKbs. + * @member {Array.} fixingKbs + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @instance + */ + WindowsDetail.prototype.fixingKbs = $util.emptyArray; - /** - * Constructs a new ImageNote. - * @memberof grafeas.v1 - * @classdesc Represents an ImageNote. - * @implements IImageNote - * @constructor - * @param {grafeas.v1.IImageNote=} [properties] Properties to set - */ - function ImageNote(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 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); + }; - /** - * ImageNote resourceUrl. - * @member {string} resourceUrl - * @memberof grafeas.v1.ImageNote - * @instance - */ - ImageNote.prototype.resourceUrl = ""; + /** + * 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; + }; - /** - * ImageNote fingerprint. - * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint - * @memberof grafeas.v1.ImageNote - * @instance - */ - ImageNote.prototype.fingerprint = null; + /** + * 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(); + }; - /** - * Creates a new ImageNote instance using the specified properties. - * @function create - * @memberof grafeas.v1.ImageNote - * @static - * @param {grafeas.v1.IImageNote=} [properties] Properties to set - * @returns {grafeas.v1.ImageNote} ImageNote instance - */ - ImageNote.create = function create(properties) { - return new ImageNote(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified ImageNote message. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. - * @function encode - * @memberof grafeas.v1.ImageNote - * @static - * @param {grafeas.v1.IImageNote} message ImageNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageNote.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(); - return writer; - }; + /** + * 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; + }; - /** - * Encodes the specified ImageNote message, length delimited. Does not implicitly {@link grafeas.v1.ImageNote.verify|verify} messages. - * @function encodeDelimited - * @memberof grafeas.v1.ImageNote - * @static - * @param {grafeas.v1.IImageNote} message ImageNote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageNote.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes an ImageNote message from the specified reader or buffer. - * @function decode - * @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.ImageNote} ImageNote - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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: - message.resourceUrl = reader.string(); - break; - case 2: - message.fingerprint = $root.grafeas.v1.Fingerprint.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * 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 = ""; } - } - return message; - }; + 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; + }; - /** - * Decodes an ImageNote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof grafeas.v1.ImageNote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ImageNote.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies an ImageNote message. - * @function verify - * @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 - */ - ImageNote.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 (error) - return "fingerprint." + error; - } - return null; - }; + WindowsDetail.KnowledgeBase = (function() { - /** - * Creates an ImageNote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof grafeas.v1.ImageNote - * @static - * @param {Object.} object Plain object - * @returns {grafeas.v1.ImageNote} ImageNote - */ - ImageNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.ImageNote) - 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); - } - return message; - }; + /** + * Properties of a KnowledgeBase. + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail + * @interface IKnowledgeBase + * @property {string|null} [name] KnowledgeBase name + * @property {string|null} [url] KnowledgeBase url + */ - /** - * Creates a plain object from an ImageNote message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.ImageNote - * @static - * @param {grafeas.v1.ImageNote} message ImageNote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImageNote.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceUrl = ""; - object.fingerprint = null; - } - 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; - }; + /** + * 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]]; + } - /** - * 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); - }; + /** + * KnowledgeBase name. + * @member {string} name + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @instance + */ + KnowledgeBase.prototype.name = ""; - return ImageNote; - })(); + /** + * KnowledgeBase url. + * @member {string} url + * @memberof grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + * @instance + */ + KnowledgeBase.prototype.url = ""; - v1.ImageOccurrence = (function() { + /** + * 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); + }; - /** - * 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 - */ + /** + * 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; + }; - /** - * 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]]; - } + /** + * 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(); + }; - /** - * ImageOccurrence fingerprint. - * @member {grafeas.v1.IFingerprint|null|undefined} fingerprint - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.fingerprint = null; + /** + * 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; + }; - /** - * ImageOccurrence distance. - * @member {number} distance - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.distance = 0; + /** + * 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()); + }; - /** - * ImageOccurrence layerInfo. - * @member {Array.} layerInfo - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.layerInfo = $util.emptyArray; + /** + * 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; + }; - /** - * ImageOccurrence baseResourceUrl. - * @member {string} baseResourceUrl - * @memberof grafeas.v1.ImageOccurrence - * @instance - */ - ImageOccurrence.prototype.baseResourceUrl = ""; + /** + * 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 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); - }; + /** + * 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; + }; - /** - * 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; - }; + /** + * 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); + }; - /** - * 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(); - }; + return KnowledgeBase; + })(); + + return WindowsDetail; + })(); + + return VulnerabilityNote; + })(); + + v1.VulnerabilityOccurrence = (function() { /** - * 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 + * 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.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 */ - 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; - }; /** - * 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 + * Constructs a new VulnerabilityOccurrence. + * @memberof grafeas.v1 + * @classdesc Represents a VulnerabilityOccurrence. + * @implements IVulnerabilityOccurrence + * @constructor + * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set */ - ImageOccurrence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + 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]]; + } /** - * 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 + * VulnerabilityOccurrence type. + * @member {string} type + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance */ - 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; - }; + VulnerabilityOccurrence.prototype.type = ""; /** - * 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 + * VulnerabilityOccurrence severity. + * @member {grafeas.v1.Severity} severity + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance */ - 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; - }; + VulnerabilityOccurrence.prototype.severity = 0; /** - * 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 + * VulnerabilityOccurrence cvssScore. + * @member {number} cvssScore + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance */ - 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; - }; + VulnerabilityOccurrence.prototype.cvssScore = 0; /** - * Converts this ImageOccurrence to JSON. - * @function toJSON - * @memberof grafeas.v1.ImageOccurrence + * VulnerabilityOccurrence cvssv3. + * @member {grafeas.v1.ICVSS|null|undefined} cvssv3 + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance - * @returns {Object.} JSON object */ - ImageOccurrence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImageOccurrence; - })(); - - v1.UpgradeNote = (function() { + VulnerabilityOccurrence.prototype.cvssv3 = null; /** - * 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 + * VulnerabilityOccurrence packageIssue. + * @member {Array.} packageIssue + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance */ + VulnerabilityOccurrence.prototype.packageIssue = $util.emptyArray; /** - * Constructs a new UpgradeNote. - * @memberof grafeas.v1 - * @classdesc Represents an UpgradeNote. - * @implements IUpgradeNote - * @constructor - * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set + * VulnerabilityOccurrence shortDescription. + * @member {string} shortDescription + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance */ - 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]]; - } + VulnerabilityOccurrence.prototype.shortDescription = ""; /** - * UpgradeNote package. - * @member {string} package - * @memberof grafeas.v1.UpgradeNote + * VulnerabilityOccurrence longDescription. + * @member {string} longDescription + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - UpgradeNote.prototype["package"] = ""; + VulnerabilityOccurrence.prototype.longDescription = ""; /** - * UpgradeNote version. - * @member {grafeas.v1.IVersion|null|undefined} version - * @memberof grafeas.v1.UpgradeNote + * VulnerabilityOccurrence relatedUrls. + * @member {Array.} relatedUrls + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - UpgradeNote.prototype.version = null; + VulnerabilityOccurrence.prototype.relatedUrls = $util.emptyArray; /** - * UpgradeNote distributions. - * @member {Array.} distributions - * @memberof grafeas.v1.UpgradeNote + * VulnerabilityOccurrence effectiveSeverity. + * @member {grafeas.v1.Severity} effectiveSeverity + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - UpgradeNote.prototype.distributions = $util.emptyArray; + VulnerabilityOccurrence.prototype.effectiveSeverity = 0; /** - * UpgradeNote windowsUpdate. - * @member {grafeas.v1.IWindowsUpdate|null|undefined} windowsUpdate - * @memberof grafeas.v1.UpgradeNote + * VulnerabilityOccurrence fixAvailable. + * @member {boolean} fixAvailable + * @memberof grafeas.v1.VulnerabilityOccurrence * @instance */ - UpgradeNote.prototype.windowsUpdate = null; + VulnerabilityOccurrence.prototype.fixAvailable = false; /** - * Creates a new UpgradeNote instance using the specified properties. + * Creates a new VulnerabilityOccurrence instance using the specified properties. * @function create - * @memberof grafeas.v1.UpgradeNote + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.IUpgradeNote=} [properties] Properties to set - * @returns {grafeas.v1.UpgradeNote} UpgradeNote instance + * @param {grafeas.v1.IVulnerabilityOccurrence=} [properties] Properties to set + * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence instance */ - UpgradeNote.create = function create(properties) { - return new UpgradeNote(properties); + VulnerabilityOccurrence.create = function create(properties) { + return new VulnerabilityOccurrence(properties); }; /** - * Encodes the specified UpgradeNote message. Does not implicitly {@link grafeas.v1.UpgradeNote.verify|verify} messages. + * Encodes the specified VulnerabilityOccurrence message. Does not implicitly {@link grafeas.v1.VulnerabilityOccurrence.verify|verify} messages. * @function encode - * @memberof grafeas.v1.UpgradeNote + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.IUpgradeNote} message UpgradeNote 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 */ - UpgradeNote.encode = function encode(message, writer) { + VulnerabilityOccurrence.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(); + 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 UpgradeNote message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeNote.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.UpgradeNote + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.IUpgradeNote} message UpgradeNote 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 */ - UpgradeNote.encodeDelimited = function encodeDelimited(message, writer) { + VulnerabilityOccurrence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpgradeNote message from the specified reader or buffer. + * Decodes a VulnerabilityOccurrence message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.UpgradeNote + * @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.UpgradeNote} UpgradeNote + * @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 */ - UpgradeNote.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.UpgradeNote(); + 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["package"] = reader.string(); + message.type = reader.string(); break; case 2: - message.version = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + message.severity = reader.int32(); break; case 3: - if (!(message.distributions && message.distributions.length)) - message.distributions = []; - message.distributions.push($root.grafeas.v1.UpgradeDistribution.decode(reader, reader.uint32())); + message.cvssScore = reader.float(); + break; + case 10: + message.cvssv3 = $root.grafeas.v1.CVSS.decode(reader, reader.uint32()); break; case 4: - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.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: + 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(); break; default: reader.skipType(tag & 7); @@ -24596,164 +24489,704 @@ }; /** - * Decodes an UpgradeNote 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.UpgradeNote + * @memberof grafeas.v1.VulnerabilityOccurrence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpgradeNote} UpgradeNote + * @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 */ - UpgradeNote.decodeDelimited = function decodeDelimited(reader) { + VulnerabilityOccurrence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpgradeNote message. + * Verifies a VulnerabilityOccurrence message. * @function verify - * @memberof grafeas.v1.UpgradeNote + * @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 */ - UpgradeNote.verify = function verify(message) { + VulnerabilityOccurrence.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 (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 "version." + error; + return "cvssv3." + 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 (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 "distributions." + error; + return "packageIssue." + error; } } - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { - var error = $root.grafeas.v1.WindowsUpdate.verify(message.windowsUpdate); - if (error) - return "windowsUpdate." + 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.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 an UpgradeNote 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. * @function fromObject - * @memberof grafeas.v1.UpgradeNote + * @memberof grafeas.v1.VulnerabilityOccurrence * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.UpgradeNote} UpgradeNote + * @returns {grafeas.v1.VulnerabilityOccurrence} VulnerabilityOccurrence */ - UpgradeNote.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpgradeNote) + VulnerabilityOccurrence.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.VulnerabilityOccurrence) 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); + 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.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.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.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.windowsUpdate != null) { - if (typeof object.windowsUpdate !== "object") - throw TypeError(".grafeas.v1.UpgradeNote.windowsUpdate: object expected"); - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.fromObject(object.windowsUpdate); + 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; } + if (object.fixAvailable != null) + message.fixAvailable = Boolean(object.fixAvailable); return message; }; /** - * Creates a plain object from an UpgradeNote 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.UpgradeNote + * @memberof grafeas.v1.VulnerabilityOccurrence * @static - * @param {grafeas.v1.UpgradeNote} message UpgradeNote + * @param {grafeas.v1.VulnerabilityOccurrence} message VulnerabilityOccurrence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpgradeNote.toObject = function toObject(message, options) { + VulnerabilityOccurrence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.distributions = []; + if (options.arrays || options.defaults) { + object.packageIssue = []; + object.relatedUrls = []; + } if (options.defaults) { - object["package"] = ""; - object.version = null; - object.windowsUpdate = 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["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.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.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) - object.windowsUpdate = $root.grafeas.v1.WindowsUpdate.toObject(message.windowsUpdate, 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 (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 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); - }; + /** + * Converts this VulnerabilityOccurrence to JSON. + * @function toJSON + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance + * @returns {Object.} JSON object + */ + VulnerabilityOccurrence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + VulnerabilityOccurrence.PackageIssue = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * 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 = ""; + + /** + * PackageIssue fixedVersion. + * @member {grafeas.v1.IVersion|null|undefined} fixedVersion + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance + */ + PackageIssue.prototype.fixedVersion = null; + + /** + * PackageIssue fixAvailable. + * @member {boolean} fixAvailable + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance + */ + PackageIssue.prototype.fixAvailable = false; + + /** + * PackageIssue packageType. + * @member {string} packageType + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance + */ + PackageIssue.prototype.packageType = ""; + + /** + * PackageIssue effectiveSeverity. + * @member {grafeas.v1.Severity} effectiveSeverity + * @memberof grafeas.v1.VulnerabilityOccurrence.PackageIssue + * @instance + */ + PackageIssue.prototype.effectiveSeverity = 0; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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; + }; + + /** + * 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()); + }; + + /** + * 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; + } + 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; + }; + + /** + * 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.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; + } + return message; + }; + + /** + * 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; + }; + + /** + * 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); + }; - return UpgradeNote; + return PackageIssue; + })(); + + return VulnerabilityOccurrence; })(); - v1.UpgradeDistribution = (function() { + v1.CVSSv3 = (function() { /** - * Properties of an UpgradeDistribution. + * Properties of a CVSSv3. * @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 + * @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 UpgradeDistribution. + * Constructs a new CVSSv3. * @memberof grafeas.v1 - * @classdesc Represents an UpgradeDistribution. - * @implements IUpgradeDistribution + * @classdesc Represents a CVSSv3. + * @implements ICVSSv3 * @constructor - * @param {grafeas.v1.IUpgradeDistribution=} [properties] Properties to set + * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set */ - function UpgradeDistribution(properties) { - this.cve = []; + function CVSSv3(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24761,434 +25194,205 @@ } /** - * UpgradeDistribution cpeUri. - * @member {string} cpeUri - * @memberof grafeas.v1.UpgradeDistribution - * @instance - */ - UpgradeDistribution.prototype.cpeUri = ""; - - /** - * UpgradeDistribution classification. - * @member {string} classification - * @memberof grafeas.v1.UpgradeDistribution + * CVSSv3 baseScore. + * @member {number} baseScore + * @memberof grafeas.v1.CVSSv3 * @instance */ - UpgradeDistribution.prototype.classification = ""; + CVSSv3.prototype.baseScore = 0; /** - * UpgradeDistribution severity. - * @member {string} severity - * @memberof grafeas.v1.UpgradeDistribution + * CVSSv3 exploitabilityScore. + * @member {number} exploitabilityScore + * @memberof grafeas.v1.CVSSv3 * @instance */ - UpgradeDistribution.prototype.severity = ""; + CVSSv3.prototype.exploitabilityScore = 0; /** - * UpgradeDistribution cve. - * @member {Array.} cve - * @memberof grafeas.v1.UpgradeDistribution + * CVSSv3 impactScore. + * @member {number} impactScore + * @memberof grafeas.v1.CVSSv3 * @instance */ - UpgradeDistribution.prototype.cve = $util.emptyArray; - - /** - * 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); - }; - - /** - * 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 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(); - }; - - /** - * 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 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()); - }; - - /** - * 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 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 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; - }; + CVSSv3.prototype.impactScore = 0; /** - * Converts this UpgradeDistribution to JSON. - * @function toJSON - * @memberof grafeas.v1.UpgradeDistribution + * CVSSv3 attackVector. + * @member {grafeas.v1.CVSSv3.AttackVector} attackVector + * @memberof grafeas.v1.CVSSv3 * @instance - * @returns {Object.} JSON object - */ - UpgradeDistribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpgradeDistribution; - })(); - - v1.WindowsUpdate = (function() { - - /** - * Properties of a WindowsUpdate. - * @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 */ + CVSSv3.prototype.attackVector = 0; /** - * Constructs a new WindowsUpdate. - * @memberof grafeas.v1 - * @classdesc Represents a WindowsUpdate. - * @implements IWindowsUpdate - * @constructor - * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set - */ - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WindowsUpdate identity. - * @member {grafeas.v1.WindowsUpdate.IIdentity|null|undefined} identity - * @memberof grafeas.v1.WindowsUpdate + * CVSSv3 attackComplexity. + * @member {grafeas.v1.CVSSv3.AttackComplexity} attackComplexity + * @memberof grafeas.v1.CVSSv3 * @instance */ - WindowsUpdate.prototype.identity = null; + CVSSv3.prototype.attackComplexity = 0; /** - * WindowsUpdate title. - * @member {string} title - * @memberof grafeas.v1.WindowsUpdate + * CVSSv3 privilegesRequired. + * @member {grafeas.v1.CVSSv3.PrivilegesRequired} privilegesRequired + * @memberof grafeas.v1.CVSSv3 * @instance */ - WindowsUpdate.prototype.title = ""; + CVSSv3.prototype.privilegesRequired = 0; /** - * WindowsUpdate description. - * @member {string} description - * @memberof grafeas.v1.WindowsUpdate + * CVSSv3 userInteraction. + * @member {grafeas.v1.CVSSv3.UserInteraction} userInteraction + * @memberof grafeas.v1.CVSSv3 * @instance */ - WindowsUpdate.prototype.description = ""; + CVSSv3.prototype.userInteraction = 0; /** - * WindowsUpdate categories. - * @member {Array.} categories - * @memberof grafeas.v1.WindowsUpdate + * CVSSv3 scope. + * @member {grafeas.v1.CVSSv3.Scope} scope + * @memberof grafeas.v1.CVSSv3 * @instance */ - WindowsUpdate.prototype.categories = $util.emptyArray; + CVSSv3.prototype.scope = 0; /** - * WindowsUpdate kbArticleIds. - * @member {Array.} kbArticleIds - * @memberof grafeas.v1.WindowsUpdate + * CVSSv3 confidentialityImpact. + * @member {grafeas.v1.CVSSv3.Impact} confidentialityImpact + * @memberof grafeas.v1.CVSSv3 * @instance */ - WindowsUpdate.prototype.kbArticleIds = $util.emptyArray; + CVSSv3.prototype.confidentialityImpact = 0; /** - * WindowsUpdate supportUrl. - * @member {string} supportUrl - * @memberof grafeas.v1.WindowsUpdate + * CVSSv3 integrityImpact. + * @member {grafeas.v1.CVSSv3.Impact} integrityImpact + * @memberof grafeas.v1.CVSSv3 * @instance */ - WindowsUpdate.prototype.supportUrl = ""; + CVSSv3.prototype.integrityImpact = 0; /** - * WindowsUpdate lastPublishedTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastPublishedTimestamp - * @memberof grafeas.v1.WindowsUpdate + * CVSSv3 availabilityImpact. + * @member {grafeas.v1.CVSSv3.Impact} availabilityImpact + * @memberof grafeas.v1.CVSSv3 * @instance */ - WindowsUpdate.prototype.lastPublishedTimestamp = null; + CVSSv3.prototype.availabilityImpact = 0; /** - * Creates a new WindowsUpdate instance using the specified properties. + * Creates a new CVSSv3 instance using the specified properties. * @function create - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.CVSSv3 * @static - * @param {grafeas.v1.IWindowsUpdate=} [properties] Properties to set - * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate instance + * @param {grafeas.v1.ICVSSv3=} [properties] Properties to set + * @returns {grafeas.v1.CVSSv3} CVSSv3 instance */ - WindowsUpdate.create = function create(properties) { - return new WindowsUpdate(properties); + CVSSv3.create = function create(properties) { + return new CVSSv3(properties); }; /** - * Encodes the specified WindowsUpdate message. Does not implicitly {@link grafeas.v1.WindowsUpdate.verify|verify} messages. + * Encodes the specified CVSSv3 message. Does not implicitly {@link grafeas.v1.CVSSv3.verify|verify} messages. * @function encode - * @memberof grafeas.v1.WindowsUpdate + * @memberof grafeas.v1.CVSSv3 * @static - * @param {grafeas.v1.IWindowsUpdate} message WindowsUpdate 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 */ - WindowsUpdate.encode = function encode(message, writer) { + CVSSv3.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.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 WindowsUpdate message, length delimited. Does not implicitly {@link grafeas.v1.WindowsUpdate.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.WindowsUpdate + * @memberof grafeas.v1.CVSSv3 * @static - * @param {grafeas.v1.IWindowsUpdate} message WindowsUpdate 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 */ - WindowsUpdate.encodeDelimited = function encodeDelimited(message, writer) { + CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WindowsUpdate message from the specified reader or buffer. + * Decodes a CVSSv3 message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.WindowsUpdate + * @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.WindowsUpdate} WindowsUpdate + * @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 */ - WindowsUpdate.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.WindowsUpdate(); + 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.identity = $root.grafeas.v1.WindowsUpdate.Identity.decode(reader, reader.uint32()); + message.baseScore = reader.float(); break; case 2: - message.title = reader.string(); + message.exploitabilityScore = reader.float(); 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())); + message.impactScore = reader.float(); break; case 5: - if (!(message.kbArticleIds && message.kbArticleIds.length)) - message.kbArticleIds = []; - message.kbArticleIds.push(reader.string()); + 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 6: - message.supportUrl = reader.string(); + case 10: + message.confidentialityImpact = reader.int32(); break; - case 7: - message.lastPublishedTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 11: + message.integrityImpact = reader.int32(); + break; + case 12: + message.availabilityImpact = reader.int32(); break; default: reader.skipType(tag & 7); @@ -25199,620 +25403,477 @@ }; /** - * Decodes a WindowsUpdate 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.WindowsUpdate + * @memberof grafeas.v1.CVSSv3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate + * @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 */ - WindowsUpdate.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 WindowsUpdate message. + * Verifies a CVSSv3 message. * @function verify - * @memberof grafeas.v1.WindowsUpdate + * @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 */ - WindowsUpdate.verify = function verify(message) { + CVSSv3.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 (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 "categories." + error; + 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: + 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.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 WindowsUpdate 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.WindowsUpdate + * @memberof grafeas.v1.CVSSv3 * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.WindowsUpdate} WindowsUpdate + * @returns {grafeas.v1.CVSSv3} CVSSv3 */ - WindowsUpdate.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.WindowsUpdate) + CVSSv3.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CVSSv3) 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.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 WindowsUpdate message. Also converts values to other types if specified. - * @function toObject - * @memberof grafeas.v1.WindowsUpdate - * @static - * @param {grafeas.v1.WindowsUpdate} message WindowsUpdate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsUpdate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 WindowsUpdate to JSON. - * @function toJSON - * @memberof grafeas.v1.WindowsUpdate - * @instance - * @returns {Object.} JSON object - */ - WindowsUpdate.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]]; + 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; } - - /** - * 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); - }; - - return Identity; - })(); - - WindowsUpdate.Category = (function() { - - /** - * Properties of a Category. - * @memberof grafeas.v1.WindowsUpdate - * @interface ICategory - * @property {string|null} [categoryId] Category categoryId - * @property {string|null} [name] Category name - */ - - /** - * 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]]; + 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; + }; - /** - * Category categoryId. - * @member {string} categoryId - * @memberof grafeas.v1.WindowsUpdate.Category - * @instance - */ - Category.prototype.categoryId = ""; - - /** - * Category name. - * @member {string} name - * @memberof grafeas.v1.WindowsUpdate.Category - * @instance - */ - Category.prototype.name = ""; - - /** - * 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 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; - }; - - /** - * 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(); - }; + /** + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. + * @function toObject + * @memberof grafeas.v1.CVSSv3 + * @static + * @param {grafeas.v1.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.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.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; + }; - /** - * 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; - }; + /** + * Converts this CVSSv3 to JSON. + * @function toJSON + * @memberof grafeas.v1.CVSSv3 + * @instance + * @returns {Object.} JSON object + */ + CVSSv3.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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()); - }; + /** + * 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; + })(); - /** - * 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; - }; + /** + * 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; + })(); - /** - * 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; - }; + /** + * 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; + })(); - /** - * 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; - }; + /** + * 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; + })(); - /** - * 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); - }; + /** + * 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; + })(); - return Category; + /** + * 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 WindowsUpdate; + return CVSSv3; })(); - v1.UpgradeOccurrence = (function() { + v1.CVSS = (function() { /** - * Properties of an UpgradeOccurrence. + * Properties of a CVSS. * @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. + * @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 an UpgradeOccurrence. - * @implements IUpgradeOccurrence + * @classdesc Represents a CVSS. + * @implements ICVSS * @constructor - * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set + * @param {grafeas.v1.ICVSS=} [properties] Properties to set */ - function UpgradeOccurrence(properties) { + function CVSS(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25820,114 +25881,218 @@ } /** - * UpgradeOccurrence package. - * @member {string} package - * @memberof grafeas.v1.UpgradeOccurrence + * CVSS baseScore. + * @member {number} baseScore + * @memberof grafeas.v1.CVSS * @instance */ - UpgradeOccurrence.prototype["package"] = ""; + CVSS.prototype.baseScore = 0; /** - * UpgradeOccurrence parsedVersion. - * @member {grafeas.v1.IVersion|null|undefined} parsedVersion - * @memberof grafeas.v1.UpgradeOccurrence + * CVSS exploitabilityScore. + * @member {number} exploitabilityScore + * @memberof grafeas.v1.CVSS * @instance */ - UpgradeOccurrence.prototype.parsedVersion = null; + CVSS.prototype.exploitabilityScore = 0; /** - * UpgradeOccurrence distribution. - * @member {grafeas.v1.IUpgradeDistribution|null|undefined} distribution - * @memberof grafeas.v1.UpgradeOccurrence + * CVSS impactScore. + * @member {number} impactScore + * @memberof grafeas.v1.CVSS * @instance */ - UpgradeOccurrence.prototype.distribution = null; + CVSS.prototype.impactScore = 0; /** - * UpgradeOccurrence windowsUpdate. - * @member {grafeas.v1.IWindowsUpdate|null|undefined} windowsUpdate - * @memberof grafeas.v1.UpgradeOccurrence + * CVSS attackVector. + * @member {grafeas.v1.CVSS.AttackVector} attackVector + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.attackVector = 0; + + /** + * CVSS attackComplexity. + * @member {grafeas.v1.CVSS.AttackComplexity} attackComplexity + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.attackComplexity = 0; + + /** + * CVSS authentication. + * @member {grafeas.v1.CVSS.Authentication} authentication + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.authentication = 0; + + /** + * CVSS privilegesRequired. + * @member {grafeas.v1.CVSS.PrivilegesRequired} privilegesRequired + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.privilegesRequired = 0; + + /** + * CVSS userInteraction. + * @member {grafeas.v1.CVSS.UserInteraction} userInteraction + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.userInteraction = 0; + + /** + * CVSS scope. + * @member {grafeas.v1.CVSS.Scope} scope + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.scope = 0; + + /** + * CVSS confidentialityImpact. + * @member {grafeas.v1.CVSS.Impact} confidentialityImpact + * @memberof grafeas.v1.CVSS + * @instance + */ + CVSS.prototype.confidentialityImpact = 0; + + /** + * 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 */ - UpgradeOccurrence.prototype.windowsUpdate = null; + CVSS.prototype.availabilityImpact = 0; /** - * Creates a new UpgradeOccurrence instance using the specified properties. + * Creates a new CVSS instance using the specified properties. * @function create - * @memberof grafeas.v1.UpgradeOccurrence + * @memberof grafeas.v1.CVSS * @static - * @param {grafeas.v1.IUpgradeOccurrence=} [properties] Properties to set - * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence instance + * @param {grafeas.v1.ICVSS=} [properties] Properties to set + * @returns {grafeas.v1.CVSS} CVSS instance */ - UpgradeOccurrence.create = function create(properties) { - return new UpgradeOccurrence(properties); + CVSS.create = function create(properties) { + return new CVSS(properties); }; /** - * Encodes the specified UpgradeOccurrence message. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. + * Encodes the specified CVSS message. Does not implicitly {@link grafeas.v1.CVSS.verify|verify} messages. * @function encode - * @memberof grafeas.v1.UpgradeOccurrence + * @memberof grafeas.v1.CVSS * @static - * @param {grafeas.v1.IUpgradeOccurrence} message UpgradeOccurrence message or plain object to encode + * @param {grafeas.v1.ICVSS} message CVSS message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpgradeOccurrence.encode = function encode(message, writer) { + CVSS.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(); + 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 UpgradeOccurrence message, length delimited. Does not implicitly {@link grafeas.v1.UpgradeOccurrence.verify|verify} messages. + * Encodes the specified CVSS message, length delimited. Does not implicitly {@link grafeas.v1.CVSS.verify|verify} messages. * @function encodeDelimited - * @memberof grafeas.v1.UpgradeOccurrence + * @memberof grafeas.v1.CVSS * @static - * @param {grafeas.v1.IUpgradeOccurrence} message UpgradeOccurrence message or plain object to encode + * @param {grafeas.v1.ICVSS} message CVSS message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpgradeOccurrence.encodeDelimited = function encodeDelimited(message, writer) { + CVSS.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpgradeOccurrence message from the specified reader or buffer. + * Decodes a CVSS message from the specified reader or buffer. * @function decode - * @memberof grafeas.v1.UpgradeOccurrence + * @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.UpgradeOccurrence} UpgradeOccurrence + * @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 */ - UpgradeOccurrence.decode = function decode(reader, length) { + 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.UpgradeOccurrence(); + 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["package"] = reader.string(); + message.baseScore = reader.float(); + break; + case 2: + message.exploitabilityScore = reader.float(); break; case 3: - message.parsedVersion = $root.grafeas.v1.Version.decode(reader, reader.uint32()); + message.impactScore = reader.float(); break; case 4: - message.distribution = $root.grafeas.v1.UpgradeDistribution.decode(reader, reader.uint32()); + message.attackVector = reader.int32(); break; case 5: - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.decode(reader, reader.uint32()); + 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); @@ -25938,127 +26103,495 @@ }; /** - * Decodes an UpgradeOccurrence message from the specified reader or buffer, length delimited. + * Decodes a CVSS message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof grafeas.v1.UpgradeOccurrence + * @memberof grafeas.v1.CVSS * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence + * @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 */ - UpgradeOccurrence.decodeDelimited = function decodeDelimited(reader) { + CVSS.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpgradeOccurrence message. + * Verifies a CVSS message. * @function verify - * @memberof grafeas.v1.UpgradeOccurrence + * @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 */ - UpgradeOccurrence.verify = function verify(message) { + CVSS.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; - } + 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.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.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; + } return null; }; /** - * Creates an UpgradeOccurrence 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. * @function fromObject - * @memberof grafeas.v1.UpgradeOccurrence + * @memberof grafeas.v1.CVSS * @static * @param {Object.} object Plain object - * @returns {grafeas.v1.UpgradeOccurrence} UpgradeOccurrence + * @returns {grafeas.v1.CVSS} CVSS */ - UpgradeOccurrence.fromObject = function fromObject(object) { - if (object instanceof $root.grafeas.v1.UpgradeOccurrence) + CVSS.fromObject = function fromObject(object) { + if (object instanceof $root.grafeas.v1.CVSS) 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); + 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; } - 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); + 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.windowsUpdate != null) { - if (typeof object.windowsUpdate !== "object") - throw TypeError(".grafeas.v1.UpgradeOccurrence.windowsUpdate: object expected"); - message.windowsUpdate = $root.grafeas.v1.WindowsUpdate.fromObject(object.windowsUpdate); + 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; }; /** - * Creates a plain object from an UpgradeOccurrence message. Also converts values to other types if specified. + * Creates a plain object from a CVSS message. Also converts values to other types if specified. * @function toObject - * @memberof grafeas.v1.UpgradeOccurrence + * @memberof grafeas.v1.CVSS * @static - * @param {grafeas.v1.UpgradeOccurrence} message UpgradeOccurrence + * @param {grafeas.v1.CVSS} message CVSS * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpgradeOccurrence.toObject = function toObject(message, options) { + CVSS.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object["package"] = ""; - object.parsedVersion = null; - object.distribution = null; - object.windowsUpdate = null; + 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["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); + 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; }; /** - * Converts this UpgradeOccurrence to JSON. + * Converts this CVSS to JSON. * @function toJSON - * @memberof grafeas.v1.UpgradeOccurrence + * @memberof grafeas.v1.CVSS * @instance * @returns {Object.} JSON object */ - UpgradeOccurrence.prototype.toJSON = function toJSON() { + CVSS.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpgradeOccurrence; + /** + * 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 + */ + 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; + })(); + + /** + * 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 + */ + 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; + })(); + + /** + * 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 + */ + 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; + })(); + + /** + * 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 + */ + 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; + })(); + + /** + * 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 + */ + 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; + })(); + + /** + * 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 + */ + 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; + })(); + + /** + * 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 + */ + 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; })(); return v1; @@ -59691,225 +60224,6 @@ return Timestamp; })(); - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(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]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.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.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Any; - })(); - protobuf.Empty = (function() { /** @@ -60273,6 +60587,225 @@ return FieldMask; })(); + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.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.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + return protobuf; })(); diff --git a/packages/google-devtools-containeranalysis/protos/protos.json b/packages/google-devtools-containeranalysis/protos/protos.json index a8ed8d4a743..cef3d0a50c2 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.json +++ b/packages/google-devtools-containeranalysis/protos/protos.json @@ -8,251 +8,11 @@ "java_multiple_files": true, "java_package": "io.grafeas.v1", "objc_class_prefix": "GRA", - "java_outer_classname": "InTotoStatementProto", "(google.api.resource_definition).type": "grafeas.io/Project", - "(google.api.resource_definition).pattern": "projects/{project}" + "(google.api.resource_definition).pattern": "projects/{project}", + "java_outer_classname": "InTotoStatementProto" }, "nested": { - "Severity": { - "values": { - "SEVERITY_UNSPECIFIED": 0, - "MINIMAL": 1, - "LOW": 2, - "MEDIUM": 3, - "HIGH": 4, - "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" - } - } - } - } - } - }, "NoteKind": { "values": { "NOTE_KIND_UNSPECIFIED": 0, @@ -321,2044 +81,2387 @@ } } }, - "CVSSv3": { - "fields": { - "baseScore": { - "type": "float", - "id": 1 - }, - "exploitabilityScore": { - "type": "float", - "id": 2 - }, - "impactScore": { - "type": "float", - "id": 3 - }, - "attackVector": { - "type": "AttackVector", - "id": 5 - }, - "attackComplexity": { - "type": "AttackComplexity", - "id": 6 + "Grafeas": { + "options": { + "(google.api.default_host)": "containeranalysis.googleapis.com" + }, + "methods": { + "GetOccurrence": { + "requestType": "GetOccurrenceRequest", + "responseType": "Occurrence", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/occurrences/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/occurrences/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "privilegesRequired": { - "type": "PrivilegesRequired", - "id": 7 + "ListOccurrences": { + "requestType": "ListOccurrencesRequest", + "responseType": "ListOccurrencesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/occurrences", + "(google.api.method_signature)": "parent,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/occurrences" + } + }, + { + "(google.api.method_signature)": "parent,filter" + } + ] }, - "userInteraction": { - "type": "UserInteraction", - "id": 8 + "DeleteOccurrence": { + "requestType": "DeleteOccurrenceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/occurrences/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/occurrences/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "scope": { - "type": "Scope", - "id": 9 + "CreateOccurrence": { + "requestType": "CreateOccurrenceRequest", + "responseType": "Occurrence", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/occurrences", + "(google.api.http).body": "occurrence", + "(google.api.method_signature)": "parent,occurrence" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/occurrences", + "body": "occurrence" + } + }, + { + "(google.api.method_signature)": "parent,occurrence" + } + ] }, - "confidentialityImpact": { - "type": "Impact", - "id": 10 + "BatchCreateOccurrences": { + "requestType": "BatchCreateOccurrencesRequest", + "responseType": "BatchCreateOccurrencesResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/occurrences:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,occurrences" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/occurrences:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,occurrences" + } + ] }, - "integrityImpact": { - "type": "Impact", - "id": 11 + "UpdateOccurrence": { + "requestType": "UpdateOccurrenceRequest", + "responseType": "Occurrence", + "options": { + "(google.api.http).patch": "/v1/{name=projects/*/occurrences/*}", + "(google.api.http).body": "occurrence", + "(google.api.method_signature)": "name,occurrence,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/occurrences/*}", + "body": "occurrence" + } + }, + { + "(google.api.method_signature)": "name,occurrence,update_mask" + } + ] }, - "availabilityImpact": { - "type": "Impact", - "id": 12 - } - }, - "nested": { - "AttackVector": { - "values": { - "ATTACK_VECTOR_UNSPECIFIED": 0, - "ATTACK_VECTOR_NETWORK": 1, - "ATTACK_VECTOR_ADJACENT": 2, - "ATTACK_VECTOR_LOCAL": 3, - "ATTACK_VECTOR_PHYSICAL": 4 - } + "GetOccurrenceNote": { + "requestType": "GetOccurrenceNoteRequest", + "responseType": "Note", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/occurrences/*}/notes", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/occurrences/*}/notes" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "AttackComplexity": { - "values": { - "ATTACK_COMPLEXITY_UNSPECIFIED": 0, - "ATTACK_COMPLEXITY_LOW": 1, - "ATTACK_COMPLEXITY_HIGH": 2 - } + "GetNote": { + "requestType": "GetNoteRequest", + "responseType": "Note", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/notes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/notes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "PrivilegesRequired": { - "values": { - "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, - "PRIVILEGES_REQUIRED_NONE": 1, - "PRIVILEGES_REQUIRED_LOW": 2, - "PRIVILEGES_REQUIRED_HIGH": 3 - } + "ListNotes": { + "requestType": "ListNotesRequest", + "responseType": "ListNotesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/notes", + "(google.api.method_signature)": "parent,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/notes" + } + }, + { + "(google.api.method_signature)": "parent,filter" + } + ] }, - "UserInteraction": { - "values": { - "USER_INTERACTION_UNSPECIFIED": 0, - "USER_INTERACTION_NONE": 1, - "USER_INTERACTION_REQUIRED": 2 - } + "DeleteNote": { + "requestType": "DeleteNoteRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/notes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/notes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "Scope": { - "values": { - "SCOPE_UNSPECIFIED": 0, - "SCOPE_UNCHANGED": 1, - "SCOPE_CHANGED": 2 - } + "CreateNote": { + "requestType": "CreateNoteRequest", + "responseType": "Note", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/notes", + "(google.api.http).body": "note", + "(google.api.method_signature)": "parent,note_id,note" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/notes", + "body": "note" + } + }, + { + "(google.api.method_signature)": "parent,note_id,note" + } + ] }, - "Impact": { - "values": { - "IMPACT_UNSPECIFIED": 0, - "IMPACT_HIGH": 1, - "IMPACT_LOW": 2, - "IMPACT_NONE": 3 - } + "BatchCreateNotes": { + "requestType": "BatchCreateNotesRequest", + "responseType": "BatchCreateNotesResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/notes:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,notes" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/notes:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,notes" + } + ] + }, + "UpdateNote": { + "requestType": "UpdateNoteRequest", + "responseType": "Note", + "options": { + "(google.api.http).patch": "/v1/{name=projects/*/notes/*}", + "(google.api.http).body": "note", + "(google.api.method_signature)": "name,note,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/notes/*}", + "body": "note" + } + }, + { + "(google.api.method_signature)": "name,note,update_mask" + } + ] + }, + "ListNoteOccurrences": { + "requestType": "ListNoteOccurrencesRequest", + "responseType": "ListNoteOccurrencesResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/notes/*}/occurrences", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/notes/*}/occurrences" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] } } }, - "Architecture": { - "values": { - "ARCHITECTURE_UNSPECIFIED": 0, - "X86": 1, - "X64": 2 - } - }, - "Distribution": { + "Occurrence": { + "options": { + "(google.api.resource).type": "grafeas.io/Occurrence", + "(google.api.resource).pattern": "projects/{project}/occurrences/{occurrence}" + }, + "oneofs": { + "details": { + "oneof": [ + "vulnerability", + "build", + "image", + "package", + "deployment", + "discovery", + "attestation", + "upgrade", + "compliance", + "dsseAttestation" + ] + } + }, "fields": { - "cpeUri": { + "name": { "type": "string", "id": 1 }, - "architecture": { - "type": "Architecture", + "resourceUri": { + "type": "string", "id": 2 }, - "latestVersion": { - "type": "Version", + "noteName": { + "type": "string", "id": 3 }, - "maintainer": { - "type": "string", + "kind": { + "type": "grafeas.v1.NoteKind", "id": 4 }, - "url": { + "remediation": { "type": "string", "id": 5 }, - "description": { - "type": "string", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 6 - } - } - }, - "Location": { - "fields": { - "cpeUri": { - "type": "string", - "id": 1 }, - "version": { - "type": "Version", - "id": 2 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7 }, - "path": { - "type": "string", - "id": 3 + "vulnerability": { + "type": "grafeas.v1.VulnerabilityOccurrence", + "id": 8 + }, + "build": { + "type": "grafeas.v1.BuildOccurrence", + "id": 9 + }, + "image": { + "type": "grafeas.v1.ImageOccurrence", + "id": 10 + }, + "package": { + "type": "grafeas.v1.PackageOccurrence", + "id": 11 + }, + "deployment": { + "type": "grafeas.v1.DeploymentOccurrence", + "id": 12 + }, + "discovery": { + "type": "grafeas.v1.DiscoveryOccurrence", + "id": 13 + }, + "attestation": { + "type": "grafeas.v1.AttestationOccurrence", + "id": 14 + }, + "upgrade": { + "type": "grafeas.v1.UpgradeOccurrence", + "id": 15 + }, + "compliance": { + "type": "grafeas.v1.ComplianceOccurrence", + "id": 16 + }, + "dsseAttestation": { + "type": "grafeas.v1.DSSEAttestationOccurrence", + "id": 17 + }, + "envelope": { + "type": "grafeas.v1.Envelope", + "id": 18 } } }, - "PackageNote": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "distribution": { - "rule": "repeated", - "type": "Distribution", - "id": 10 + "Note": { + "options": { + "(google.api.resource).type": "grafeas.io/Note", + "(google.api.resource).pattern": "projects/{project}/notes/{note}" + }, + "oneofs": { + "type": { + "oneof": [ + "vulnerability", + "build", + "image", + "package", + "deployment", + "discovery", + "attestation", + "upgrade", + "compliance", + "dsseAttestation" + ] } - } - }, - "PackageOccurrence": { + }, "fields": { "name": { "type": "string", "id": 1 }, - "location": { - "rule": "repeated", - "type": "Location", - "id": 2 - } - } - }, - "Version": { - "fields": { - "epoch": { - "type": "int32", - "id": 1 - }, - "name": { + "shortDescription": { "type": "string", "id": 2 }, - "revision": { + "longDescription": { "type": "string", "id": 3 }, - "inclusive": { - "type": "bool", - "id": 6 - }, "kind": { - "type": "VersionKind", + "type": "grafeas.v1.NoteKind", "id": 4 }, - "fullName": { - "type": "string", + "relatedUrl": { + "rule": "repeated", + "type": "grafeas.v1.RelatedUrl", "id": 5 - } - }, - "nested": { - "VersionKind": { - "values": { - "VERSION_KIND_UNSPECIFIED": 0, - "NORMAL": 1, - "MINIMUM": 2, - "MAXIMUM": 3 - } + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "relatedNoteNames": { + "rule": "repeated", + "type": "string", + "id": 9 + }, + "vulnerability": { + "type": "grafeas.v1.VulnerabilityNote", + "id": 10 + }, + "build": { + "type": "grafeas.v1.BuildNote", + "id": 11 + }, + "image": { + "type": "grafeas.v1.ImageNote", + "id": 12 + }, + "package": { + "type": "grafeas.v1.PackageNote", + "id": 13 + }, + "deployment": { + "type": "grafeas.v1.DeploymentNote", + "id": 14 + }, + "discovery": { + "type": "grafeas.v1.DiscoveryNote", + "id": 15 + }, + "attestation": { + "type": "grafeas.v1.AttestationNote", + "id": 16 + }, + "upgrade": { + "type": "grafeas.v1.UpgradeNote", + "id": 17 + }, + "compliance": { + "type": "grafeas.v1.ComplianceNote", + "id": 18 + }, + "dsseAttestation": { + "type": "grafeas.v1.DSSEAttestationNote", + "id": 19 } } }, - "AttestationNote": { + "GetOccurrenceRequest": { "fields": { - "hint": { - "type": "Hint", - "id": 1 - } - }, - "nested": { - "Hint": { - "fields": { - "humanReadableName": { - "type": "string", - "id": 1 - } + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Occurrence" } } } }, - "Jwt": { + "ListOccurrencesRequest": { "fields": { - "compactJwt": { + "parent": { "type": "string", - "id": 1 - } - } - }, - "AttestationOccurrence": { - "fields": { - "serializedPayload": { - "type": "bytes", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Project" + } }, - "signatures": { - "rule": "repeated", - "type": "Signature", + "filter": { + "type": "string", "id": 2 }, - "jwts": { - "rule": "repeated", - "type": "Jwt", + "pageSize": { + "type": "int32", "id": 3 - } - } - }, - "BuildNote": { - "fields": { - "builderVersion": { + }, + "pageToken": { "type": "string", - "id": 1 + "id": 4 } } }, - "BuildOccurrence": { + "ListOccurrencesResponse": { "fields": { - "provenance": { - "type": "grafeas.v1.BuildProvenance", + "occurrences": { + "rule": "repeated", + "type": "Occurrence", "id": 1 }, - "provenanceBytes": { + "nextPageToken": { "type": "string", "id": 2 - }, - "intotoProvenance": { - "type": "InTotoProvenance", - "id": 3 - }, - "intotoStatement": { - "type": "InTotoStatement", - "id": 4 } } }, - "Recipe": { + "DeleteOccurrenceRequest": { "fields": { - "type": { - "type": "string", - "id": 1 - }, - "definedInMaterial": { - "type": "int64", - "id": 2 - }, - "entryPoint": { + "name": { "type": "string", - "id": 3 - }, - "arguments": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 4 - }, - "environment": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 5 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Occurrence" + } } } }, - "Completeness": { + "CreateOccurrenceRequest": { "fields": { - "arguments": { - "type": "bool", - "id": 1 - }, - "environment": { - "type": "bool", - "id": 2 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Project" + } }, - "materials": { - "type": "bool", - "id": 3 + "occurrence": { + "type": "Occurrence", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "Metadata": { + "UpdateOccurrenceRequest": { "fields": { - "buildInvocationId": { + "name": { "type": "string", - "id": 1 - }, - "buildStartedOn": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "buildFinishedOn": { - "type": "google.protobuf.Timestamp", - "id": 3 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Occurrence" + } }, - "completeness": { - "type": "Completeness", - "id": 4 + "occurrence": { + "type": "Occurrence", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "reproducible": { - "type": "bool", - "id": 5 + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 } } }, - "BuilderConfig": { + "GetNoteRequest": { "fields": { - "id": { + "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Note" + } } } }, - "InTotoProvenance": { + "GetOccurrenceNoteRequest": { "fields": { - "builderConfig": { - "type": "BuilderConfig", - "id": 1 - }, - "recipe": { - "type": "Recipe", - "id": 2 - }, - "metadata": { - "type": "Metadata", - "id": 3 - }, - "materials": { - "rule": "repeated", + "name": { "type": "string", - "id": 4 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Occurrence" + } } } }, - "InTotoStatement": { - "oneofs": { - "predicate": { - "oneof": [ - "provenance", - "slsaProvenance" - ] - } - }, + "ListNotesRequest": { "fields": { - "type": { + "parent": { "type": "string", "id": 1, "options": { - "json_name": "_type" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Project" } }, - "subject": { - "rule": "repeated", - "type": "Subject", + "filter": { + "type": "string", "id": 2 }, - "predicateType": { - "type": "string", + "pageSize": { + "type": "int32", "id": 3 }, - "provenance": { - "type": "InTotoProvenance", + "pageToken": { + "type": "string", "id": 4 - }, - "slsaProvenance": { - "type": "SlsaProvenance", - "id": 5 } } }, - "Subject": { + "ListNotesResponse": { "fields": { - "name": { - "type": "string", + "notes": { + "rule": "repeated", + "type": "Note", "id": 1 }, - "digest": { - "keyType": "string", + "nextPageToken": { "type": "string", "id": 2 } } }, - "SlsaProvenance": { + "DeleteNoteRequest": { "fields": { - "builder": { - "type": "SlsaBuilder", - "id": 1 - }, - "recipe": { - "type": "SlsaRecipe", - "id": 2 - }, - "metadata": { - "type": "SlsaMetadata", - "id": 3 - }, - "materials": { - "rule": "repeated", - "type": "Material", - "id": 4 - } - }, - "nested": { - "SlsaRecipe": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "definedInMaterial": { - "type": "int64", - "id": 2 - }, - "entryPoint": { - "type": "string", - "id": 3 - }, - "arguments": { - "type": "google.protobuf.Any", - "id": 4 - }, - "environment": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "SlsaCompleteness": { - "fields": { - "arguments": { - "type": "bool", - "id": 1 - }, - "environment": { - "type": "bool", - "id": 2 - }, - "materials": { - "type": "bool", - "id": 3 - } - } - }, - "SlsaMetadata": { - "fields": { - "buildInvocationId": { - "type": "string", - "id": 1 - }, - "buildStartedOn": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "buildFinishedOn": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "completeness": { - "type": "SlsaCompleteness", - "id": 4 - }, - "reproducible": { - "type": "bool", - "id": 5 - } - } - }, - "SlsaBuilder": { - "fields": { - "id": { - "type": "string", - "id": 1 - } - } - }, - "Material": { - "fields": { - "uri": { - "type": "string", - "id": 1 - }, - "digest": { - "keyType": "string", - "type": "string", - "id": 2 - } + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Note" } } } }, - "BuildProvenance": { + "CreateNoteRequest": { "fields": { - "id": { - "type": "string", - "id": 1 - }, - "projectId": { - "type": "string", - "id": 2 - }, - "commands": { - "rule": "repeated", - "type": "Command", - "id": 3 - }, - "builtArtifacts": { - "rule": "repeated", - "type": "Artifact", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "creator": { + "parent": { "type": "string", - "id": 8 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Project" + } }, - "logsUri": { + "noteId": { "type": "string", - "id": 9 - }, - "sourceProvenance": { - "type": "Source", - "id": 10 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "triggerId": { + "note": { + "type": "Note", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateNoteRequest": { + "fields": { + "name": { "type": "string", - "id": 11 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Note" + } }, - "buildOptions": { - "keyType": "string", - "type": "string", - "id": 12 + "note": { + "type": "Note", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "builderVersion": { - "type": "string", - "id": 13 + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 } } }, - "Source": { + "ListNoteOccurrencesRequest": { "fields": { - "artifactStorageSourceUri": { + "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Note" + } }, - "fileHashes": { - "keyType": "string", - "type": "FileHashes", + "filter": { + "type": "string", "id": 2 }, - "context": { - "type": "SourceContext", + "pageSize": { + "type": "int32", "id": 3 }, - "additionalContexts": { - "rule": "repeated", - "type": "SourceContext", + "pageToken": { + "type": "string", "id": 4 } } }, - "FileHashes": { + "ListNoteOccurrencesResponse": { "fields": { - "fileHash": { + "occurrences": { "rule": "repeated", - "type": "Hash", + "type": "Occurrence", "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "Hash": { + "BatchCreateNotesRequest": { "fields": { - "type": { + "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Project" + } }, - "value": { - "type": "bytes", - "id": 2 + "notes": { + "keyType": "string", + "type": "Note", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "Command": { + "BatchCreateNotesResponse": { "fields": { - "name": { - "type": "string", - "id": 1 - }, - "env": { + "notes": { "rule": "repeated", + "type": "Note", + "id": 1 + } + } + }, + "BatchCreateOccurrencesRequest": { + "fields": { + "parent": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "grafeas.io/Project" + } }, - "args": { + "occurrences": { "rule": "repeated", - "type": "string", - "id": 3 - }, - "dir": { - "type": "string", - "id": 4 - }, - "id": { - "type": "string", - "id": 5 - }, - "waitFor": { + "type": "Occurrence", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateOccurrencesResponse": { + "fields": { + "occurrences": { "rule": "repeated", - "type": "string", - "id": 6 + "type": "Occurrence", + "id": 1 } } }, - "Artifact": { + "AttestationNote": { "fields": { - "checksum": { + "hint": { + "type": "Hint", + "id": 1 + } + }, + "nested": { + "Hint": { + "fields": { + "humanReadableName": { + "type": "string", + "id": 1 + } + } + } + } + }, + "Jwt": { + "fields": { + "compactJwt": { "type": "string", "id": 1 + } + } + }, + "AttestationOccurrence": { + "fields": { + "serializedPayload": { + "type": "bytes", + "id": 1 }, - "id": { - "type": "string", + "signatures": { + "rule": "repeated", + "type": "Signature", "id": 2 }, - "names": { + "jwts": { "rule": "repeated", - "type": "string", + "type": "Jwt", "id": 3 } } }, - "SourceContext": { - "oneofs": { - "context": { - "oneof": [ - "cloudRepo", - "gerrit", - "git" - ] + "BuildNote": { + "fields": { + "builderVersion": { + "type": "string", + "id": 1 } - }, + } + }, + "BuildOccurrence": { "fields": { - "cloudRepo": { - "type": "CloudRepoSourceContext", + "provenance": { + "type": "grafeas.v1.BuildProvenance", "id": 1 }, - "gerrit": { - "type": "GerritSourceContext", + "provenanceBytes": { + "type": "string", "id": 2 }, - "git": { - "type": "GitSourceContext", + "intotoProvenance": { + "type": "InTotoProvenance", "id": 3 }, - "labels": { - "keyType": "string", - "type": "string", + "intotoStatement": { + "type": "InTotoStatement", "id": 4 } } }, - "AliasContext": { + "Recipe": { "fields": { - "kind": { - "type": "Kind", + "type": { + "type": "string", "id": 1 }, - "name": { - "type": "string", + "definedInMaterial": { + "type": "int64", "id": 2 - } - }, - "nested": { - "Kind": { - "values": { - "KIND_UNSPECIFIED": 0, - "FIXED": 1, - "MOVABLE": 2, - "OTHER": 4 - } + }, + "entryPoint": { + "type": "string", + "id": 3 + }, + "arguments": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 4 + }, + "environment": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 5 } } }, - "CloudRepoSourceContext": { - "oneofs": { - "revision": { - "oneof": [ - "revisionId", - "aliasContext" - ] - } - }, + "Completeness": { "fields": { - "repoId": { - "type": "RepoId", + "arguments": { + "type": "bool", "id": 1 }, - "revisionId": { - "type": "string", + "environment": { + "type": "bool", "id": 2 }, - "aliasContext": { - "type": "AliasContext", + "materials": { + "type": "bool", "id": 3 } } }, - "GerritSourceContext": { - "oneofs": { - "revision": { - "oneof": [ - "revisionId", - "aliasContext" - ] - } - }, + "Metadata": { "fields": { - "hostUri": { + "buildInvocationId": { "type": "string", "id": 1 }, - "gerritProject": { - "type": "string", + "buildStartedOn": { + "type": "google.protobuf.Timestamp", "id": 2 }, - "revisionId": { - "type": "string", + "buildFinishedOn": { + "type": "google.protobuf.Timestamp", "id": 3 }, - "aliasContext": { - "type": "AliasContext", + "completeness": { + "type": "Completeness", "id": 4 + }, + "reproducible": { + "type": "bool", + "id": 5 } } }, - "GitSourceContext": { + "BuilderConfig": { "fields": { - "url": { + "id": { "type": "string", "id": 1 - }, - "revisionId": { - "type": "string", - "id": 2 } } }, - "RepoId": { - "oneofs": { - "id": { - "oneof": [ - "projectRepoId", - "uid" - ] - } - }, + "InTotoProvenance": { "fields": { - "projectRepoId": { - "type": "ProjectRepoId", + "builderConfig": { + "type": "BuilderConfig", "id": 1 }, - "uid": { - "type": "string", + "recipe": { + "type": "Recipe", "id": 2 - } - } - }, - "ProjectRepoId": { - "fields": { - "projectId": { - "type": "string", - "id": 1 }, - "repoName": { + "metadata": { + "type": "Metadata", + "id": 3 + }, + "materials": { + "rule": "repeated", "type": "string", - "id": 2 + "id": 4 } } }, - "ComplianceNote": { + "InTotoStatement": { "oneofs": { - "complianceType": { + "predicate": { "oneof": [ - "cisBenchmark" + "provenance", + "slsaProvenance" ] } }, "fields": { - "title": { + "type": { "type": "string", - "id": 1 + "id": 1, + "options": { + "json_name": "_type" + } }, - "description": { - "type": "string", + "subject": { + "rule": "repeated", + "type": "Subject", "id": 2 }, - "version": { - "rule": "repeated", - "type": "grafeas.v1.ComplianceVersion", + "predicateType": { + "type": "string", "id": 3 }, - "rationale": { - "type": "string", + "provenance": { + "type": "InTotoProvenance", "id": 4 }, - "remediation": { - "type": "string", + "slsaProvenance": { + "type": "SlsaProvenance", "id": 5 - }, - "cisBenchmark": { - "type": "CisBenchmark", - "id": 6 - }, - "scanInstructions": { - "type": "bytes", - "id": 7 - } - }, - "nested": { - "CisBenchmark": { - "fields": { - "profileLevel": { - "type": "int32", - "id": 1 - }, - "severity": { - "type": "grafeas.v1.Severity", - "id": 2 - } - } } } }, - "ComplianceVersion": { + "Subject": { "fields": { - "cpeUri": { + "name": { "type": "string", "id": 1 }, - "version": { + "digest": { + "keyType": "string", "type": "string", "id": 2 } } }, - "ComplianceOccurrence": { - "fields": { - "nonCompliantFiles": { - "rule": "repeated", - "type": "NonCompliantFile", - "id": 2 - }, - "nonComplianceReason": { - "type": "string", - "id": 3 - } - } - }, - "NonCompliantFile": { + "SlsaProvenance": { "fields": { - "path": { - "type": "string", + "builder": { + "type": "SlsaBuilder", "id": 1 }, - "displayCommand": { - "type": "string", + "recipe": { + "type": "SlsaRecipe", "id": 2 }, - "reason": { - "type": "string", + "metadata": { + "type": "SlsaMetadata", "id": 3 - } - } - }, - "DeploymentNote": { - "fields": { - "resourceUri": { + }, + "materials": { "rule": "repeated", - "type": "string", - "id": 1 + "type": "Material", + "id": 4 + } + }, + "nested": { + "SlsaRecipe": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "definedInMaterial": { + "type": "int64", + "id": 2 + }, + "entryPoint": { + "type": "string", + "id": 3 + }, + "arguments": { + "type": "google.protobuf.Any", + "id": 4 + }, + "environment": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "SlsaCompleteness": { + "fields": { + "arguments": { + "type": "bool", + "id": 1 + }, + "environment": { + "type": "bool", + "id": 2 + }, + "materials": { + "type": "bool", + "id": 3 + } + } + }, + "SlsaMetadata": { + "fields": { + "buildInvocationId": { + "type": "string", + "id": 1 + }, + "buildStartedOn": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "buildFinishedOn": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "completeness": { + "type": "SlsaCompleteness", + "id": 4 + }, + "reproducible": { + "type": "bool", + "id": 5 + } + } + }, + "SlsaBuilder": { + "fields": { + "id": { + "type": "string", + "id": 1 + } + } + }, + "Material": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "digest": { + "keyType": "string", + "type": "string", + "id": 2 + } + } } } }, - "DeploymentOccurrence": { + "BuildProvenance": { "fields": { - "userEmail": { + "id": { "type": "string", "id": 1 }, - "deployTime": { - "type": "google.protobuf.Timestamp", + "projectId": { + "type": "string", "id": 2 }, - "undeployTime": { - "type": "google.protobuf.Timestamp", + "commands": { + "rule": "repeated", + "type": "Command", "id": 3 }, - "config": { - "type": "string", + "builtArtifacts": { + "rule": "repeated", + "type": "Artifact", "id": 4 }, - "address": { - "type": "string", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 5 }, - "resourceUri": { - "rule": "repeated", - "type": "string", + "startTime": { + "type": "google.protobuf.Timestamp", "id": 6 }, - "platform": { - "type": "Platform", + "endTime": { + "type": "google.protobuf.Timestamp", "id": 7 - } - }, - "nested": { - "Platform": { - "values": { - "PLATFORM_UNSPECIFIED": 0, - "GKE": 1, - "FLEX": 2, - "CUSTOM": 3 - } - } - } - }, - "DiscoveryNote": { - "fields": { - "analysisKind": { - "type": "grafeas.v1.NoteKind", - "id": 1 + }, + "creator": { + "type": "string", + "id": 8 + }, + "logsUri": { + "type": "string", + "id": 9 + }, + "sourceProvenance": { + "type": "Source", + "id": 10 + }, + "triggerId": { + "type": "string", + "id": 11 + }, + "buildOptions": { + "keyType": "string", + "type": "string", + "id": 12 + }, + "builderVersion": { + "type": "string", + "id": 13 } } }, - "DiscoveryOccurrence": { + "Source": { "fields": { - "continuousAnalysis": { - "type": "ContinuousAnalysis", + "artifactStorageSourceUri": { + "type": "string", "id": 1 }, - "analysisStatus": { - "type": "AnalysisStatus", + "fileHashes": { + "keyType": "string", + "type": "FileHashes", "id": 2 }, - "analysisStatusError": { - "type": "google.rpc.Status", + "context": { + "type": "SourceContext", "id": 3 }, - "cpe": { - "type": "string", + "additionalContexts": { + "rule": "repeated", + "type": "SourceContext", "id": 4 - }, - "lastScanTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - } - }, - "nested": { - "ContinuousAnalysis": { - "values": { - "CONTINUOUS_ANALYSIS_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2 - } - }, - "AnalysisStatus": { - "values": { - "ANALYSIS_STATUS_UNSPECIFIED": 0, - "PENDING": 1, - "SCANNING": 2, - "FINISHED_SUCCESS": 3, - "FINISHED_FAILED": 4, - "FINISHED_UNSUPPORTED": 5 - } } } }, - "DSSEAttestationNote": { + "FileHashes": { "fields": { - "hint": { - "type": "DSSEHint", + "fileHash": { + "rule": "repeated", + "type": "Hash", "id": 1 } - }, - "nested": { - "DSSEHint": { - "fields": { - "humanReadableName": { - "type": "string", - "id": 1 - } - } - } } }, - "DSSEAttestationOccurrence": { - "oneofs": { - "decodedPayload": { - "oneof": [ - "statement" - ] - } - }, + "Hash": { "fields": { - "envelope": { - "type": "Envelope", + "type": { + "type": "string", "id": 1 }, - "statement": { - "type": "InTotoStatement", + "value": { + "type": "bytes", "id": 2 } } }, - "Grafeas": { - "options": { - "(google.api.default_host)": "containeranalysis.googleapis.com" - }, - "methods": { - "GetOccurrence": { - "requestType": "GetOccurrenceRequest", - "responseType": "Occurrence", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/occurrences/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/occurrences/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListOccurrences": { - "requestType": "ListOccurrencesRequest", - "responseType": "ListOccurrencesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/occurrences", - "(google.api.method_signature)": "parent,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*}/occurrences" - } - }, - { - "(google.api.method_signature)": "parent,filter" - } - ] - }, - "DeleteOccurrence": { - "requestType": "DeleteOccurrenceRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/occurrences/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/occurrences/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateOccurrence": { - "requestType": "CreateOccurrenceRequest", - "responseType": "Occurrence", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/occurrences", - "(google.api.http).body": "occurrence", - "(google.api.method_signature)": "parent,occurrence" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*}/occurrences", - "body": "occurrence" - } - }, - { - "(google.api.method_signature)": "parent,occurrence" - } - ] - }, - "BatchCreateOccurrences": { - "requestType": "BatchCreateOccurrencesRequest", - "responseType": "BatchCreateOccurrencesResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/occurrences:batchCreate", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,occurrences" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*}/occurrences:batchCreate", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,occurrences" - } - ] + "Command": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "UpdateOccurrence": { - "requestType": "UpdateOccurrenceRequest", - "responseType": "Occurrence", - "options": { - "(google.api.http).patch": "/v1/{name=projects/*/occurrences/*}", - "(google.api.http).body": "occurrence", - "(google.api.method_signature)": "name,occurrence,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{name=projects/*/occurrences/*}", - "body": "occurrence" - } - }, - { - "(google.api.method_signature)": "name,occurrence,update_mask" - } - ] + "env": { + "rule": "repeated", + "type": "string", + "id": 2 }, - "GetOccurrenceNote": { - "requestType": "GetOccurrenceNoteRequest", - "responseType": "Note", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/occurrences/*}/notes", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/occurrences/*}/notes" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "args": { + "rule": "repeated", + "type": "string", + "id": 3 }, - "GetNote": { - "requestType": "GetNoteRequest", - "responseType": "Note", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/notes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/notes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "dir": { + "type": "string", + "id": 4 }, - "ListNotes": { - "requestType": "ListNotesRequest", - "responseType": "ListNotesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/notes", - "(google.api.method_signature)": "parent,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*}/notes" - } - }, - { - "(google.api.method_signature)": "parent,filter" - } - ] + "id": { + "type": "string", + "id": 5 }, - "DeleteNote": { - "requestType": "DeleteNoteRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/notes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/notes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "waitFor": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "Artifact": { + "fields": { + "checksum": { + "type": "string", + "id": 1 }, - "CreateNote": { - "requestType": "CreateNoteRequest", - "responseType": "Note", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/notes", - "(google.api.http).body": "note", - "(google.api.method_signature)": "parent,note_id,note" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*}/notes", - "body": "note" - } - }, - { - "(google.api.method_signature)": "parent,note_id,note" - } - ] + "id": { + "type": "string", + "id": 2 }, - "BatchCreateNotes": { - "requestType": "BatchCreateNotesRequest", - "responseType": "BatchCreateNotesResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/notes:batchCreate", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,notes" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*}/notes:batchCreate", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,notes" - } + "names": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "SourceContext": { + "oneofs": { + "context": { + "oneof": [ + "cloudRepo", + "gerrit", + "git" ] + } + }, + "fields": { + "cloudRepo": { + "type": "CloudRepoSourceContext", + "id": 1 }, - "UpdateNote": { - "requestType": "UpdateNoteRequest", - "responseType": "Note", - "options": { - "(google.api.http).patch": "/v1/{name=projects/*/notes/*}", - "(google.api.http).body": "note", - "(google.api.method_signature)": "name,note,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{name=projects/*/notes/*}", - "body": "note" - } - }, - { - "(google.api.method_signature)": "name,note,update_mask" - } - ] + "gerrit": { + "type": "GerritSourceContext", + "id": 2 }, - "ListNoteOccurrences": { - "requestType": "ListNoteOccurrencesRequest", - "responseType": "ListNoteOccurrencesResponse", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/notes/*}/occurrences", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/notes/*}/occurrences" - } - }, - { - "(google.api.method_signature)": "name,filter" - } + "git": { + "type": "GitSourceContext", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + } + } + }, + "AliasContext": { + "fields": { + "kind": { + "type": "Kind", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + }, + "nested": { + "Kind": { + "values": { + "KIND_UNSPECIFIED": 0, + "FIXED": 1, + "MOVABLE": 2, + "OTHER": 4 + } + } + } + }, + "CloudRepoSourceContext": { + "oneofs": { + "revision": { + "oneof": [ + "revisionId", + "aliasContext" ] } + }, + "fields": { + "repoId": { + "type": "RepoId", + "id": 1 + }, + "revisionId": { + "type": "string", + "id": 2 + }, + "aliasContext": { + "type": "AliasContext", + "id": 3 + } } }, - "Occurrence": { - "options": { - "(google.api.resource).type": "grafeas.io/Occurrence", - "(google.api.resource).pattern": "projects/{project}/occurrences/{occurrence}" - }, + "GerritSourceContext": { "oneofs": { - "details": { + "revision": { "oneof": [ - "vulnerability", - "build", - "image", - "package", - "deployment", - "discovery", - "attestation", - "upgrade", - "compliance", - "dsseAttestation" + "revisionId", + "aliasContext" ] } }, "fields": { - "name": { + "hostUri": { "type": "string", "id": 1 }, - "resourceUri": { + "gerritProject": { "type": "string", "id": 2 }, - "noteName": { + "revisionId": { "type": "string", "id": 3 }, - "kind": { - "type": "grafeas.v1.NoteKind", + "aliasContext": { + "type": "AliasContext", "id": 4 - }, - "remediation": { + } + } + }, + "GitSourceContext": { + "fields": { + "url": { "type": "string", - "id": 5 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "vulnerability": { - "type": "grafeas.v1.VulnerabilityOccurrence", - "id": 8 - }, - "build": { - "type": "grafeas.v1.BuildOccurrence", - "id": 9 - }, - "image": { - "type": "grafeas.v1.ImageOccurrence", - "id": 10 - }, - "package": { - "type": "grafeas.v1.PackageOccurrence", - "id": 11 - }, - "deployment": { - "type": "grafeas.v1.DeploymentOccurrence", - "id": 12 - }, - "discovery": { - "type": "grafeas.v1.DiscoveryOccurrence", - "id": 13 - }, - "attestation": { - "type": "grafeas.v1.AttestationOccurrence", - "id": 14 - }, - "upgrade": { - "type": "grafeas.v1.UpgradeOccurrence", - "id": 15 + "id": 1 }, - "compliance": { - "type": "grafeas.v1.ComplianceOccurrence", - "id": 16 + "revisionId": { + "type": "string", + "id": 2 + } + } + }, + "RepoId": { + "oneofs": { + "id": { + "oneof": [ + "projectRepoId", + "uid" + ] + } + }, + "fields": { + "projectRepoId": { + "type": "ProjectRepoId", + "id": 1 }, - "dsseAttestation": { - "type": "grafeas.v1.DSSEAttestationOccurrence", - "id": 17 + "uid": { + "type": "string", + "id": 2 + } + } + }, + "ProjectRepoId": { + "fields": { + "projectId": { + "type": "string", + "id": 1 }, - "envelope": { - "type": "grafeas.v1.Envelope", - "id": 18 + "repoName": { + "type": "string", + "id": 2 } } }, - "Note": { - "options": { - "(google.api.resource).type": "grafeas.io/Note", - "(google.api.resource).pattern": "projects/{project}/notes/{note}" - }, + "ComplianceNote": { "oneofs": { - "type": { + "complianceType": { "oneof": [ - "vulnerability", - "build", - "image", - "package", - "deployment", - "discovery", - "attestation", - "upgrade", - "compliance", - "dsseAttestation" + "cisBenchmark" ] } }, "fields": { - "name": { + "title": { "type": "string", "id": 1 }, - "shortDescription": { + "description": { "type": "string", "id": 2 }, - "longDescription": { - "type": "string", + "version": { + "rule": "repeated", + "type": "grafeas.v1.ComplianceVersion", "id": 3 }, - "kind": { - "type": "grafeas.v1.NoteKind", + "rationale": { + "type": "string", "id": 4 }, - "relatedUrl": { - "rule": "repeated", - "type": "grafeas.v1.RelatedUrl", + "remediation": { + "type": "string", "id": 5 }, - "expirationTime": { - "type": "google.protobuf.Timestamp", + "cisBenchmark": { + "type": "CisBenchmark", "id": 6 }, - "createTime": { - "type": "google.protobuf.Timestamp", + "scanInstructions": { + "type": "bytes", "id": 7 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 8 - }, - "relatedNoteNames": { - "rule": "repeated", + } + }, + "nested": { + "CisBenchmark": { + "fields": { + "profileLevel": { + "type": "int32", + "id": 1 + }, + "severity": { + "type": "grafeas.v1.Severity", + "id": 2 + } + } + } + } + }, + "ComplianceVersion": { + "fields": { + "cpeUri": { "type": "string", - "id": 9 - }, - "vulnerability": { - "type": "grafeas.v1.VulnerabilityNote", - "id": 10 - }, - "build": { - "type": "grafeas.v1.BuildNote", - "id": 11 - }, - "image": { - "type": "grafeas.v1.ImageNote", - "id": 12 - }, - "package": { - "type": "grafeas.v1.PackageNote", - "id": 13 - }, - "deployment": { - "type": "grafeas.v1.DeploymentNote", - "id": 14 - }, - "discovery": { - "type": "grafeas.v1.DiscoveryNote", - "id": 15 + "id": 1 }, - "attestation": { - "type": "grafeas.v1.AttestationNote", - "id": 16 + "version": { + "type": "string", + "id": 2 + } + } + }, + "ComplianceOccurrence": { + "fields": { + "nonCompliantFiles": { + "rule": "repeated", + "type": "NonCompliantFile", + "id": 2 }, - "upgrade": { - "type": "grafeas.v1.UpgradeNote", - "id": 17 + "nonComplianceReason": { + "type": "string", + "id": 3 + } + } + }, + "NonCompliantFile": { + "fields": { + "path": { + "type": "string", + "id": 1 }, - "compliance": { - "type": "grafeas.v1.ComplianceNote", - "id": 18 + "displayCommand": { + "type": "string", + "id": 2 }, - "dsseAttestation": { - "type": "grafeas.v1.DSSEAttestationNote", - "id": 19 + "reason": { + "type": "string", + "id": 3 } } }, - "GetOccurrenceRequest": { + "Severity": { + "values": { + "SEVERITY_UNSPECIFIED": 0, + "MINIMAL": 1, + "LOW": 2, + "MEDIUM": 3, + "HIGH": 4, + "CRITICAL": 5 + } + }, + "DeploymentNote": { "fields": { - "name": { + "resourceUri": { + "rule": "repeated", "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Occurrence" - } + "id": 1 } } }, - "ListOccurrencesRequest": { + "DeploymentOccurrence": { "fields": { - "parent": { + "userEmail": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Project" - } + "id": 1 }, - "filter": { - "type": "string", + "deployTime": { + "type": "google.protobuf.Timestamp", "id": 2 }, - "pageSize": { - "type": "int32", + "undeployTime": { + "type": "google.protobuf.Timestamp", "id": 3 }, - "pageToken": { + "config": { "type": "string", "id": 4 + }, + "address": { + "type": "string", + "id": 5 + }, + "resourceUri": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "platform": { + "type": "Platform", + "id": 7 + } + }, + "nested": { + "Platform": { + "values": { + "PLATFORM_UNSPECIFIED": 0, + "GKE": 1, + "FLEX": 2, + "CUSTOM": 3 + } } } }, - "ListOccurrencesResponse": { + "DiscoveryNote": { "fields": { - "occurrences": { - "rule": "repeated", - "type": "Occurrence", + "analysisKind": { + "type": "grafeas.v1.NoteKind", "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 } } }, - "DeleteOccurrenceRequest": { + "DiscoveryOccurrence": { "fields": { - "name": { + "continuousAnalysis": { + "type": "ContinuousAnalysis", + "id": 1 + }, + "analysisStatus": { + "type": "AnalysisStatus", + "id": 2 + }, + "analysisStatusError": { + "type": "google.rpc.Status", + "id": 3 + }, + "cpe": { "type": "string", - "id": 1, + "id": 4 + }, + "lastScanTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "archiveTime": { + "type": "google.protobuf.Timestamp", + "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Occurrence" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ContinuousAnalysis": { + "values": { + "CONTINUOUS_ANALYSIS_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 + } + }, + "AnalysisStatus": { + "values": { + "ANALYSIS_STATUS_UNSPECIFIED": 0, + "PENDING": 1, + "SCANNING": 2, + "FINISHED_SUCCESS": 3, + "FINISHED_FAILED": 4, + "FINISHED_UNSUPPORTED": 5 } } } }, - "CreateOccurrenceRequest": { + "DSSEAttestationNote": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Project" + "hint": { + "type": "DSSEHint", + "id": 1 + } + }, + "nested": { + "DSSEHint": { + "fields": { + "humanReadableName": { + "type": "string", + "id": 1 + } } + } + } + }, + "DSSEAttestationOccurrence": { + "oneofs": { + "decodedPayload": { + "oneof": [ + "statement" + ] + } + }, + "fields": { + "envelope": { + "type": "Envelope", + "id": 1 }, - "occurrence": { - "type": "Occurrence", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "statement": { + "type": "InTotoStatement", + "id": 2 } } }, - "UpdateOccurrenceRequest": { + "Layer": { "fields": { - "name": { + "directive": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Occurrence" - } + "id": 1 }, - "occurrence": { - "type": "Occurrence", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "arguments": { + "type": "string", + "id": 2 + } + } + }, + "Fingerprint": { + "fields": { + "v1Name": { + "type": "string", + "id": 1 }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "v2Blob": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "v2Name": { + "type": "string", "id": 3 } } }, - "GetNoteRequest": { + "ImageNote": { "fields": { - "name": { + "resourceUrl": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Note" - } + "id": 1 + }, + "fingerprint": { + "type": "Fingerprint", + "id": 2 } } }, - "GetOccurrenceNoteRequest": { + "ImageOccurrence": { "fields": { - "name": { + "fingerprint": { + "type": "Fingerprint", + "id": 1 + }, + "distance": { + "type": "int32", + "id": 2 + }, + "layerInfo": { + "rule": "repeated", + "type": "Layer", + "id": 3 + }, + "baseResourceUrl": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Occurrence" - } + "id": 4 } } }, - "ListNotesRequest": { + "Architecture": { + "values": { + "ARCHITECTURE_UNSPECIFIED": 0, + "X86": 1, + "X64": 2 + } + }, + "Distribution": { "fields": { - "parent": { + "cpeUri": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Project" - } + "id": 1 }, - "filter": { - "type": "string", + "architecture": { + "type": "Architecture", "id": 2 }, - "pageSize": { - "type": "int32", + "latestVersion": { + "type": "Version", "id": 3 }, - "pageToken": { + "maintainer": { "type": "string", "id": 4 + }, + "url": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 } } }, - "ListNotesResponse": { + "Location": { "fields": { - "notes": { - "rule": "repeated", - "type": "Note", + "cpeUri": { + "type": "string", "id": 1 }, - "nextPageToken": { - "type": "string", + "version": { + "type": "Version", "id": 2 + }, + "path": { + "type": "string", + "id": 3 } } }, - "DeleteNoteRequest": { + "PackageNote": { "fields": { "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Note" - } + "id": 1 + }, + "distribution": { + "rule": "repeated", + "type": "Distribution", + "id": 10 } } }, - "CreateNoteRequest": { + "PackageOccurrence": { "fields": { - "parent": { + "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Project" - } + "id": 1 }, - "noteId": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 2 + } + } + }, + "Version": { + "fields": { + "epoch": { + "type": "int32", + "id": 1 + }, + "name": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 2 }, - "note": { - "type": "Note", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "revision": { + "type": "string", + "id": 3 + }, + "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 } } } }, - "UpdateNoteRequest": { + "UpgradeNote": { "fields": { - "name": { + "package": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Note" - } + "id": 1 }, - "note": { - "type": "Note", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "version": { + "type": "grafeas.v1.Version", + "id": 2 }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "distributions": { + "rule": "repeated", + "type": "UpgradeDistribution", "id": 3 + }, + "windowsUpdate": { + "type": "WindowsUpdate", + "id": 4 } } }, - "ListNoteOccurrencesRequest": { + "UpgradeDistribution": { "fields": { - "name": { + "cpeUri": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Note" - } + "id": 1 }, - "filter": { + "classification": { "type": "string", "id": 2 }, - "pageSize": { - "type": "int32", + "severity": { + "type": "string", "id": 3 }, - "pageToken": { + "cve": { + "rule": "repeated", "type": "string", "id": 4 } } }, - "ListNoteOccurrencesResponse": { + "WindowsUpdate": { "fields": { - "occurrences": { - "rule": "repeated", - "type": "Occurrence", + "identity": { + "type": "Identity", "id": 1 }, - "nextPageToken": { + "title": { "type": "string", "id": 2 - } - } - }, - "BatchCreateNotesRequest": { - "fields": { - "parent": { + }, + "description": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Project" - } + "id": 3 }, - "notes": { - "keyType": "string", - "type": "Note", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "BatchCreateNotesResponse": { - "fields": { - "notes": { + "categories": { + "rule": "repeated", + "type": "Category", + "id": 4 + }, + "kbArticleIds": { "rule": "repeated", - "type": "Note", - "id": 1 - } - } - }, - "BatchCreateOccurrencesRequest": { - "fields": { - "parent": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "grafeas.io/Project" + "id": 5 + }, + "supportUrl": { + "type": "string", + "id": 6 + }, + "lastPublishedTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 7 + } + }, + "nested": { + "Identity": { + "fields": { + "updateId": { + "type": "string", + "id": 1 + }, + "revision": { + "type": "int32", + "id": 2 + } } }, - "occurrences": { - "rule": "repeated", - "type": "Occurrence", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "Category": { + "fields": { + "categoryId": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } } } } }, - "BatchCreateOccurrencesResponse": { - "fields": { - "occurrences": { - "rule": "repeated", - "type": "Occurrence", - "id": 1 - } - } - }, - "Layer": { + "UpgradeOccurrence": { "fields": { - "directive": { + "package": { "type": "string", "id": 1 }, - "arguments": { - "type": "string", - "id": 2 + "parsedVersion": { + "type": "grafeas.v1.Version", + "id": 3 + }, + "distribution": { + "type": "UpgradeDistribution", + "id": 4 + }, + "windowsUpdate": { + "type": "WindowsUpdate", + "id": 5 } } }, - "Fingerprint": { + "VulnerabilityNote": { "fields": { - "v1Name": { - "type": "string", + "cvssScore": { + "type": "float", "id": 1 }, - "v2Blob": { - "rule": "repeated", - "type": "string", + "severity": { + "type": "grafeas.v1.Severity", "id": 2 }, - "v2Name": { - "type": "string", + "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 } - } - }, - "ImageNote": { - "fields": { - "resourceUrl": { - "type": "string", - "id": 1 + }, + "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 + } + } }, - "fingerprint": { - "type": "Fingerprint", - "id": 2 + "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 + } + } + } + } } } }, - "ImageOccurrence": { + "VulnerabilityOccurrence": { "fields": { - "fingerprint": { - "type": "Fingerprint", + "type": { + "type": "string", "id": 1 }, - "distance": { - "type": "int32", + "severity": { + "type": "grafeas.v1.Severity", "id": 2 }, - "layerInfo": { - "rule": "repeated", - "type": "Layer", + "cvssScore": { + "type": "float", "id": 3 }, - "baseResourceUrl": { - "type": "string", + "cvssv3": { + "type": "CVSS", + "id": 10 + }, + "packageIssue": { + "rule": "repeated", + "type": "PackageIssue", "id": 4 - } - } - }, - "UpgradeNote": { - "fields": { - "package": { + }, + "shortDescription": { "type": "string", - "id": 1 + "id": 5 }, - "version": { - "type": "grafeas.v1.Version", - "id": 2 + "longDescription": { + "type": "string", + "id": 6 }, - "distributions": { + "relatedUrls": { "rule": "repeated", - "type": "UpgradeDistribution", - "id": 3 + "type": "grafeas.v1.RelatedUrl", + "id": 7 }, - "windowsUpdate": { - "type": "WindowsUpdate", - "id": 4 + "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" + } + } + } } } }, - "UpgradeDistribution": { + "CVSSv3": { "fields": { - "cpeUri": { - "type": "string", + "baseScore": { + "type": "float", "id": 1 }, - "classification": { - "type": "string", + "exploitabilityScore": { + "type": "float", "id": 2 }, - "severity": { - "type": "string", + "impactScore": { + "type": "float", "id": 3 }, - "cve": { - "rule": "repeated", - "type": "string", - "id": 4 + "attackVector": { + "type": "AttackVector", + "id": 5 + }, + "attackComplexity": { + "type": "AttackComplexity", + "id": 6 + }, + "privilegesRequired": { + "type": "PrivilegesRequired", + "id": 7 + }, + "userInteraction": { + "type": "UserInteraction", + "id": 8 + }, + "scope": { + "type": "Scope", + "id": 9 + }, + "confidentialityImpact": { + "type": "Impact", + "id": 10 + }, + "integrityImpact": { + "type": "Impact", + "id": 11 + }, + "availabilityImpact": { + "type": "Impact", + "id": 12 + } + }, + "nested": { + "AttackVector": { + "values": { + "ATTACK_VECTOR_UNSPECIFIED": 0, + "ATTACK_VECTOR_NETWORK": 1, + "ATTACK_VECTOR_ADJACENT": 2, + "ATTACK_VECTOR_LOCAL": 3, + "ATTACK_VECTOR_PHYSICAL": 4 + } + }, + "AttackComplexity": { + "values": { + "ATTACK_COMPLEXITY_UNSPECIFIED": 0, + "ATTACK_COMPLEXITY_LOW": 1, + "ATTACK_COMPLEXITY_HIGH": 2 + } + }, + "PrivilegesRequired": { + "values": { + "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, + "PRIVILEGES_REQUIRED_NONE": 1, + "PRIVILEGES_REQUIRED_LOW": 2, + "PRIVILEGES_REQUIRED_HIGH": 3 + } + }, + "UserInteraction": { + "values": { + "USER_INTERACTION_UNSPECIFIED": 0, + "USER_INTERACTION_NONE": 1, + "USER_INTERACTION_REQUIRED": 2 + } + }, + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "SCOPE_UNCHANGED": 1, + "SCOPE_CHANGED": 2 + } + }, + "Impact": { + "values": { + "IMPACT_UNSPECIFIED": 0, + "IMPACT_HIGH": 1, + "IMPACT_LOW": 2, + "IMPACT_NONE": 3 + } } } }, - "WindowsUpdate": { + "CVSS": { "fields": { - "identity": { - "type": "Identity", + "baseScore": { + "type": "float", "id": 1 }, - "title": { - "type": "string", + "exploitabilityScore": { + "type": "float", "id": 2 }, - "description": { - "type": "string", + "impactScore": { + "type": "float", "id": 3 }, - "categories": { - "rule": "repeated", - "type": "Category", + "attackVector": { + "type": "AttackVector", "id": 4 }, - "kbArticleIds": { - "rule": "repeated", - "type": "string", + "attackComplexity": { + "type": "AttackComplexity", "id": 5 }, - "supportUrl": { - "type": "string", + "authentication": { + "type": "Authentication", "id": 6 }, - "lastPublishedTimestamp": { - "type": "google.protobuf.Timestamp", + "privilegesRequired": { + "type": "PrivilegesRequired", "id": 7 + }, + "userInteraction": { + "type": "UserInteraction", + "id": 8 + }, + "scope": { + "type": "Scope", + "id": 9 + }, + "confidentialityImpact": { + "type": "Impact", + "id": 10 + }, + "integrityImpact": { + "type": "Impact", + "id": 11 + }, + "availabilityImpact": { + "type": "Impact", + "id": 12 } }, "nested": { - "Identity": { - "fields": { - "updateId": { - "type": "string", - "id": 1 - }, - "revision": { - "type": "int32", - "id": 2 - } + "AttackVector": { + "values": { + "ATTACK_VECTOR_UNSPECIFIED": 0, + "ATTACK_VECTOR_NETWORK": 1, + "ATTACK_VECTOR_ADJACENT": 2, + "ATTACK_VECTOR_LOCAL": 3, + "ATTACK_VECTOR_PHYSICAL": 4 } }, - "Category": { - "fields": { - "categoryId": { - "type": "string", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - } + "AttackComplexity": { + "values": { + "ATTACK_COMPLEXITY_UNSPECIFIED": 0, + "ATTACK_COMPLEXITY_LOW": 1, + "ATTACK_COMPLEXITY_HIGH": 2 } - } - } - }, - "UpgradeOccurrence": { - "fields": { - "package": { - "type": "string", - "id": 1 }, - "parsedVersion": { - "type": "grafeas.v1.Version", - "id": 3 + "Authentication": { + "values": { + "AUTHENTICATION_UNSPECIFIED": 0, + "AUTHENTICATION_MULTIPLE": 1, + "AUTHENTICATION_SINGLE": 2, + "AUTHENTICATION_NONE": 3 + } }, - "distribution": { - "type": "UpgradeDistribution", - "id": 4 + "PrivilegesRequired": { + "values": { + "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, + "PRIVILEGES_REQUIRED_NONE": 1, + "PRIVILEGES_REQUIRED_LOW": 2, + "PRIVILEGES_REQUIRED_HIGH": 3 + } }, - "windowsUpdate": { - "type": "WindowsUpdate", - "id": 5 + "UserInteraction": { + "values": { + "USER_INTERACTION_UNSPECIFIED": 0, + "USER_INTERACTION_NONE": 1, + "USER_INTERACTION_REQUIRED": 2 + } + }, + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "SCOPE_UNCHANGED": 1, + "SCOPE_CHANGED": 2 + } + }, + "Impact": { + "values": { + "IMPACT_UNSPECIFIED": 0, + "IMPACT_HIGH": 1, + "IMPACT_LOW": 2, + "IMPACT_NONE": 3 + } } } } @@ -4389,8 +4492,8 @@ "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project", - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" } }, "filter": { @@ -5816,18 +5919,6 @@ } } }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, "Empty": { "fields": {} }, @@ -5839,6 +5930,18 @@ "id": 1 } } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } } } }, diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js index f205db231fc..ddf75efcdab 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -31,8 +37,7 @@ function main(resource) { // const options = {} // Imports the Containeranalysis library - const {ContainerAnalysisClient} = - require('@google-cloud/containeranalysis').v1; + const {ContainerAnalysisClient} = require('@google-cloud/containeranalysis').v1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js index c65c9ebf939..a6df7cd282a 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -20,7 +26,7 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * The name of the project to get a vulnerability summary for in the form of + * Required. The name of the project to get a vulnerability summary for in the form of * `projects/[PROJECT_ID]`. */ // const parent = 'abc123' @@ -30,8 +36,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Containeranalysis library - const {ContainerAnalysisClient} = - require('@google-cloud/containeranalysis').v1; + const {ContainerAnalysisClient} = require('@google-cloud/containeranalysis').v1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); @@ -43,8 +48,7 @@ function main(parent) { }; // Run request - const response = - await containeranalysisClient.getVulnerabilityOccurrencesSummary(request); + const response = await containeranalysisClient.getVulnerabilityOccurrencesSummary(request); console.log(response); } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js index 3a045d1d1c3..032fd1a1e65 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -33,8 +39,7 @@ function main(resource, policy) { // const policy = {} // Imports the Containeranalysis library - const {ContainerAnalysisClient} = - require('@google-cloud/containeranalysis').v1; + const {ContainerAnalysisClient} = require('@google-cloud/containeranalysis').v1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js index 07985ff72a1..b1af301f4e6 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -33,8 +39,7 @@ function main(resource, permissions) { // const permissions = 'abc123' // Imports the Containeranalysis library - const {ContainerAnalysisClient} = - require('@google-cloud/containeranalysis').v1; + const {ContainerAnalysisClient} = require('@google-cloud/containeranalysis').v1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js index 5966436812f..93bb50ec1bb 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js index bdfbdb9439c..019c0a0cfa3 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -43,9 +49,7 @@ function main(parent, occurrences) { }; // Run request - const response = await containeranalysisClient.batchCreateOccurrences( - request - ); + const response = await containeranalysisClient.batchCreateOccurrences(request); console.log(response); } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js index 7de9696f551..77832b3248f 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js index dda445194fb..bbd6ddfced7 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js index f969821ddb4..48dc484c9a6 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js index 546f42f9ff0..1e32721fcd1 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js index d747c56375e..b470ad57eac 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js index 47cfdbc9032..fcda928a3e2 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js index 661fd7a3903..68e14db007e 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js index f086130881a..4afff7cc150 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -50,11 +56,9 @@ function main(name) { }; // Run request - const iterable = await containeranalysisClient.listNoteOccurrencesAsync( - request - ); + const iterable = await containeranalysisClient.listNoteOccurrencesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js index cb68bdbe4d3..89cd9b3fb16 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -53,7 +59,7 @@ function main(parent) { // Run request const iterable = await containeranalysisClient.listNotesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js index 9d9a979d7ea..13f9a99671f 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -51,11 +57,9 @@ function main(parent) { }; // Run request - const iterable = await containeranalysisClient.listOccurrencesAsync( - request - ); + const iterable = await containeranalysisClient.listOccurrencesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js index 70817bde96d..b3ff919b46b 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js index 2f5de589c6e..3a404af14d1 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json new file mode 100644 index 00000000000..0de577c540f --- /dev/null +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json @@ -0,0 +1,823 @@ +{ + "clientLibrary": { + "name": "nodejs-containeranalysis", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.devtools.containeranalysis.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "containeranalysis_v1_generated_ContainerAnalysis_SetIamPolicy_async", + "title": "containeranalysis setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "canonical": true, + "file": "container_analysis.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ContainerAnalysisClient", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysisClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.SetIamPolicy", + "service": { + "shortName": "ContainerAnalysis", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_ContainerAnalysis_GetIamPolicy_async", + "title": "containeranalysis getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "canonical": true, + "file": "container_analysis.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ContainerAnalysisClient", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysisClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.GetIamPolicy", + "service": { + "shortName": "ContainerAnalysis", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_ContainerAnalysis_TestIamPermissions_async", + "title": "containeranalysis testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "canonical": true, + "file": "container_analysis.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "ContainerAnalysisClient", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysisClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.TestIamPermissions", + "service": { + "shortName": "ContainerAnalysis", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_ContainerAnalysis_GetVulnerabilityOccurrencesSummary_async", + "title": "containeranalysis getVulnerabilityOccurrencesSummary Sample", + "origin": "API_DEFINITION", + "description": " Gets a summary of the number and severity of occurrences.", + "canonical": true, + "file": "container_analysis.get_vulnerability_occurrences_summary.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVulnerabilityOccurrencesSummary", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.GetVulnerabilityOccurrencesSummary", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary", + "client": { + "shortName": "ContainerAnalysisClient", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysisClient" + }, + "method": { + "shortName": "GetVulnerabilityOccurrencesSummary", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis.GetVulnerabilityOccurrencesSummary", + "service": { + "shortName": "ContainerAnalysis", + "fullName": "google.devtools.containeranalysis.v1.ContainerAnalysis" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_GetOccurrence_async", + "title": "containeranalysis getOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Gets the specified occurrence.", + "canonical": true, + "file": "grafeas.get_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.GetOccurrence", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1.Occurrence", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "GetOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.GetOccurrence", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_ListOccurrences_async", + "title": "containeranalysis listOccurrences Sample", + "origin": "API_DEFINITION", + "description": " Lists occurrences for the specified project.", + "canonical": true, + "file": "grafeas.list_occurrences.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOccurrences", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.ListOccurrences", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1.ListOccurrencesResponse", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "ListOccurrences", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.ListOccurrences", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_DeleteOccurrence_async", + "title": "containeranalysis deleteOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.", + "canonical": true, + "file": "grafeas.delete_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.DeleteOccurrence", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "DeleteOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.DeleteOccurrence", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_CreateOccurrence_async", + "title": "containeranalysis createOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Creates a new occurrence.", + "canonical": true, + "file": "grafeas.create_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.CreateOccurrence", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "occurrence", + "type": ".grafeas.v1.Occurrence" + } + ], + "resultType": ".grafeas.v1.Occurrence", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "CreateOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.CreateOccurrence", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_async", + "title": "containeranalysis batchCreateOccurrences Sample", + "origin": "API_DEFINITION", + "description": " Creates new occurrences in batch.", + "canonical": true, + "file": "grafeas.batch_create_occurrences.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateOccurrences", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.BatchCreateOccurrences", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "occurrences", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".grafeas.v1.BatchCreateOccurrencesResponse", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "BatchCreateOccurrences", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.BatchCreateOccurrences", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_UpdateOccurrence_async", + "title": "containeranalysis updateOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified occurrence.", + "canonical": true, + "file": "grafeas.update_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.UpdateOccurrence", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "occurrence", + "type": ".grafeas.v1.Occurrence" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".grafeas.v1.Occurrence", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "UpdateOccurrence", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.UpdateOccurrence", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_async", + "title": "containeranalysis getOccurrenceNote Sample", + "origin": "API_DEFINITION", + "description": " Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.", + "canonical": true, + "file": "grafeas.get_occurrence_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOccurrenceNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.GetOccurrenceNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1.Note", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "GetOccurrenceNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.GetOccurrenceNote", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_GetNote_async", + "title": "containeranalysis getNote Sample", + "origin": "API_DEFINITION", + "description": " Gets the specified note.", + "canonical": true, + "file": "grafeas.get_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.GetNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1.Note", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "GetNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.GetNote", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_ListNotes_async", + "title": "containeranalysis listNotes Sample", + "origin": "API_DEFINITION", + "description": " Lists notes for the specified project.", + "canonical": true, + "file": "grafeas.list_notes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNotes", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.ListNotes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1.ListNotesResponse", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "ListNotes", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.ListNotes", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_DeleteNote_async", + "title": "containeranalysis deleteNote Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified note.", + "canonical": true, + "file": "grafeas.delete_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.DeleteNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "DeleteNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.DeleteNote", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_CreateNote_async", + "title": "containeranalysis createNote Sample", + "origin": "API_DEFINITION", + "description": " Creates a new note.", + "canonical": true, + "file": "grafeas.create_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.CreateNote", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "note_id", + "type": "TYPE_STRING" + }, + { + "name": "note", + "type": ".grafeas.v1.Note" + } + ], + "resultType": ".grafeas.v1.Note", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "CreateNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.CreateNote", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_BatchCreateNotes_async", + "title": "containeranalysis batchCreateNotes Sample", + "origin": "API_DEFINITION", + "description": " Creates new notes in batch.", + "canonical": true, + "file": "grafeas.batch_create_notes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateNotes", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.BatchCreateNotes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "notes", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".grafeas.v1.BatchCreateNotesResponse", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "BatchCreateNotes", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.BatchCreateNotes", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_UpdateNote_async", + "title": "containeranalysis updateNote Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified note.", + "canonical": true, + "file": "grafeas.update_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.UpdateNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "note", + "type": ".grafeas.v1.Note" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".grafeas.v1.Note", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "UpdateNote", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.UpdateNote", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + }, + { + "regionTag": "containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_async", + "title": "containeranalysis listNoteOccurrences Sample", + "origin": "API_DEFINITION", + "description": " Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.", + "canonical": true, + "file": "grafeas.list_note_occurrences.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNoteOccurrences", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.ListNoteOccurrences", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1.ListNoteOccurrencesResponse", + "client": { + "shortName": "GrafeasClient", + "fullName": "google.devtools.containeranalysis.v1.GrafeasClient" + }, + "method": { + "shortName": "ListNoteOccurrences", + "fullName": "google.devtools.containeranalysis.v1.Grafeas.ListNoteOccurrences", + "service": { + "shortName": "Grafeas", + "fullName": "google.devtools.containeranalysis.v1.Grafeas" + } + } + } + } + ] +} diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js index 1fd0704453b..bb638d5b7fc 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -31,8 +37,7 @@ function main(resource) { // const options = {} // Imports the Containeranalysis library - const {ContainerAnalysisV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js index 3425416944c..0f28f0e1e51 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -26,8 +32,7 @@ function main(name) { // const name = 'abc123' // Imports the Containeranalysis library - const {ContainerAnalysisV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js index d707160598d..42995bf8f57 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -38,8 +44,7 @@ function main(parent, filter) { // const pageToken = 'abc123' // Imports the Containeranalysis library - const {ContainerAnalysisV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); @@ -52,11 +57,9 @@ function main(parent, filter) { }; // Run request - const iterable = await containeranalysisClient.listScanConfigsAsync( - request - ); + const iterable = await containeranalysisClient.listScanConfigsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js index 63b19acbea0..099ca29711e 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -33,8 +39,7 @@ function main(resource, policy) { // const policy = {} // Imports the Containeranalysis library - const {ContainerAnalysisV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js index dcd86b0594b..c041cd6c5b2 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -33,8 +39,7 @@ function main(resource, permissions) { // const permissions = 'abc123' // Imports the Containeranalysis library - const {ContainerAnalysisV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js index 5a859d2b0cf..399b7a202a3 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -30,8 +36,7 @@ function main(name, scanConfig) { // const scanConfig = {} // Imports the Containeranalysis library - const {ContainerAnalysisV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js index 0222b51ef9c..aff2edeb0c5 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -30,15 +36,15 @@ function main() { // const notes = 1234 // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callBatchCreateNotes() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.batchCreateNotes(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js index ade10bf3d68..a1d94dfd2dd 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -30,20 +36,18 @@ function main() { // const occurrences = 1234 // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callBatchCreateOccurrences() { // Construct request - const request = {}; + const request = { + }; // Run request - const response = await containeranalysisClient.batchCreateOccurrences( - request - ); + const response = await containeranalysisClient.batchCreateOccurrences(request); console.log(response); } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js index bce0810b0a4..2e03141c37e 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -34,15 +40,15 @@ function main() { // const note = {} // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callCreateNote() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.createNote(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js index aff3bd12627..fbafc428a30 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -30,15 +36,15 @@ function main() { // const occurrence = {} // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callCreateOccurrence() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.createOccurrence(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js index 0334008e363..73ce3bc42e3 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -26,15 +32,15 @@ function main() { // const name = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callDeleteNote() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.deleteNote(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js index f686e70a18f..551d9182e38 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -26,15 +32,15 @@ function main() { // const name = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callDeleteOccurrence() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.deleteOccurrence(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js index 45c8225b6dc..781c7055f03 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -26,15 +32,15 @@ function main() { // const name = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callGetNote() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.getNote(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js index 06d30f30870..13847f2e479 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -26,15 +32,15 @@ function main() { // const name = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callGetOccurrence() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.getOccurrence(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js index 102b236a3d9..7322597637c 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -26,15 +32,15 @@ function main() { // const name = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callGetOccurrenceNote() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.getOccurrenceNote(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js index 44e721f3e7a..fdfe355f531 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -30,19 +36,18 @@ function main() { // const filter = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callGetVulnerabilityOccurrencesSummary() { // Construct request - const request = {}; + const request = { + }; // Run request - const response = - await containeranalysisClient.getVulnerabilityOccurrencesSummary(request); + const response = await containeranalysisClient.getVulnerabilityOccurrencesSummary(request); console.log(response); } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js index 0b0270d96c8..5c0c2c3fba6 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -38,22 +44,20 @@ function main() { // const pageToken = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callListNoteOccurrences() { // Construct request - const request = {}; + const request = { + }; // Run request - const iterable = await containeranalysisClient.listNoteOccurrencesAsync( - request - ); + const iterable = await containeranalysisClient.listNoteOccurrencesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js index 73a40434db7..14ce913eca2 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -38,20 +44,20 @@ function main() { // const pageToken = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callListNotes() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await containeranalysisClient.listNotesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js index 3ed8e6c7d29..45e84a5fd57 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -38,22 +44,20 @@ function main() { // const pageToken = 'abc123' // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callListOccurrences() { // Construct request - const request = {}; + const request = { + }; // Run request - const iterable = await containeranalysisClient.listOccurrencesAsync( - request - ); + const iterable = await containeranalysisClient.listOccurrencesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js index e3adf4b1a3d..574065039f5 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -34,15 +40,15 @@ function main() { // const updateMask = {} // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callUpdateNote() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.updateNote(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js index b2c6995c352..4adeb9066e0 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js @@ -1,16 +1,22 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -34,15 +40,15 @@ function main() { // const updateMask = {} // Imports the Containeranalysis library - const {GrafeasV1Beta1Client} = - require('@google-cloud/containeranalysis').v1beta1; + const {GrafeasV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); async function callUpdateOccurrence() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await containeranalysisClient.updateOccurrence(request); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json new file mode 100644 index 00000000000..4d9051f9a97 --- /dev/null +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json @@ -0,0 +1,959 @@ +{ + "clientLibrary": { + "name": "nodejs-containeranalysis", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.devtools.containeranalysis.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_SetIamPolicy_async", + "title": "containeranalysis setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "canonical": true, + "file": "container_analysis_v1_beta1.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ContainerAnalysisV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1Client" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.SetIamPolicy", + "service": { + "shortName": "ContainerAnalysisV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GetIamPolicy_async", + "title": "containeranalysis getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "canonical": true, + "file": "container_analysis_v1_beta1.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ContainerAnalysisV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1Client" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetIamPolicy", + "service": { + "shortName": "ContainerAnalysisV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_TestIamPermissions_async", + "title": "containeranalysis testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "canonical": true, + "file": "container_analysis_v1_beta1.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "ContainerAnalysisV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1Client" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.TestIamPermissions", + "service": { + "shortName": "ContainerAnalysisV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GetScanConfig_async", + "title": "containeranalysis getScanConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets the specified scan configuration.", + "canonical": true, + "file": "container_analysis_v1_beta1.get_scan_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetScanConfig", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetScanConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.containeranalysis.v1beta1.ScanConfig", + "client": { + "shortName": "ContainerAnalysisV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1Client" + }, + "method": { + "shortName": "GetScanConfig", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GetScanConfig", + "service": { + "shortName": "ContainerAnalysisV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_ListScanConfigs_async", + "title": "containeranalysis listScanConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists scan configurations for the specified project.", + "canonical": true, + "file": "container_analysis_v1_beta1.list_scan_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListScanConfigs", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.ListScanConfigs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.containeranalysis.v1beta1.ListScanConfigsResponse", + "client": { + "shortName": "ContainerAnalysisV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1Client" + }, + "method": { + "shortName": "ListScanConfigs", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.ListScanConfigs", + "service": { + "shortName": "ContainerAnalysisV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_UpdateScanConfig_async", + "title": "containeranalysis updateScanConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified scan configuration.", + "canonical": true, + "file": "container_analysis_v1_beta1.update_scan_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateScanConfig", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.UpdateScanConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "scan_config", + "type": ".google.devtools.containeranalysis.v1beta1.ScanConfig" + } + ], + "resultType": ".google.devtools.containeranalysis.v1beta1.ScanConfig", + "client": { + "shortName": "ContainerAnalysisV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1Client" + }, + "method": { + "shortName": "UpdateScanConfig", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.UpdateScanConfig", + "service": { + "shortName": "ContainerAnalysisV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrence_async", + "title": "containeranalysis getOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Gets the specified occurrence.", + "canonical": true, + "file": "grafeas_v1_beta1.get_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetOccurrence", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1beta1.Occurrence", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "GetOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetOccurrence", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListOccurrences_async", + "title": "containeranalysis listOccurrences Sample", + "origin": "API_DEFINITION", + "description": " Lists occurrences for the specified project.", + "canonical": true, + "file": "grafeas_v1_beta1.list_occurrences.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOccurrences", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.ListOccurrences", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1beta1.ListOccurrencesResponse", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "ListOccurrences", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.ListOccurrences", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteOccurrence_async", + "title": "containeranalysis deleteOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.", + "canonical": true, + "file": "grafeas_v1_beta1.delete_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.DeleteOccurrence", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "DeleteOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.DeleteOccurrence", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateOccurrence_async", + "title": "containeranalysis createOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Creates a new occurrence.", + "canonical": true, + "file": "grafeas_v1_beta1.create_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.CreateOccurrence", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "occurrence", + "type": ".grafeas.v1beta1.Occurrence" + } + ], + "resultType": ".grafeas.v1beta1.Occurrence", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "CreateOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.CreateOccurrence", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateOccurrences_async", + "title": "containeranalysis batchCreateOccurrences Sample", + "origin": "API_DEFINITION", + "description": " Creates new occurrences in batch.", + "canonical": true, + "file": "grafeas_v1_beta1.batch_create_occurrences.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateOccurrences", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.BatchCreateOccurrences", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "occurrences", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".grafeas.v1beta1.BatchCreateOccurrencesResponse", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "BatchCreateOccurrences", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.BatchCreateOccurrences", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateOccurrence_async", + "title": "containeranalysis updateOccurrence Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified occurrence.", + "canonical": true, + "file": "grafeas_v1_beta1.update_occurrence.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.UpdateOccurrence", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "occurrence", + "type": ".grafeas.v1beta1.Occurrence" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".grafeas.v1beta1.Occurrence", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "UpdateOccurrence", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.UpdateOccurrence", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrenceNote_async", + "title": "containeranalysis getOccurrenceNote Sample", + "origin": "API_DEFINITION", + "description": " Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.", + "canonical": true, + "file": "grafeas_v1_beta1.get_occurrence_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOccurrenceNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetOccurrenceNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1beta1.Note", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "GetOccurrenceNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetOccurrenceNote", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetNote_async", + "title": "containeranalysis getNote Sample", + "origin": "API_DEFINITION", + "description": " Gets the specified note.", + "canonical": true, + "file": "grafeas_v1_beta1.get_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1beta1.Note", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "GetNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetNote", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNotes_async", + "title": "containeranalysis listNotes Sample", + "origin": "API_DEFINITION", + "description": " Lists notes for the specified project.", + "canonical": true, + "file": "grafeas_v1_beta1.list_notes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNotes", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.ListNotes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1beta1.ListNotesResponse", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "ListNotes", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.ListNotes", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteNote_async", + "title": "containeranalysis deleteNote Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified note.", + "canonical": true, + "file": "grafeas_v1_beta1.delete_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.DeleteNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "DeleteNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.DeleteNote", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateNote_async", + "title": "containeranalysis createNote Sample", + "origin": "API_DEFINITION", + "description": " Creates a new note.", + "canonical": true, + "file": "grafeas_v1_beta1.create_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.CreateNote", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "note_id", + "type": "TYPE_STRING" + }, + { + "name": "note", + "type": ".grafeas.v1beta1.Note" + } + ], + "resultType": ".grafeas.v1beta1.Note", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "CreateNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.CreateNote", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateNotes_async", + "title": "containeranalysis batchCreateNotes Sample", + "origin": "API_DEFINITION", + "description": " Creates new notes in batch.", + "canonical": true, + "file": "grafeas_v1_beta1.batch_create_notes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateNotes", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.BatchCreateNotes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "notes", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".grafeas.v1beta1.BatchCreateNotesResponse", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "BatchCreateNotes", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.BatchCreateNotes", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateNote_async", + "title": "containeranalysis updateNote Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified note.", + "canonical": true, + "file": "grafeas_v1_beta1.update_note.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.UpdateNote", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "note", + "type": ".grafeas.v1beta1.Note" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".grafeas.v1beta1.Note", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "UpdateNote", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.UpdateNote", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNoteOccurrences_async", + "title": "containeranalysis listNoteOccurrences Sample", + "origin": "API_DEFINITION", + "description": " Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.", + "canonical": true, + "file": "grafeas_v1_beta1.list_note_occurrences.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNoteOccurrences", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.ListNoteOccurrences", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1beta1.ListNoteOccurrencesResponse", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "ListNoteOccurrences", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.ListNoteOccurrences", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + }, + { + "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetVulnerabilityOccurrencesSummary_async", + "title": "containeranalysis getVulnerabilityOccurrencesSummary Sample", + "origin": "API_DEFINITION", + "description": " Gets a summary of the number and severity of occurrences.", + "canonical": true, + "file": "grafeas_v1_beta1.get_vulnerability_occurrences_summary.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVulnerabilityOccurrencesSummary", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetVulnerabilityOccurrencesSummary", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".grafeas.v1beta1.VulnerabilityOccurrencesSummary", + "client": { + "shortName": "GrafeasV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1Client" + }, + "method": { + "shortName": "GetVulnerabilityOccurrencesSummary", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1.GetVulnerabilityOccurrencesSummary", + "service": { + "shortName": "GrafeasV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.GrafeasV1Beta1" + } + } + } + } + ] +} diff --git a/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts b/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts index 4e84480039c..3c47c4f151d 100644 --- a/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1/container_analysis_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. @@ -607,7 +607,7 @@ export class ContainerAnalysisClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the project to get a vulnerability summary for in the form of + * Required. The name of the project to get a vulnerability summary for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. @@ -814,9 +814,8 @@ export class ContainerAnalysisClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.containerAnalysisStub!.then(stub => { + if (this.containerAnalysisStub && !this._terminated) { + return this.containerAnalysisStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-devtools-containeranalysis/src/v1/container_analysis_proto_list.json b/packages/google-devtools-containeranalysis/src/v1/container_analysis_proto_list.json index fc57e4e1abc..94cb583be0d 100644 --- a/packages/google-devtools-containeranalysis/src/v1/container_analysis_proto_list.json +++ b/packages/google-devtools-containeranalysis/src/v1/container_analysis_proto_list.json @@ -14,6 +14,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/google-devtools-containeranalysis/src/v1/grafeas_proto_list.json b/packages/google-devtools-containeranalysis/src/v1/grafeas_proto_list.json index fc57e4e1abc..94cb583be0d 100644 --- a/packages/google-devtools-containeranalysis/src/v1/grafeas_proto_list.json +++ b/packages/google-devtools-containeranalysis/src/v1/grafeas_proto_list.json @@ -14,6 +14,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/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts index b6834fdffd8..0105773d197 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_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. @@ -1089,9 +1089,8 @@ export class ContainerAnalysisV1Beta1Client { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.containerAnalysisV1Beta1Stub!.then(stub => { + if (this.containerAnalysisV1Beta1Stub && !this._terminated) { + return this.containerAnalysisV1Beta1Stub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts b/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts index 70498a058c3..e1e4037162a 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_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. @@ -2029,9 +2029,8 @@ export class GrafeasV1Beta1Client { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.grafeasV1Beta1Stub!.then(stub => { + if (this.grafeasV1Beta1Stub && !this._terminated) { + return this.grafeasV1Beta1Stub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-devtools-containeranalysis/system-test/fixtures/sample/src/index.js b/packages/google-devtools-containeranalysis/system-test/fixtures/sample/src/index.js index 27f74528322..860b9216895 100644 --- a/packages/google-devtools-containeranalysis/system-test/fixtures/sample/src/index.js +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/system-test/fixtures/sample/src/index.ts b/packages/google-devtools-containeranalysis/system-test/fixtures/sample/src/index.ts index bc742e71416..41c8c39789f 100644 --- a/packages/google-devtools-containeranalysis/system-test/fixtures/sample/src/index.ts +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/system-test/install.ts b/packages/google-devtools-containeranalysis/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-devtools-containeranalysis/system-test/install.ts +++ b/packages/google-devtools-containeranalysis/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/google-devtools-containeranalysis/test/gapic_container_analysis_v1.ts b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1.ts index 24e2a310fb1..b76cdb39495 100644 --- a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1.ts +++ b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_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. @@ -90,12 +90,27 @@ describe('v1.ContainerAnalysisClient', () => { assert(client.containerAnalysisStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new containeranalysisModule.v1.ContainerAnalysisClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.containerAnalysisStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new containeranalysisModule.v1.ContainerAnalysisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.containerAnalysisStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -241,6 +256,22 @@ describe('v1.ContainerAnalysisClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new containeranalysisModule.v1.ContainerAnalysisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); }); describe('getIamPolicy', () => { @@ -352,6 +383,22 @@ describe('v1.ContainerAnalysisClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new containeranalysisModule.v1.ContainerAnalysisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); }); describe('testIamPermissions', () => { @@ -464,6 +511,22 @@ describe('v1.ContainerAnalysisClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new containeranalysisModule.v1.ContainerAnalysisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); }); describe('getVulnerabilityOccurrencesSummary', () => { @@ -581,6 +644,25 @@ describe('v1.ContainerAnalysisClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getVulnerabilityOccurrencesSummary with closed client', async () => { + const client = new containeranalysisModule.v1.ContainerAnalysisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getVulnerabilityOccurrencesSummary(request), + expectedError + ); + }); }); describe('Path templates', () => { diff --git a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts index b885411269c..0b935e61ba2 100644 --- a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts +++ b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.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. @@ -164,7 +164,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { assert(client.containerAnalysisV1Beta1Stub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( { @@ -172,7 +172,25 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.close(); + client.initialize(); + assert(client.containerAnalysisV1Beta1Stub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.containerAnalysisV1Beta1Stub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -333,6 +351,25 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes setIamPolicy with closed client', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); }); describe('getIamPolicy', () => { @@ -453,6 +490,25 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getIamPolicy with closed client', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); }); describe('testIamPermissions', () => { @@ -574,6 +630,25 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes testIamPermissions with closed client', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); }); describe('getScanConfig', () => { @@ -694,6 +769,25 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getScanConfig with closed client', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.GetScanConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getScanConfig(request), expectedError); + }); }); describe('updateScanConfig', () => { @@ -814,6 +908,25 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateScanConfig with closed client', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.UpdateScanConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateScanConfig(request), expectedError); + }); }); describe('listScanConfigs', () => { diff --git a/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.ts b/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.ts index 3c87c824305..c19f91596fa 100644 --- a/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.ts +++ b/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.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. @@ -153,12 +153,27 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { assert(client.grafeasV1Beta1Stub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.grafeasV1Beta1Stub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.grafeasV1Beta1Stub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -304,6 +319,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getOccurrence with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.GetOccurrenceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getOccurrence(request), expectedError); + }); }); describe('deleteOccurrence', () => { @@ -415,6 +446,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteOccurrence with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.DeleteOccurrenceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteOccurrence(request), expectedError); + }); }); describe('createOccurrence', () => { @@ -526,6 +573,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createOccurrence with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.CreateOccurrenceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createOccurrence(request), expectedError); + }); }); describe('batchCreateOccurrences', () => { @@ -641,6 +704,25 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchCreateOccurrences with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.BatchCreateOccurrencesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchCreateOccurrences(request), + expectedError + ); + }); }); describe('updateOccurrence', () => { @@ -752,6 +834,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateOccurrence with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.UpdateOccurrenceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateOccurrence(request), expectedError); + }); }); describe('getOccurrenceNote', () => { @@ -863,6 +961,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getOccurrenceNote with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.GetOccurrenceNoteRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getOccurrenceNote(request), expectedError); + }); }); describe('getNote', () => { @@ -971,6 +1085,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getNote with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.GetNoteRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getNote(request), expectedError); + }); }); describe('deleteNote', () => { @@ -1082,6 +1212,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteNote with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.DeleteNoteRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteNote(request), expectedError); + }); }); describe('createNote', () => { @@ -1193,6 +1339,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createNote with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.CreateNoteRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createNote(request), expectedError); + }); }); describe('batchCreateNotes', () => { @@ -1304,6 +1466,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchCreateNotes with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.BatchCreateNotesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchCreateNotes(request), expectedError); + }); }); describe('updateNote', () => { @@ -1415,6 +1593,22 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateNote with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.UpdateNoteRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateNote(request), expectedError); + }); }); describe('getVulnerabilityOccurrencesSummary', () => { @@ -1532,6 +1726,25 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getVulnerabilityOccurrencesSummary with closed client', async () => { + const client = new grafeasv1beta1Module.v1beta1.GrafeasV1Beta1Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getVulnerabilityOccurrencesSummary(request), + expectedError + ); + }); }); describe('listOccurrences', () => {