diff --git a/java-grafeas/README.md b/java-grafeas/README.md index fc9b25185291..94a24aaa8ec0 100644 --- a/java-grafeas/README.md +++ b/java-grafeas/README.md @@ -14,7 +14,6 @@ Java idiomatic client for [Grafeas][product-docs]. If you are using Maven, add this to your pom.xml file: - ```xml @@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies: ```Scala libraryDependencies += "io.grafeas" % "grafeas" % "2.13.0" ``` - ## Authentication diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Common.java b/java-grafeas/src/main/java/io/grafeas/v1/Common.java index f7c01d6e2d84..1a42d02d24cf 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Common.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Common.java @@ -75,14 +75,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002 \001(\t\"!\n\014FileLocation\022\021\n\tfile_path\030\001 \001(\t" + "\"/\n\007License\022\022\n\nexpression\030\001 \001(\t\022\020\n\010comme" + "nts\030\002 \001(\t\",\n\006Digest\022\014\n\004algo\030\001 \001(\t\022\024\n\014dig" - + "est_bytes\030\002 \001(\014*\276\001\n\010NoteKind\022\031\n\025NOTE_KIN" + + "est_bytes\030\002 \001(\014*\334\001\n\010NoteKind\022\031\n\025NOTE_KIN" + "D_UNSPECIFIED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BU" + "ILD\020\002\022\t\n\005IMAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYM" + "ENT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n" + "\007UPGRADE\020\010\022\016\n\nCOMPLIANCE\020\t\022\024\n\020DSSE_ATTES" - + "TATION\020\nBQ\n\rio.grafeas.v1P\001Z8google.gola" - + "ng.org/genproto/googleapis/grafeas/v1;gr" - + "afeas\242\002\003GRAb\006proto3" + + "TATION\020\n\022\034\n\030VULNERABILITY_ASSESSMENT\020\013BQ" + + "\n\rio.grafeas.v1P\001Z8google.golang.org/gen" + + "proto/googleapis/grafeas/v1;grafeas\242\002\003GR" + + "Ab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java b/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java index 6be00a97e2c3..fd399c121f80 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/GrafeasOuterClass.java @@ -138,157 +138,160 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "iscovery.proto\032!grafeas/v1/dsse_attestat" + "ion.proto\032\026grafeas/v1/image.proto\032\030grafe" + "as/v1/package.proto\032\030grafeas/v1/upgrade." - + "proto\032\036grafeas/v1/vulnerability.proto\"\373\006" - + "\n\nOccurrence\022\014\n\004name\030\001 \001(\t\022\024\n\014resource_u" - + "ri\030\002 \001(\t\022\021\n\tnote_name\030\003 \001(\t\022\"\n\004kind\030\004 \001(" - + "\0162\024.grafeas.v1.NoteKind\022\023\n\013remediation\030\005" - + " \001(\t\022/\n\013create_time\030\006 \001(\0132\032.google.proto" - + "buf.Timestamp\022/\n\013update_time\030\007 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\022<\n\rvulnerability\030" - + "\010 \001(\0132#.grafeas.v1.VulnerabilityOccurren" - + "ceH\000\022,\n\005build\030\t \001(\0132\033.grafeas.v1.BuildOc" - + "currenceH\000\022,\n\005image\030\n \001(\0132\033.grafeas.v1.I" - + "mageOccurrenceH\000\0220\n\007package\030\013 \001(\0132\035.graf" - + "eas.v1.PackageOccurrenceH\000\0226\n\ndeployment" - + "\030\014 \001(\0132 .grafeas.v1.DeploymentOccurrence" - + "H\000\0224\n\tdiscovery\030\r \001(\0132\037.grafeas.v1.Disco" - + "veryOccurrenceH\000\0228\n\013attestation\030\016 \001(\0132!." - + "grafeas.v1.AttestationOccurrenceH\000\0220\n\007up" - + "grade\030\017 \001(\0132\035.grafeas.v1.UpgradeOccurren" - + "ceH\000\0226\n\ncompliance\030\020 \001(\0132 .grafeas.v1.Co" - + "mplianceOccurrenceH\000\022A\n\020dsse_attestation" - + "\030\021 \001(\0132%.grafeas.v1.DSSEAttestationOccur" - + "renceH\000\022&\n\010envelope\030\022 \001(\0132\024.grafeas.v1.E" - + "nvelope:G\352AD\n\025grafeas.io/Occurrence\022+pro" - + "jects/{project}/occurrences/{occurrence}" - + "B\t\n\007details\"\361\006\n\004Note\022\014\n\004name\030\001 \001(\t\022\031\n\021sh" - + "ort_description\030\002 \001(\t\022\030\n\020long_descriptio" - + "n\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.NoteK" - + "ind\022+\n\013related_url\030\005 \003(\0132\026.grafeas.v1.Re" - + "latedUrl\0223\n\017expiration_time\030\006 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022/\n\013create_time\030\007 \001" - + "(\0132\032.google.protobuf.Timestamp\022/\n\013update" - + "_time\030\010 \001(\0132\032.google.protobuf.Timestamp\022" - + "\032\n\022related_note_names\030\t \003(\t\0226\n\rvulnerabi" - + "lity\030\n \001(\0132\035.grafeas.v1.VulnerabilityNot" - + "eH\000\022&\n\005build\030\013 \001(\0132\025.grafeas.v1.BuildNot" - + "eH\000\022&\n\005image\030\014 \001(\0132\025.grafeas.v1.ImageNot" - + "eH\000\022*\n\007package\030\r \001(\0132\027.grafeas.v1.Packag" - + "eNoteH\000\0220\n\ndeployment\030\016 \001(\0132\032.grafeas.v1" - + ".DeploymentNoteH\000\022.\n\tdiscovery\030\017 \001(\0132\031.g" - + "rafeas.v1.DiscoveryNoteH\000\0222\n\013attestation" - + "\030\020 \001(\0132\033.grafeas.v1.AttestationNoteH\000\022*\n" - + "\007upgrade\030\021 \001(\0132\027.grafeas.v1.UpgradeNoteH" - + "\000\0220\n\ncompliance\030\022 \001(\0132\032.grafeas.v1.Compl" - + "ianceNoteH\000\022;\n\020dsse_attestation\030\023 \001(\0132\037." - + "grafeas.v1.DSSEAttestationNoteH\000:5\352A2\n\017g" - + "rafeas.io/Note\022\037projects/{project}/notes" - + "/{note}B\006\n\004type\"C\n\024GetOccurrenceRequest\022" - + "+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurr" - + "ence\"{\n\026ListOccurrencesRequest\022*\n\006parent" - + "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\022\016\n\006fi" - + "lter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_to" - + "ken\030\004 \001(\t\"_\n\027ListOccurrencesResponse\022+\n\013" - + "occurrences\030\001 \003(\0132\026.grafeas.v1.Occurrenc" - + "e\022\027\n\017next_page_token\030\002 \001(\t\"F\n\027DeleteOccu" - + "rrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" - + "feas.io/Occurrence\"v\n\027CreateOccurrenceRe" - + "quest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.i" - + "o/Project\022/\n\noccurrence\030\002 \001(\0132\026.grafeas." - + "v1.OccurrenceB\003\340A\002\"\250\001\n\027UpdateOccurrenceR" - + "equest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io" - + "/Occurrence\022/\n\noccurrence\030\002 \001(\0132\026.grafea" - + "s.v1.OccurrenceB\003\340A\002\022/\n\013update_mask\030\003 \001(" - + "\0132\032.google.protobuf.FieldMask\"7\n\016GetNote" - + "Request\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.i" - + "o/Note\"G\n\030GetOccurrenceNoteRequest\022+\n\004na" - + "me\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"" - + "u\n\020ListNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002" - + "\372A\024\n\022grafeas.io/Project\022\016\n\006filter\030\002 \001(\t\022" - + "\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"M" - + "\n\021ListNotesResponse\022\037\n\005notes\030\001 \003(\0132\020.gra" - + "feas.v1.Note\022\027\n\017next_page_token\030\002 \001(\t\":\n" - + "\021DeleteNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021" - + "\n\017grafeas.io/Note\"z\n\021CreateNoteRequest\022*" - + "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" - + "ct\022\024\n\007note_id\030\002 \001(\tB\003\340A\002\022#\n\004note\030\003 \001(\0132\020" - + ".grafeas.v1.NoteB\003\340A\002\"\220\001\n\021UpdateNoteRequ" - + "est\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/No" - + "te\022#\n\004note\030\002 \001(\0132\020.grafeas.v1.NoteB\003\340A\002\022" + + "proto\032\024grafeas/v1/vex.proto\032\036grafeas/v1/" + + "vulnerability.proto\"\373\006\n\nOccurrence\022\014\n\004na" + + "me\030\001 \001(\t\022\024\n\014resource_uri\030\002 \001(\t\022\021\n\tnote_n" + + "ame\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas.v1.Not" + + "eKind\022\023\n\013remediation\030\005 \001(\t\022/\n\013create_tim" + + "e\030\006 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + + "pdate_time\030\007 \001(\0132\032.google.protobuf.Times" + + "tamp\022<\n\rvulnerability\030\010 \001(\0132#.grafeas.v1" + + ".VulnerabilityOccurrenceH\000\022,\n\005build\030\t \001(" + + "\0132\033.grafeas.v1.BuildOccurrenceH\000\022,\n\005imag" + + "e\030\n \001(\0132\033.grafeas.v1.ImageOccurrenceH\000\0220" + + "\n\007package\030\013 \001(\0132\035.grafeas.v1.PackageOccu" + + "rrenceH\000\0226\n\ndeployment\030\014 \001(\0132 .grafeas.v" + + "1.DeploymentOccurrenceH\000\0224\n\tdiscovery\030\r " + + "\001(\0132\037.grafeas.v1.DiscoveryOccurrenceH\000\0228" + + "\n\013attestation\030\016 \001(\0132!.grafeas.v1.Attesta" + + "tionOccurrenceH\000\0220\n\007upgrade\030\017 \001(\0132\035.graf" + + "eas.v1.UpgradeOccurrenceH\000\0226\n\ncompliance" + + "\030\020 \001(\0132 .grafeas.v1.ComplianceOccurrence" + + "H\000\022A\n\020dsse_attestation\030\021 \001(\0132%.grafeas.v" + + "1.DSSEAttestationOccurrenceH\000\022&\n\010envelop" + + "e\030\022 \001(\0132\024.grafeas.v1.Envelope:G\352AD\n\025graf" + + "eas.io/Occurrence\022+projects/{project}/oc" + + "currences/{occurrence}B\t\n\007details\"\276\007\n\004No" + + "te\022\014\n\004name\030\001 \001(\t\022\031\n\021short_description\030\002 " + + "\001(\t\022\030\n\020long_description\030\003 \001(\t\022\"\n\004kind\030\004 " + + "\001(\0162\024.grafeas.v1.NoteKind\022+\n\013related_url" + + "\030\005 \003(\0132\026.grafeas.v1.RelatedUrl\0223\n\017expira" + + "tion_time\030\006 \001(\0132\032.google.protobuf.Timest" + + "amp\022/\n\013create_time\030\007 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013update_time\030\010 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022\032\n\022related_note_na" + + "mes\030\t \003(\t\0226\n\rvulnerability\030\n \001(\0132\035.grafe" + + "as.v1.VulnerabilityNoteH\000\022&\n\005build\030\013 \001(\013" + + "2\025.grafeas.v1.BuildNoteH\000\022&\n\005image\030\014 \001(\013" + + "2\025.grafeas.v1.ImageNoteH\000\022*\n\007package\030\r \001" + + "(\0132\027.grafeas.v1.PackageNoteH\000\0220\n\ndeploym" + + "ent\030\016 \001(\0132\032.grafeas.v1.DeploymentNoteH\000\022" + + ".\n\tdiscovery\030\017 \001(\0132\031.grafeas.v1.Discover" + + "yNoteH\000\0222\n\013attestation\030\020 \001(\0132\033.grafeas.v" + + "1.AttestationNoteH\000\022*\n\007upgrade\030\021 \001(\0132\027.g" + + "rafeas.v1.UpgradeNoteH\000\0220\n\ncompliance\030\022 " + + "\001(\0132\032.grafeas.v1.ComplianceNoteH\000\022;\n\020dss" + + "e_attestation\030\023 \001(\0132\037.grafeas.v1.DSSEAtt" + + "estationNoteH\000\022K\n\030vulnerability_assessme" + + "nt\030\024 \001(\0132\'.grafeas.v1.VulnerabilityAsses" + + "smentNoteH\000:5\352A2\n\017grafeas.io/Note\022\037proje" + + "cts/{project}/notes/{note}B\006\n\004type\"C\n\024Ge" + + "tOccurrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027" + + "\n\025grafeas.io/Occurrence\"{\n\026ListOccurrenc" + + "esRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafe" + + "as.io/Project\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_si" + + "ze\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"_\n\027ListOccu" + + "rrencesResponse\022+\n\013occurrences\030\001 \003(\0132\026.g" + + "rafeas.v1.Occurrence\022\027\n\017next_page_token\030" + + "\002 \001(\t\"F\n\027DeleteOccurrenceRequest\022+\n\004name" + + "\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"v\n" + + "\027CreateOccurrenceRequest\022*\n\006parent\030\001 \001(\t" + + "B\032\340A\002\372A\024\n\022grafeas.io/Project\022/\n\noccurren" + + "ce\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\"\250\001" + + "\n\027UpdateOccurrenceRequest\022+\n\004name\030\001 \001(\tB" + + "\035\340A\002\372A\027\n\025grafeas.io/Occurrence\022/\n\noccurr" + + "ence\030\002 \001(\0132\026.grafeas.v1.OccurrenceB\003\340A\002\022" + "/\n\013update_mask\030\003 \001(\0132\032.google.protobuf.F" - + "ieldMask\"z\n\032ListNoteOccurrencesRequest\022%" - + "\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\022\016\n" - + "\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage" - + "_token\030\004 \001(\t\"c\n\033ListNoteOccurrencesRespo" - + "nse\022+\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Oc" - + "currence\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n\027Ba" - + "tchCreateNotesRequest\022*\n\006parent\030\001 \001(\tB\032\340" - + "A\002\372A\024\n\022grafeas.io/Project\022B\n\005notes\030\002 \003(\013" - + "2..grafeas.v1.BatchCreateNotesRequest.No" - + "tesEntryB\003\340A\002\032>\n\nNotesEntry\022\013\n\003key\030\001 \001(\t" - + "\022\037\n\005value\030\002 \001(\0132\020.grafeas.v1.Note:\0028\001\";\n" - + "\030BatchCreateNotesResponse\022\037\n\005notes\030\001 \003(\013" - + "2\020.grafeas.v1.Note\"}\n\035BatchCreateOccurre" - + "ncesRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022gra" - + "feas.io/Project\0220\n\013occurrences\030\002 \003(\0132\026.g" - + "rafeas.v1.OccurrenceB\003\340A\002\"M\n\036BatchCreate" - + "OccurrencesResponse\022+\n\013occurrences\030\001 \003(\013" - + "2\026.grafeas.v1.Occurrence2\222\020\n\007Grafeas\022}\n\r" - + "GetOccurrence\022 .grafeas.v1.GetOccurrence" - + "Request\032\026.grafeas.v1.Occurrence\"2\202\323\344\223\002%\022" - + "#/v1/{name=projects/*/occurrences/*}\332A\004n" - + "ame\022\227\001\n\017ListOccurrences\022\".grafeas.v1.Lis" - + "tOccurrencesRequest\032#.grafeas.v1.ListOcc" - + "urrencesResponse\";\202\323\344\223\002%\022#/v1/{parent=pr" - + "ojects/*}/occurrences\332A\rparent,filter\022\203\001" - + "\n\020DeleteOccurrence\022#.grafeas.v1.DeleteOc" - + "currenceRequest\032\026.google.protobuf.Empty\"" - + "2\202\323\344\223\002%*#/v1/{name=projects/*/occurrence" - + "s/*}\332A\004name\022\234\001\n\020CreateOccurrence\022#.grafe" - + "as.v1.CreateOccurrenceRequest\032\026.grafeas." - + "v1.Occurrence\"K\202\323\344\223\0021\"#/v1/{parent=proje" - + "cts/*}/occurrences:\noccurrence\332A\021parent," - + "occurrence\022\300\001\n\026BatchCreateOccurrences\022)." - + "grafeas.v1.BatchCreateOccurrencesRequest" - + "\032*.grafeas.v1.BatchCreateOccurrencesResp" - + "onse\"O\202\323\344\223\0024\"//v1/{parent=projects/*}/oc" - + "currences:batchCreate:\001*\332A\022parent,occurr" - + "ences\022\246\001\n\020UpdateOccurrence\022#.grafeas.v1." - + "UpdateOccurrenceRequest\032\026.grafeas.v1.Occ" - + "urrence\"U\202\323\344\223\00212#/v1/{name=projects/*/oc" - + "currences/*}:\noccurrence\332A\033name,occurren" - + "ce,update_mask\022\205\001\n\021GetOccurrenceNote\022$.g" - + "rafeas.v1.GetOccurrenceNoteRequest\032\020.gra" - + "feas.v1.Note\"8\202\323\344\223\002+\022)/v1/{name=projects" - + "/*/occurrences/*}/notes\332A\004name\022e\n\007GetNot" - + "e\022\032.grafeas.v1.GetNoteRequest\032\020.grafeas." - + "v1.Note\",\202\323\344\223\002\037\022\035/v1/{name=projects/*/no" - + "tes/*}\332A\004name\022\177\n\tListNotes\022\034.grafeas.v1." - + "ListNotesRequest\032\035.grafeas.v1.ListNotesR" - + "esponse\"5\202\323\344\223\002\037\022\035/v1/{parent=projects/*}" - + "/notes\332A\rparent,filter\022q\n\nDeleteNote\022\035.g" - + "rafeas.v1.DeleteNoteRequest\032\026.google.pro" - + "tobuf.Empty\",\202\323\344\223\002\037*\035/v1/{name=projects/" - + "*/notes/*}\332A\004name\022\200\001\n\nCreateNote\022\035.grafe" - + "as.v1.CreateNoteRequest\032\020.grafeas.v1.Not" - + "e\"A\202\323\344\223\002%\"\035/v1/{parent=projects/*}/notes" - + ":\004note\332A\023parent,note_id,note\022\242\001\n\020BatchCr" - + "eateNotes\022#.grafeas.v1.BatchCreateNotesR" - + "equest\032$.grafeas.v1.BatchCreateNotesResp" - + "onse\"C\202\323\344\223\002.\")/v1/{parent=projects/*}/no" - + "tes:batchCreate:\001*\332A\014parent,notes\022\202\001\n\nUp" - + "dateNote\022\035.grafeas.v1.UpdateNoteRequest\032" - + "\020.grafeas.v1.Note\"C\202\323\344\223\002%2\035/v1/{name=pro" - + "jects/*/notes/*}:\004note\332A\025name,note,updat" - + "e_mask\022\247\001\n\023ListNoteOccurrences\022&.grafeas" - + ".v1.ListNoteOccurrencesRequest\032\'.grafeas" - + ".v1.ListNoteOccurrencesResponse\"?\202\323\344\223\002+\022" - + ")/v1/{name=projects/*/notes/*}/occurrenc" - + "es\332A\013name,filter\032#\312A containeranalysis.g" - + "oogleapis.comB|\n\rio.grafeas.v1P\001Z8google" - + ".golang.org/genproto/googleapis/grafeas/" - + "v1;grafeas\242\002\003GRA\352A(\n\022grafeas.io/Project\022" - + "\022projects/{project}b\006proto3" + + "ieldMask\"7\n\016GetNoteRequest\022%\n\004name\030\001 \001(\t" + + "B\027\340A\002\372A\021\n\017grafeas.io/Note\"G\n\030GetOccurren" + + "ceNoteRequest\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025gra" + + "feas.io/Occurrence\"u\n\020ListNotesRequest\022*" + + "\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Proje" + + "ct\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + + "\npage_token\030\004 \001(\t\"M\n\021ListNotesResponse\022\037" + + "\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\022\027\n\017next_" + + "page_token\030\002 \001(\t\":\n\021DeleteNoteRequest\022%\n" + + "\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note\"z\n\021" + + "CreateNoteRequest\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A" + + "\024\n\022grafeas.io/Project\022\024\n\007note_id\030\002 \001(\tB\003" + + "\340A\002\022#\n\004note\030\003 \001(\0132\020.grafeas.v1.NoteB\003\340A\002" + + "\"\220\001\n\021UpdateNoteRequest\022%\n\004name\030\001 \001(\tB\027\340A" + + "\002\372A\021\n\017grafeas.io/Note\022#\n\004note\030\002 \001(\0132\020.gr" + + "afeas.v1.NoteB\003\340A\002\022/\n\013update_mask\030\003 \001(\0132" + + "\032.google.protobuf.FieldMask\"z\n\032ListNoteO" + + "ccurrencesRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n" + + "\017grafeas.io/Note\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage" + + "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"c\n\033ListN" + + "oteOccurrencesResponse\022+\n\013occurrences\030\001 " + + "\003(\0132\026.grafeas.v1.Occurrence\022\027\n\017next_page" + + "_token\030\002 \001(\t\"\311\001\n\027BatchCreateNotesRequest" + + "\022*\n\006parent\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Pro" + + "ject\022B\n\005notes\030\002 \003(\0132..grafeas.v1.BatchCr" + + "eateNotesRequest.NotesEntryB\003\340A\002\032>\n\nNote" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\037\n\005value\030\002 \001(\0132\020.gra" + + "feas.v1.Note:\0028\001\";\n\030BatchCreateNotesResp" + + "onse\022\037\n\005notes\030\001 \003(\0132\020.grafeas.v1.Note\"}\n" + + "\035BatchCreateOccurrencesRequest\022*\n\006parent" + + "\030\001 \001(\tB\032\340A\002\372A\024\n\022grafeas.io/Project\0220\n\013oc" + + "currences\030\002 \003(\0132\026.grafeas.v1.OccurrenceB" + + "\003\340A\002\"M\n\036BatchCreateOccurrencesResponse\022+" + + "\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Occurre" + + "nce2\222\020\n\007Grafeas\022}\n\rGetOccurrence\022 .grafe" + + "as.v1.GetOccurrenceRequest\032\026.grafeas.v1." + + "Occurrence\"2\202\323\344\223\002%\022#/v1/{name=projects/*" + + "/occurrences/*}\332A\004name\022\227\001\n\017ListOccurrenc" + + "es\022\".grafeas.v1.ListOccurrencesRequest\032#" + + ".grafeas.v1.ListOccurrencesResponse\";\202\323\344" + + "\223\002%\022#/v1/{parent=projects/*}/occurrences" + + "\332A\rparent,filter\022\203\001\n\020DeleteOccurrence\022#." + + "grafeas.v1.DeleteOccurrenceRequest\032\026.goo" + + "gle.protobuf.Empty\"2\202\323\344\223\002%*#/v1/{name=pr" + + "ojects/*/occurrences/*}\332A\004name\022\234\001\n\020Creat" + + "eOccurrence\022#.grafeas.v1.CreateOccurrenc" + + "eRequest\032\026.grafeas.v1.Occurrence\"K\202\323\344\223\0021" + + "\"#/v1/{parent=projects/*}/occurrences:\no" + + "ccurrence\332A\021parent,occurrence\022\300\001\n\026BatchC" + + "reateOccurrences\022).grafeas.v1.BatchCreat" + + "eOccurrencesRequest\032*.grafeas.v1.BatchCr" + + "eateOccurrencesResponse\"O\202\323\344\223\0024\"//v1/{pa" + + "rent=projects/*}/occurrences:batchCreate" + + ":\001*\332A\022parent,occurrences\022\246\001\n\020UpdateOccur" + + "rence\022#.grafeas.v1.UpdateOccurrenceReque" + + "st\032\026.grafeas.v1.Occurrence\"U\202\323\344\223\00212#/v1/" + + "{name=projects/*/occurrences/*}:\noccurre" + + "nce\332A\033name,occurrence,update_mask\022\205\001\n\021Ge" + + "tOccurrenceNote\022$.grafeas.v1.GetOccurren" + + "ceNoteRequest\032\020.grafeas.v1.Note\"8\202\323\344\223\002+\022" + + ")/v1/{name=projects/*/occurrences/*}/not" + + "es\332A\004name\022e\n\007GetNote\022\032.grafeas.v1.GetNot" + + "eRequest\032\020.grafeas.v1.Note\",\202\323\344\223\002\037\022\035/v1/" + + "{name=projects/*/notes/*}\332A\004name\022\177\n\tList" + + "Notes\022\034.grafeas.v1.ListNotesRequest\032\035.gr" + + "afeas.v1.ListNotesResponse\"5\202\323\344\223\002\037\022\035/v1/" + + "{parent=projects/*}/notes\332A\rparent,filte" + + "r\022q\n\nDeleteNote\022\035.grafeas.v1.DeleteNoteR" + + "equest\032\026.google.protobuf.Empty\",\202\323\344\223\002\037*\035" + + "/v1/{name=projects/*/notes/*}\332A\004name\022\200\001\n" + + "\nCreateNote\022\035.grafeas.v1.CreateNoteReque" + + "st\032\020.grafeas.v1.Note\"A\202\323\344\223\002%\"\035/v1/{paren" + + "t=projects/*}/notes:\004note\332A\023parent,note_" + + "id,note\022\242\001\n\020BatchCreateNotes\022#.grafeas.v" + + "1.BatchCreateNotesRequest\032$.grafeas.v1.B" + + "atchCreateNotesResponse\"C\202\323\344\223\002.\")/v1/{pa" + + "rent=projects/*}/notes:batchCreate:\001*\332A\014" + + "parent,notes\022\202\001\n\nUpdateNote\022\035.grafeas.v1" + + ".UpdateNoteRequest\032\020.grafeas.v1.Note\"C\202\323" + + "\344\223\002%2\035/v1/{name=projects/*/notes/*}:\004not" + + "e\332A\025name,note,update_mask\022\247\001\n\023ListNoteOc" + + "currences\022&.grafeas.v1.ListNoteOccurrenc" + + "esRequest\032\'.grafeas.v1.ListNoteOccurrenc" + + "esResponse\"?\202\323\344\223\002+\022)/v1/{name=projects/*" + + "/notes/*}/occurrences\332A\013name,filter\032#\312A " + + "containeranalysis.googleapis.comB|\n\rio.g" + + "rafeas.v1P\001Z8google.golang.org/genproto/" + + "googleapis/grafeas/v1;grafeas\242\002\003GRA\352A(\n\022" + + "grafeas.io/Project\022\022projects/{project}b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -311,6 +314,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.Image.getDescriptor(), io.grafeas.v1.Package.getDescriptor(), io.grafeas.v1.Upgrade.getDescriptor(), + io.grafeas.v1.Vex.getDescriptor(), io.grafeas.v1.Vulnerability.getDescriptor(), }); internal_static_grafeas_v1_Occurrence_descriptor = getDescriptor().getMessageTypes().get(0); @@ -362,6 +366,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Upgrade", "Compliance", "DsseAttestation", + "VulnerabilityAssessment", "Type", }); internal_static_grafeas_v1_GetOccurrenceRequest_descriptor = @@ -551,6 +556,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.Image.getDescriptor(); io.grafeas.v1.Package.getDescriptor(); io.grafeas.v1.Upgrade.getDescriptor(); + io.grafeas.v1.Vex.getDescriptor(); io.grafeas.v1.Vulnerability.getDescriptor(); } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Note.java b/java-grafeas/src/main/java/io/grafeas/v1/Note.java index 3eaf0e457bf8..9f8e76eb5192 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Note.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Note.java @@ -87,6 +87,7 @@ public enum TypeCase UPGRADE(17), COMPLIANCE(18), DSSE_ATTESTATION(19), + VULNERABILITY_ASSESSMENT(20), TYPE_NOT_SET(0); private final int value; @@ -125,6 +126,8 @@ public static TypeCase forNumber(int value) { return COMPLIANCE; case 19: return DSSE_ATTESTATION; + case 20: + return VULNERABILITY_ASSESSMENT; case 0: return TYPE_NOT_SET; default: @@ -1123,6 +1126,57 @@ public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() return io.grafeas.v1.DSSEAttestationNote.getDefaultInstance(); } + public static final int VULNERABILITY_ASSESSMENT_FIELD_NUMBER = 20; + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return Whether the vulnerabilityAssessment field is set. + */ + @java.lang.Override + public boolean hasVulnerabilityAssessment() { + return typeCase_ == 20; + } + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return The vulnerabilityAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder() { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1194,6 +1248,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (typeCase_ == 19) { output.writeMessage(19, (io.grafeas.v1.DSSEAttestationNote) type_); } + if (typeCase_ == 20) { + output.writeMessage(20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); + } getUnknownFields().writeTo(output); } @@ -1285,6 +1342,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 19, (io.grafeas.v1.DSSEAttestationNote) type_); } + if (typeCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (io.grafeas.v1.VulnerabilityAssessmentNote) type_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1350,6 +1412,9 @@ public boolean equals(final java.lang.Object obj) { case 19: if (!getDsseAttestation().equals(other.getDsseAttestation())) return false; break; + case 20: + if (!getVulnerabilityAssessment().equals(other.getVulnerabilityAssessment())) return false; + break; case 0: default: } @@ -1433,6 +1498,10 @@ public int hashCode() { hash = (37 * hash) + DSSE_ATTESTATION_FIELD_NUMBER; hash = (53 * hash) + getDsseAttestation().hashCode(); break; + case 20: + hash = (37 * hash) + VULNERABILITY_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getVulnerabilityAssessment().hashCode(); + break; case 0: default: } @@ -1628,6 +1697,9 @@ public Builder clear() { if (dsseAttestationBuilder_ != null) { dsseAttestationBuilder_.clear(); } + if (vulnerabilityAssessmentBuilder_ != null) { + vulnerabilityAssessmentBuilder_.clear(); + } typeCase_ = 0; type_ = null; return this; @@ -1740,6 +1812,9 @@ private void buildPartialOneofs(io.grafeas.v1.Note result) { if (typeCase_ == 19 && dsseAttestationBuilder_ != null) { result.type_ = dsseAttestationBuilder_.build(); } + if (typeCase_ == 20 && vulnerabilityAssessmentBuilder_ != null) { + result.type_ = vulnerabilityAssessmentBuilder_.build(); + } } @java.lang.Override @@ -1902,6 +1977,11 @@ public Builder mergeFrom(io.grafeas.v1.Note other) { mergeDsseAttestation(other.getDsseAttestation()); break; } + case VULNERABILITY_ASSESSMENT: + { + mergeVulnerabilityAssessment(other.getVulnerabilityAssessment()); + break; + } case TYPE_NOT_SET: { break; @@ -2054,6 +2134,13 @@ public Builder mergeFrom( typeCase_ = 19; break; } // case 154 + case 162: + { + input.readMessage( + getVulnerabilityAssessmentFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 20; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5624,6 +5711,216 @@ public io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder() return dsseAttestationBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder, + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> + vulnerabilityAssessmentBuilder_; + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return Whether the vulnerabilityAssessment field is set. + */ + @java.lang.Override + public boolean hasVulnerabilityAssessment() { + return typeCase_ == 20; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return The vulnerabilityAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } else { + if (typeCase_ == 20) { + return vulnerabilityAssessmentBuilder_.getMessage(); + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder setVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { + if (vulnerabilityAssessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + vulnerabilityAssessmentBuilder_.setMessage(value); + } + typeCase_ = 20; + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder setVulnerabilityAssessment( + io.grafeas.v1.VulnerabilityAssessmentNote.Builder builderForValue) { + if (vulnerabilityAssessmentBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + vulnerabilityAssessmentBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 20; + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder mergeVulnerabilityAssessment(io.grafeas.v1.VulnerabilityAssessmentNote value) { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20 + && type_ != io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance()) { + type_ = + io.grafeas.v1.VulnerabilityAssessmentNote.newBuilder( + (io.grafeas.v1.VulnerabilityAssessmentNote) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 20) { + vulnerabilityAssessmentBuilder_.mergeFrom(value); + } else { + vulnerabilityAssessmentBuilder_.setMessage(value); + } + } + typeCase_ = 20; + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public Builder clearVulnerabilityAssessment() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (typeCase_ == 20) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 20) { + typeCase_ = 0; + type_ = null; + } + vulnerabilityAssessmentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Builder getVulnerabilityAssessmentBuilder() { + return getVulnerabilityAssessmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder + getVulnerabilityAssessmentOrBuilder() { + if ((typeCase_ == 20) && (vulnerabilityAssessmentBuilder_ != null)) { + return vulnerabilityAssessmentBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 20) { + return (io.grafeas.v1.VulnerabilityAssessmentNote) type_; + } + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + } + /** + * + * + *
+     * A note describing a vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder, + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder> + getVulnerabilityAssessmentFieldBuilder() { + if (vulnerabilityAssessmentBuilder_ == null) { + if (!(typeCase_ == 20)) { + type_ = io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + vulnerabilityAssessmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder, + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder>( + (io.grafeas.v1.VulnerabilityAssessmentNote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 20; + onChanged(); + return vulnerabilityAssessmentBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java b/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java index d21eac6e8e86..acced9ba551b 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/NoteKind.java @@ -139,6 +139,16 @@ public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum { * DSSE_ATTESTATION = 10; */ DSSE_ATTESTATION(10), + /** + * + * + *
+   * This represents a Vulnerability Assessment.
+   * 
+ * + * VULNERABILITY_ASSESSMENT = 11; + */ + VULNERABILITY_ASSESSMENT(11), UNRECOGNIZED(-1), ; @@ -252,6 +262,16 @@ public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum { * DSSE_ATTESTATION = 10; */ public static final int DSSE_ATTESTATION_VALUE = 10; + /** + * + * + *
+   * This represents a Vulnerability Assessment.
+   * 
+ * + * VULNERABILITY_ASSESSMENT = 11; + */ + public static final int VULNERABILITY_ASSESSMENT_VALUE = 11; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -299,6 +319,8 @@ public static NoteKind forNumber(int value) { return COMPLIANCE; case 10: return DSSE_ATTESTATION; + case 11: + return VULNERABILITY_ASSESSMENT; default: return null; } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java index 7bbaf91e1d3d..8a9e6800c60e 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/NoteOrBuilder.java @@ -691,5 +691,40 @@ public interface NoteOrBuilder */ io.grafeas.v1.DSSEAttestationNoteOrBuilder getDsseAttestationOrBuilder(); + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return Whether the vulnerabilityAssessment field is set. + */ + boolean hasVulnerabilityAssessment(); + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + * + * @return The vulnerabilityAssessment. + */ + io.grafeas.v1.VulnerabilityAssessmentNote getVulnerabilityAssessment(); + /** + * + * + *
+   * A note describing a vulnerability assessment.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; + */ + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder getVulnerabilityAssessmentOrBuilder(); + public io.grafeas.v1.Note.TypeCase getTypeCase(); } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Vex.java b/java-grafeas/src/main/java/io/grafeas/v1/Vex.java new file mode 100644 index 000000000000..ca88e4697d34 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/Vex.java @@ -0,0 +1,187 @@ +/* + * Copyright 2019 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 + * + * 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. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vex.proto + +package io.grafeas.v1; + +public final class Vex { + private Vex() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\024grafeas/v1/vex.proto\022\ngrafeas.v1\032\027graf" + + "eas/v1/common.proto\"\252\r\n\033VulnerabilityAss" + + "essmentNote\022\r\n\005title\030\001 \001(\t\022\031\n\021short_desc" + + "ription\030\002 \001(\t\022\030\n\020long_description\030\003 \001(\t\022" + + "\025\n\rlanguage_code\030\004 \001(\t\022D\n\tpublisher\030\005 \001(" + + "\01321.grafeas.v1.VulnerabilityAssessmentNo" + + "te.Publisher\022@\n\007product\030\006 \001(\0132/.grafeas." + + "v1.VulnerabilityAssessmentNote.Product\022F" + + "\n\nassessment\030\007 \001(\01322.grafeas.v1.Vulnerab" + + "ilityAssessmentNote.Assessment\032Q\n\tPublis" + + "her\022\014\n\004name\030\001 \001(\t\022\031\n\021issuing_authority\030\002" + + " \001(\t\022\033\n\023publisher_namespace\030\003 \001(\t\032H\n\007Pro" + + "duct\022\014\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\025\n\013generi" + + "c_uri\030\003 \001(\tH\000B\014\n\nidentifier\032\302\t\n\nAssessme" + + "nt\022\013\n\003cve\030\001 \001(\t\022\031\n\021short_description\030\002 \001" + + "(\t\022\030\n\020long_description\030\003 \001(\t\022,\n\014related_" + + "uris\030\004 \003(\0132\026.grafeas.v1.RelatedUrl\022G\n\005st" + + "ate\030\005 \001(\01628.grafeas.v1.VulnerabilityAsse" + + "ssmentNote.Assessment.State\022\017\n\007impacts\030\006" + + " \003(\t\022W\n\rjustification\030\007 \001(\0132@.grafeas.v1" + + ".VulnerabilityAssessmentNote.Assessment." + + "Justification\022T\n\014remediations\030\010 \003(\0132>.gr" + + "afeas.v1.VulnerabilityAssessmentNote.Ass" + + "essment.Remediation\032\214\003\n\rJustification\022n\n" + + "\022justification_type\030\001 \001(\0162R.grafeas.v1.V" + + "ulnerabilityAssessmentNote.Assessment.Ju" + + "stification.JustificationType\022\017\n\007details" + + "\030\002 \001(\t\"\371\001\n\021JustificationType\022\"\n\036JUSTIFIC" + + "ATION_TYPE_UNSPECIFIED\020\000\022\031\n\025COMPONENT_NO" + + "T_PRESENT\020\001\022\037\n\033VULNERABLE_CODE_NOT_PRESE" + + "NT\020\002\022\'\n#VULNERABLE_CODE_NOT_IN_EXECUTE_P" + + "ATH\020\003\0225\n1VULNERABLE_CODE_CANNOT_BE_CONTR" + + "OLLED_BY_ADVERSARY\020\004\022$\n INLINE_MITIGATIO" + + "NS_ALREADY_EXIST\020\005\032\307\002\n\013Remediation\022h\n\020re" + + "mediation_type\030\001 \001(\0162N.grafeas.v1.Vulner" + + "abilityAssessmentNote.Assessment.Remedia" + + "tion.RemediationType\022\017\n\007details\030\002 \001(\t\022/\n" + + "\017remediation_uri\030\003 \001(\0132\026.grafeas.v1.Rela" + + "tedUrl\"\213\001\n\017RemediationType\022 \n\034REMEDIATIO" + + "N_TYPE_UNSPECIFIED\020\000\022\016\n\nMITIGATION\020\001\022\022\n\016" + + "NO_FIX_PLANNED\020\002\022\022\n\016NONE_AVAILABLE\020\003\022\016\n\n" + + "VENDOR_FIX\020\004\022\016\n\nWORKAROUND\020\005\"b\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n\010AFFECTED\020\001\022\020\n\014NO" + + "T_AFFECTED\020\002\022\t\n\005FIXED\020\003\022\027\n\023UNDER_INVESTI" + + "GATION\020\004BQ\n\rio.grafeas.v1P\001Z8google.gola" + + "ng.org/genproto/googleapis/grafeas/v1;gr" + + "afeas\242\002\003GRAb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grafeas.v1.Common.getDescriptor(), + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor, + new java.lang.String[] { + "Title", + "ShortDescription", + "LongDescription", + "LanguageCode", + "Publisher", + "Product", + "Assessment", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor, + new java.lang.String[] { + "Name", "IssuingAuthority", "PublisherNamespace", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor, + new java.lang.String[] { + "Name", "Id", "GenericUri", "Identifier", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor.getNestedTypes().get(2); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor, + new java.lang.String[] { + "Cve", + "ShortDescription", + "LongDescription", + "RelatedUris", + "State", + "Impacts", + "Justification", + "Remediations", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor + .getNestedTypes() + .get(0); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor, + new java.lang.String[] { + "JustificationType", "Details", + }); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor = + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor + .getNestedTypes() + .get(1); + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor, + new java.lang.String[] { + "RemediationType", "Details", "RemediationUri", + }); + io.grafeas.v1.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java index 2f2571e9d91f..73b1f566a6fc 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -66,53 +70,66 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle/protobuf/timestamp.proto\032\027grafeas/" + "v1/common.proto\032\025grafeas/v1/cvss.proto\032\030" + "grafeas/v1/package.proto\032\031grafeas/v1/sev" - + "erity.proto\"\311\007\n\021VulnerabilityNote\022\022\n\ncvs" - + "s_score\030\001 \001(\002\022&\n\010severity\030\002 \001(\0162\024.grafea" - + "s.v1.Severity\0225\n\007details\030\003 \003(\0132$.grafeas" - + ".v1.VulnerabilityNote.Detail\022#\n\007cvss_v3\030" - + "\004 \001(\0132\022.grafeas.v1.CVSSv3\022D\n\017windows_det" - + "ails\030\005 \003(\0132+.grafeas.v1.VulnerabilityNot" - + "e.WindowsDetail\0226\n\022source_update_time\030\006 " - + "\001(\0132\032.google.protobuf.Timestamp\022-\n\014cvss_" - + "version\030\007 \001(\0162\027.grafeas.v1.CVSSVersion\032\255" - + "\003\n\006Detail\022\025\n\rseverity_name\030\001 \001(\t\022\023\n\013desc" - + "ription\030\002 \001(\t\022\024\n\014package_type\030\003 \001(\t\022\030\n\020a" - + "ffected_cpe_uri\030\004 \001(\t\022\030\n\020affected_packag" - + "e\030\005 \001(\t\0223\n\026affected_version_start\030\006 \001(\0132" - + "\023.grafeas.v1.Version\0221\n\024affected_version" - + "_end\030\007 \001(\0132\023.grafeas.v1.Version\022\025\n\rfixed" - + "_cpe_uri\030\010 \001(\t\022\025\n\rfixed_package\030\t \001(\t\022*\n" - + "\rfixed_version\030\n \001(\0132\023.grafeas.v1.Versio" - + "n\022\023\n\013is_obsolete\030\013 \001(\010\0226\n\022source_update_" - + "time\030\014 \001(\0132\032.google.protobuf.Timestamp\022\016" - + "\n\006source\030\r \001(\t\022\016\n\006vendor\030\016 \001(\t\032\276\001\n\rWindo" - + "wsDetail\022\017\n\007cpe_uri\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022" - + "\023\n\013description\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\013" - + "29.grafeas.v1.VulnerabilityNote.WindowsD" - + "etail.KnowledgeBase\032*\n\rKnowledgeBase\022\014\n\004" - + "name\030\001 \001(\t\022\013\n\003url\030\002 \001(\t\"\214\006\n\027Vulnerabilit" - + "yOccurrence\022\014\n\004type\030\001 \001(\t\022&\n\010severity\030\002 " - + "\001(\0162\024.grafeas.v1.Severity\022\022\n\ncvss_score\030" - + "\003 \001(\002\022 \n\006cvssv3\030\n \001(\0132\020.grafeas.v1.CVSS\022" - + "G\n\rpackage_issue\030\004 \003(\01320.grafeas.v1.Vuln" - + "erabilityOccurrence.PackageIssue\022\031\n\021shor" - + "t_description\030\005 \001(\t\022\030\n\020long_description\030" - + "\006 \001(\t\022,\n\014related_urls\030\007 \003(\0132\026.grafeas.v1" - + ".RelatedUrl\0220\n\022effective_severity\030\010 \001(\0162" - + "\024.grafeas.v1.Severity\022\025\n\rfix_available\030\t" - + " \001(\010\022-\n\014cvss_version\030\013 \001(\0162\027.grafeas.v1." - + "CVSSVersion\032\340\002\n\014PackageIssue\022\030\n\020affected" - + "_cpe_uri\030\001 \001(\t\022\030\n\020affected_package\030\002 \001(\t" - + "\022-\n\020affected_version\030\003 \001(\0132\023.grafeas.v1." - + "Version\022\025\n\rfixed_cpe_uri\030\004 \001(\t\022\025\n\rfixed_" - + "package\030\005 \001(\t\022*\n\rfixed_version\030\006 \001(\0132\023.g" - + "rafeas.v1.Version\022\025\n\rfix_available\030\007 \001(\010" - + "\022\024\n\014package_type\030\010 \001(\t\0225\n\022effective_seve" - + "rity\030\t \001(\0162\024.grafeas.v1.SeverityB\003\340A\003\022/\n" - + "\rfile_location\030\n \003(\0132\030.grafeas.v1.FileLo" - + "cationBQ\n\rio.grafeas.v1P\001Z8google.golang" - + ".org/genproto/googleapis/grafeas/v1;graf" - + "eas\242\002\003GRAb\006proto3" + + "erity.proto\032\024grafeas/v1/vex.proto\"\354\007\n\021Vu" + + "lnerabilityNote\022\022\n\ncvss_score\030\001 \001(\002\022&\n\010s" + + "everity\030\002 \001(\0162\024.grafeas.v1.Severity\0225\n\007d" + + "etails\030\003 \003(\0132$.grafeas.v1.VulnerabilityN" + + "ote.Detail\022#\n\007cvss_v3\030\004 \001(\0132\022.grafeas.v1" + + ".CVSSv3\022D\n\017windows_details\030\005 \003(\0132+.grafe" + + "as.v1.VulnerabilityNote.WindowsDetail\0226\n" + + "\022source_update_time\030\006 \001(\0132\032.google.proto" + + "buf.Timestamp\022-\n\014cvss_version\030\007 \001(\0162\027.gr" + + "afeas.v1.CVSSVersion\022!\n\007cvss_v2\030\010 \001(\0132\020." + + "grafeas.v1.CVSS\032\255\003\n\006Detail\022\025\n\rseverity_n" + + "ame\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\024\n\014packag" + + "e_type\030\003 \001(\t\022\030\n\020affected_cpe_uri\030\004 \001(\t\022\030" + + "\n\020affected_package\030\005 \001(\t\0223\n\026affected_ver" + + "sion_start\030\006 \001(\0132\023.grafeas.v1.Version\0221\n" + + "\024affected_version_end\030\007 \001(\0132\023.grafeas.v1" + + ".Version\022\025\n\rfixed_cpe_uri\030\010 \001(\t\022\025\n\rfixed" + + "_package\030\t \001(\t\022*\n\rfixed_version\030\n \001(\0132\023." + + "grafeas.v1.Version\022\023\n\013is_obsolete\030\013 \001(\010\022" + + "6\n\022source_update_time\030\014 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022\016\n\006source\030\r \001(\t\022\016\n\006vendo" + + "r\030\016 \001(\t\032\276\001\n\rWindowsDetail\022\017\n\007cpe_uri\030\001 \001" + + "(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022M\n" + + "\nfixing_kbs\030\004 \003(\01329.grafeas.v1.Vulnerabi" + + "lityNote.WindowsDetail.KnowledgeBase\032*\n\r" + + "KnowledgeBase\022\014\n\004name\030\001 \001(\t\022\013\n\003url\030\002 \001(\t" + + "\"\343\t\n\027VulnerabilityOccurrence\022\014\n\004type\030\001 \001" + + "(\t\022&\n\010severity\030\002 \001(\0162\024.grafeas.v1.Severi" + + "ty\022\022\n\ncvss_score\030\003 \001(\002\022 \n\006cvssv3\030\n \001(\0132\020" + + ".grafeas.v1.CVSS\022G\n\rpackage_issue\030\004 \003(\0132" + + "0.grafeas.v1.VulnerabilityOccurrence.Pac" + + "kageIssue\022\031\n\021short_description\030\005 \001(\t\022\030\n\020" + + "long_description\030\006 \001(\t\022,\n\014related_urls\030\007" + + " \003(\0132\026.grafeas.v1.RelatedUrl\0220\n\022effectiv" + + "e_severity\030\010 \001(\0162\024.grafeas.v1.Severity\022\025" + + "\n\rfix_available\030\t \001(\010\022-\n\014cvss_version\030\013 " + + "\001(\0162\027.grafeas.v1.CVSSVersion\022!\n\007cvss_v2\030" + + "\014 \001(\0132\020.grafeas.v1.CVSS\022I\n\016vex_assessmen" + + "t\030\r \001(\01321.grafeas.v1.VulnerabilityOccurr" + + "ence.VexAssessment\032\340\002\n\014PackageIssue\022\030\n\020a" + + "ffected_cpe_uri\030\001 \001(\t\022\030\n\020affected_packag" + + "e\030\002 \001(\t\022-\n\020affected_version\030\003 \001(\0132\023.graf" + + "eas.v1.Version\022\025\n\rfixed_cpe_uri\030\004 \001(\t\022\025\n" + + "\rfixed_package\030\005 \001(\t\022*\n\rfixed_version\030\006 " + + "\001(\0132\023.grafeas.v1.Version\022\025\n\rfix_availabl" + + "e\030\007 \001(\010\022\024\n\014package_type\030\010 \001(\t\0225\n\022effecti" + + "ve_severity\030\t \001(\0162\024.grafeas.v1.SeverityB" + + "\003\340A\003\022/\n\rfile_location\030\n \003(\0132\030.grafeas.v1" + + ".FileLocation\032\346\002\n\rVexAssessment\022\013\n\003cve\030\001" + + " \001(\t\022,\n\014related_uris\030\002 \003(\0132\026.grafeas.v1." + + "RelatedUrl\022\021\n\tnote_name\030\003 \001(\t\022G\n\005state\030\004" + + " \001(\01628.grafeas.v1.VulnerabilityAssessmen" + + "tNote.Assessment.State\022\017\n\007impacts\030\005 \003(\t\022" + + "T\n\014remediations\030\006 \003(\0132>.grafeas.v1.Vulne" + + "rabilityAssessmentNote.Assessment.Remedi" + + "ation\022W\n\rjustification\030\007 \001(\0132@.grafeas.v" + + "1.VulnerabilityAssessmentNote.Assessment" + + ".JustificationBQ\n\rio.grafeas.v1P\001Z8googl" + + "e.golang.org/genproto/googleapis/grafeas" + + "/v1;grafeas\242\002\003GRAb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -124,6 +141,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.CVSSProto.getDescriptor(), io.grafeas.v1.Package.getDescriptor(), io.grafeas.v1.SeverityOuterClass.getDescriptor(), + io.grafeas.v1.Vex.getDescriptor(), }); internal_static_grafeas_v1_VulnerabilityNote_descriptor = getDescriptor().getMessageTypes().get(0); @@ -138,6 +156,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WindowsDetails", "SourceUpdateTime", "CvssVersion", + "CvssV2", }); internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor = internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(0); @@ -195,6 +214,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EffectiveSeverity", "FixAvailable", "CvssVersion", + "CvssV2", + "VexAssessment", }); internal_static_grafeas_v1_VulnerabilityOccurrence_PackageIssue_descriptor = internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(0); @@ -213,6 +234,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EffectiveSeverity", "FileLocation", }); + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor = + internal_static_grafeas_v1_VulnerabilityOccurrence_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor, + new java.lang.String[] { + "Cve", "RelatedUris", "NoteName", "State", "Impacts", "Remediations", "Justification", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -224,6 +253,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.CVSSProto.getDescriptor(); io.grafeas.v1.Package.getDescriptor(); io.grafeas.v1.SeverityOuterClass.getDescriptor(); + io.grafeas.v1.Vex.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java new file mode 100644 index 000000000000..7c06d0a8409e --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNote.java @@ -0,0 +1,10262 @@ +/* + * Copyright 2019 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 + * + * 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. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vex.proto + +package io.grafeas.v1; + +/** + * + * + *
+ * A single VulnerabilityAssessmentNote represents
+ * one particular product's vulnerability assessment for one CVE.
+ * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote} + */ +public final class VulnerabilityAssessmentNote extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote) + VulnerabilityAssessmentNoteOrBuilder { + private static final long serialVersionUID = 0L; + // Use VulnerabilityAssessmentNote.newBuilder() to construct. + private VulnerabilityAssessmentNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VulnerabilityAssessmentNote() { + title_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VulnerabilityAssessmentNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class); + } + + public interface PublisherOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * + * @return The issuingAuthority. + */ + java.lang.String getIssuingAuthority(); + /** + * + * + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * + * @return The bytes for issuingAuthority. + */ + com.google.protobuf.ByteString getIssuingAuthorityBytes(); + + /** + * + * + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * + * @return The publisherNamespace. + */ + java.lang.String getPublisherNamespace(); + /** + * + * + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * + * @return The bytes for publisherNamespace. + */ + com.google.protobuf.ByteString getPublisherNamespaceBytes(); + } + /** + * + * + *
+   * Publisher contains information about the publisher of
+   * this Note.
+   * (-- api-linter: core::0123::resource-annotation=disabled
+   *     aip.dev/not-precedent: Publisher is not a separate resource. --)
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher} + */ + public static final class Publisher extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + PublisherOrBuilder { + private static final long serialVersionUID = 0L; + // Use Publisher.newBuilder() to construct. + private Publisher(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Publisher() { + name_ = ""; + issuingAuthority_ = ""; + publisherNamespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Publisher(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the publisher.
+     * Examples: 'Google', 'Google Cloud Platform'.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISSUING_AUTHORITY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object issuingAuthority_ = ""; + /** + * + * + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * + * @return The issuingAuthority. + */ + @java.lang.Override + public java.lang.String getIssuingAuthority() { + java.lang.Object ref = issuingAuthority_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuingAuthority_ = s; + return s; + } + } + /** + * + * + *
+     * Provides information about the authority of the issuing party to
+     * release the document, in particular, the party's constituency and
+     * responsibilities or other obligations.
+     * 
+ * + * string issuing_authority = 2; + * + * @return The bytes for issuingAuthority. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIssuingAuthorityBytes() { + java.lang.Object ref = issuingAuthority_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issuingAuthority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLISHER_NAMESPACE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object publisherNamespace_ = ""; + /** + * + * + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * + * @return The publisherNamespace. + */ + @java.lang.Override + public java.lang.String getPublisherNamespace() { + java.lang.Object ref = publisherNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherNamespace_ = s; + return s; + } + } + /** + * + * + *
+     * The context or namespace.
+     * Contains a URL which is under control of the issuing party and can
+     * be used as a globally unique identifier for that issuing party.
+     * Example: https://csaf.io
+     * 
+ * + * string publisher_namespace = 3; + * + * @return The bytes for publisherNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublisherNamespaceBytes() { + java.lang.Object ref = publisherNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publisherNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuingAuthority_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, issuingAuthority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publisherNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publisherNamespace_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuingAuthority_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, issuingAuthority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publisherNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publisherNamespace_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Publisher)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) obj; + + if (!getName().equals(other.getName())) return false; + if (!getIssuingAuthority().equals(other.getIssuingAuthority())) return false; + if (!getPublisherNamespace().equals(other.getPublisherNamespace())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ISSUING_AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getIssuingAuthority().hashCode(); + hash = (37 * hash) + PUBLISHER_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPublisherNamespace().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Publisher contains information about the publisher of
+     * this Note.
+     * (-- api-linter: core::0123::resource-annotation=disabled
+     *     aip.dev/not-precedent: Publisher is not a separate resource. --)
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + issuingAuthority_ = ""; + publisherNamespace_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result = + new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.issuingAuthority_ = issuingAuthority_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.publisherNamespace_ = publisherNamespace_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIssuingAuthority().isEmpty()) { + issuingAuthority_ = other.issuingAuthority_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPublisherNamespace().isEmpty()) { + publisherNamespace_ = other.publisherNamespace_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + issuingAuthority_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + publisherNamespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the publisher.
+       * Examples: 'Google', 'Google Cloud Platform'.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object issuingAuthority_ = ""; + /** + * + * + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * + * @return The issuingAuthority. + */ + public java.lang.String getIssuingAuthority() { + java.lang.Object ref = issuingAuthority_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuingAuthority_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * + * @return The bytes for issuingAuthority. + */ + public com.google.protobuf.ByteString getIssuingAuthorityBytes() { + java.lang.Object ref = issuingAuthority_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issuingAuthority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * + * @param value The issuingAuthority to set. + * @return This builder for chaining. + */ + public Builder setIssuingAuthority(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + issuingAuthority_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * + * @return This builder for chaining. + */ + public Builder clearIssuingAuthority() { + issuingAuthority_ = getDefaultInstance().getIssuingAuthority(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Provides information about the authority of the issuing party to
+       * release the document, in particular, the party's constituency and
+       * responsibilities or other obligations.
+       * 
+ * + * string issuing_authority = 2; + * + * @param value The bytes for issuingAuthority to set. + * @return This builder for chaining. + */ + public Builder setIssuingAuthorityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + issuingAuthority_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object publisherNamespace_ = ""; + /** + * + * + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * + * @return The publisherNamespace. + */ + public java.lang.String getPublisherNamespace() { + java.lang.Object ref = publisherNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * + * @return The bytes for publisherNamespace. + */ + public com.google.protobuf.ByteString getPublisherNamespaceBytes() { + java.lang.Object ref = publisherNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publisherNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * + * @param value The publisherNamespace to set. + * @return This builder for chaining. + */ + public Builder setPublisherNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publisherNamespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * + * @return This builder for chaining. + */ + public Builder clearPublisherNamespace() { + publisherNamespace_ = getDefaultInstance().getPublisherNamespace(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The context or namespace.
+       * Contains a URL which is under control of the issuing party and can
+       * be used as a globally unique identifier for that issuing party.
+       * Example: https://csaf.io
+       * 
+ * + * string publisher_namespace = 3; + * + * @param value The bytes for publisherNamespace to set. + * @return This builder for chaining. + */ + public Builder setPublisherNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publisherNamespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Publisher DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Publisher parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ProductOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Product) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * + * @return Whether the genericUri field is set. + */ + boolean hasGenericUri(); + /** + * + * + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * + * @return The genericUri. + */ + java.lang.String getGenericUri(); + /** + * + * + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * + * @return The bytes for genericUri. + */ + com.google.protobuf.ByteString getGenericUriBytes(); + + public io.grafeas.v1.VulnerabilityAssessmentNote.Product.IdentifierCase getIdentifierCase(); + } + /** + * + * + *
+   * Product contains information about a product and how to uniquely identify
+   * it.
+   * (-- api-linter: core::0123::resource-annotation=disabled
+   *     aip.dev/not-precedent: Product is not a separate resource. --)
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product} + */ + public static final class Product extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Product) + ProductOrBuilder { + private static final long serialVersionUID = 0L; + // Use Product.newBuilder() to construct. + private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Product() { + name_ = ""; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Product(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Product.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class); + } + + private int identifierCase_ = 0; + private java.lang.Object identifier_; + + public enum IdentifierCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GENERIC_URI(3), + IDENTIFIER_NOT_SET(0); + private final int value; + + private IdentifierCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdentifierCase valueOf(int value) { + return forNumber(value); + } + + public static IdentifierCase forNumber(int value) { + switch (value) { + case 3: + return GENERIC_URI; + case 0: + return IDENTIFIER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IdentifierCase getIdentifierCase() { + return IdentifierCase.forNumber(identifierCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the product.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * Token that identifies a product so that it can be referred to from other
+     * parts in the document. There is no predefined format as long as it
+     * uniquely identifies a group in the context of the current document.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERIC_URI_FIELD_NUMBER = 3; + /** + * + * + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * + * @return Whether the genericUri field is set. + */ + public boolean hasGenericUri() { + return identifierCase_ == 3; + } + /** + * + * + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * + * @return The genericUri. + */ + public java.lang.String getGenericUri() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identifierCase_ == 3) { + identifier_ = s; + } + return s; + } + } + /** + * + * + *
+     * Contains a URI which is vendor-specific.
+     * Example: The artifact repository URL of an image.
+     * 
+ * + * string generic_uri = 3; + * + * @return The bytes for genericUri. + */ + public com.google.protobuf.ByteString getGenericUriBytes() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (identifierCase_ == 3) { + identifier_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (identifierCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, identifier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (identifierCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, identifier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Product)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Product other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Product) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getIdentifierCase().equals(other.getIdentifierCase())) return false; + switch (identifierCase_) { + case 3: + if (!getGenericUri().equals(other.getGenericUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + switch (identifierCase_) { + case 3: + hash = (37 * hash) + GENERIC_URI_FIELD_NUMBER; + hash = (53 * hash) + getGenericUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Product prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Product contains information about a product and how to uniquely identify
+     * it.
+     * (-- api-linter: core::0123::resource-annotation=disabled
+     *     aip.dev/not-precedent: Product is not a separate resource. --)
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Product) + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Product.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Product.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + id_ = ""; + identifierCase_ = 0; + identifier_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Product result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Product result = + new io.grafeas.v1.VulnerabilityAssessmentNote.Product(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Product result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + } + + private void buildPartialOneofs(io.grafeas.v1.VulnerabilityAssessmentNote.Product result) { + result.identifierCase_ = identifierCase_; + result.identifier_ = this.identifier_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Product) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Product) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Product other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getIdentifierCase()) { + case GENERIC_URI: + { + identifierCase_ = 3; + identifier_ = other.identifier_; + onChanged(); + break; + } + case IDENTIFIER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + identifierCase_ = 3; + identifier_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int identifierCase_ = 0; + private java.lang.Object identifier_; + + public IdentifierCase getIdentifierCase() { + return IdentifierCase.forNumber(identifierCase_); + } + + public Builder clearIdentifier() { + identifierCase_ = 0; + identifier_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the product.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Token that identifies a product so that it can be referred to from other
+       * parts in the document. There is no predefined format as long as it
+       * uniquely identifies a group in the context of the current document.
+       * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * + * @return Whether the genericUri field is set. + */ + @java.lang.Override + public boolean hasGenericUri() { + return identifierCase_ == 3; + } + /** + * + * + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * + * @return The genericUri. + */ + @java.lang.Override + public java.lang.String getGenericUri() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identifierCase_ == 3) { + identifier_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * + * @return The bytes for genericUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGenericUriBytes() { + java.lang.Object ref = ""; + if (identifierCase_ == 3) { + ref = identifier_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (identifierCase_ == 3) { + identifier_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * + * @param value The genericUri to set. + * @return This builder for chaining. + */ + public Builder setGenericUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identifierCase_ = 3; + identifier_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearGenericUri() { + if (identifierCase_ == 3) { + identifierCase_ = 0; + identifier_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Contains a URI which is vendor-specific.
+       * Example: The artifact repository URL of an image.
+       * 
+ * + * string generic_uri = 3; + * + * @param value The bytes for genericUri to set. + * @return This builder for chaining. + */ + public Builder setGenericUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identifierCase_ = 3; + identifier_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Product) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Product) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Product DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Product(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AssessmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The cve. + */ + java.lang.String getCve(); + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + com.google.protobuf.ByteString getCveBytes(); + + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString getShortDescriptionBytes(); + + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString getLongDescriptionBytes(); + + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + java.util.List getRelatedUrisList(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + io.grafeas.v1.RelatedUrl getRelatedUris(int index); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + int getRelatedUrisCount(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + java.util.List getRelatedUrisOrBuilderList(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index); + + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @return The state. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState(); + + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @return A list containing the impacts. + */ + java.util.List getImpactsList(); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @return The count of impacts. + */ + int getImpactsCount(); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + java.lang.String getImpacts(int index); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + com.google.protobuf.ByteString getImpactsBytes(int index); + + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + boolean hasJustification(); + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification(); + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder(); + + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + java.util.List + getRemediationsList(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + int getRemediationsCount(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index); + } + /** + * + * + *
+   * Assessment provides all information that is related to a single
+   * vulnerability for this product.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment} + */ + public static final class Assessment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + AssessmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Assessment.newBuilder() to construct. + private Assessment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Assessment() { + cve_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + relatedUris_ = java.util.Collections.emptyList(); + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + remediations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Assessment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class); + } + + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * No state is specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * This product is known to be affected by this vulnerability.
+       * 
+ * + * AFFECTED = 1; + */ + AFFECTED(1), + /** + * + * + *
+       * This product is known to be not affected by this vulnerability.
+       * 
+ * + * NOT_AFFECTED = 2; + */ + NOT_AFFECTED(2), + /** + * + * + *
+       * This product contains a fix for this vulnerability.
+       * 
+ * + * FIXED = 3; + */ + FIXED(3), + /** + * + * + *
+       * It is not known yet whether these versions are or are not affected
+       * by the vulnerability. However, it is still under investigation.
+       * 
+ * + * UNDER_INVESTIGATION = 4; + */ + UNDER_INVESTIGATION(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * No state is specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * This product is known to be affected by this vulnerability.
+       * 
+ * + * AFFECTED = 1; + */ + public static final int AFFECTED_VALUE = 1; + /** + * + * + *
+       * This product is known to be not affected by this vulnerability.
+       * 
+ * + * NOT_AFFECTED = 2; + */ + public static final int NOT_AFFECTED_VALUE = 2; + /** + * + * + *
+       * This product contains a fix for this vulnerability.
+       * 
+ * + * FIXED = 3; + */ + public static final int FIXED_VALUE = 3; + /** + * + * + *
+       * It is not known yet whether these versions are or are not affected
+       * by the vulnerability. However, it is still under investigation.
+       * 
+ * + * UNDER_INVESTIGATION = 4; + */ + public static final int UNDER_INVESTIGATION_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return AFFECTED; + case 2: + return NOT_AFFECTED; + case 3: + return FIXED; + case 4: + return UNDER_INVESTIGATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.State) + } + + public interface JustificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The justification type for this vulnerability.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @return The enum numeric value on the wire for justificationType. + */ + int getJustificationTypeValue(); + /** + * + * + *
+       * The justification type for this vulnerability.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @return The justificationType. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + getJustificationType(); + + /** + * + * + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * + * @return The details. + */ + java.lang.String getDetails(); + /** + * + * + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + com.google.protobuf.ByteString getDetailsBytes(); + } + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification} + */ + public static final class Justification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + JustificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Justification.newBuilder() to construct. + private Justification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Justification() { + justificationType_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Justification(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class); + } + + /** + * + * + *
+       * Provides the type of justification.
+       * 
+ * + * Protobuf enum {@code + * grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType} + */ + public enum JustificationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * JUSTIFICATION_TYPE_UNSPECIFIED.
+         * 
+ * + * JUSTIFICATION_TYPE_UNSPECIFIED = 0; + */ + JUSTIFICATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * The vulnerable component is not present in the product.
+         * 
+ * + * COMPONENT_NOT_PRESENT = 1; + */ + COMPONENT_NOT_PRESENT(1), + /** + * + * + *
+         * The vulnerable code is not present. Typically this case
+         * occurs when source code is configured or built in a way that excludes
+         * the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_PRESENT = 2; + */ + VULNERABLE_CODE_NOT_PRESENT(2), + /** + * + * + *
+         * The vulnerable code can not be executed.
+         * Typically this case occurs when the product includes the vulnerable
+         * code but does not call or use the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; + */ + VULNERABLE_CODE_NOT_IN_EXECUTE_PATH(3), + /** + * + * + *
+         * The vulnerable code cannot be controlled by an attacker to exploit
+         * the vulnerability.
+         * 
+ * + * VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; + */ + VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY(4), + /** + * + * + *
+         * The product includes built-in protections or features that prevent
+         * exploitation of the vulnerability. These built-in protections cannot
+         * be subverted by the attacker and cannot be configured or disabled by
+         * the user. These mitigations completely prevent exploitation based on
+         * known attack vectors.
+         * 
+ * + * INLINE_MITIGATIONS_ALREADY_EXIST = 5; + */ + INLINE_MITIGATIONS_ALREADY_EXIST(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * JUSTIFICATION_TYPE_UNSPECIFIED.
+         * 
+ * + * JUSTIFICATION_TYPE_UNSPECIFIED = 0; + */ + public static final int JUSTIFICATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * The vulnerable component is not present in the product.
+         * 
+ * + * COMPONENT_NOT_PRESENT = 1; + */ + public static final int COMPONENT_NOT_PRESENT_VALUE = 1; + /** + * + * + *
+         * The vulnerable code is not present. Typically this case
+         * occurs when source code is configured or built in a way that excludes
+         * the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_PRESENT = 2; + */ + public static final int VULNERABLE_CODE_NOT_PRESENT_VALUE = 2; + /** + * + * + *
+         * The vulnerable code can not be executed.
+         * Typically this case occurs when the product includes the vulnerable
+         * code but does not call or use the vulnerable code.
+         * 
+ * + * VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; + */ + public static final int VULNERABLE_CODE_NOT_IN_EXECUTE_PATH_VALUE = 3; + /** + * + * + *
+         * The vulnerable code cannot be controlled by an attacker to exploit
+         * the vulnerability.
+         * 
+ * + * VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; + */ + public static final int VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY_VALUE = 4; + /** + * + * + *
+         * The product includes built-in protections or features that prevent
+         * exploitation of the vulnerability. These built-in protections cannot
+         * be subverted by the attacker and cannot be configured or disabled by
+         * the user. These mitigations completely prevent exploitation based on
+         * known attack vectors.
+         * 
+ * + * INLINE_MITIGATIONS_ALREADY_EXIST = 5; + */ + public static final int INLINE_MITIGATIONS_ALREADY_EXIST_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JustificationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JustificationType forNumber(int value) { + switch (value) { + case 0: + return JUSTIFICATION_TYPE_UNSPECIFIED; + case 1: + return COMPONENT_NOT_PRESENT; + case 2: + return VULNERABLE_CODE_NOT_PRESENT; + case 3: + return VULNERABLE_CODE_NOT_IN_EXECUTE_PATH; + case 4: + return VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY; + case 5: + return INLINE_MITIGATIONS_ALREADY_EXIST; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JustificationType findValueByNumber(int number) { + return JustificationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final JustificationType[] VALUES = values(); + + public static JustificationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JustificationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType) + } + + public static final int JUSTIFICATION_TYPE_FIELD_NUMBER = 1; + private int justificationType_ = 0; + /** + * + * + *
+       * The justification type for this vulnerability.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @return The enum numeric value on the wire for justificationType. + */ + @java.lang.Override + public int getJustificationTypeValue() { + return justificationType_; + } + /** + * + * + *
+       * The justification type for this vulnerability.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @return The justificationType. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + getJustificationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .forNumber(justificationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .UNRECOGNIZED + : result; + } + + public static final int DETAILS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + * + * + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + * + * + *
+       * Additional details on why this justification was chosen.
+       * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (justificationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .JUSTIFICATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, justificationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (justificationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .JUSTIFICATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, justificationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) obj; + + if (justificationType_ != other.justificationType_) return false; + if (!getDetails().equals(other.getDetails())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + JUSTIFICATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + justificationType_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class); + } + + // Construct using + // io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + justificationType_ = 0; + details_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result = + new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.justificationType_ = justificationType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.details_ = details_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) { + return mergeFrom( + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other) { + if (other + == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance()) return this; + if (other.justificationType_ != 0) { + setJustificationTypeValue(other.getJustificationTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + justificationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int justificationType_ = 0; + /** + * + * + *
+         * The justification type for this vulnerability.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @return The enum numeric value on the wire for justificationType. + */ + @java.lang.Override + public int getJustificationTypeValue() { + return justificationType_; + } + /** + * + * + *
+         * The justification type for this vulnerability.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @param value The enum numeric value on the wire for justificationType to set. + * @return This builder for chaining. + */ + public Builder setJustificationTypeValue(int value) { + justificationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The justification type for this vulnerability.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @return The justificationType. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + getJustificationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .JustificationType.forNumber(justificationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+         * The justification type for this vulnerability.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @param value The justificationType to set. + * @return This builder for chaining. + */ + public Builder setJustificationType( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + justificationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * The justification type for this vulnerability.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearJustificationType() { + bitField0_ = (bitField0_ & ~0x00000001); + justificationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + * + * + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Additional details on why this justification was chosen.
+         * 
+ * + * string details = 2; + * + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Justification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RemediationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The type of remediation that can be applied.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @return The enum numeric value on the wire for remediationType. + */ + int getRemediationTypeValue(); + /** + * + * + *
+       * The type of remediation that can be applied.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @return The remediationType. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + getRemediationType(); + + /** + * + * + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * + * @return The details. + */ + java.lang.String getDetails(); + /** + * + * + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + com.google.protobuf.ByteString getDetailsBytes(); + + /** + * + * + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * + * @return Whether the remediationUri field is set. + */ + boolean hasRemediationUri(); + /** + * + * + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * + * @return The remediationUri. + */ + io.grafeas.v1.RelatedUrl getRemediationUri(); + /** + * + * + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder(); + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation} + */ + public static final class Remediation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + RemediationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Remediation.newBuilder() to construct. + private Remediation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Remediation() { + remediationType_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Remediation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); + } + + /** + * + * + *
+       * The type of remediation that can be applied.
+       * 
+ * + * Protobuf enum {@code + * grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType} + */ + public enum RemediationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * No remediation type specified.
+         * 
+ * + * REMEDIATION_TYPE_UNSPECIFIED = 0; + */ + REMEDIATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * A MITIGATION is available.
+         * 
+ * + * MITIGATION = 1; + */ + MITIGATION(1), + /** + * + * + *
+         * No fix is planned.
+         * 
+ * + * NO_FIX_PLANNED = 2; + */ + NO_FIX_PLANNED(2), + /** + * + * + *
+         * Not available.
+         * 
+ * + * NONE_AVAILABLE = 3; + */ + NONE_AVAILABLE(3), + /** + * + * + *
+         * A vendor fix is available.
+         * 
+ * + * VENDOR_FIX = 4; + */ + VENDOR_FIX(4), + /** + * + * + *
+         * A workaround is available.
+         * 
+ * + * WORKAROUND = 5; + */ + WORKAROUND(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * No remediation type specified.
+         * 
+ * + * REMEDIATION_TYPE_UNSPECIFIED = 0; + */ + public static final int REMEDIATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * A MITIGATION is available.
+         * 
+ * + * MITIGATION = 1; + */ + public static final int MITIGATION_VALUE = 1; + /** + * + * + *
+         * No fix is planned.
+         * 
+ * + * NO_FIX_PLANNED = 2; + */ + public static final int NO_FIX_PLANNED_VALUE = 2; + /** + * + * + *
+         * Not available.
+         * 
+ * + * NONE_AVAILABLE = 3; + */ + public static final int NONE_AVAILABLE_VALUE = 3; + /** + * + * + *
+         * A vendor fix is available.
+         * 
+ * + * VENDOR_FIX = 4; + */ + public static final int VENDOR_FIX_VALUE = 4; + /** + * + * + *
+         * A workaround is available.
+         * 
+ * + * WORKAROUND = 5; + */ + public static final int WORKAROUND_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RemediationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RemediationType forNumber(int value) { + switch (value) { + case 0: + return REMEDIATION_TYPE_UNSPECIFIED; + case 1: + return MITIGATION; + case 2: + return NO_FIX_PLANNED; + case 3: + return NONE_AVAILABLE; + case 4: + return VENDOR_FIX; + case 5: + return WORKAROUND; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RemediationType findValueByNumber(int number) { + return RemediationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RemediationType[] VALUES = values(); + + public static RemediationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RemediationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType) + } + + public static final int REMEDIATION_TYPE_FIELD_NUMBER = 1; + private int remediationType_ = 0; + /** + * + * + *
+       * The type of remediation that can be applied.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @return The enum numeric value on the wire for remediationType. + */ + @java.lang.Override + public int getRemediationTypeValue() { + return remediationType_; + } + /** + * + * + *
+       * The type of remediation that can be applied.
+       * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @return The remediationType. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + getRemediationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .forNumber(remediationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .UNRECOGNIZED + : result; + } + + public static final int DETAILS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + * + * + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + * + * + *
+       * Contains a comprehensive human-readable discussion of the remediation.
+       * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMEDIATION_URI_FIELD_NUMBER = 3; + private io.grafeas.v1.RelatedUrl remediationUri_; + /** + * + * + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * + * @return Whether the remediationUri field is set. + */ + @java.lang.Override + public boolean hasRemediationUri() { + return remediationUri_ != null; + } + /** + * + * + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * + * @return The remediationUri. + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRemediationUri() { + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; + } + /** + * + * + *
+       * Contains the URL where to obtain the remediation.
+       * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() { + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (remediationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .REMEDIATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, remediationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); + } + if (remediationUri_ != null) { + output.writeMessage(3, getRemediationUri()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (remediationType_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .REMEDIATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, remediationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); + } + if (remediationUri_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRemediationUri()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) obj; + + if (remediationType_ != other.remediationType_) return false; + if (!getDetails().equals(other.getDetails())) return false; + if (hasRemediationUri() != other.hasRemediationUri()) return false; + if (hasRemediationUri()) { + if (!getRemediationUri().equals(other.getRemediationUri())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REMEDIATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + remediationType_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + if (hasRemediationUri()) { + hash = (37 * hash) + REMEDIATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getRemediationUri().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class); + } + + // Construct using + // io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + remediationType_ = 0; + details_ = ""; + remediationUri_ = null; + if (remediationUriBuilder_ != null) { + remediationUriBuilder_.dispose(); + remediationUriBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result = + new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.remediationType_ = remediationType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.details_ = details_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.remediationUri_ = + remediationUriBuilder_ == null ? remediationUri_ : remediationUriBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) { + return mergeFrom( + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other) { + if (other + == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()) return this; + if (other.remediationType_ != 0) { + setRemediationTypeValue(other.getRemediationTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRemediationUri()) { + mergeRemediationUri(other.getRemediationUri()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + remediationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getRemediationUriFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int remediationType_ = 0; + /** + * + * + *
+         * The type of remediation that can be applied.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @return The enum numeric value on the wire for remediationType. + */ + @java.lang.Override + public int getRemediationTypeValue() { + return remediationType_; + } + /** + * + * + *
+         * The type of remediation that can be applied.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @param value The enum numeric value on the wire for remediationType to set. + * @return This builder for chaining. + */ + public Builder setRemediationTypeValue(int value) { + remediationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The type of remediation that can be applied.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @return The remediationType. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + getRemediationType() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .forNumber(remediationType_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+         * The type of remediation that can be applied.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @param value The remediationType to set. + * @return This builder for chaining. + */ + public Builder setRemediationType( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + remediationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * The type of remediation that can be applied.
+         * 
+ * + * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearRemediationType() { + bitField0_ = (bitField0_ & ~0x00000001); + remediationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + * + * + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Contains a comprehensive human-readable discussion of the remediation.
+         * 
+ * + * string details = 2; + * + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.grafeas.v1.RelatedUrl remediationUri_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + remediationUriBuilder_; + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * + * @return Whether the remediationUri field is set. + */ + public boolean hasRemediationUri() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + * + * @return The remediationUri. + */ + public io.grafeas.v1.RelatedUrl getRemediationUri() { + if (remediationUriBuilder_ == null) { + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; + } else { + return remediationUriBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder setRemediationUri(io.grafeas.v1.RelatedUrl value) { + if (remediationUriBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remediationUri_ = value; + } else { + remediationUriBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder setRemediationUri(io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (remediationUriBuilder_ == null) { + remediationUri_ = builderForValue.build(); + } else { + remediationUriBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder mergeRemediationUri(io.grafeas.v1.RelatedUrl value) { + if (remediationUriBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && remediationUri_ != null + && remediationUri_ != io.grafeas.v1.RelatedUrl.getDefaultInstance()) { + getRemediationUriBuilder().mergeFrom(value); + } else { + remediationUri_ = value; + } + } else { + remediationUriBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public Builder clearRemediationUri() { + bitField0_ = (bitField0_ & ~0x00000004); + remediationUri_ = null; + if (remediationUriBuilder_ != null) { + remediationUriBuilder_.dispose(); + remediationUriBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public io.grafeas.v1.RelatedUrl.Builder getRemediationUriBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRemediationUriFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() { + if (remediationUriBuilder_ != null) { + return remediationUriBuilder_.getMessageOrBuilder(); + } else { + return remediationUri_ == null + ? io.grafeas.v1.RelatedUrl.getDefaultInstance() + : remediationUri_; + } + } + /** + * + * + *
+         * Contains the URL where to obtain the remediation.
+         * 
+ * + * .grafeas.v1.RelatedUrl remediation_uri = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + getRemediationUriFieldBuilder() { + if (remediationUriBuilder_ == null) { + remediationUriBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder>( + getRemediationUri(), getParentForChildren(), isClean()); + remediationUri_ = null; + } + return remediationUriBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Remediation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CVE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cve_ = ""; + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The cve. + */ + @java.lang.Override + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } + } + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_URIS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List relatedUris_; + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public java.util.List getRelatedUrisList() { + return relatedUris_; + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public java.util.List + getRelatedUrisOrBuilderList() { + return relatedUris_; + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public int getRelatedUrisCount() { + return relatedUris_.size(); + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + return relatedUris_.get(index); + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment. These uris have additional information about the
+     * vulnerability and the assessment itself. E.g. Link to a document which
+     * details how this assessment concluded the state of this vulnerability.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) { + return relatedUris_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; + } + + public static final int IMPACTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList impacts_; + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList getImpactsList() { + return impacts_; + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 6; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + + public static final int JUSTIFICATION_FIELD_NUMBER = 7; + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + @java.lang.Override + public boolean hasJustification() { + return justification_ != null; + } + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; + } + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; + } + + public static final int REMEDIATIONS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List + remediations_; + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + @java.lang.Override + public java.util.List + getRemediationsList() { + return remediations_; + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + @java.lang.Override + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList() { + return remediations_; + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + @java.lang.Override + public int getRemediationsCount() { + return remediations_.size(); + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { + return remediations_.get(index); + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { + return remediations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + output.writeMessage(4, relatedUris_.get(i)); + } + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, state_); + } + for (int i = 0; i < impacts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, impacts_.getRaw(i)); + } + if (justification_ != null) { + output.writeMessage(7, getJustification()); + } + for (int i = 0; i < remediations_.size(); i++) { + output.writeMessage(8, remediations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, relatedUris_.get(i)); + } + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + { + int dataSize = 0; + for (int i = 0; i < impacts_.size(); i++) { + dataSize += computeStringSizeNoTag(impacts_.getRaw(i)); + } + size += dataSize; + size += 1 * getImpactsList().size(); + } + if (justification_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getJustification()); + } + for (int i = 0; i < remediations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, remediations_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other = + (io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) obj; + + if (!getCve().equals(other.getCve())) return false; + if (!getShortDescription().equals(other.getShortDescription())) return false; + if (!getLongDescription().equals(other.getLongDescription())) return false; + if (!getRelatedUrisList().equals(other.getRelatedUrisList())) return false; + if (state_ != other.state_) return false; + if (!getImpactsList().equals(other.getImpactsList())) return false; + if (hasJustification() != other.hasJustification()) return false; + if (hasJustification()) { + if (!getJustification().equals(other.getJustification())) return false; + } + if (!getRemediationsList().equals(other.getRemediationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCve().hashCode(); + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + if (getRelatedUrisCount() > 0) { + hash = (37 * hash) + RELATED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrisList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getImpactsCount() > 0) { + hash = (37 * hash) + IMPACTS_FIELD_NUMBER; + hash = (53 * hash) + getImpactsList().hashCode(); + } + if (hasJustification()) { + hash = (37 * hash) + JUSTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getJustification().hashCode(); + } + if (getRemediationsCount() > 0) { + hash = (37 * hash) + REMEDIATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRemediationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Assessment provides all information that is related to a single
+     * vulnerability for this product.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cve_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + } else { + relatedUris_ = null; + relatedUrisBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + } else { + remediations_ = null; + remediationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment build() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result = + new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result) { + if (relatedUrisBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + relatedUris_ = java.util.Collections.unmodifiableList(relatedUris_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.relatedUris_ = relatedUris_; + } else { + result.relatedUris_ = relatedUrisBuilder_.build(); + } + if (((bitField0_ & 0x00000020) != 0)) { + impacts_ = impacts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.impacts_ = impacts_; + if (remediationsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + remediations_ = java.util.Collections.unmodifiableList(remediations_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.remediations_ = remediations_; + } else { + result.remediations_ = remediationsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cve_ = cve_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.justification_ = + justificationBuilder_ == null ? justification_ : justificationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) + return this; + if (!other.getCve().isEmpty()) { + cve_ = other.cve_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (relatedUrisBuilder_ == null) { + if (!other.relatedUris_.isEmpty()) { + if (relatedUris_.isEmpty()) { + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRelatedUrisIsMutable(); + relatedUris_.addAll(other.relatedUris_); + } + onChanged(); + } + } else { + if (!other.relatedUris_.isEmpty()) { + if (relatedUrisBuilder_.isEmpty()) { + relatedUrisBuilder_.dispose(); + relatedUrisBuilder_ = null; + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000008); + relatedUrisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRelatedUrisFieldBuilder() + : null; + } else { + relatedUrisBuilder_.addAllMessages(other.relatedUris_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.impacts_.isEmpty()) { + if (impacts_.isEmpty()) { + impacts_ = other.impacts_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureImpactsIsMutable(); + impacts_.addAll(other.impacts_); + } + onChanged(); + } + if (other.hasJustification()) { + mergeJustification(other.getJustification()); + } + if (remediationsBuilder_ == null) { + if (!other.remediations_.isEmpty()) { + if (remediations_.isEmpty()) { + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureRemediationsIsMutable(); + remediations_.addAll(other.remediations_); + } + onChanged(); + } + } else { + if (!other.remediations_.isEmpty()) { + if (remediationsBuilder_.isEmpty()) { + remediationsBuilder_.dispose(); + remediationsBuilder_ = null; + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000080); + remediationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRemediationsFieldBuilder() + : null; + } else { + remediationsBuilder_.addAllMessages(other.remediations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cve_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + io.grafeas.v1.RelatedUrl m = + input.readMessage(io.grafeas.v1.RelatedUrl.parser(), extensionRegistry); + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(m); + } else { + relatedUrisBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureImpactsIsMutable(); + impacts_.add(s); + break; + } // case 50 + case 58: + { + input.readMessage(getJustificationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m = + input.readMessage( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(), + extensionRegistry); + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(m); + } else { + remediationsBuilder_.addMessage(m); + } + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cve_ = ""; + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return The cve. + */ + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = getDefaultInstance().getCve(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @param value The bytes for cve to set. + * @return This builder for chaining. + */ + public Builder setCveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortDescription_ = ""; + /** + * + * + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * A one sentence description of this Vex.
+       * 
+ * + * string short_description = 2; + * + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + * + * + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * A detailed description of this Vex.
+       * 
+ * + * string long_description = 3; + * + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List relatedUris_ = + java.util.Collections.emptyList(); + + private void ensureRelatedUrisIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + relatedUris_ = new java.util.ArrayList(relatedUris_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + relatedUrisBuilder_; + + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public java.util.List getRelatedUrisList() { + if (relatedUrisBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUris_); + } else { + return relatedUrisBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public int getRelatedUrisCount() { + if (relatedUrisBuilder_ == null) { + return relatedUris_.size(); + } else { + return relatedUrisBuilder_.getCount(); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, value); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder addAllRelatedUris( + java.lang.Iterable values) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedUris_); + onChanged(); + } else { + relatedUrisBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder clearRelatedUris() { + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + relatedUrisBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public Builder removeRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.remove(index); + onChanged(); + } else { + relatedUrisBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder(int index) { + return getRelatedUrisFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public java.util.List + getRelatedUrisOrBuilderList() { + if (relatedUrisBuilder_ != null) { + return relatedUrisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUris_); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() { + return getRelatedUrisFieldBuilder() + .addBuilder(io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(int index) { + return getRelatedUrisFieldBuilder() + .addBuilder(index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment. These uris have additional information about the
+       * vulnerability and the assessment itself. E.g. Link to a document which
+       * details how this assessment concluded the state of this vulnerability.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 4; + */ + public java.util.List getRelatedUrisBuilderList() { + return getRelatedUrisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrisFieldBuilder() { + if (relatedUrisBuilder_ == null) { + relatedUrisBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUris_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + relatedUris_ = null; + } + return relatedUrisBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList impacts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureImpactsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList getImpactsList() { + return impacts_.getUnmodifiableView(); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @param index The index to set the value at. + * @param value The impacts to set. + * @return This builder for chaining. + */ + public Builder setImpacts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImpactsIsMutable(); + impacts_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @param value The impacts to add. + * @return This builder for chaining. + */ + public Builder addImpacts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @param values The impacts to add. + * @return This builder for chaining. + */ + public Builder addAllImpacts(java.lang.Iterable values) { + ensureImpactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, impacts_); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @return This builder for chaining. + */ + public Builder clearImpacts() { + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 6; + * + * @param value The bytes of the impacts to add. + * @return This builder for chaining. + */ + public Builder addImpactsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + justificationBuilder_; + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + public boolean hasJustification() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + if (justificationBuilder_ == null) { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; + } else { + return justificationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + justification_ = value; + } else { + justificationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + builderForValue) { + if (justificationBuilder_ == null) { + justification_ = builderForValue.build(); + } else { + justificationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder mergeJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && justification_ != null + && justification_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance()) { + getJustificationBuilder().mergeFrom(value); + } else { + justification_ = value; + } + } else { + justificationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder clearJustification() { + bitField0_ = (bitField0_ & ~0x00000040); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + getJustificationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getJustificationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { + if (justificationBuilder_ != null) { + return justificationBuilder_.getMessageOrBuilder(); + } else { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; + } + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + getJustificationFieldBuilder() { + if (justificationBuilder_ == null) { + justificationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( + getJustification(), getParentForChildren(), isClean()); + justification_ = null; + } + return justificationBuilder_; + } + + private java.util.List + remediations_ = java.util.Collections.emptyList(); + + private void ensureRemediationsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + remediations_ = + new java.util.ArrayList< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation>(remediations_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + remediationsBuilder_; + + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public java.util.List + getRemediationsList() { + if (remediationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remediations_); + } else { + return remediationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public int getRemediationsCount() { + if (remediationsBuilder_ == null) { + return remediations_.size(); + } else { + return remediationsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder setRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.set(index, value); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder setRemediations( + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.set(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(value); + onChanged(); + } else { + remediationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder addRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(index, value); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder addRemediations( + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder addAllRemediations( + java.lang.Iterable< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation> + values) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remediations_); + onChanged(); + } else { + remediationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder clearRemediations() { + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + remediationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public Builder removeRemediations(int index) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.remove(index); + onChanged(); + } else { + remediationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + getRemediationsBuilder(int index) { + return getRemediationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList() { + if (remediationsBuilder_ != null) { + return remediationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remediations_); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder() { + return getRemediationsFieldBuilder() + .addBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder(int index) { + return getRemediationsFieldBuilder() + .addBuilder( + index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; + * + */ + public java.util.List< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder> + getRemediationsBuilderList() { + return getRemediationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsFieldBuilder() { + if (remediationsBuilder_ == null) { + remediationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( + remediations_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + remediations_ = null; + } + return remediationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment) + private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Assessment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TITLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * + * + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + * + * + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } + } + /** + * + * + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object longDescription_ = ""; + /** + * + * + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * + * @return The longDescription. + */ + @java.lang.Override + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } + } + /** + * + * + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * + * @return The bytes for longDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLISHER_FIELD_NUMBER = 5; + private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_; + /** + * + * + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * + * @return Whether the publisher field is set. + */ + @java.lang.Override + public boolean hasPublisher() { + return publisher_ != null; + } + /** + * + * + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * + * @return The publisher. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() { + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; + } + /** + * + * + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder() { + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; + } + + public static final int PRODUCT_FIELD_NUMBER = 6; + private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_; + /** + * + * + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + * + * + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * + * @return The product. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() { + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; + } + /** + * + * + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder() { + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; + } + + public static final int ASSESSMENT_FIELD_NUMBER = 7; + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_; + /** + * + * + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * + * @return Whether the assessment field is set. + */ + @java.lang.Override + public boolean hasAssessment() { + return assessment_ != null; + } + /** + * + * + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * + * @return The assessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() { + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; + } + /** + * + * + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder() { + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + if (publisher_ != null) { + output.writeMessage(5, getPublisher()); + } + if (product_ != null) { + output.writeMessage(6, getProduct()); + } + if (assessment_ != null) { + output.writeMessage(7, getAssessment()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + if (publisher_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPublisher()); + } + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProduct()); + } + if (assessment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAssessment()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityAssessmentNote other = + (io.grafeas.v1.VulnerabilityAssessmentNote) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (!getShortDescription().equals(other.getShortDescription())) return false; + if (!getLongDescription().equals(other.getLongDescription())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (hasPublisher() != other.hasPublisher()) return false; + if (hasPublisher()) { + if (!getPublisher().equals(other.getPublisher())) return false; + } + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct().equals(other.getProduct())) return false; + } + if (hasAssessment() != other.hasAssessment()) return false; + if (hasAssessment()) { + if (!getAssessment().equals(other.getAssessment())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getLongDescription().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + if (hasPublisher()) { + hash = (37 * hash) + PUBLISHER_FIELD_NUMBER; + hash = (53 * hash) + getPublisher().hashCode(); + } + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + if (hasAssessment()) { + hash = (37 * hash) + ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getAssessment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A single VulnerabilityAssessmentNote represents
+   * one particular product's vulnerability assessment for one CVE.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityAssessmentNote) + io.grafeas.v1.VulnerabilityAssessmentNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vex + .internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityAssessmentNote.class, + io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityAssessmentNote.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + shortDescription_ = ""; + longDescription_ = ""; + languageCode_ = ""; + publisher_ = null; + if (publisherBuilder_ != null) { + publisherBuilder_.dispose(); + publisherBuilder_ = null; + } + product_ = null; + if (productBuilder_ != null) { + productBuilder_.dispose(); + productBuilder_ = null; + } + assessment_ = null; + if (assessmentBuilder_ != null) { + assessmentBuilder_.dispose(); + assessmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote build() { + io.grafeas.v1.VulnerabilityAssessmentNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote buildPartial() { + io.grafeas.v1.VulnerabilityAssessmentNote result = + new io.grafeas.v1.VulnerabilityAssessmentNote(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityAssessmentNote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longDescription_ = longDescription_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.publisher_ = publisherBuilder_ == null ? publisher_ : publisherBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.product_ = productBuilder_ == null ? product_ : productBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.assessment_ = assessmentBuilder_ == null ? assessment_ : assessmentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityAssessmentNote) { + return mergeFrom((io.grafeas.v1.VulnerabilityAssessmentNote) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityAssessmentNote other) { + if (other == io.grafeas.v1.VulnerabilityAssessmentNote.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLongDescription().isEmpty()) { + longDescription_ = other.longDescription_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasPublisher()) { + mergePublisher(other.getPublisher()); + } + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.hasAssessment()) { + mergeAssessment(other.getAssessment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + longDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getPublisherFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getAssessmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + * + * + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The title of the note. E.g. `Vex-Debian-11.4`
+     * 
+ * + * string title = 1; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortDescription_ = ""; + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A one sentence description of this Vex.
+     * 
+ * + * string short_description = 2; + * + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object longDescription_ = ""; + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @return The longDescription. + */ + public java.lang.String getLongDescription() { + java.lang.Object ref = longDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @return The bytes for longDescription. + */ + public com.google.protobuf.ByteString getLongDescriptionBytes() { + java.lang.Object ref = longDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @param value The longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @return This builder for chaining. + */ + public Builder clearLongDescription() { + longDescription_ = getDefaultInstance().getLongDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A detailed description of this Vex.
+     * 
+ * + * string long_description = 3; + * + * @param value The bytes for longDescription to set. + * @return This builder for chaining. + */ + public Builder setLongDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + longDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies the language used by this document,
+     * corresponding to IETF BCP 47 / RFC 5646.
+     * 
+ * + * string language_code = 4; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> + publisherBuilder_; + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * + * @return Whether the publisher field is set. + */ + public boolean hasPublisher() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * + * @return The publisher. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() { + if (publisherBuilder_ == null) { + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; + } else { + return publisherBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder setPublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher value) { + if (publisherBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publisher_ = value; + } else { + publisherBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder setPublisher( + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder builderForValue) { + if (publisherBuilder_ == null) { + publisher_ = builderForValue.build(); + } else { + publisherBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder mergePublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher value) { + if (publisherBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && publisher_ != null + && publisher_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) { + getPublisherBuilder().mergeFrom(value); + } else { + publisher_ = value; + } + } else { + publisherBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public Builder clearPublisher() { + bitField0_ = (bitField0_ & ~0x00000010); + publisher_ = null; + if (publisherBuilder_ != null) { + publisherBuilder_.dispose(); + publisherBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder getPublisherBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPublisherFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder() { + if (publisherBuilder_ != null) { + return publisherBuilder_.getMessageOrBuilder(); + } else { + return publisher_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance() + : publisher_; + } + } + /** + * + * + *
+     * Publisher details of this Note.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder> + getPublisherFieldBuilder() { + if (publisherBuilder_ == null) { + publisherBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher, + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder>( + getPublisher(), getParentForChildren(), isClean()); + publisher_ = null; + } + return publisherBuilder_; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Product, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> + productBuilder_; + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * + * @return The product. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder setProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + } else { + productBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder setProduct( + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder mergeProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product value) { + if (productBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && product_ != null + && product_ != io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) { + getProductBuilder().mergeFrom(value); + } else { + product_ = value; + } + } else { + productBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public Builder clearProduct() { + bitField0_ = (bitField0_ & ~0x00000020); + product_ = null; + if (productBuilder_ != null) { + productBuilder_.dispose(); + productBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder getProductBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance() + : product_; + } + } + /** + * + * + *
+     * The product affected by this vex.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Product, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Product, + io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder>( + getProduct(), getParentForChildren(), isClean()); + product_ = null; + } + return productBuilder_; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> + assessmentBuilder_; + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * + * @return Whether the assessment field is set. + */ + public boolean hasAssessment() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * + * @return The assessment. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() { + if (assessmentBuilder_ == null) { + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; + } else { + return assessmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder setAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment value) { + if (assessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assessment_ = value; + } else { + assessmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder setAssessment( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder builderForValue) { + if (assessmentBuilder_ == null) { + assessment_ = builderForValue.build(); + } else { + assessmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder mergeAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment value) { + if (assessmentBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && assessment_ != null + && assessment_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) { + getAssessmentBuilder().mergeFrom(value); + } else { + assessment_ = value; + } + } else { + assessmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public Builder clearAssessment() { + bitField0_ = (bitField0_ & ~0x00000040); + assessment_ = null; + if (assessmentBuilder_ != null) { + assessmentBuilder_.dispose(); + assessmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder getAssessmentBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAssessmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder() { + if (assessmentBuilder_ != null) { + return assessmentBuilder_.getMessageOrBuilder(); + } else { + return assessment_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance() + : assessment_; + } + } + /** + * + * + *
+     * Represents a vulnerability assessment for the product.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder> + getAssessmentFieldBuilder() { + if (assessmentBuilder_ == null) { + assessmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder>( + getAssessment(), getParentForChildren(), isClean()); + assessment_ = null; + } + return assessmentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote) + private static final io.grafeas.v1.VulnerabilityAssessmentNote DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote(); + } + + public static io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityAssessmentNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java new file mode 100644 index 000000000000..32be78c74319 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityAssessmentNoteOrBuilder.java @@ -0,0 +1,233 @@ +/* + * Copyright 2019 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 + * + * 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. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grafeas/v1/vex.proto + +package io.grafeas.v1; + +public interface VulnerabilityAssessmentNoteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * The title of the note. E.g. `Vex-Debian-11.4`
+   * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + * + * + *
+   * A one sentence description of this Vex.
+   * 
+ * + * string short_description = 2; + * + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString getShortDescriptionBytes(); + + /** + * + * + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * + * @return The longDescription. + */ + java.lang.String getLongDescription(); + /** + * + * + *
+   * A detailed description of this Vex.
+   * 
+ * + * string long_description = 3; + * + * @return The bytes for longDescription. + */ + com.google.protobuf.ByteString getLongDescriptionBytes(); + + /** + * + * + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Identifies the language used by this document,
+   * corresponding to IETF BCP 47 / RFC 5646.
+   * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * + * @return Whether the publisher field is set. + */ + boolean hasPublisher(); + /** + * + * + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + * + * @return The publisher. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher(); + /** + * + * + *
+   * Publisher details of this Note.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder(); + + /** + * + * + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + * + * + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + * + * @return The product. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct(); + /** + * + * + *
+   * The product affected by this vex.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder(); + + /** + * + * + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * + * @return Whether the assessment field is set. + */ + boolean hasAssessment(); + /** + * + * + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + * + * @return The assessment. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment(); + /** + * + * + *
+   * Represents a vulnerability assessment for the product.
+   * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; + */ + io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder(); +} diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java index 5cd7cd2dbcee..a2a528aaa593 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNote.java @@ -6901,6 +6901,52 @@ public io.grafeas.v1.CVSSVersion getCvssVersion() { return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; } + public static final int CVSS_V2_FIELD_NUMBER = 8; + private io.grafeas.v1.CVSS cvssV2_; + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -6936,6 +6982,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { output.writeEnum(7, cvssVersion_); } + if (cvssV2_ != null) { + output.writeMessage(8, getCvssV2()); + } getUnknownFields().writeTo(output); } @@ -6966,6 +7015,9 @@ public int getSerializedSize() { if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, cvssVersion_); } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCvssV2()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -6995,6 +7047,10 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceUpdateTime().equals(other.getSourceUpdateTime())) return false; } if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2().equals(other.getCvssV2())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7028,6 +7084,10 @@ public int hashCode() { } hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -7191,6 +7251,11 @@ public Builder clear() { sourceUpdateTimeBuilder_ = null; } cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } return this; } @@ -7263,6 +7328,9 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityNote result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.cvssVersion_ = cvssVersion_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null ? cvssV2_ : cvssV2Builder_.build(); + } } @java.lang.Override @@ -7379,6 +7447,9 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote other) { if (other.cvssVersion_ != 0) { setCvssVersionValue(other.getCvssVersionValue()); } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -7462,6 +7533,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 56 + case 66: + { + input.readMessage(getCvssV2FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -8850,6 +8927,179 @@ public Builder clearCvssVersion() { return this; } + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + cvssV2Builder_; + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && cvssV2_ != null + && cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000080); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + * + * + *
+     * The full description of the v2 CVSS for this vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), getParentForChildren(), isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java index b8f01eba3129..7433f546f771 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java @@ -282,4 +282,39 @@ public interface VulnerabilityNoteOrBuilder * @return The cvssVersion. */ io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + * + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + * + * + *
+   * The full description of the v2 CVSS for this vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 8; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); } diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java index 623f620cf8c4..e3f429df6ec7 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java @@ -3060,6 +3060,2975 @@ public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue getDefaultInstanceForT } } + public interface VexAssessmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The cve. + */ + java.lang.String getCve(); + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + com.google.protobuf.ByteString getCveBytes(); + + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + java.util.List getRelatedUrisList(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + io.grafeas.v1.RelatedUrl getRelatedUris(int index); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + int getRelatedUrisCount(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + java.util.List getRelatedUrisOrBuilderList(); + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index); + + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The noteName. + */ + java.lang.String getNoteName(); + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The bytes for noteName. + */ + com.google.protobuf.ByteString getNoteNameBytes(); + + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The state. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState(); + + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return A list containing the impacts. + */ + java.util.List getImpactsList(); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return The count of impacts. + */ + int getImpactsCount(); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + java.lang.String getImpacts(int index); + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + com.google.protobuf.ByteString getImpactsBytes(int index); + + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + java.util.List + getRemediationsList(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + int getRemediationsCount(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList(); + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index); + + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + boolean hasJustification(); + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification(); + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder(); + } + /** + * + * + *
+   * VexAssessment provides all publisher provided Vex information that is
+   * related to this vulnerability.
+   * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} + */ + public static final class VexAssessment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + VexAssessmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use VexAssessment.newBuilder() to construct. + private VexAssessment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VexAssessment() { + cve_ = ""; + relatedUris_ = java.util.Collections.emptyList(); + noteName_ = ""; + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + remediations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VexAssessment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); + } + + public static final int CVE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cve_ = ""; + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The cve. + */ + @java.lang.Override + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } + } + /** + * + * + *
+     * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+     * tracking number for the vulnerability.
+     * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATED_URIS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List relatedUris_; + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public java.util.List getRelatedUrisList() { + return relatedUris_; + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public java.util.List + getRelatedUrisOrBuilderList() { + return relatedUris_; + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public int getRelatedUrisCount() { + return relatedUris_.size(); + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + return relatedUris_.get(index); + } + /** + * + * + *
+     * Holds a list of references associated with this vulnerability item and
+     * assessment.
+     * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + @java.lang.Override + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) { + return relatedUris_.get(index); + } + + public static final int NOTE_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object noteName_ = ""; + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The noteName. + */ + @java.lang.Override + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } + } + /** + * + * + *
+     * The VulnerabilityAssessment note from which this VexAssessment was
+     * generated.
+     * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+     * 
+ * + * string note_name = 3; + * + * @return The bytes for noteName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Provides the state of this Vulnerability assessment.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; + } + + public static final int IMPACTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList impacts_; + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList getImpactsList() { + return impacts_; + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + * + * + *
+     * Contains information about the impact of this vulnerability,
+     * this will change with time.
+     * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + + public static final int REMEDIATIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + remediations_; + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public java.util.List + getRemediationsList() { + return remediations_; + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList() { + return remediations_; + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public int getRemediationsCount() { + return remediations_.size(); + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { + return remediations_.get(index); + } + /** + * + * + *
+     * Specifies details on how to handle (and presumably, fix) a vulnerability.
+     * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { + return remediations_.get(index); + } + + public static final int JUSTIFICATION_FIELD_NUMBER = 7; + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + @java.lang.Override + public boolean hasJustification() { + return justification_ != null; + } + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; + } + /** + * + * + *
+     * Justification provides the justification when the state of the
+     * assessment if NOT_AFFECTED.
+     * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance() + : justification_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + output.writeMessage(2, relatedUris_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_); + } + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + for (int i = 0; i < impacts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, impacts_.getRaw(i)); + } + for (int i = 0; i < remediations_.size(); i++) { + output.writeMessage(6, remediations_.get(i)); + } + if (justification_ != null) { + output.writeMessage(7, getJustification()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_); + } + for (int i = 0; i < relatedUris_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, relatedUris_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_); + } + if (state_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + { + int dataSize = 0; + for (int i = 0; i < impacts_.size(); i++) { + dataSize += computeStringSizeNoTag(impacts_.getRaw(i)); + } + size += dataSize; + size += 1 * getImpactsList().size(); + } + for (int i = 0; i < remediations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, remediations_.get(i)); + } + if (justification_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getJustification()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment)) { + return super.equals(obj); + } + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other = + (io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) obj; + + if (!getCve().equals(other.getCve())) return false; + if (!getRelatedUrisList().equals(other.getRelatedUrisList())) return false; + if (!getNoteName().equals(other.getNoteName())) return false; + if (state_ != other.state_) return false; + if (!getImpactsList().equals(other.getImpactsList())) return false; + if (!getRemediationsList().equals(other.getRemediationsList())) return false; + if (hasJustification() != other.hasJustification()) return false; + if (hasJustification()) { + if (!getJustification().equals(other.getJustification())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCve().hashCode(); + if (getRelatedUrisCount() > 0) { + hash = (37 * hash) + RELATED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedUrisList().hashCode(); + } + hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNoteName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getImpactsCount() > 0) { + hash = (37 * hash) + IMPACTS_FIELD_NUMBER; + hash = (53 * hash) + getImpactsList().hashCode(); + } + if (getRemediationsCount() > 0) { + hash = (37 * hash) + REMEDIATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRemediationsList().hashCode(); + } + if (hasJustification()) { + hash = (37 * hash) + JUSTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getJustification().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * VexAssessment provides all publisher provided Vex information that is
+     * related to this vulnerability.
+     * 
+ * + * Protobuf type {@code grafeas.v1.VulnerabilityOccurrence.VexAssessment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.class, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder.class); + } + + // Construct using io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cve_ = ""; + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + } else { + relatedUris_ = null; + relatedUrisBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + noteName_ = ""; + state_ = 0; + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + } else { + remediations_ = null; + remediationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Vulnerability + .internal_static_grafeas_v1_VulnerabilityOccurrence_VexAssessment_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { + return io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment build() { + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment buildPartial() { + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result = + new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { + if (relatedUrisBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + relatedUris_ = java.util.Collections.unmodifiableList(relatedUris_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relatedUris_ = relatedUris_; + } else { + result.relatedUris_ = relatedUrisBuilder_.build(); + } + if (((bitField0_ & 0x00000010) != 0)) { + impacts_ = impacts_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.impacts_ = impacts_; + if (remediationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + remediations_ = java.util.Collections.unmodifiableList(remediations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.remediations_ = remediations_; + } else { + result.remediations_ = remediationsBuilder_.build(); + } + } + + private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cve_ = cve_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteName_ = noteName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.justification_ = + justificationBuilder_ == null ? justification_ : justificationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) { + return mergeFrom((io.grafeas.v1.VulnerabilityOccurrence.VexAssessment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment other) { + if (other == io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) + return this; + if (!other.getCve().isEmpty()) { + cve_ = other.cve_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (relatedUrisBuilder_ == null) { + if (!other.relatedUris_.isEmpty()) { + if (relatedUris_.isEmpty()) { + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelatedUrisIsMutable(); + relatedUris_.addAll(other.relatedUris_); + } + onChanged(); + } + } else { + if (!other.relatedUris_.isEmpty()) { + if (relatedUrisBuilder_.isEmpty()) { + relatedUrisBuilder_.dispose(); + relatedUrisBuilder_ = null; + relatedUris_ = other.relatedUris_; + bitField0_ = (bitField0_ & ~0x00000002); + relatedUrisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRelatedUrisFieldBuilder() + : null; + } else { + relatedUrisBuilder_.addAllMessages(other.relatedUris_); + } + } + } + if (!other.getNoteName().isEmpty()) { + noteName_ = other.noteName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.impacts_.isEmpty()) { + if (impacts_.isEmpty()) { + impacts_ = other.impacts_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureImpactsIsMutable(); + impacts_.addAll(other.impacts_); + } + onChanged(); + } + if (remediationsBuilder_ == null) { + if (!other.remediations_.isEmpty()) { + if (remediations_.isEmpty()) { + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureRemediationsIsMutable(); + remediations_.addAll(other.remediations_); + } + onChanged(); + } + } else { + if (!other.remediations_.isEmpty()) { + if (remediationsBuilder_.isEmpty()) { + remediationsBuilder_.dispose(); + remediationsBuilder_ = null; + remediations_ = other.remediations_; + bitField0_ = (bitField0_ & ~0x00000020); + remediationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRemediationsFieldBuilder() + : null; + } else { + remediationsBuilder_.addAllMessages(other.remediations_); + } + } + } + if (other.hasJustification()) { + mergeJustification(other.getJustification()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cve_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + io.grafeas.v1.RelatedUrl m = + input.readMessage(io.grafeas.v1.RelatedUrl.parser(), extensionRegistry); + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(m); + } else { + relatedUrisBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + noteName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureImpactsIsMutable(); + impacts_.add(s); + break; + } // case 42 + case 50: + { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation m = + input.readMessage( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.parser(), + extensionRegistry); + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(m); + } else { + remediationsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + input.readMessage(getJustificationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cve_ = ""; + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return The cve. + */ + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = getDefaultInstance().getCve(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
+       * tracking number for the vulnerability.
+       * 
+ * + * string cve = 1; + * + * @param value The bytes for cve to set. + * @return This builder for chaining. + */ + public Builder setCveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cve_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List relatedUris_ = + java.util.Collections.emptyList(); + + private void ensureRelatedUrisIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relatedUris_ = new java.util.ArrayList(relatedUris_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + relatedUrisBuilder_; + + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List getRelatedUrisList() { + if (relatedUrisBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedUris_); + } else { + return relatedUrisBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public int getRelatedUrisCount() { + if (relatedUrisBuilder_ == null) { + return relatedUris_.size(); + } else { + return relatedUrisBuilder_.getCount(); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl getRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, value); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl value) { + if (relatedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, value); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedUrisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder addAllRelatedUris( + java.lang.Iterable values) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedUris_); + onChanged(); + } else { + relatedUrisBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder clearRelatedUris() { + if (relatedUrisBuilder_ == null) { + relatedUris_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + relatedUrisBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public Builder removeRelatedUris(int index) { + if (relatedUrisBuilder_ == null) { + ensureRelatedUrisIsMutable(); + relatedUris_.remove(index); + onChanged(); + } else { + relatedUrisBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder(int index) { + return getRelatedUrisFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) { + if (relatedUrisBuilder_ == null) { + return relatedUris_.get(index); + } else { + return relatedUrisBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List + getRelatedUrisOrBuilderList() { + if (relatedUrisBuilder_ != null) { + return relatedUrisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedUris_); + } + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() { + return getRelatedUrisFieldBuilder() + .addBuilder(io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(int index) { + return getRelatedUrisFieldBuilder() + .addBuilder(index, io.grafeas.v1.RelatedUrl.getDefaultInstance()); + } + /** + * + * + *
+       * Holds a list of references associated with this vulnerability item and
+       * assessment.
+       * 
+ * + * repeated .grafeas.v1.RelatedUrl related_uris = 2; + */ + public java.util.List getRelatedUrisBuilderList() { + return getRelatedUrisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder> + getRelatedUrisFieldBuilder() { + if (relatedUrisBuilder_ == null) { + relatedUrisBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.RelatedUrl, + io.grafeas.v1.RelatedUrl.Builder, + io.grafeas.v1.RelatedUrlOrBuilder>( + relatedUris_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + relatedUris_ = null; + } + return relatedUrisBuilder_; + } + + private java.lang.Object noteName_ = ""; + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @return The noteName. + */ + public java.lang.String getNoteName() { + java.lang.Object ref = noteName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @return The bytes for noteName. + */ + public com.google.protobuf.ByteString getNoteNameBytes() { + java.lang.Object ref = noteName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + noteName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @param value The noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearNoteName() { + noteName_ = getDefaultInstance().getNoteName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The VulnerabilityAssessment note from which this VexAssessment was
+       * generated.
+       * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: The suffix is kept for consistency. --)
+       * 
+ * + * string note_name = 3; + * + * @param value The bytes for noteName to set. + * @return This builder for chaining. + */ + public Builder setNoteNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + noteName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() { + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result = + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_); + return result == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Provides the state of this Vulnerability assessment.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList impacts_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureImpactsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @return A list containing the impacts. + */ + public com.google.protobuf.ProtocolStringList getImpactsList() { + return impacts_.getUnmodifiableView(); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @return The count of impacts. + */ + public int getImpactsCount() { + return impacts_.size(); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the element to return. + * @return The impacts at the given index. + */ + public java.lang.String getImpacts(int index) { + return impacts_.get(index); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param index The index of the value to return. + * @return The bytes of the impacts at the given index. + */ + public com.google.protobuf.ByteString getImpactsBytes(int index) { + return impacts_.getByteString(index); + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param index The index to set the value at. + * @param value The impacts to set. + * @return This builder for chaining. + */ + public Builder setImpacts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImpactsIsMutable(); + impacts_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param value The impacts to add. + * @return This builder for chaining. + */ + public Builder addImpacts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param values The impacts to add. + * @return This builder for chaining. + */ + public Builder addAllImpacts(java.lang.Iterable values) { + ensureImpactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, impacts_); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @return This builder for chaining. + */ + public Builder clearImpacts() { + impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains information about the impact of this vulnerability,
+       * this will change with time.
+       * 
+ * + * repeated string impacts = 5; + * + * @param value The bytes of the impacts to add. + * @return This builder for chaining. + */ + public Builder addImpactsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureImpactsIsMutable(); + impacts_.add(value); + onChanged(); + return this; + } + + private java.util.List + remediations_ = java.util.Collections.emptyList(); + + private void ensureRemediationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + remediations_ = + new java.util.ArrayList< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation>(remediations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + remediationsBuilder_; + + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public java.util.List + getRemediationsList() { + if (remediationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remediations_); + } else { + return remediationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public int getRemediationsCount() { + if (remediationsBuilder_ == null) { + return remediations_.size(); + } else { + return remediationsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations( + int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder setRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.set(index, value); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder setRemediations( + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.set(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(value); + onChanged(); + } else { + remediationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) { + if (remediationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemediationsIsMutable(); + remediations_.add(index, value); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addRemediations( + int index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + builderForValue) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.add(index, builderForValue.build()); + onChanged(); + } else { + remediationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder addAllRemediations( + java.lang.Iterable< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation> + values) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remediations_); + onChanged(); + } else { + remediationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder clearRemediations() { + if (remediationsBuilder_ == null) { + remediations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + remediationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public Builder removeRemediations(int index) { + if (remediationsBuilder_ == null) { + ensureRemediationsIsMutable(); + remediations_.remove(index); + onChanged(); + } else { + remediationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + getRemediationsBuilder(int index) { + return getRemediationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder + getRemediationsOrBuilder(int index) { + if (remediationsBuilder_ == null) { + return remediations_.get(index); + } else { + return remediationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public java.util.List< + ? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsOrBuilderList() { + if (remediationsBuilder_ != null) { + return remediationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remediations_); + } + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder() { + return getRemediationsFieldBuilder() + .addBuilder( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder + addRemediationsBuilder(int index) { + return getRemediationsFieldBuilder() + .addBuilder( + index, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + .getDefaultInstance()); + } + /** + * + * + *
+       * Specifies details on how to handle (and presumably, fix) a vulnerability.
+       * 
+ * + * + * repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; + * + */ + public java.util.List< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder> + getRemediationsBuilderList() { + return getRemediationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder> + getRemediationsFieldBuilder() { + if (remediationsBuilder_ == null) { + remediationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>( + remediations_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + remediations_ = null; + } + return remediationsBuilder_; + } + + private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + justificationBuilder_; + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return Whether the justification field is set. + */ + public boolean hasJustification() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + * + * @return The justification. + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() { + if (justificationBuilder_ == null) { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; + } else { + return justificationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + justification_ = value; + } else { + justificationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder setJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + builderForValue) { + if (justificationBuilder_ == null) { + justification_ = builderForValue.build(); + } else { + justificationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder mergeJustification( + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) { + if (justificationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && justification_ != null + && justification_ + != io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance()) { + getJustificationBuilder().mergeFrom(value); + } else { + justification_ = value; + } + } else { + justificationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public Builder clearJustification() { + bitField0_ = (bitField0_ & ~0x00000040); + justification_ = null; + if (justificationBuilder_ != null) { + justificationBuilder_.dispose(); + justificationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder + getJustificationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getJustificationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder + getJustificationOrBuilder() { + if (justificationBuilder_ != null) { + return justificationBuilder_.getMessageOrBuilder(); + } else { + return justification_ == null + ? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + .getDefaultInstance() + : justification_; + } + } + /** + * + * + *
+       * Justification provides the justification when the state of the
+       * assessment if NOT_AFFECTED.
+       * 
+ * + * .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder> + getJustificationFieldBuilder() { + if (justificationBuilder_ == null) { + justificationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder, + io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>( + getJustification(), getParentForChildren(), isClean()); + justification_ = null; + } + return justificationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityOccurrence.VexAssessment) + private static final io.grafeas.v1.VulnerabilityOccurrence.VexAssessment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityOccurrence.VexAssessment(); + } + + public static io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VexAssessment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int TYPE_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -3565,6 +6534,82 @@ public io.grafeas.v1.CVSSVersion getCvssVersion() { return result == null ? io.grafeas.v1.CVSSVersion.UNRECOGNIZED : result; } + public static final int CVSS_V2_FIELD_NUMBER = 12; + private io.grafeas.v1.CVSS cvssV2_; + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return Whether the cvssV2 field is set. + */ + @java.lang.Override + public boolean hasCvssV2() { + return cvssV2_ != null; + } + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return The cvssV2. + */ + @java.lang.Override + public io.grafeas.v1.CVSS getCvssV2() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + @java.lang.Override + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + + public static final int VEX_ASSESSMENT_FIELD_NUMBER = 13; + private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return Whether the vexAssessment field is set. + */ + @java.lang.Override + public boolean hasVexAssessment() { + return vexAssessment_ != null; + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return The vexAssessment. + */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + @java.lang.Override + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder() { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3612,6 +6657,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { output.writeEnum(11, cvssVersion_); } + if (cvssV2_ != null) { + output.writeMessage(12, getCvssV2()); + } + if (vexAssessment_ != null) { + output.writeMessage(13, getVexAssessment()); + } getUnknownFields().writeTo(output); } @@ -3654,6 +6705,12 @@ public int getSerializedSize() { if (cvssVersion_ != io.grafeas.v1.CVSSVersion.CVSS_VERSION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, cvssVersion_); } + if (cvssV2_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCvssV2()); + } + if (vexAssessment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getVexAssessment()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3684,6 +6741,14 @@ public boolean equals(final java.lang.Object obj) { if (effectiveSeverity_ != other.effectiveSeverity_) return false; if (getFixAvailable() != other.getFixAvailable()) return false; if (cvssVersion_ != other.cvssVersion_) return false; + if (hasCvssV2() != other.hasCvssV2()) return false; + if (hasCvssV2()) { + if (!getCvssV2().equals(other.getCvssV2())) return false; + } + if (hasVexAssessment() != other.hasVexAssessment()) return false; + if (hasVexAssessment()) { + if (!getVexAssessment().equals(other.getVexAssessment())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3723,6 +6788,14 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFixAvailable()); hash = (37 * hash) + CVSS_VERSION_FIELD_NUMBER; hash = (53 * hash) + cvssVersion_; + if (hasCvssV2()) { + hash = (37 * hash) + CVSS_V2_FIELD_NUMBER; + hash = (53 * hash) + getCvssV2().hashCode(); + } + if (hasVexAssessment()) { + hash = (37 * hash) + VEX_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getVexAssessment().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3888,6 +6961,16 @@ public Builder clear() { effectiveSeverity_ = 0; fixAvailable_ = false; cvssVersion_ = 0; + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + vexAssessment_ = null; + if (vexAssessmentBuilder_ != null) { + vexAssessmentBuilder_.dispose(); + vexAssessmentBuilder_ = null; + } return this; } @@ -3973,6 +7056,13 @@ private void buildPartial0(io.grafeas.v1.VulnerabilityOccurrence result) { if (((from_bitField0_ & 0x00000400) != 0)) { result.cvssVersion_ = cvssVersion_; } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.cvssV2_ = cvssV2Builder_ == null ? cvssV2_ : cvssV2Builder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.vexAssessment_ = + vexAssessmentBuilder_ == null ? vexAssessment_ : vexAssessmentBuilder_.build(); + } } @java.lang.Override @@ -4107,6 +7197,12 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence other) { if (other.cvssVersion_ != 0) { setCvssVersionValue(other.getCvssVersionValue()); } + if (other.hasCvssV2()) { + mergeCvssV2(other.getCvssV2()); + } + if (other.hasVexAssessment()) { + mergeVexAssessment(other.getVexAssessment()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4213,6 +7309,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000400; break; } // case 88 + case 98: + { + input.readMessage(getCvssV2FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + input.readMessage(getVexAssessmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5872,6 +8980,297 @@ public Builder clearCvssVersion() { return this; } + private io.grafeas.v1.CVSS cvssV2_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + cvssV2Builder_; + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return Whether the cvssV2 field is set. + */ + public boolean hasCvssV2() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return The cvssV2. + */ + public io.grafeas.v1.CVSS getCvssV2() { + if (cvssV2Builder_ == null) { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } else { + return cvssV2Builder_.getMessage(); + } + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV2_ = value; + } else { + cvssV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder setCvssV2(io.grafeas.v1.CVSS.Builder builderForValue) { + if (cvssV2Builder_ == null) { + cvssV2_ = builderForValue.build(); + } else { + cvssV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder mergeCvssV2(io.grafeas.v1.CVSS value) { + if (cvssV2Builder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && cvssV2_ != null + && cvssV2_ != io.grafeas.v1.CVSS.getDefaultInstance()) { + getCvssV2Builder().mergeFrom(value); + } else { + cvssV2_ = value; + } + } else { + cvssV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public Builder clearCvssV2() { + bitField0_ = (bitField0_ & ~0x00000800); + cvssV2_ = null; + if (cvssV2Builder_ != null) { + cvssV2Builder_.dispose(); + cvssV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSS.Builder getCvssV2Builder() { + bitField0_ |= 0x00000800; + onChanged(); + return getCvssV2FieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + public io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder() { + if (cvssV2Builder_ != null) { + return cvssV2Builder_.getMessageOrBuilder(); + } else { + return cvssV2_ == null ? io.grafeas.v1.CVSS.getDefaultInstance() : cvssV2_; + } + } + /** + * + * + *
+     * The cvss v2 score for the vulnerability.
+     * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder> + getCvssV2FieldBuilder() { + if (cvssV2Builder_ == null) { + cvssV2Builder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.CVSS, io.grafeas.v1.CVSS.Builder, io.grafeas.v1.CVSSOrBuilder>( + getCvssV2(), getParentForChildren(), isClean()); + cvssV2_ = null; + } + return cvssV2Builder_; + } + + private io.grafeas.v1.VulnerabilityOccurrence.VexAssessment vexAssessment_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> + vexAssessmentBuilder_; + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return Whether the vexAssessment field is set. + */ + public boolean hasVexAssessment() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return The vexAssessment. + */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment() { + if (vexAssessmentBuilder_ == null) { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } else { + return vexAssessmentBuilder_.getMessage(); + } + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder setVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { + if (vexAssessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vexAssessment_ = value; + } else { + vexAssessmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder setVexAssessment( + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder builderForValue) { + if (vexAssessmentBuilder_ == null) { + vexAssessment_ = builderForValue.build(); + } else { + vexAssessmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder mergeVexAssessment(io.grafeas.v1.VulnerabilityOccurrence.VexAssessment value) { + if (vexAssessmentBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && vexAssessment_ != null + && vexAssessment_ + != io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance()) { + getVexAssessmentBuilder().mergeFrom(value); + } else { + vexAssessment_ = value; + } + } else { + vexAssessmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public Builder clearVexAssessment() { + bitField0_ = (bitField0_ & ~0x00001000); + vexAssessment_ = null; + if (vexAssessmentBuilder_ != null) { + vexAssessmentBuilder_.dispose(); + vexAssessmentBuilder_ = null; + } + onChanged(); + return this; + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder getVexAssessmentBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getVexAssessmentFieldBuilder().getBuilder(); + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + public io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder + getVexAssessmentOrBuilder() { + if (vexAssessmentBuilder_ != null) { + return vexAssessmentBuilder_.getMessageOrBuilder(); + } else { + return vexAssessment_ == null + ? io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.getDefaultInstance() + : vexAssessment_; + } + } + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder> + getVexAssessmentFieldBuilder() { + if (vexAssessmentBuilder_ == null) { + vexAssessmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment.Builder, + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder>( + getVexAssessment(), getParentForChildren(), isClean()); + vexAssessment_ = null; + } + return vexAssessmentBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java index db22aee8bdbf..550f31d4b9e4 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java @@ -363,4 +363,54 @@ public interface VulnerabilityOccurrenceOrBuilder * @return The cvssVersion. */ io.grafeas.v1.CVSSVersion getCvssVersion(); + + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return Whether the cvssV2 field is set. + */ + boolean hasCvssV2(); + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + * + * @return The cvssV2. + */ + io.grafeas.v1.CVSS getCvssV2(); + /** + * + * + *
+   * The cvss v2 score for the vulnerability.
+   * 
+ * + * .grafeas.v1.CVSS cvss_v2 = 12; + */ + io.grafeas.v1.CVSSOrBuilder getCvssV2OrBuilder(); + + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return Whether the vexAssessment field is set. + */ + boolean hasVexAssessment(); + /** + * .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; + * + * @return The vexAssessment. + */ + io.grafeas.v1.VulnerabilityOccurrence.VexAssessment getVexAssessment(); + /** .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; */ + io.grafeas.v1.VulnerabilityOccurrence.VexAssessmentOrBuilder getVexAssessmentOrBuilder(); } diff --git a/java-grafeas/src/main/proto/grafeas/v1/common.proto b/java-grafeas/src/main/proto/grafeas/v1/common.proto index 80bd7869968a..1464ecc9be2d 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/common.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/common.proto @@ -45,6 +45,8 @@ enum NoteKind { COMPLIANCE = 9; // This represents a DSSE attestation Note DSSE_ATTESTATION = 10; + // This represents a Vulnerability Assessment. + VULNERABILITY_ASSESSMENT = 11; } // Metadata for any related URL information. diff --git a/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto b/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto index 5665fe3623e6..5ec930e6ef3d 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/grafeas.proto @@ -33,6 +33,7 @@ import "grafeas/v1/dsse_attestation.proto"; import "grafeas/v1/image.proto"; import "grafeas/v1/package.proto"; import "grafeas/v1/upgrade.proto"; +import "grafeas/v1/vex.proto"; import "grafeas/v1/vulnerability.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; @@ -314,6 +315,8 @@ message Note { grafeas.v1.ComplianceNote compliance = 18; // A note describing a dsse attestation note. grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + // A note describing a vulnerability assessment. + grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; } } diff --git a/java-grafeas/src/main/proto/grafeas/v1/vex.proto b/java-grafeas/src/main/proto/grafeas/v1/vex.proto new file mode 100644 index 000000000000..ba53a8438ff8 --- /dev/null +++ b/java-grafeas/src/main/proto/grafeas/v1/vex.proto @@ -0,0 +1,203 @@ +// Copyright 2023 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; + +import "grafeas/v1/common.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"; + +// A single VulnerabilityAssessmentNote represents +// one particular product's vulnerability assessment for one CVE. +message VulnerabilityAssessmentNote { + // The title of the note. E.g. `Vex-Debian-11.4` + string title = 1; + + // A one sentence description of this Vex. + string short_description = 2; + + // A detailed description of this Vex. + string long_description = 3; + + // Identifies the language used by this document, + // corresponding to IETF BCP 47 / RFC 5646. + string language_code = 4; + + // Publisher contains information about the publisher of + // this Note. + // (-- api-linter: core::0123::resource-annotation=disabled + // aip.dev/not-precedent: Publisher is not a separate resource. --) + message Publisher { + // Name of the publisher. + // Examples: 'Google', 'Google Cloud Platform'. + string name = 1; + + // Provides information about the authority of the issuing party to + // release the document, in particular, the party's constituency and + // responsibilities or other obligations. + string issuing_authority = 2; + + // The context or namespace. + // Contains a URL which is under control of the issuing party and can + // be used as a globally unique identifier for that issuing party. + // Example: https://csaf.io + string publisher_namespace = 3; + } + + // Publisher details of this Note. + Publisher publisher = 5; + + // Product contains information about a product and how to uniquely identify + // it. + // (-- api-linter: core::0123::resource-annotation=disabled + // aip.dev/not-precedent: Product is not a separate resource. --) + message Product { + // Name of the product. + string name = 1; + + // Token that identifies a product so that it can be referred to from other + // parts in the document. There is no predefined format as long as it + // uniquely identifies a group in the context of the current document. + string id = 2; + + oneof identifier { + // Contains a URI which is vendor-specific. + // Example: The artifact repository URL of an image. + string generic_uri = 3; + } + } + + // The product affected by this vex. + Product product = 6; + + // Assessment provides all information that is related to a single + // vulnerability for this product. + message Assessment { + // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) + // tracking number for the vulnerability. + string cve = 1; + + // A one sentence description of this Vex. + string short_description = 2; + + // A detailed description of this Vex. + string long_description = 3; + + // Holds a list of references associated with this vulnerability item and + // assessment. These uris have additional information about the + // vulnerability and the assessment itself. E.g. Link to a document which + // details how this assessment concluded the state of this vulnerability. + repeated grafeas.v1.RelatedUrl related_uris = 4; + + // Provides the state of this Vulnerability assessment. + enum State { + // No state is specified. + STATE_UNSPECIFIED = 0; + // This product is known to be affected by this vulnerability. + AFFECTED = 1; + // This product is known to be not affected by this vulnerability. + NOT_AFFECTED = 2; + // This product contains a fix for this vulnerability. + FIXED = 3; + // It is not known yet whether these versions are or are not affected + // by the vulnerability. However, it is still under investigation. + UNDER_INVESTIGATION = 4; + } + + // Provides the state of this Vulnerability assessment. + State state = 5; + + // Contains information about the impact of this vulnerability, + // this will change with time. + repeated string impacts = 6; + + // Justification provides the justification when the state of the + // assessment if NOT_AFFECTED. + message Justification { + // Provides the type of justification. + enum JustificationType { + // JUSTIFICATION_TYPE_UNSPECIFIED. + JUSTIFICATION_TYPE_UNSPECIFIED = 0; + // The vulnerable component is not present in the product. + COMPONENT_NOT_PRESENT = 1; + // The vulnerable code is not present. Typically this case + // occurs when source code is configured or built in a way that excludes + // the vulnerable code. + VULNERABLE_CODE_NOT_PRESENT = 2; + // The vulnerable code can not be executed. + // Typically this case occurs when the product includes the vulnerable + // code but does not call or use the vulnerable code. + VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; + // The vulnerable code cannot be controlled by an attacker to exploit + // the vulnerability. + VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; + // The product includes built-in protections or features that prevent + // exploitation of the vulnerability. These built-in protections cannot + // be subverted by the attacker and cannot be configured or disabled by + // the user. These mitigations completely prevent exploitation based on + // known attack vectors. + INLINE_MITIGATIONS_ALREADY_EXIST = 5; + } + + // The justification type for this vulnerability. + JustificationType justification_type = 1; + + // Additional details on why this justification was chosen. + string details = 2; + } + + // Justification provides the justification when the state of the + // assessment if NOT_AFFECTED. + Justification justification = 7; + + // Specifies details on how to handle (and presumably, fix) a vulnerability. + message Remediation { + // The type of remediation that can be applied. + enum RemediationType { + // No remediation type specified. + REMEDIATION_TYPE_UNSPECIFIED = 0; + // A MITIGATION is available. + MITIGATION = 1; + // No fix is planned. + NO_FIX_PLANNED = 2; + // Not available. + NONE_AVAILABLE = 3; + // A vendor fix is available. + VENDOR_FIX = 4; + // A workaround is available. + WORKAROUND = 5; + } + + // The type of remediation that can be applied. + RemediationType remediation_type = 1; + + // Contains a comprehensive human-readable discussion of the remediation. + string details = 2; + + // Contains the URL where to obtain the remediation. + grafeas.v1.RelatedUrl remediation_uri = 3; + } + + // Specifies details on how to handle (and presumably, fix) a vulnerability. + repeated Remediation remediations = 8; + } + + // Represents a vulnerability assessment for the product. + Assessment assessment = 7; +} diff --git a/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto index cea4558b1445..3b316eb8dd37 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto @@ -22,6 +22,7 @@ import "grafeas/v1/common.proto"; import "grafeas/v1/cvss.proto"; import "grafeas/v1/package.proto"; import "grafeas/v1/severity.proto"; +import "grafeas/v1/vex.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; option java_multiple_files = true; @@ -152,7 +153,10 @@ message VulnerabilityNote { // CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 7; - // Next free ID is 8. + // The full description of the v2 CVSS for this vulnerability. + CVSS cvss_v2 = 8; + + // Next free ID is 9. } // An occurrence of a severity vulnerability on a resource. @@ -247,5 +251,47 @@ message VulnerabilityOccurrence { // Output only. CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 11; - // Next free ID is 12. + // The cvss v2 score for the vulnerability. + CVSS cvss_v2 = 12; + + // VexAssessment provides all publisher provided Vex information that is + // related to this vulnerability. + message VexAssessment { + // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) + // tracking number for the vulnerability. + string cve = 1; + + // Holds a list of references associated with this vulnerability item and + // assessment. + repeated grafeas.v1.RelatedUrl related_uris = 2; + + // The VulnerabilityAssessment note from which this VexAssessment was + // generated. + // This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. + // (-- api-linter: core::0122::name-suffix=disabled + // aip.dev/not-precedent: The suffix is kept for consistency. --) + string note_name = 3; + + // Provides the state of this Vulnerability assessment. + grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; + + // Contains information about the impact of this vulnerability, + // this will change with time. + repeated string impacts = 5; + + // Specifies details on how to handle (and presumably, fix) a vulnerability. + repeated grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation + remediations = 6; + + // Justification provides the justification when the state of the + // assessment if NOT_AFFECTED. + grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification + justification = 7; + + // Next ID: 8 + } + + VexAssessment vex_assessment = 13; + + // Next free ID is 14. }