From 17e95c1c95a1e85addd5745fca9f28691d29fa46 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jan 2020 08:20:24 -0800 Subject: [PATCH] feat: add upgrade classes (#21) * [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * fix: allow proto interface changes Co-authored-by: Jeff Ching --- clirr-ignored-differences.xml | 19 + .../grafeas/v1/BatchCreateNotesRequest.java | 68 +- .../v1/BatchCreateNotesRequestOrBuilder.java | 23 +- .../v1/BatchCreateOccurrencesRequest.java | 120 +- ...atchCreateOccurrencesRequestOrBuilder.java | 28 +- src/main/java/io/grafeas/v1/Common.java | 10 +- .../java/io/grafeas/v1/CreateNoteRequest.java | 66 +- .../v1/CreateNoteRequestOrBuilder.java | 18 +- .../grafeas/v1/CreateOccurrenceRequest.java | 52 +- .../v1/CreateOccurrenceRequestOrBuilder.java | 14 +- .../java/io/grafeas/v1/DeleteNoteRequest.java | 28 +- .../v1/DeleteNoteRequestOrBuilder.java | 8 +- .../grafeas/v1/DeleteOccurrenceRequest.java | 32 +- .../v1/DeleteOccurrenceRequestOrBuilder.java | 8 +- src/main/java/io/grafeas/v1/Discovery.java | 44 +- .../io/grafeas/v1/DiscoveryOccurrence.java | 450 ++ .../v1/DiscoveryOccurrenceOrBuilder.java | 60 + .../java/io/grafeas/v1/GetNoteRequest.java | 28 +- .../grafeas/v1/GetNoteRequestOrBuilder.java | 8 +- .../grafeas/v1/GetOccurrenceNoteRequest.java | 28 +- .../v1/GetOccurrenceNoteRequestOrBuilder.java | 8 +- .../io/grafeas/v1/GetOccurrenceRequest.java | 28 +- .../v1/GetOccurrenceRequestOrBuilder.java | 8 +- .../java/io/grafeas/v1/GrafeasOuterClass.java | 302 +- .../v1/ListNoteOccurrencesRequest.java | 28 +- .../ListNoteOccurrencesRequestOrBuilder.java | 8 +- .../java/io/grafeas/v1/ListNotesRequest.java | 28 +- .../grafeas/v1/ListNotesRequestOrBuilder.java | 8 +- .../io/grafeas/v1/ListOccurrencesRequest.java | 28 +- .../v1/ListOccurrencesRequestOrBuilder.java | 8 +- src/main/java/io/grafeas/v1/Note.java | 293 ++ src/main/java/io/grafeas/v1/NoteKind.java | 22 + .../java/io/grafeas/v1/NoteOrBuilder.java | 35 + src/main/java/io/grafeas/v1/Occurrence.java | 295 ++ .../io/grafeas/v1/OccurrenceOrBuilder.java | 35 + .../java/io/grafeas/v1/UpdateNoteRequest.java | 52 +- .../v1/UpdateNoteRequestOrBuilder.java | 14 +- .../grafeas/v1/UpdateOccurrenceRequest.java | 52 +- .../v1/UpdateOccurrenceRequestOrBuilder.java | 14 +- src/main/java/io/grafeas/v1/Upgrade.java | 155 + .../io/grafeas/v1/UpgradeDistribution.java | 1290 ++++++ .../v1/UpgradeDistributionOrBuilder.java | 160 + src/main/java/io/grafeas/v1/UpgradeNote.java | 1660 +++++++ .../io/grafeas/v1/UpgradeNoteOrBuilder.java | 176 + .../java/io/grafeas/v1/UpgradeOccurrence.java | 1473 +++++++ .../v1/UpgradeOccurrenceOrBuilder.java | 165 + .../java/io/grafeas/v1/Vulnerability.java | 91 +- .../java/io/grafeas/v1/VulnerabilityNote.java | 635 +++ .../v1/VulnerabilityNoteOrBuilder.java | 41 + .../grafeas/v1/VulnerabilityOccurrence.java | 21 +- .../v1/VulnerabilityOccurrenceOrBuilder.java | 6 +- .../java/io/grafeas/v1/WindowsUpdate.java | 3898 +++++++++++++++++ .../io/grafeas/v1/WindowsUpdateOrBuilder.java | 278 ++ src/main/proto/grafeas/v1/common.proto | 2 + src/main/proto/grafeas/v1/discovery.proto | 7 + src/main/proto/grafeas/v1/grafeas.proto | 125 +- src/main/proto/grafeas/v1/upgrade.proto | 114 + src/main/proto/grafeas/v1/vulnerability.proto | 14 +- synth.metadata | 731 +--- 59 files changed, 12211 insertions(+), 1209 deletions(-) create mode 100644 clirr-ignored-differences.xml create mode 100644 src/main/java/io/grafeas/v1/Upgrade.java create mode 100644 src/main/java/io/grafeas/v1/UpgradeDistribution.java create mode 100644 src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java create mode 100644 src/main/java/io/grafeas/v1/UpgradeNote.java create mode 100644 src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java create mode 100644 src/main/java/io/grafeas/v1/UpgradeOccurrence.java create mode 100644 src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java create mode 100644 src/main/java/io/grafeas/v1/WindowsUpdate.java create mode 100644 src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java create mode 100644 src/main/proto/grafeas/v1/upgrade.proto diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml new file mode 100644 index 00000000..8c1bfb4a --- /dev/null +++ b/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + io/grafeas/v1/*OrBuilder + * get*(*) + + + 7012 + io/grafeas/v1/*OrBuilder + boolean contains*(*) + + + 7012 + io/grafeas/v1/*OrBuilder + boolean has*(*) + + diff --git a/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java b/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java index 90d3c392..c19f6ab4 100644 --- a/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java +++ b/src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java @@ -147,7 +147,9 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -170,7 +172,9 @@ public java.lang.String getParent() { * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -218,7 +222,8 @@ public int getNotesCount() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public boolean containsNotes(java.lang.String key) { if (key == null) { @@ -238,7 +243,8 @@ public java.util.Map getNotes() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.Map getNotesMap() { return internalGetNotes().getMap(); @@ -250,7 +256,8 @@ public java.util.Map getNotesMap() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Note getNotesOrDefault( java.lang.String key, io.grafeas.v1.Note defaultValue) { @@ -267,7 +274,8 @@ public io.grafeas.v1.Note getNotesOrDefault( * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Note getNotesOrThrow(java.lang.String key) { if (key == null) { @@ -647,7 +655,9 @@ public Builder mergeFrom( * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -670,7 +680,9 @@ public java.lang.String getParent() { * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -693,7 +705,9 @@ public com.google.protobuf.ByteString getParentBytes() { * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -715,7 +729,9 @@ public Builder setParent(java.lang.String value) { * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -733,7 +749,9 @@ public Builder clearParent() { * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -781,7 +799,9 @@ public int getNotesCount() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public boolean containsNotes(java.lang.String key) { if (key == null) { @@ -801,7 +821,9 @@ public java.util.Map getNotes() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.Map getNotesMap() { return internalGetNotes().getMap(); @@ -813,7 +835,9 @@ public java.util.Map getNotesMap() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Note getNotesOrDefault( java.lang.String key, io.grafeas.v1.Note defaultValue) { @@ -830,7 +854,9 @@ public io.grafeas.v1.Note getNotesOrDefault( * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Note getNotesOrThrow(java.lang.String key) { if (key == null) { @@ -854,7 +880,9 @@ public Builder clearNotes() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder removeNotes(java.lang.String key) { if (key == null) { @@ -875,7 +903,9 @@ public java.util.Map getMutableNotes() { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder putNotes(java.lang.String key, io.grafeas.v1.Note value) { if (key == null) { @@ -894,7 +924,9 @@ public Builder putNotes(java.lang.String key, io.grafeas.v1.Note value) { * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder putAllNotes(java.util.Map values) { internalGetMutableNotes().getMutableMap().putAll(values); diff --git a/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java b/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java index e69913c9..6a859109 100644 --- a/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface BatchCreateNotesRequestOrBuilder * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -45,7 +47,9 @@ public interface BatchCreateNotesRequestOrBuilder * the notes are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -58,7 +62,8 @@ public interface BatchCreateNotesRequestOrBuilder * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ int getNotesCount(); /** @@ -68,7 +73,8 @@ public interface BatchCreateNotesRequestOrBuilder * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ boolean containsNotes(java.lang.String key); /** Use {@link #getNotesMap()} instead. */ @@ -81,7 +87,8 @@ public interface BatchCreateNotesRequestOrBuilder * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ java.util.Map getNotesMap(); /** @@ -91,7 +98,8 @@ public interface BatchCreateNotesRequestOrBuilder * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ io.grafeas.v1.Note getNotesOrDefault(java.lang.String key, io.grafeas.v1.Note defaultValue); /** @@ -101,7 +109,8 @@ public interface BatchCreateNotesRequestOrBuilder * The notes to create. Max allowed length is 1000. * * - * map<string, .grafeas.v1.Note> notes = 2; + * map<string, .grafeas.v1.Note> notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ io.grafeas.v1.Note getNotesOrThrow(java.lang.String key); } diff --git a/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java b/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java index 23f41882..93150519 100644 --- a/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java +++ b/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java @@ -137,7 +137,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -160,7 +162,9 @@ public java.lang.String getParent() { * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -185,7 +189,9 @@ public com.google.protobuf.ByteString getParentBytes() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getOccurrencesList() { return occurrences_; @@ -197,7 +203,9 @@ public java.util.List getOccurrencesList() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getOccurrencesOrBuilderList() { return occurrences_; @@ -209,7 +217,9 @@ public java.util.List getOccurrence * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public int getOccurrencesCount() { return occurrences_.size(); @@ -221,7 +231,9 @@ public int getOccurrencesCount() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Occurrence getOccurrences(int index) { return occurrences_.get(index); @@ -233,7 +245,9 @@ public io.grafeas.v1.Occurrence getOccurrences(int index) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder(int index) { return occurrences_.get(index); @@ -622,7 +636,9 @@ public Builder mergeFrom( * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -645,7 +661,9 @@ public java.lang.String getParent() { * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -668,7 +686,9 @@ public com.google.protobuf.ByteString getParentBytes() { * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -690,7 +710,9 @@ public Builder setParent(java.lang.String value) { * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -708,7 +730,9 @@ public Builder clearParent() { * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -747,7 +771,9 @@ private void ensureOccurrencesIsMutable() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getOccurrencesList() { if (occurrencesBuilder_ == null) { @@ -763,7 +789,9 @@ public java.util.List getOccurrencesList() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public int getOccurrencesCount() { if (occurrencesBuilder_ == null) { @@ -779,7 +807,9 @@ public int getOccurrencesCount() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Occurrence getOccurrences(int index) { if (occurrencesBuilder_ == null) { @@ -795,7 +825,9 @@ public io.grafeas.v1.Occurrence getOccurrences(int index) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setOccurrences(int index, io.grafeas.v1.Occurrence value) { if (occurrencesBuilder_ == null) { @@ -817,7 +849,9 @@ public Builder setOccurrences(int index, io.grafeas.v1.Occurrence value) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setOccurrences(int index, io.grafeas.v1.Occurrence.Builder builderForValue) { if (occurrencesBuilder_ == null) { @@ -836,7 +870,9 @@ public Builder setOccurrences(int index, io.grafeas.v1.Occurrence.Builder builde * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addOccurrences(io.grafeas.v1.Occurrence value) { if (occurrencesBuilder_ == null) { @@ -858,7 +894,9 @@ public Builder addOccurrences(io.grafeas.v1.Occurrence value) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addOccurrences(int index, io.grafeas.v1.Occurrence value) { if (occurrencesBuilder_ == null) { @@ -880,7 +918,9 @@ public Builder addOccurrences(int index, io.grafeas.v1.Occurrence value) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addOccurrences(io.grafeas.v1.Occurrence.Builder builderForValue) { if (occurrencesBuilder_ == null) { @@ -899,7 +939,9 @@ public Builder addOccurrences(io.grafeas.v1.Occurrence.Builder builderForValue) * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addOccurrences(int index, io.grafeas.v1.Occurrence.Builder builderForValue) { if (occurrencesBuilder_ == null) { @@ -918,7 +960,9 @@ public Builder addOccurrences(int index, io.grafeas.v1.Occurrence.Builder builde * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addAllOccurrences( java.lang.Iterable values) { @@ -938,7 +982,9 @@ public Builder addAllOccurrences( * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearOccurrences() { if (occurrencesBuilder_ == null) { @@ -957,7 +1003,9 @@ public Builder clearOccurrences() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder removeOccurrences(int index) { if (occurrencesBuilder_ == null) { @@ -976,7 +1024,9 @@ public Builder removeOccurrences(int index) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder(int index) { return getOccurrencesFieldBuilder().getBuilder(index); @@ -988,7 +1038,9 @@ public io.grafeas.v1.Occurrence.Builder getOccurrencesBuilder(int index) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder(int index) { if (occurrencesBuilder_ == null) { @@ -1004,7 +1056,9 @@ public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder(int index) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getOccurrencesOrBuilderList() { @@ -1021,7 +1075,9 @@ public io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder(int index) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { return getOccurrencesFieldBuilder().addBuilder(io.grafeas.v1.Occurrence.getDefaultInstance()); @@ -1033,7 +1089,9 @@ public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder() { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder(int index) { return getOccurrencesFieldBuilder() @@ -1046,7 +1104,9 @@ public io.grafeas.v1.Occurrence.Builder addOccurrencesBuilder(int index) { * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getOccurrencesBuilderList() { return getOccurrencesFieldBuilder().getBuilderList(); diff --git a/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java b/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java index 83bf8b19..383e9870 100644 --- a/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface BatchCreateOccurrencesRequestOrBuilder * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -45,7 +47,9 @@ public interface BatchCreateOccurrencesRequestOrBuilder * the occurrences are to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -58,7 +62,9 @@ public interface BatchCreateOccurrencesRequestOrBuilder * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ java.util.List getOccurrencesList(); /** @@ -68,7 +74,9 @@ public interface BatchCreateOccurrencesRequestOrBuilder * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ io.grafeas.v1.Occurrence getOccurrences(int index); /** @@ -78,7 +86,9 @@ public interface BatchCreateOccurrencesRequestOrBuilder * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ int getOccurrencesCount(); /** @@ -88,7 +98,9 @@ public interface BatchCreateOccurrencesRequestOrBuilder * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ java.util.List getOccurrencesOrBuilderList(); /** @@ -98,7 +110,9 @@ public interface BatchCreateOccurrencesRequestOrBuilder * The occurrences to create. Max allowed length is 1000. * * - * repeated .grafeas.v1.Occurrence occurrences = 2; + * + * repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ io.grafeas.v1.OccurrenceOrBuilder getOccurrencesOrBuilder(int index); } diff --git a/src/main/java/io/grafeas/v1/Common.java b/src/main/java/io/grafeas/v1/Common.java index 619b4b66..22345a3c 100644 --- a/src/main/java/io/grafeas/v1/Common.java +++ b/src/main/java/io/grafeas/v1/Common.java @@ -48,13 +48,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n\027grafeas/v1/common.proto\022\ngrafeas.v1\"(\n" + "\nRelatedUrl\022\013\n\003url\030\001 \001(\t\022\r\n\005label\030\002 \001(\t\"" + "5\n\tSignature\022\021\n\tsignature\030\001 \001(\014\022\025\n\rpubli" - + "c_key_id\030\002 \001(\t*\213\001\n\010NoteKind\022\031\n\025NOTE_KIND" + + "c_key_id\030\002 \001(\t*\230\001\n\010NoteKind\022\031\n\025NOTE_KIND" + "_UNSPECIFIED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BUI" + "LD\020\002\022\t\n\005IMAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYME" - + "NT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007BQ\n\r" - + "io.grafeas.v1P\001Z8google.golang.org/genpr" - + "oto/googleapis/grafeas/v1;grafeas\242\002\003GRAb" - + "\006proto3" + + "NT\020\005\022\r\n\tDISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n\007" + + "UPGRADE\020\010BQ\n\rio.grafeas.v1P\001Z8google.gol" + + "ang.org/genproto/googleapis/grafeas/v1;g" + + "rafeas\242\002\003GRAb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/src/main/java/io/grafeas/v1/CreateNoteRequest.java b/src/main/java/io/grafeas/v1/CreateNoteRequest.java index c51cf183..0130f86c 100644 --- a/src/main/java/io/grafeas/v1/CreateNoteRequest.java +++ b/src/main/java/io/grafeas/v1/CreateNoteRequest.java @@ -142,7 +142,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -165,7 +167,9 @@ public java.lang.String getParent() { * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -190,7 +194,7 @@ public com.google.protobuf.ByteString getParentBytes() { * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The noteId. */ @@ -212,7 +216,7 @@ public java.lang.String getNoteId() { * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for noteId. */ @@ -237,7 +241,7 @@ public com.google.protobuf.ByteString getNoteIdBytes() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the note field is set. */ @@ -251,7 +255,7 @@ public boolean hasNote() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The note. */ @@ -265,7 +269,7 @@ public io.grafeas.v1.Note getNote() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { return getNote(); @@ -636,7 +640,9 @@ public Builder mergeFrom( * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -659,7 +665,9 @@ public java.lang.String getParent() { * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -682,7 +690,9 @@ public com.google.protobuf.ByteString getParentBytes() { * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -704,7 +714,9 @@ public Builder setParent(java.lang.String value) { * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -722,7 +734,9 @@ public Builder clearParent() { * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -746,7 +760,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The noteId. */ @@ -768,7 +782,7 @@ public java.lang.String getNoteId() { * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for noteId. */ @@ -790,7 +804,7 @@ public com.google.protobuf.ByteString getNoteIdBytes() { * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The noteId to set. * @return This builder for chaining. @@ -811,7 +825,7 @@ public Builder setNoteId(java.lang.String value) { * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -828,7 +842,7 @@ public Builder clearNoteId() { * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for noteId to set. * @return This builder for chaining. @@ -855,7 +869,7 @@ public Builder setNoteIdBytes(com.google.protobuf.ByteString value) { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the note field is set. */ @@ -869,7 +883,7 @@ public boolean hasNote() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The note. */ @@ -887,7 +901,7 @@ public io.grafeas.v1.Note getNote() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setNote(io.grafeas.v1.Note value) { if (noteBuilder_ == null) { @@ -909,7 +923,7 @@ public Builder setNote(io.grafeas.v1.Note value) { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setNote(io.grafeas.v1.Note.Builder builderForValue) { if (noteBuilder_ == null) { @@ -928,7 +942,7 @@ public Builder setNote(io.grafeas.v1.Note.Builder builderForValue) { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeNote(io.grafeas.v1.Note value) { if (noteBuilder_ == null) { @@ -951,7 +965,7 @@ public Builder mergeNote(io.grafeas.v1.Note value) { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearNote() { if (noteBuilder_ == null) { @@ -971,7 +985,7 @@ public Builder clearNote() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.Note.Builder getNoteBuilder() { @@ -985,7 +999,7 @@ public io.grafeas.v1.Note.Builder getNoteBuilder() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { if (noteBuilder_ != null) { @@ -1001,7 +1015,7 @@ public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> diff --git a/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java b/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java index 32ce5f33..d08b3958 100644 --- a/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface CreateNoteRequestOrBuilder * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -45,7 +47,9 @@ public interface CreateNoteRequestOrBuilder * the note is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -58,7 +62,7 @@ public interface CreateNoteRequestOrBuilder * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The noteId. */ @@ -70,7 +74,7 @@ public interface CreateNoteRequestOrBuilder * The ID to use for this note. * * - * string note_id = 2; + * string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for noteId. */ @@ -83,7 +87,7 @@ public interface CreateNoteRequestOrBuilder * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the note field is set. */ @@ -95,7 +99,7 @@ public interface CreateNoteRequestOrBuilder * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The note. */ @@ -107,7 +111,7 @@ public interface CreateNoteRequestOrBuilder * The note to create. * * - * .grafeas.v1.Note note = 3; + * .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; */ io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); } diff --git a/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java b/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java index 16bd8200..80c19ab0 100644 --- a/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java +++ b/src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java @@ -136,7 +136,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -159,7 +161,9 @@ public java.lang.String getParent() { * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -184,7 +188,7 @@ public com.google.protobuf.ByteString getParentBytes() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the occurrence field is set. */ @@ -198,7 +202,7 @@ public boolean hasOccurrence() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The occurrence. */ @@ -212,7 +216,7 @@ public io.grafeas.v1.Occurrence getOccurrence() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { return getOccurrence(); @@ -569,7 +573,9 @@ public Builder mergeFrom( * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -592,7 +598,9 @@ public java.lang.String getParent() { * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -615,7 +623,9 @@ public com.google.protobuf.ByteString getParentBytes() { * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -637,7 +647,9 @@ public Builder setParent(java.lang.String value) { * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -655,7 +667,9 @@ public Builder clearParent() { * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -684,7 +698,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the occurrence field is set. */ @@ -698,7 +712,7 @@ public boolean hasOccurrence() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The occurrence. */ @@ -716,7 +730,7 @@ public io.grafeas.v1.Occurrence getOccurrence() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setOccurrence(io.grafeas.v1.Occurrence value) { if (occurrenceBuilder_ == null) { @@ -738,7 +752,7 @@ public Builder setOccurrence(io.grafeas.v1.Occurrence value) { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setOccurrence(io.grafeas.v1.Occurrence.Builder builderForValue) { if (occurrenceBuilder_ == null) { @@ -757,7 +771,7 @@ public Builder setOccurrence(io.grafeas.v1.Occurrence.Builder builderForValue) { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { if (occurrenceBuilder_ == null) { @@ -781,7 +795,7 @@ public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearOccurrence() { if (occurrenceBuilder_ == null) { @@ -801,7 +815,7 @@ public Builder clearOccurrence() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { @@ -815,7 +829,7 @@ public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { if (occurrenceBuilder_ != null) { @@ -831,7 +845,7 @@ public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.Occurrence, diff --git a/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java b/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java index da40ae43..281f6f70 100644 --- a/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface CreateOccurrenceRequestOrBuilder * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -45,7 +47,9 @@ public interface CreateOccurrenceRequestOrBuilder * the occurrence is to be created. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -58,7 +62,7 @@ public interface CreateOccurrenceRequestOrBuilder * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the occurrence field is set. */ @@ -70,7 +74,7 @@ public interface CreateOccurrenceRequestOrBuilder * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The occurrence. */ @@ -82,7 +86,7 @@ public interface CreateOccurrenceRequestOrBuilder * The occurrence to create. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); } diff --git a/src/main/java/io/grafeas/v1/DeleteNoteRequest.java b/src/main/java/io/grafeas/v1/DeleteNoteRequest.java index 2747ff04..3bbda132 100644 --- a/src/main/java/io/grafeas/v1/DeleteNoteRequest.java +++ b/src/main/java/io/grafeas/v1/DeleteNoteRequest.java @@ -120,7 +120,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -143,7 +145,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -480,7 +484,9 @@ public Builder mergeFrom( * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -503,7 +509,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -526,7 +534,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -548,7 +558,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -566,7 +578,9 @@ public Builder clearName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java b/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java index b60513f1..f6297470 100644 --- a/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface DeleteNoteRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface DeleteNoteRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java b/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java index d5c2c571..feb7dca4 100644 --- a/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java +++ b/src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java @@ -23,7 +23,7 @@ * * *
- * Request to delete a occurrence.
+ * Request to delete an occurrence.
  * 
* * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} @@ -122,7 +122,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -145,7 +147,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -322,7 +326,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request to delete a occurrence.
+   * Request to delete an occurrence.
    * 
* * Protobuf type {@code grafeas.v1.DeleteOccurrenceRequest} @@ -484,7 +488,9 @@ public Builder mergeFrom( * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -507,7 +513,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -530,7 +538,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -552,7 +562,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -570,7 +582,9 @@ public Builder clearName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java b/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java index 1a35cb80..d4e13800 100644 --- a/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface DeleteOccurrenceRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface DeleteOccurrenceRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/src/main/java/io/grafeas/v1/Discovery.java b/src/main/java/io/grafeas/v1/Discovery.java index fec1b9d1..c2968587 100644 --- a/src/main/java/io/grafeas/v1/Discovery.java +++ b/src/main/java/io/grafeas/v1/Discovery.java @@ -46,29 +46,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\032grafeas/v1/discovery.proto\022\ngrafeas.v1" - + "\032\027google/rpc/status.proto\032\027grafeas/v1/co" - + "mmon.proto\"<\n\rDiscoveryNote\022+\n\ranalysis_" - + "kind\030\001 \001(\0162\024.grafeas.v1.NoteKind\"\313\003\n\023Dis" - + "coveryOccurrence\022O\n\023continuous_analysis\030" - + "\001 \001(\01622.grafeas.v1.DiscoveryOccurrence.C" - + "ontinuousAnalysis\022G\n\017analysis_status\030\002 \001" - + "(\0162..grafeas.v1.DiscoveryOccurrence.Anal" - + "ysisStatus\0221\n\025analysis_status_error\030\003 \001(" - + "\0132\022.google.rpc.Status\"S\n\022ContinuousAnaly" - + "sis\022#\n\037CONTINUOUS_ANALYSIS_UNSPECIFIED\020\000" - + "\022\n\n\006ACTIVE\020\001\022\014\n\010INACTIVE\020\002\"\221\001\n\016AnalysisS" - + "tatus\022\037\n\033ANALYSIS_STATUS_UNSPECIFIED\020\000\022\013" - + "\n\007PENDING\020\001\022\014\n\010SCANNING\020\002\022\024\n\020FINISHED_SU" - + "CCESS\020\003\022\023\n\017FINISHED_FAILED\020\004\022\030\n\024FINISHED" - + "_UNSUPPORTED\020\005BQ\n\rio.grafeas.v1P\001Z8googl" - + "e.golang.org/genproto/googleapis/grafeas" - + "/v1;grafeas\242\002\003GRAb\006proto3" + + "\032\037google/protobuf/timestamp.proto\032\027googl" + + "e/rpc/status.proto\032\027grafeas/v1/common.pr" + + "oto\"<\n\rDiscoveryNote\022+\n\ranalysis_kind\030\001 " + + "\001(\0162\024.grafeas.v1.NoteKind\"\214\004\n\023DiscoveryO" + + "ccurrence\022O\n\023continuous_analysis\030\001 \001(\01622" + + ".grafeas.v1.DiscoveryOccurrence.Continuo" + + "usAnalysis\022G\n\017analysis_status\030\002 \001(\0162..gr" + + "afeas.v1.DiscoveryOccurrence.AnalysisSta" + + "tus\0221\n\025analysis_status_error\030\003 \001(\0132\022.goo" + + "gle.rpc.Status\022\013\n\003cpe\030\004 \001(\t\0222\n\016last_scan" + + "_time\030\005 \001(\0132\032.google.protobuf.Timestamp\"" + + "S\n\022ContinuousAnalysis\022#\n\037CONTINUOUS_ANAL" + + "YSIS_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INACTI" + + "VE\020\002\"\221\001\n\016AnalysisStatus\022\037\n\033ANALYSIS_STAT" + + "US_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\014\n\010SCANNIN" + + "G\020\002\022\024\n\020FINISHED_SUCCESS\020\003\022\023\n\017FINISHED_FA" + + "ILED\020\004\022\030\n\024FINISHED_UNSUPPORTED\020\005BQ\n\rio.g" + + "rafeas.v1P\001Z8google.golang.org/genproto/" + + "googleapis/grafeas/v1;grafeas\242\002\003GRAb\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.rpc.StatusProto.getDescriptor(), io.grafeas.v1.Common.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + io.grafeas.v1.Common.getDescriptor(), }); internal_static_grafeas_v1_DiscoveryNote_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_grafeas_v1_DiscoveryNote_fieldAccessorTable = @@ -83,8 +88,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_grafeas_v1_DiscoveryOccurrence_descriptor, new java.lang.String[] { - "ContinuousAnalysis", "AnalysisStatus", "AnalysisStatusError", + "ContinuousAnalysis", "AnalysisStatus", "AnalysisStatusError", "Cpe", "LastScanTime", }); + com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); io.grafeas.v1.Common.getDescriptor(); } diff --git a/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java b/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java index b947f862..a0ea1933 100644 --- a/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java +++ b/src/main/java/io/grafeas/v1/DiscoveryOccurrence.java @@ -41,6 +41,7 @@ private DiscoveryOccurrence(com.google.protobuf.GeneratedMessageV3.Builder bu private DiscoveryOccurrence() { continuousAnalysis_ = 0; analysisStatus_ = 0; + cpe_ = ""; } @java.lang.Override @@ -99,6 +100,28 @@ private DiscoveryOccurrence( analysisStatusError_ = subBuilder.buildPartial(); } + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + cpe_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastScanTime_ != null) { + subBuilder = lastScanTime_.toBuilder(); + } + lastScanTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastScanTime_); + lastScanTime_ = subBuilder.buildPartial(); + } + break; } default: @@ -632,6 +655,98 @@ public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { return getAnalysisStatusError(); } + public static final int CPE_FIELD_NUMBER = 4; + private volatile java.lang.Object cpe_; + /** + * + * + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * + * @return The cpe. + */ + public java.lang.String getCpe() { + java.lang.Object ref = cpe_; + 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(); + cpe_ = s; + return s; + } + } + /** + * + * + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * + * @return The bytes for cpe. + */ + public com.google.protobuf.ByteString getCpeBytes() { + java.lang.Object ref = cpe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_SCAN_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastScanTime_; + /** + * + * + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * + * @return Whether the lastScanTime field is set. + */ + public boolean hasLastScanTime() { + return lastScanTime_ != null; + } + /** + * + * + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * + * @return The lastScanTime. + */ + public com.google.protobuf.Timestamp getLastScanTime() { + return lastScanTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastScanTime_; + } + /** + * + * + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { + return getLastScanTime(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -659,6 +774,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (analysisStatusError_ != null) { output.writeMessage(3, getAnalysisStatusError()); } + if (!getCpeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpe_); + } + if (lastScanTime_ != null) { + output.writeMessage(5, getLastScanTime()); + } unknownFields.writeTo(output); } @@ -681,6 +802,12 @@ public int getSerializedSize() { if (analysisStatusError_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnalysisStatusError()); } + if (!getCpeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpe_); + } + if (lastScanTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLastScanTime()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -702,6 +829,11 @@ public boolean equals(final java.lang.Object obj) { if (hasAnalysisStatusError()) { if (!getAnalysisStatusError().equals(other.getAnalysisStatusError())) return false; } + if (!getCpe().equals(other.getCpe())) return false; + if (hasLastScanTime() != other.hasLastScanTime()) return false; + if (hasLastScanTime()) { + if (!getLastScanTime().equals(other.getLastScanTime())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -721,6 +853,12 @@ public int hashCode() { hash = (37 * hash) + ANALYSIS_STATUS_ERROR_FIELD_NUMBER; hash = (53 * hash) + getAnalysisStatusError().hashCode(); } + hash = (37 * hash) + CPE_FIELD_NUMBER; + hash = (53 * hash) + getCpe().hashCode(); + if (hasLastScanTime()) { + hash = (37 * hash) + LAST_SCAN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastScanTime().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -874,6 +1012,14 @@ public Builder clear() { analysisStatusError_ = null; analysisStatusErrorBuilder_ = null; } + cpe_ = ""; + + if (lastScanTimeBuilder_ == null) { + lastScanTime_ = null; + } else { + lastScanTime_ = null; + lastScanTimeBuilder_ = null; + } return this; } @@ -906,6 +1052,12 @@ public io.grafeas.v1.DiscoveryOccurrence buildPartial() { } else { result.analysisStatusError_ = analysisStatusErrorBuilder_.build(); } + result.cpe_ = cpe_; + if (lastScanTimeBuilder_ == null) { + result.lastScanTime_ = lastScanTime_; + } else { + result.lastScanTime_ = lastScanTimeBuilder_.build(); + } onBuilt(); return result; } @@ -964,6 +1116,13 @@ public Builder mergeFrom(io.grafeas.v1.DiscoveryOccurrence other) { if (other.hasAnalysisStatusError()) { mergeAnalysisStatusError(other.getAnalysisStatusError()); } + if (!other.getCpe().isEmpty()) { + cpe_ = other.cpe_; + onChanged(); + } + if (other.hasLastScanTime()) { + mergeLastScanTime(other.getLastScanTime()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1373,6 +1532,297 @@ public com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder() { return analysisStatusErrorBuilder_; } + private java.lang.Object cpe_ = ""; + /** + * + * + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * + * @return The cpe. + */ + public java.lang.String getCpe() { + java.lang.Object ref = cpe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * + * @return The bytes for cpe. + */ + public com.google.protobuf.ByteString getCpeBytes() { + java.lang.Object ref = cpe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * + * @param value The cpe to set. + * @return This builder for chaining. + */ + public Builder setCpe(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpe_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * + * @return This builder for chaining. + */ + public Builder clearCpe() { + + cpe_ = getDefaultInstance().getCpe(); + onChanged(); + return this; + } + /** + * + * + *
+     * The CPE of the resource being scanned.
+     * 
+ * + * string cpe = 4; + * + * @param value The bytes for cpe to set. + * @return This builder for chaining. + */ + public Builder setCpeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpe_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastScanTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastScanTimeBuilder_; + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * + * @return Whether the lastScanTime field is set. + */ + public boolean hasLastScanTime() { + return lastScanTimeBuilder_ != null || lastScanTime_ != null; + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * + * @return The lastScanTime. + */ + public com.google.protobuf.Timestamp getLastScanTime() { + if (lastScanTimeBuilder_ == null) { + return lastScanTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastScanTime_; + } else { + return lastScanTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder setLastScanTime(com.google.protobuf.Timestamp value) { + if (lastScanTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastScanTime_ = value; + onChanged(); + } else { + lastScanTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder setLastScanTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastScanTimeBuilder_ == null) { + lastScanTime_ = builderForValue.build(); + onChanged(); + } else { + lastScanTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder mergeLastScanTime(com.google.protobuf.Timestamp value) { + if (lastScanTimeBuilder_ == null) { + if (lastScanTime_ != null) { + lastScanTime_ = + com.google.protobuf.Timestamp.newBuilder(lastScanTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastScanTime_ = value; + } + onChanged(); + } else { + lastScanTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public Builder clearLastScanTime() { + if (lastScanTimeBuilder_ == null) { + lastScanTime_ = null; + onChanged(); + } else { + lastScanTime_ = null; + lastScanTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getLastScanTimeBuilder() { + + onChanged(); + return getLastScanTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder() { + if (lastScanTimeBuilder_ != null) { + return lastScanTimeBuilder_.getMessageOrBuilder(); + } else { + return lastScanTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastScanTime_; + } + } + /** + * + * + *
+     * The last time this resource was scanned.
+     * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastScanTimeFieldBuilder() { + if (lastScanTimeBuilder_ == null) { + lastScanTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastScanTime(), getParentForChildren(), isClean()); + lastScanTime_ = null; + } + return lastScanTimeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java b/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java index 38fe3f5c..e41a943e 100644 --- a/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java +++ b/src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java @@ -114,4 +114,64 @@ public interface DiscoveryOccurrenceOrBuilder * .google.rpc.Status analysis_status_error = 3; */ com.google.rpc.StatusOrBuilder getAnalysisStatusErrorOrBuilder(); + + /** + * + * + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * + * @return The cpe. + */ + java.lang.String getCpe(); + /** + * + * + *
+   * The CPE of the resource being scanned.
+   * 
+ * + * string cpe = 4; + * + * @return The bytes for cpe. + */ + com.google.protobuf.ByteString getCpeBytes(); + + /** + * + * + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * + * @return Whether the lastScanTime field is set. + */ + boolean hasLastScanTime(); + /** + * + * + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + * + * @return The lastScanTime. + */ + com.google.protobuf.Timestamp getLastScanTime(); + /** + * + * + *
+   * The last time this resource was scanned.
+   * 
+ * + * .google.protobuf.Timestamp last_scan_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getLastScanTimeOrBuilder(); } diff --git a/src/main/java/io/grafeas/v1/GetNoteRequest.java b/src/main/java/io/grafeas/v1/GetNoteRequest.java index 479743e7..fc6e7da5 100644 --- a/src/main/java/io/grafeas/v1/GetNoteRequest.java +++ b/src/main/java/io/grafeas/v1/GetNoteRequest.java @@ -120,7 +120,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -143,7 +145,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -478,7 +482,9 @@ public Builder mergeFrom( * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -501,7 +507,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -524,7 +532,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -546,7 +556,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -564,7 +576,9 @@ public Builder clearName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java b/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java index ca19b0f1..f3d1d50a 100644 --- a/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface GetNoteRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface GetNoteRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java b/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java index 6f5bb9d6..0cb8e0c6 100644 --- a/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java +++ b/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java @@ -122,7 +122,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -145,7 +147,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -485,7 +489,9 @@ public Builder mergeFrom( * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -508,7 +514,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -531,7 +539,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -553,7 +563,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -571,7 +583,9 @@ public Builder clearName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java b/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java index 195b5251..09ba013d 100644 --- a/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface GetOccurrenceNoteRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface GetOccurrenceNoteRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java b/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java index 31ec544d..83a39fe4 100644 --- a/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java +++ b/src/main/java/io/grafeas/v1/GetOccurrenceRequest.java @@ -122,7 +122,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -145,7 +147,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -483,7 +487,9 @@ public Builder mergeFrom( * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -506,7 +512,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -529,7 +537,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -551,7 +561,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -569,7 +581,9 @@ public Builder clearName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java b/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java index 4b6344aa..87e16912 100644 --- a/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface GetOccurrenceRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface GetOccurrenceRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/src/main/java/io/grafeas/v1/GrafeasOuterClass.java b/src/main/java/io/grafeas/v1/GrafeasOuterClass.java index abe95c1c..ed299775 100644 --- a/src/main/java/io/grafeas/v1/GrafeasOuterClass.java +++ b/src/main/java/io/grafeas/v1/GrafeasOuterClass.java @@ -126,141 +126,172 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\030grafeas/v1/grafeas.proto\022\ngrafeas.v1\032\034" - + "google/api/annotations.proto\032\033google/pro" - + "tobuf/empty.proto\032 google/protobuf/field" - + "_mask.proto\032\037google/protobuf/timestamp.p" - + "roto\032\034grafeas/v1/attestation.proto\032\026graf" - + "eas/v1/build.proto\032\027grafeas/v1/common.pr" - + "oto\032\033grafeas/v1/deployment.proto\032\032grafea" - + "s/v1/discovery.proto\032\026grafeas/v1/image.p" - + "roto\032\030grafeas/v1/package.proto\032\033grafeas/" - + "v1/provenance.proto\032\036grafeas/v1/vulnerab" - + "ility.proto\"\335\004\n\nOccurrence\022\014\n\004name\030\001 \001(\t" - + "\022\024\n\014resource_uri\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.protobuf.Timestamp\022/\n\013update_ti" - + "me\030\007 \001(\0132\032.google.protobuf.Timestamp\022<\n\r" - + "vulnerability\030\010 \001(\0132#.grafeas.v1.Vulnera" - + "bilityOccurrenceH\000\022,\n\005build\030\t \001(\0132\033.graf" - + "eas.v1.BuildOccurrenceH\000\022,\n\005image\030\n \001(\0132" - + "\033.grafeas.v1.ImageOccurrenceH\000\0220\n\007packag" - + "e\030\013 \001(\0132\035.grafeas.v1.PackageOccurrenceH\000" - + "\0226\n\ndeployment\030\014 \001(\0132 .grafeas.v1.Deploy" - + "mentOccurrenceH\000\0224\n\tdiscovery\030\r \001(\0132\037.gr" - + "afeas.v1.DiscoveryOccurrenceH\000\0228\n\013attest" - + "ation\030\016 \001(\0132!.grafeas.v1.AttestationOccu" - + "rrenceH\000B\t\n\007details\"\237\005\n\004Note\022\014\n\004name\030\001 \001" - + "(\t\022\031\n\021short_description\030\002 \001(\t\022\030\n\020long_de" - + "scription\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.grafeas." - + "v1.NoteKind\022+\n\013related_url\030\005 \003(\0132\026.grafe" - + "as.v1.RelatedUrl\0223\n\017expiration_time\030\006 \001(" - + "\0132\032.google.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.Ti" - + "mestamp\022\032\n\022related_note_names\030\t \003(\t\0226\n\rv" - + "ulnerability\030\n \001(\0132\035.grafeas.v1.Vulnerab" - + "ilityNoteH\000\022&\n\005build\030\013 \001(\0132\025.grafeas.v1." - + "BuildNoteH\000\022&\n\005image\030\014 \001(\0132\025.grafeas.v1." - + "ImageNoteH\000\022*\n\007package\030\r \001(\0132\027.grafeas.v" - + "1.PackageNoteH\000\0220\n\ndeployment\030\016 \001(\0132\032.gr" - + "afeas.v1.DeploymentNoteH\000\022.\n\tdiscovery\030\017" - + " \001(\0132\031.grafeas.v1.DiscoveryNoteH\000\0222\n\013att" - + "estation\030\020 \001(\0132\033.grafeas.v1.AttestationN" - + "oteH\000B\006\n\004type\"$\n\024GetOccurrenceRequest\022\014\n" - + "\004name\030\001 \001(\t\"_\n\026ListOccurrencesRequest\022\016\n" - + "\006parent\030\001 \001(\t\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\"\'\n\027DeleteOccurrenceRequest\022\014\n\004name" - + "\030\001 \001(\t\"U\n\027CreateOccurrenceRequest\022\016\n\006par" - + "ent\030\001 \001(\t\022*\n\noccurrence\030\002 \001(\0132\026.grafeas." - + "v1.Occurrence\"\204\001\n\027UpdateOccurrenceReques" - + "t\022\014\n\004name\030\001 \001(\t\022*\n\noccurrence\030\002 \001(\0132\026.gr" - + "afeas.v1.Occurrence\022/\n\013update_mask\030\003 \001(\013" - + "2\032.google.protobuf.FieldMask\"\036\n\016GetNoteR" - + "equest\022\014\n\004name\030\001 \001(\t\"(\n\030GetOccurrenceNot" - + "eRequest\022\014\n\004name\030\001 \001(\t\"Y\n\020ListNotesReque" - + "st\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpa" - + "ge_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"M\n\021Lis" - + "tNotesResponse\022\037\n\005notes\030\001 \003(\0132\020.grafeas." - + "v1.Note\022\027\n\017next_page_token\030\002 \001(\t\"!\n\021Dele" - + "teNoteRequest\022\014\n\004name\030\001 \001(\t\"T\n\021CreateNot" - + "eRequest\022\016\n\006parent\030\001 \001(\t\022\017\n\007note_id\030\002 \001(" - + "\t\022\036\n\004note\030\003 \001(\0132\020.grafeas.v1.Note\"r\n\021Upd" - + "ateNoteRequest\022\014\n\004name\030\001 \001(\t\022\036\n\004note\030\002 \001" - + "(\0132\020.grafeas.v1.Note\022/\n\013update_mask\030\003 \001(" - + "\0132\032.google.protobuf.FieldMask\"a\n\032ListNot" - + "eOccurrencesRequest\022\014\n\004name\030\001 \001(\t\022\016\n\006fil" - + "ter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_tok" - + "en\030\004 \001(\t\"c\n\033ListNoteOccurrencesResponse\022" - + "+\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.Occurr" - + "ence\022\027\n\017next_page_token\030\002 \001(\t\"\250\001\n\027BatchC" - + "reateNotesRequest\022\016\n\006parent\030\001 \001(\t\022=\n\005not" - + "es\030\002 \003(\0132..grafeas.v1.BatchCreateNotesRe" - + "quest.NotesEntry\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(\0132\020.grafeas.v1.Note\"\\\n\035BatchCreateOccu" - + "rrencesRequest\022\016\n\006parent\030\001 \001(\t\022+\n\013occurr" - + "ences\030\002 \003(\0132\026.grafeas.v1.Occurrence\"M\n\036B" - + "atchCreateOccurrencesResponse\022+\n\013occurre" - + "nces\030\001 \003(\0132\026.grafeas.v1.Occurrence2\224\016\n\007G" - + "rafeas\022v\n\rGetOccurrence\022 .grafeas.v1.Get" - + "OccurrenceRequest\032\026.grafeas.v1.Occurrenc" - + "e\"+\202\323\344\223\002%\022#/v1/{name=projects/*/occurren" - + "ces/*}\022\207\001\n\017ListOccurrences\022\".grafeas.v1." - + "ListOccurrencesRequest\032#.grafeas.v1.List" - + "OccurrencesResponse\"+\202\323\344\223\002%\022#/v1/{parent" - + "=projects/*}/occurrences\022|\n\020DeleteOccurr" - + "ence\022#.grafeas.v1.DeleteOccurrenceReques" - + "t\032\026.google.protobuf.Empty\"+\202\323\344\223\002%*#/v1/{" - + "name=projects/*/occurrences/*}\022\210\001\n\020Creat" - + "eOccurrence\022#.grafeas.v1.CreateOccurrenc" - + "eRequest\032\026.grafeas.v1.Occurrence\"7\202\323\344\223\0021" - + "\"#/v1/{parent=projects/*}/occurrences:\no" - + "ccurrence\022\253\001\n\026BatchCreateOccurrences\022).g" - + "rafeas.v1.BatchCreateOccurrencesRequest\032" - + "*.grafeas.v1.BatchCreateOccurrencesRespo" - + "nse\":\202\323\344\223\0024\"//v1/{parent=projects/*}/occ" - + "urrences:batchCreate:\001*\022\210\001\n\020UpdateOccurr" - + "ence\022#.grafeas.v1.UpdateOccurrenceReques" - + "t\032\026.grafeas.v1.Occurrence\"7\202\323\344\223\00212#/v1/{" - + "name=projects/*/occurrences/*}:\noccurren" - + "ce\022~\n\021GetOccurrenceNote\022$.grafeas.v1.Get" - + "OccurrenceNoteRequest\032\020.grafeas.v1.Note\"" - + "1\202\323\344\223\002+\022)/v1/{name=projects/*/occurrence" - + "s/*}/notes\022^\n\007GetNote\022\032.grafeas.v1.GetNo" - + "teRequest\032\020.grafeas.v1.Note\"%\202\323\344\223\002\037\022\035/v1" - + "/{name=projects/*/notes/*}\022o\n\tListNotes\022" - + "\034.grafeas.v1.ListNotesRequest\032\035.grafeas." - + "v1.ListNotesResponse\"%\202\323\344\223\002\037\022\035/v1/{paren" - + "t=projects/*}/notes\022j\n\nDeleteNote\022\035.graf" - + "eas.v1.DeleteNoteRequest\032\026.google.protob" - + "uf.Empty\"%\202\323\344\223\002\037*\035/v1/{name=projects/*/n" - + "otes/*}\022j\n\nCreateNote\022\035.grafeas.v1.Creat" - + "eNoteRequest\032\020.grafeas.v1.Note\"+\202\323\344\223\002%\"\035" - + "/v1/{parent=projects/*}/notes:\004note\022\223\001\n\020" - + "BatchCreateNotes\022#.grafeas.v1.BatchCreat" - + "eNotesRequest\032$.grafeas.v1.BatchCreateNo" - + "tesResponse\"4\202\323\344\223\002.\")/v1/{parent=project" - + "s/*}/notes:batchCreate:\001*\022j\n\nUpdateNote\022" - + "\035.grafeas.v1.UpdateNoteRequest\032\020.grafeas" - + ".v1.Note\"+\202\323\344\223\002%2\035/v1/{name=projects/*/n" - + "otes/*}:\004note\022\231\001\n\023ListNoteOccurrences\022&." - + "grafeas.v1.ListNoteOccurrencesRequest\032\'." - + "grafeas.v1.ListNoteOccurrencesResponse\"1" - + "\202\323\344\223\002+\022)/v1/{name=projects/*/notes/*}/oc" - + "currencesBQ\n\rio.grafeas.v1P\001Z8google.gol" - + "ang.org/genproto/googleapis/grafeas/v1;g" - + "rafeas\242\002\003GRAb\006proto3" + + "google/api/annotations.proto\032\027google/api" + + "/client.proto\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032\033googl" + + "e/protobuf/empty.proto\032 google/protobuf/" + + "field_mask.proto\032\037google/protobuf/timest" + + "amp.proto\032\034grafeas/v1/attestation.proto\032" + + "\026grafeas/v1/build.proto\032\027grafeas/v1/comm" + + "on.proto\032\033grafeas/v1/deployment.proto\032\032g" + + "rafeas/v1/discovery.proto\032\026grafeas/v1/im" + + "age.proto\032\030grafeas/v1/package.proto\032\030gra" + + "feas/v1/upgrade.proto\032\036grafeas/v1/vulner" + + "ability.proto\"\330\005\n\nOccurrence\022\014\n\004name\030\001 \001" + + "(\t\022\024\n\014resource_uri\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.protobuf.Timestamp\022/\n\013update_" + + "time\030\007 \001(\0132\032.google.protobuf.Timestamp\022<" + + "\n\rvulnerability\030\010 \001(\0132#.grafeas.v1.Vulne" + + "rabilityOccurrenceH\000\022,\n\005build\030\t \001(\0132\033.gr" + + "afeas.v1.BuildOccurrenceH\000\022,\n\005image\030\n \001(" + + "\0132\033.grafeas.v1.ImageOccurrenceH\000\0220\n\007pack" + + "age\030\013 \001(\0132\035.grafeas.v1.PackageOccurrence" + + "H\000\0226\n\ndeployment\030\014 \001(\0132 .grafeas.v1.Depl" + + "oymentOccurrenceH\000\0224\n\tdiscovery\030\r \001(\0132\037." + + "grafeas.v1.DiscoveryOccurrenceH\000\0228\n\013atte" + + "station\030\016 \001(\0132!.grafeas.v1.AttestationOc" + + "currenceH\000\0220\n\007upgrade\030\017 \001(\0132\035.grafeas.v1" + + ".UpgradeOccurrenceH\000:G\352AD\n\025grafeas.io/Oc" + + "currence\022+projects/{project}/occurrences" + + "/{occurrence}B\t\n\007details\"\202\006\n\004Note\022\014\n\004nam" + + "e\030\001 \001(\t\022\031\n\021short_description\030\002 \001(\t\022\030\n\020lo" + + "ng_description\030\003 \001(\t\022\"\n\004kind\030\004 \001(\0162\024.gra" + + "feas.v1.NoteKind\022+\n\013related_url\030\005 \003(\0132\026." + + "grafeas.v1.RelatedUrl\0223\n\017expiration_time" + + "\030\006 \001(\0132\032.google.protobuf.Timestamp\022/\n\013cr" + + "eate_time\030\007 \001(\0132\032.google.protobuf.Timest" + + "amp\022/\n\013update_time\030\010 \001(\0132\032.google.protob" + + "uf.Timestamp\022\032\n\022related_note_names\030\t \003(\t" + + "\0226\n\rvulnerability\030\n \001(\0132\035.grafeas.v1.Vul" + + "nerabilityNoteH\000\022&\n\005build\030\013 \001(\0132\025.grafea" + + "s.v1.BuildNoteH\000\022&\n\005image\030\014 \001(\0132\025.grafea" + + "s.v1.ImageNoteH\000\022*\n\007package\030\r \001(\0132\027.graf" + + "eas.v1.PackageNoteH\000\0220\n\ndeployment\030\016 \001(\013" + + "2\032.grafeas.v1.DeploymentNoteH\000\022.\n\tdiscov" + + "ery\030\017 \001(\0132\031.grafeas.v1.DiscoveryNoteH\000\0222" + + "\n\013attestation\030\020 \001(\0132\033.grafeas.v1.Attesta" + + "tionNoteH\000\022*\n\007upgrade\030\021 \001(\0132\027.grafeas.v1" + + ".UpgradeNoteH\000:5\352A2\n\017grafeas.io/Note\022\037pr" + + "ojects/{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/Occurrence\"\224\001\n\026ListOccur" + + "rencesRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+c" + + "loudresourcemanager.googleapis.com/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\"_\n\027ListOccurrencesResp" + + "onse\022+\n\013occurrences\030\001 \003(\0132\026.grafeas.v1.O" + + "ccurrence\022\027\n\017next_page_token\030\002 \001(\t\"F\n\027De" + + "leteOccurrenceRequest\022+\n\004name\030\001 \001(\tB\035\340A\002" + + "\372A\027\n\025grafeas.io/Occurrence\"\217\001\n\027CreateOcc" + + "urrenceRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+" + + "cloudresourcemanager.googleapis.com/Proj" + + "ect\022/\n\noccurrence\030\002 \001(\0132\026.grafeas.v1.Occ" + + "urrenceB\003\340A\002\"\250\001\n\027UpdateOccurrenceRequest" + + "\022+\n\004name\030\001 \001(\tB\035\340A\002\372A\027\n\025grafeas.io/Occur" + + "rence\022/\n\noccurrence\030\002 \001(\0132\026.grafeas.v1.O" + + "ccurrenceB\003\340A\002\022/\n\013update_mask\030\003 \001(\0132\032.go" + + "ogle.protobuf.FieldMask\"7\n\016GetNoteReques" + + "t\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/Note" + + "\"G\n\030GetOccurrenceNoteRequest\022+\n\004name\030\001 \001" + + "(\tB\035\340A\002\372A\027\n\025grafeas.io/Occurrence\"\216\001\n\020Li" + + "stNotesRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+" + + "cloudresourcemanager.googleapis.com/Proj" + + "ect\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\"\223\001" + + "\n\021CreateNoteRequest\022C\n\006parent\030\001 \001(\tB3\340A\002" + + "\372A-\n+cloudresourcemanager.googleapis.com" + + "/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\021UpdateNo" + + "teRequest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas" + + ".io/Note\022#\n\004note\030\002 \001(\0132\020.grafeas.v1.Note" + + "B\003\340A\002\022/\n\013update_mask\030\003 \001(\0132\032.google.prot" + + "obuf.FieldMask\"z\n\032ListNoteOccurrencesReq" + + "uest\022%\n\004name\030\001 \001(\tB\027\340A\002\372A\021\n\017grafeas.io/N" + + "ote\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\033ListNoteOccurrence" + + "sResponse\022+\n\013occurrences\030\001 \003(\0132\026.grafeas" + + ".v1.Occurrence\022\027\n\017next_page_token\030\002 \001(\t\"" + + "\342\001\n\027BatchCreateNotesRequest\022C\n\006parent\030\001 " + + "\001(\tB3\340A\002\372A-\n+cloudresourcemanager.google" + + "apis.com/Project\022B\n\005notes\030\002 \003(\0132..grafea" + + "s.v1.BatchCreateNotesRequest.NotesEntryB" + + "\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\030BatchCre" + + "ateNotesResponse\022\037\n\005notes\030\001 \003(\0132\020.grafea" + + "s.v1.Note\"\226\001\n\035BatchCreateOccurrencesRequ" + + "est\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudresour" + + "cemanager.googleapis.com/Project\0220\n\013occu" + + "rrences\030\002 \003(\0132\026.grafeas.v1.OccurrenceB\003\340" + + "A\002\"M\n\036BatchCreateOccurrencesResponse\022+\n\013" + + "occurrences\030\001 \003(\0132\026.grafeas.v1.Occurrenc" + + "e2\355\017\n\007Grafeas\022}\n\rGetOccurrence\022 .grafeas" + + ".v1.GetOccurrenceRequest\032\026.grafeas.v1.Oc" + + "currence\"2\202\323\344\223\002%\022#/v1/{name=projects/*/o" + + "ccurrences/*}\332A\004name\022\227\001\n\017ListOccurrences" + + "\022\".grafeas.v1.ListOccurrencesRequest\032#.g" + + "rafeas.v1.ListOccurrencesResponse\";\202\323\344\223\002" + + "%\022#/v1/{parent=projects/*}/occurrences\332A" + + "\rparent,filter\022\203\001\n\020DeleteOccurrence\022#.gr" + + "afeas.v1.DeleteOccurrenceRequest\032\026.googl" + + "e.protobuf.Empty\"2\202\323\344\223\002%*#/v1/{name=proj" + + "ects/*/occurrences/*}\332A\004name\022\234\001\n\020CreateO" + + "ccurrence\022#.grafeas.v1.CreateOccurrenceR" + + "equest\032\026.grafeas.v1.Occurrence\"K\202\323\344\223\0021\"#" + + "/v1/{parent=projects/*}/occurrences:\nocc" + + "urrence\332A\021parent,occurrence\022\300\001\n\026BatchCre" + + "ateOccurrences\022).grafeas.v1.BatchCreateO" + + "ccurrencesRequest\032*.grafeas.v1.BatchCrea" + + "teOccurrencesResponse\"O\202\323\344\223\0024\"//v1/{pare" + + "nt=projects/*}/occurrences:batchCreate:\001" + + "*\332A\022parent,occurrences\022\246\001\n\020UpdateOccurre" + + "nce\022#.grafeas.v1.UpdateOccurrenceRequest" + + "\032\026.grafeas.v1.Occurrence\"U\202\323\344\223\00212#/v1/{n" + + "ame=projects/*/occurrences/*}:\noccurrenc" + + "e\332A\033name,occurrence,update_mask\022\205\001\n\021GetO" + + "ccurrenceNote\022$.grafeas.v1.GetOccurrence" + + "NoteRequest\032\020.grafeas.v1.Note\"8\202\323\344\223\002+\022)/" + + "v1/{name=projects/*/occurrences/*}/notes" + + "\332A\004name\022e\n\007GetNote\022\032.grafeas.v1.GetNoteR" + + "equest\032\020.grafeas.v1.Note\",\202\323\344\223\002\037\022\035/v1/{n" + + "ame=projects/*/notes/*}\332A\004name\022\177\n\tListNo" + + "tes\022\034.grafeas.v1.ListNotesRequest\032\035.graf" + + "eas.v1.ListNotesResponse\"5\202\323\344\223\002\037\022\035/v1/{p" + + "arent=projects/*}/notes\332A\rparent,filter\022" + + "q\n\nDeleteNote\022\035.grafeas.v1.DeleteNoteReq" + + "uest\032\026.google.protobuf.Empty\",\202\323\344\223\002\037*\035/v" + + "1/{name=projects/*/notes/*}\332A\004name\022\200\001\n\nC" + + "reateNote\022\035.grafeas.v1.CreateNoteRequest" + + "\032\020.grafeas.v1.Note\"A\202\323\344\223\002%\"\035/v1/{parent=" + + "projects/*}/notes:\004note\332A\023parent,note_id" + + ",note\022\242\001\n\020BatchCreateNotes\022#.grafeas.v1." + + "BatchCreateNotesRequest\032$.grafeas.v1.Bat" + + "chCreateNotesResponse\"C\202\323\344\223\002.\")/v1/{pare" + + "nt=projects/*}/notes:batchCreate:\001*\332A\014pa" + + "rent,notes\022\202\001\n\nUpdateNote\022\035.grafeas.v1.U" + + "pdateNoteRequest\032\020.grafeas.v1.Note\"C\202\323\344\223" + + "\002%2\035/v1/{name=projects/*/notes/*}:\004note\332" + + "A\025name,note,update_mask\022\247\001\n\023ListNoteOccu" + + "rrences\022&.grafeas.v1.ListNoteOccurrences" + + "Request\032\'.grafeas.v1.ListNoteOccurrences" + + "Response\"?\202\323\344\223\002+\022)/v1/{name=projects/*/n" + + "otes/*}/occurrences\332A\013name,filterBQ\n\rio." + + "grafeas.v1P\001Z8google.golang.org/genproto" + + "/googleapis/grafeas/v1;grafeas\242\002\003GRAb\006pr" + + "oto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -271,7 +302,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.Discovery.getDescriptor(), io.grafeas.v1.Image.getDescriptor(), io.grafeas.v1.Package.getDescriptor(), - io.grafeas.v1.Provenance.getDescriptor(), + io.grafeas.v1.Upgrade.getDescriptor(), io.grafeas.v1.Vulnerability.getDescriptor(), }); internal_static_grafeas_v1_Occurrence_descriptor = getDescriptor().getMessageTypes().get(0); @@ -293,6 +324,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Deployment", "Discovery", "Attestation", + "Upgrade", "Details", }); internal_static_grafeas_v1_Note_descriptor = getDescriptor().getMessageTypes().get(1); @@ -316,6 +348,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Deployment", "Discovery", "Attestation", + "Upgrade", "Type", }); internal_static_grafeas_v1_GetOccurrenceRequest_descriptor = @@ -479,10 +512,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); @@ -493,7 +533,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { io.grafeas.v1.Discovery.getDescriptor(); io.grafeas.v1.Image.getDescriptor(); io.grafeas.v1.Package.getDescriptor(); - io.grafeas.v1.Provenance.getDescriptor(); + io.grafeas.v1.Upgrade.getDescriptor(); io.grafeas.v1.Vulnerability.getDescriptor(); } diff --git a/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java b/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java index 8e42ba27..01af4e57 100644 --- a/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java +++ b/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java @@ -143,7 +143,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -166,7 +168,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -664,7 +668,9 @@ public Builder mergeFrom( * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -687,7 +693,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -710,7 +718,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -732,7 +742,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -750,7 +762,9 @@ public Builder clearName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java b/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java index 6a59655f..fd380edd 100644 --- a/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface ListNoteOccurrencesRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface ListNoteOccurrencesRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/src/main/java/io/grafeas/v1/ListNotesRequest.java b/src/main/java/io/grafeas/v1/ListNotesRequest.java index 9b37915e..68ee08f2 100644 --- a/src/main/java/io/grafeas/v1/ListNotesRequest.java +++ b/src/main/java/io/grafeas/v1/ListNotesRequest.java @@ -141,7 +141,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -164,7 +166,9 @@ public java.lang.String getParent() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -658,7 +662,9 @@ public Builder mergeFrom( * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -681,7 +687,9 @@ public java.lang.String getParent() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -704,7 +712,9 @@ public com.google.protobuf.ByteString getParentBytes() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -726,7 +736,9 @@ public Builder setParent(java.lang.String value) { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -744,7 +756,9 @@ public Builder clearParent() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java b/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java index ad5c4a3e..298f0843 100644 --- a/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface ListNotesRequestOrBuilder * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -45,7 +47,9 @@ public interface ListNotesRequestOrBuilder * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java b/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java index e71b20d3..95ac1bc8 100644 --- a/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java +++ b/src/main/java/io/grafeas/v1/ListOccurrencesRequest.java @@ -143,7 +143,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -166,7 +168,9 @@ public java.lang.String getParent() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -663,7 +667,9 @@ public Builder mergeFrom( * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -686,7 +692,9 @@ public java.lang.String getParent() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -709,7 +717,9 @@ public com.google.protobuf.ByteString getParentBytes() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -731,7 +741,9 @@ public Builder setParent(java.lang.String value) { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -749,7 +761,9 @@ public Builder clearParent() { * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java b/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java index 81fd545b..72e4696c 100644 --- a/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface ListOccurrencesRequestOrBuilder * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -45,7 +47,9 @@ public interface ListOccurrencesRequestOrBuilder * `projects/[PROJECT_ID]`. * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/src/main/java/io/grafeas/v1/Note.java b/src/main/java/io/grafeas/v1/Note.java index aa1bc476..e306a6f9 100644 --- a/src/main/java/io/grafeas/v1/Note.java +++ b/src/main/java/io/grafeas/v1/Note.java @@ -269,6 +269,20 @@ private Note( typeCase_ = 16; break; } + case 138: + { + io.grafeas.v1.UpgradeNote.Builder subBuilder = null; + if (typeCase_ == 17) { + subBuilder = ((io.grafeas.v1.UpgradeNote) type_).toBuilder(); + } + type_ = input.readMessage(io.grafeas.v1.UpgradeNote.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.grafeas.v1.UpgradeNote) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 17; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -320,6 +334,7 @@ public enum TypeCase DEPLOYMENT(14), DISCOVERY(15), ATTESTATION(16), + UPGRADE(17), TYPE_NOT_SET(0); private final int value; @@ -352,6 +367,8 @@ public static TypeCase forNumber(int value) { return DISCOVERY; case 16: return ATTESTATION; + case 17: + return UPGRADE; case 0: return TYPE_NOT_SET; default: @@ -1143,6 +1160,54 @@ public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { return io.grafeas.v1.AttestationNote.getDefaultInstance(); } + public static final int UPGRADE_FIELD_NUMBER = 17; + /** + * + * + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * + * @return Whether the upgrade field is set. + */ + public boolean hasUpgrade() { + return typeCase_ == 17; + } + /** + * + * + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * + * @return The upgrade. + */ + public io.grafeas.v1.UpgradeNote getUpgrade() { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + /** + * + * + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1205,6 +1270,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (typeCase_ == 16) { output.writeMessage(16, (io.grafeas.v1.AttestationNote) type_); } + if (typeCase_ == 17) { + output.writeMessage(17, (io.grafeas.v1.UpgradeNote) type_); + } unknownFields.writeTo(output); } @@ -1281,6 +1349,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 16, (io.grafeas.v1.AttestationNote) type_); } + if (typeCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (io.grafeas.v1.UpgradeNote) type_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1337,6 +1410,9 @@ public boolean equals(final java.lang.Object obj) { case 16: if (!getAttestation().equals(other.getAttestation())) return false; break; + case 17: + if (!getUpgrade().equals(other.getUpgrade())) return false; + break; case 0: default: } @@ -1408,6 +1484,10 @@ public int hashCode() { hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; hash = (53 * hash) + getAttestation().hashCode(); break; + case 17: + hash = (37 * hash) + UPGRADE_FIELD_NUMBER; + hash = (53 * hash) + getUpgrade().hashCode(); + break; case 0: default: } @@ -1697,6 +1777,13 @@ public io.grafeas.v1.Note buildPartial() { result.type_ = attestationBuilder_.build(); } } + if (typeCase_ == 17) { + if (upgradeBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = upgradeBuilder_.build(); + } + } result.typeCase_ = typeCase_; onBuilt(); return result; @@ -1844,6 +1931,11 @@ public Builder mergeFrom(io.grafeas.v1.Note other) { mergeAttestation(other.getAttestation()); break; } + case UPGRADE: + { + mergeUpgrade(other.getUpgrade()); + break; + } case TYPE_NOT_SET: { break; @@ -4797,6 +4889,207 @@ public io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder() { return attestationBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, + io.grafeas.v1.UpgradeNote.Builder, + io.grafeas.v1.UpgradeNoteOrBuilder> + upgradeBuilder_; + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * + * @return Whether the upgrade field is set. + */ + public boolean hasUpgrade() { + return typeCase_ == 17; + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * + * @return The upgrade. + */ + public io.grafeas.v1.UpgradeNote getUpgrade() { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } else { + if (typeCase_ == 17) { + return upgradeBuilder_.getMessage(); + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeNote value) { + if (upgradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + upgradeBuilder_.setMessage(value); + } + typeCase_ = 17; + return this; + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeNote.Builder builderForValue) { + if (upgradeBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + upgradeBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 17; + return this; + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder mergeUpgrade(io.grafeas.v1.UpgradeNote value) { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17 && type_ != io.grafeas.v1.UpgradeNote.getDefaultInstance()) { + type_ = + io.grafeas.v1.UpgradeNote.newBuilder((io.grafeas.v1.UpgradeNote) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 17) { + upgradeBuilder_.mergeFrom(value); + } + upgradeBuilder_.setMessage(value); + } + typeCase_ = 17; + return this; + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public Builder clearUpgrade() { + if (upgradeBuilder_ == null) { + if (typeCase_ == 17) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 17) { + typeCase_ = 0; + type_ = null; + } + upgradeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public io.grafeas.v1.UpgradeNote.Builder getUpgradeBuilder() { + return getUpgradeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + public io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder() { + if ((typeCase_ == 17) && (upgradeBuilder_ != null)) { + return upgradeBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 17) { + return (io.grafeas.v1.UpgradeNote) type_; + } + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + } + /** + * + * + *
+     * A note describing available package upgrades.
+     * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, + io.grafeas.v1.UpgradeNote.Builder, + io.grafeas.v1.UpgradeNoteOrBuilder> + getUpgradeFieldBuilder() { + if (upgradeBuilder_ == null) { + if (!(typeCase_ == 17)) { + type_ = io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + upgradeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeNote, + io.grafeas.v1.UpgradeNote.Builder, + io.grafeas.v1.UpgradeNoteOrBuilder>( + (io.grafeas.v1.UpgradeNote) type_, getParentForChildren(), isClean()); + type_ = null; + } + typeCase_ = 17; + onChanged(); + ; + return upgradeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/src/main/java/io/grafeas/v1/NoteKind.java b/src/main/java/io/grafeas/v1/NoteKind.java index 58d8d808..400092cb 100644 --- a/src/main/java/io/grafeas/v1/NoteKind.java +++ b/src/main/java/io/grafeas/v1/NoteKind.java @@ -109,6 +109,16 @@ public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum { * ATTESTATION = 7; */ ATTESTATION(7), + /** + * + * + *
+   * This represents an available package upgrade.
+   * 
+ * + * UPGRADE = 8; + */ + UPGRADE(8), UNRECOGNIZED(-1), ; @@ -192,6 +202,16 @@ public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum { * ATTESTATION = 7; */ public static final int ATTESTATION_VALUE = 7; + /** + * + * + *
+   * This represents an available package upgrade.
+   * 
+ * + * UPGRADE = 8; + */ + public static final int UPGRADE_VALUE = 8; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -233,6 +253,8 @@ public static NoteKind forNumber(int value) { return DISCOVERY; case 7: return ATTESTATION; + case 8: + return UPGRADE; default: return null; } diff --git a/src/main/java/io/grafeas/v1/NoteOrBuilder.java b/src/main/java/io/grafeas/v1/NoteOrBuilder.java index 290ab9c0..5f269093 100644 --- a/src/main/java/io/grafeas/v1/NoteOrBuilder.java +++ b/src/main/java/io/grafeas/v1/NoteOrBuilder.java @@ -586,5 +586,40 @@ public interface NoteOrBuilder */ io.grafeas.v1.AttestationNoteOrBuilder getAttestationOrBuilder(); + /** + * + * + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * + * @return Whether the upgrade field is set. + */ + boolean hasUpgrade(); + /** + * + * + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + * + * @return The upgrade. + */ + io.grafeas.v1.UpgradeNote getUpgrade(); + /** + * + * + *
+   * A note describing available package upgrades.
+   * 
+ * + * .grafeas.v1.UpgradeNote upgrade = 17; + */ + io.grafeas.v1.UpgradeNoteOrBuilder getUpgradeOrBuilder(); + public io.grafeas.v1.Note.TypeCase getTypeCase(); } diff --git a/src/main/java/io/grafeas/v1/Occurrence.java b/src/main/java/io/grafeas/v1/Occurrence.java index 1e3384d1..59fa3c6e 100644 --- a/src/main/java/io/grafeas/v1/Occurrence.java +++ b/src/main/java/io/grafeas/v1/Occurrence.java @@ -247,6 +247,21 @@ private Occurrence( detailsCase_ = 14; break; } + case 122: + { + io.grafeas.v1.UpgradeOccurrence.Builder subBuilder = null; + if (detailsCase_ == 15) { + subBuilder = ((io.grafeas.v1.UpgradeOccurrence) details_).toBuilder(); + } + details_ = + input.readMessage(io.grafeas.v1.UpgradeOccurrence.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.grafeas.v1.UpgradeOccurrence) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 15; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -292,6 +307,7 @@ public enum DetailsCase DEPLOYMENT(12), DISCOVERY(13), ATTESTATION(14), + UPGRADE(15), DETAILS_NOT_SET(0); private final int value; @@ -324,6 +340,8 @@ public static DetailsCase forNumber(int value) { return DISCOVERY; case 14: return ATTESTATION; + case 15: + return UPGRADE; case 0: return DETAILS_NOT_SET; default: @@ -998,6 +1016,54 @@ public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { return io.grafeas.v1.AttestationOccurrence.getDefaultInstance(); } + public static final int UPGRADE_FIELD_NUMBER = 15; + /** + * + * + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * + * @return Whether the upgrade field is set. + */ + public boolean hasUpgrade() { + return detailsCase_ == 15; + } + /** + * + * + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * + * @return The upgrade. + */ + public io.grafeas.v1.UpgradeOccurrence getUpgrade() { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + /** + * + * + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1054,6 +1120,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (detailsCase_ == 14) { output.writeMessage(14, (io.grafeas.v1.AttestationOccurrence) details_); } + if (detailsCase_ == 15) { + output.writeMessage(15, (io.grafeas.v1.UpgradeOccurrence) details_); + } unknownFields.writeTo(output); } @@ -1119,6 +1188,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 14, (io.grafeas.v1.AttestationOccurrence) details_); } + if (detailsCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (io.grafeas.v1.UpgradeOccurrence) details_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1170,6 +1244,9 @@ public boolean equals(final java.lang.Object obj) { case 14: if (!getAttestation().equals(other.getAttestation())) return false; break; + case 15: + if (!getUpgrade().equals(other.getUpgrade())) return false; + break; case 0: default: } @@ -1231,6 +1308,10 @@ public int hashCode() { hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; hash = (53 * hash) + getAttestation().hashCode(); break; + case 15: + hash = (37 * hash) + UPGRADE_FIELD_NUMBER; + hash = (53 * hash) + getUpgrade().hashCode(); + break; case 0: default: } @@ -1489,6 +1570,13 @@ public io.grafeas.v1.Occurrence buildPartial() { result.details_ = attestationBuilder_.build(); } } + if (detailsCase_ == 15) { + if (upgradeBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = upgradeBuilder_.build(); + } + } result.detailsCase_ = detailsCase_; onBuilt(); return result; @@ -1600,6 +1688,11 @@ public Builder mergeFrom(io.grafeas.v1.Occurrence other) { mergeAttestation(other.getAttestation()); break; } + case UPGRADE: + { + mergeUpgrade(other.getUpgrade()); + break; + } case DETAILS_NOT_SET: { break; @@ -3982,6 +4075,208 @@ public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { return attestationBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, + io.grafeas.v1.UpgradeOccurrence.Builder, + io.grafeas.v1.UpgradeOccurrenceOrBuilder> + upgradeBuilder_; + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * + * @return Whether the upgrade field is set. + */ + public boolean hasUpgrade() { + return detailsCase_ == 15; + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * + * @return The upgrade. + */ + public io.grafeas.v1.UpgradeOccurrence getUpgrade() { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } else { + if (detailsCase_ == 15) { + return upgradeBuilder_.getMessage(); + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeOccurrence value) { + if (upgradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + upgradeBuilder_.setMessage(value); + } + detailsCase_ = 15; + return this; + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder setUpgrade(io.grafeas.v1.UpgradeOccurrence.Builder builderForValue) { + if (upgradeBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + upgradeBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 15; + return this; + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder mergeUpgrade(io.grafeas.v1.UpgradeOccurrence value) { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15 + && details_ != io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) { + details_ = + io.grafeas.v1.UpgradeOccurrence.newBuilder((io.grafeas.v1.UpgradeOccurrence) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 15) { + upgradeBuilder_.mergeFrom(value); + } + upgradeBuilder_.setMessage(value); + } + detailsCase_ = 15; + return this; + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public Builder clearUpgrade() { + if (upgradeBuilder_ == null) { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + } + upgradeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public io.grafeas.v1.UpgradeOccurrence.Builder getUpgradeBuilder() { + return getUpgradeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + public io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder() { + if ((detailsCase_ == 15) && (upgradeBuilder_ != null)) { + return upgradeBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 15) { + return (io.grafeas.v1.UpgradeOccurrence) details_; + } + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + } + /** + * + * + *
+     * Describes an available package upgrade on the linked resource.
+     * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, + io.grafeas.v1.UpgradeOccurrence.Builder, + io.grafeas.v1.UpgradeOccurrenceOrBuilder> + getUpgradeFieldBuilder() { + if (upgradeBuilder_ == null) { + if (!(detailsCase_ == 15)) { + details_ = io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + upgradeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeOccurrence, + io.grafeas.v1.UpgradeOccurrence.Builder, + io.grafeas.v1.UpgradeOccurrenceOrBuilder>( + (io.grafeas.v1.UpgradeOccurrence) details_, getParentForChildren(), isClean()); + details_ = null; + } + detailsCase_ = 15; + onChanged(); + ; + return upgradeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java b/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java index 044c1139..8de233c5 100644 --- a/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java +++ b/src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java @@ -479,5 +479,40 @@ public interface OccurrenceOrBuilder */ io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder(); + /** + * + * + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * + * @return Whether the upgrade field is set. + */ + boolean hasUpgrade(); + /** + * + * + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + * + * @return The upgrade. + */ + io.grafeas.v1.UpgradeOccurrence getUpgrade(); + /** + * + * + *
+   * Describes an available package upgrade on the linked resource.
+   * 
+ * + * .grafeas.v1.UpgradeOccurrence upgrade = 15; + */ + io.grafeas.v1.UpgradeOccurrenceOrBuilder getUpgradeOrBuilder(); + public io.grafeas.v1.Occurrence.DetailsCase getDetailsCase(); } diff --git a/src/main/java/io/grafeas/v1/UpdateNoteRequest.java b/src/main/java/io/grafeas/v1/UpdateNoteRequest.java index c51e3d4b..05cd6fc3 100644 --- a/src/main/java/io/grafeas/v1/UpdateNoteRequest.java +++ b/src/main/java/io/grafeas/v1/UpdateNoteRequest.java @@ -149,7 +149,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -172,7 +174,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -197,7 +201,7 @@ public com.google.protobuf.ByteString getNameBytes() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the note field is set. */ @@ -211,7 +215,7 @@ public boolean hasNote() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The note. */ @@ -225,7 +229,7 @@ public io.grafeas.v1.Note getNote() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { return getNote(); @@ -651,7 +655,9 @@ public Builder mergeFrom( * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -674,7 +680,9 @@ public java.lang.String getName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -697,7 +705,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -719,7 +729,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -737,7 +749,9 @@ public Builder clearName() { * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. @@ -764,7 +778,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the note field is set. */ @@ -778,7 +792,7 @@ public boolean hasNote() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The note. */ @@ -796,7 +810,7 @@ public io.grafeas.v1.Note getNote() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setNote(io.grafeas.v1.Note value) { if (noteBuilder_ == null) { @@ -818,7 +832,7 @@ public Builder setNote(io.grafeas.v1.Note value) { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setNote(io.grafeas.v1.Note.Builder builderForValue) { if (noteBuilder_ == null) { @@ -837,7 +851,7 @@ public Builder setNote(io.grafeas.v1.Note.Builder builderForValue) { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeNote(io.grafeas.v1.Note value) { if (noteBuilder_ == null) { @@ -860,7 +874,7 @@ public Builder mergeNote(io.grafeas.v1.Note value) { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearNote() { if (noteBuilder_ == null) { @@ -880,7 +894,7 @@ public Builder clearNote() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.Note.Builder getNoteBuilder() { @@ -894,7 +908,7 @@ public io.grafeas.v1.Note.Builder getNoteBuilder() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { if (noteBuilder_ != null) { @@ -910,7 +924,7 @@ public io.grafeas.v1.NoteOrBuilder getNoteOrBuilder() { * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.Note, io.grafeas.v1.Note.Builder, io.grafeas.v1.NoteOrBuilder> diff --git a/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java b/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java index a3b890b5..2ab1e077 100644 --- a/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface UpdateNoteRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface UpdateNoteRequestOrBuilder * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -58,7 +62,7 @@ public interface UpdateNoteRequestOrBuilder * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the note field is set. */ @@ -70,7 +74,7 @@ public interface UpdateNoteRequestOrBuilder * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The note. */ @@ -82,7 +86,7 @@ public interface UpdateNoteRequestOrBuilder * The updated note. * * - * .grafeas.v1.Note note = 2; + * .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; */ io.grafeas.v1.NoteOrBuilder getNoteOrBuilder(); diff --git a/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java b/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java index bad89136..2da41261 100644 --- a/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java +++ b/src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java @@ -151,7 +151,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -174,7 +176,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -199,7 +203,7 @@ public com.google.protobuf.ByteString getNameBytes() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the occurrence field is set. */ @@ -213,7 +217,7 @@ public boolean hasOccurrence() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The occurrence. */ @@ -227,7 +231,7 @@ public io.grafeas.v1.Occurrence getOccurrence() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { return getOccurrence(); @@ -655,7 +659,9 @@ public Builder mergeFrom( * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -678,7 +684,9 @@ public java.lang.String getName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -701,7 +709,9 @@ public com.google.protobuf.ByteString getNameBytes() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -723,7 +733,9 @@ public Builder setName(java.lang.String value) { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -741,7 +753,9 @@ public Builder clearName() { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. @@ -770,7 +784,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the occurrence field is set. */ @@ -784,7 +798,7 @@ public boolean hasOccurrence() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The occurrence. */ @@ -802,7 +816,7 @@ public io.grafeas.v1.Occurrence getOccurrence() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setOccurrence(io.grafeas.v1.Occurrence value) { if (occurrenceBuilder_ == null) { @@ -824,7 +838,7 @@ public Builder setOccurrence(io.grafeas.v1.Occurrence value) { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setOccurrence(io.grafeas.v1.Occurrence.Builder builderForValue) { if (occurrenceBuilder_ == null) { @@ -843,7 +857,7 @@ public Builder setOccurrence(io.grafeas.v1.Occurrence.Builder builderForValue) { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { if (occurrenceBuilder_ == null) { @@ -867,7 +881,7 @@ public Builder mergeOccurrence(io.grafeas.v1.Occurrence value) { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearOccurrence() { if (occurrenceBuilder_ == null) { @@ -887,7 +901,7 @@ public Builder clearOccurrence() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { @@ -901,7 +915,7 @@ public io.grafeas.v1.Occurrence.Builder getOccurrenceBuilder() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { if (occurrenceBuilder_ != null) { @@ -917,7 +931,7 @@ public io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder() { * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.Occurrence, diff --git a/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java b/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java index 8102cffa..8fdfaac8 100644 --- a/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java +++ b/src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface UpdateOccurrenceRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -45,7 +47,9 @@ public interface UpdateOccurrenceRequestOrBuilder * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * * - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -58,7 +62,7 @@ public interface UpdateOccurrenceRequestOrBuilder * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the occurrence field is set. */ @@ -70,7 +74,7 @@ public interface UpdateOccurrenceRequestOrBuilder * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The occurrence. */ @@ -82,7 +86,7 @@ public interface UpdateOccurrenceRequestOrBuilder * The updated occurrence. * * - * .grafeas.v1.Occurrence occurrence = 2; + * .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; */ io.grafeas.v1.OccurrenceOrBuilder getOccurrenceOrBuilder(); diff --git a/src/main/java/io/grafeas/v1/Upgrade.java b/src/main/java/io/grafeas/v1/Upgrade.java new file mode 100644 index 00000000..430f34b3 --- /dev/null +++ b/src/main/java/io/grafeas/v1/Upgrade.java @@ -0,0 +1,155 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +public final class Upgrade { + private Upgrade() {} + + 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_UpgradeNote_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeDistribution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grafeas_v1_UpgradeOccurrence_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\030grafeas/v1/upgrade.proto\022\ngrafeas.v1\032\037" + + "google/protobuf/timestamp.proto\032\030grafeas" + + "/v1/package.proto\"\257\001\n\013UpgradeNote\022\017\n\007pac" + + "kage\030\001 \001(\t\022$\n\007version\030\002 \001(\0132\023.grafeas.v1" + + ".Version\0226\n\rdistributions\030\003 \003(\0132\037.grafea" + + "s.v1.UpgradeDistribution\0221\n\016windows_upda" + + "te\030\004 \001(\0132\031.grafeas.v1.WindowsUpdate\"]\n\023U" + + "pgradeDistribution\022\017\n\007cpe_uri\030\001 \001(\t\022\026\n\016c" + + "lassification\030\002 \001(\t\022\020\n\010severity\030\003 \001(\t\022\013\n" + + "\003cve\030\004 \003(\t\"\354\002\n\rWindowsUpdate\0224\n\010identity" + + "\030\001 \001(\0132\".grafeas.v1.WindowsUpdate.Identi" + + "ty\022\r\n\005title\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0226" + + "\n\ncategories\030\004 \003(\0132\".grafeas.v1.WindowsU" + + "pdate.Category\022\026\n\016kb_article_ids\030\005 \003(\t\022\023" + + "\n\013support_url\030\006 \001(\t\022<\n\030last_published_ti" + + "mestamp\030\007 \001(\0132\032.google.protobuf.Timestam" + + "p\032/\n\010Identity\022\021\n\tupdate_id\030\001 \001(\t\022\020\n\010revi" + + "sion\030\002 \001(\005\032-\n\010Category\022\023\n\013category_id\030\001 " + + "\001(\t\022\014\n\004name\030\002 \001(\t\"\273\001\n\021UpgradeOccurrence\022" + + "\017\n\007package\030\001 \001(\t\022+\n\016parsed_version\030\003 \001(\013" + + "2\023.grafeas.v1.Version\0225\n\014distribution\030\004 " + + "\001(\0132\037.grafeas.v1.UpgradeDistribution\0221\n\016" + + "windows_update\030\005 \001(\0132\031.grafeas.v1.Window" + + "sUpdateBQ\n\rio.grafeas.v1P\001Z8google.golan" + + "g.org/genproto/googleapis/grafeas/v1;gra" + + "feas\242\002\003GRAb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + io.grafeas.v1.Package.getDescriptor(), + }); + internal_static_grafeas_v1_UpgradeNote_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeNote_descriptor, + new java.lang.String[] { + "Package", "Version", "Distributions", "WindowsUpdate", + }); + internal_static_grafeas_v1_UpgradeDistribution_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeDistribution_descriptor, + new java.lang.String[] { + "CpeUri", "Classification", "Severity", "Cve", + }); + internal_static_grafeas_v1_WindowsUpdate_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_descriptor, + new java.lang.String[] { + "Identity", + "Title", + "Description", + "Categories", + "KbArticleIds", + "SupportUrl", + "LastPublishedTimestamp", + }); + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor = + internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(0); + internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor, + new java.lang.String[] { + "UpdateId", "Revision", + }); + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor = + internal_static_grafeas_v1_WindowsUpdate_descriptor.getNestedTypes().get(1); + internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_WindowsUpdate_Category_descriptor, + new java.lang.String[] { + "CategoryId", "Name", + }); + internal_static_grafeas_v1_UpgradeOccurrence_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grafeas_v1_UpgradeOccurrence_descriptor, + new java.lang.String[] { + "Package", "ParsedVersion", "Distribution", "WindowsUpdate", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + io.grafeas.v1.Package.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/io/grafeas/v1/UpgradeDistribution.java b/src/main/java/io/grafeas/v1/UpgradeDistribution.java new file mode 100644 index 00000000..a6a7637e --- /dev/null +++ b/src/main/java/io/grafeas/v1/UpgradeDistribution.java @@ -0,0 +1,1290 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +/** + * + * + *
+ * The Upgrade Distribution represents metadata about the Upgrade for each
+ * operating system (CPE). Some distributions have additional metadata around
+ * updates, classifying them into various categories and severities.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeDistribution} + */ +public final class UpgradeDistribution extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeDistribution) + UpgradeDistributionOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeDistribution.newBuilder() to construct. + private UpgradeDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeDistribution() { + cpeUri_ = ""; + classification_ = ""; + severity_ = ""; + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeDistribution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeDistribution( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + cpeUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + classification_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + severity_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cve_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cve_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cve_ = cve_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeDistribution.class, + io.grafeas.v1.UpgradeDistribution.Builder.class); + } + + public static final int CPE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object cpeUri_; + /** + * + * + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + 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(); + cpeUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLASSIFICATION_FIELD_NUMBER = 2; + private volatile java.lang.Object classification_; + /** + * + * + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * + * @return The classification. + */ + public java.lang.String getClassification() { + java.lang.Object ref = classification_; + 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(); + classification_ = s; + return s; + } + } + /** + * + * + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * + * @return The bytes for classification. + */ + public com.google.protobuf.ByteString getClassificationBytes() { + java.lang.Object ref = classification_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + classification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 3; + private volatile java.lang.Object severity_; + /** + * + * + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * + * @return The severity. + */ + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + 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(); + severity_ = s; + return s; + } + } + /** + * + * + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * + * @return The bytes for severity. + */ + public com.google.protobuf.ByteString getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CVE_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList cve_; + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @return A list containing the cve. + */ + public com.google.protobuf.ProtocolStringList getCveList() { + return cve_; + } + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @return The count of cve. + */ + public int getCveCount() { + return cve_.size(); + } + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @param index The index of the element to return. + * @return The cve at the given index. + */ + public java.lang.String getCve(int index) { + return cve_.get(index); + } + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + public com.google.protobuf.ByteString getCveBytes(int index) { + return cve_.getByteString(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 (!getCpeUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_); + } + if (!getClassificationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, classification_); + } + if (!getSeverityBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, severity_); + } + for (int i = 0; i < cve_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cve_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCpeUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_); + } + if (!getClassificationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, classification_); + } + if (!getSeverityBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, severity_); + } + { + int dataSize = 0; + for (int i = 0; i < cve_.size(); i++) { + dataSize += computeStringSizeNoTag(cve_.getRaw(i)); + } + size += dataSize; + size += 1 * getCveList().size(); + } + size += unknownFields.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.UpgradeDistribution)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeDistribution other = (io.grafeas.v1.UpgradeDistribution) obj; + + if (!getCpeUri().equals(other.getCpeUri())) return false; + if (!getClassification().equals(other.getClassification())) return false; + if (!getSeverity().equals(other.getSeverity())) return false; + if (!getCveList().equals(other.getCveList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCpeUri().hashCode(); + hash = (37 * hash) + CLASSIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getClassification().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + getSeverity().hashCode(); + if (getCveCount() > 0) { + hash = (37 * hash) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCveList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeDistribution parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeDistribution 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.UpgradeDistribution parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeDistribution 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.UpgradeDistribution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeDistribution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.UpgradeDistribution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeDistribution 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.UpgradeDistribution parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeDistribution 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.UpgradeDistribution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeDistribution 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.UpgradeDistribution 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; + } + /** + * + * + *
+   * The Upgrade Distribution represents metadata about the Upgrade for each
+   * operating system (CPE). Some distributions have additional metadata around
+   * updates, classifying them into various categories and severities.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeDistribution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeDistribution) + io.grafeas.v1.UpgradeDistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeDistribution.class, + io.grafeas.v1.UpgradeDistribution.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeDistribution.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cpeUri_ = ""; + + classification_ = ""; + + severity_ = ""; + + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeDistribution_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeDistribution.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution build() { + io.grafeas.v1.UpgradeDistribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeDistribution buildPartial() { + io.grafeas.v1.UpgradeDistribution result = new io.grafeas.v1.UpgradeDistribution(this); + int from_bitField0_ = bitField0_; + result.cpeUri_ = cpeUri_; + result.classification_ = classification_; + result.severity_ = severity_; + if (((bitField0_ & 0x00000001) != 0)) { + cve_ = cve_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cve_ = cve_; + onBuilt(); + return result; + } + + @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.UpgradeDistribution) { + return mergeFrom((io.grafeas.v1.UpgradeDistribution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeDistribution other) { + if (other == io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) return this; + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + onChanged(); + } + if (!other.getClassification().isEmpty()) { + classification_ = other.classification_; + onChanged(); + } + if (!other.getSeverity().isEmpty()) { + severity_ = other.severity_; + onChanged(); + } + if (!other.cve_.isEmpty()) { + if (cve_.isEmpty()) { + cve_ = other.cve_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCveIsMutable(); + cve_.addAll(other.cve_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + io.grafeas.v1.UpgradeDistribution parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.UpgradeDistribution) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object cpeUri_ = ""; + /** + * + * + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * + * @return The cpeUri. + */ + public java.lang.String getCpeUri() { + java.lang.Object ref = cpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * + * @return The bytes for cpeUri. + */ + public com.google.protobuf.ByteString getCpeUriBytes() { + java.lang.Object ref = cpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * + * @param value The cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpeUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearCpeUri() { + + cpeUri_ = getDefaultInstance().getCpeUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required - The specific operating system this metadata applies to. See
+     * https://cpe.mitre.org/specification/.
+     * 
+ * + * string cpe_uri = 1; + * + * @param value The bytes for cpeUri to set. + * @return This builder for chaining. + */ + public Builder setCpeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpeUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object classification_ = ""; + /** + * + * + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * + * @return The classification. + */ + public java.lang.String getClassification() { + java.lang.Object ref = classification_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + classification_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * + * @return The bytes for classification. + */ + public com.google.protobuf.ByteString getClassificationBytes() { + java.lang.Object ref = classification_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + classification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * + * @param value The classification to set. + * @return This builder for chaining. + */ + public Builder setClassification(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + classification_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * + * @return This builder for chaining. + */ + public Builder clearClassification() { + + classification_ = getDefaultInstance().getClassification(); + onChanged(); + return this; + } + /** + * + * + *
+     * The operating system classification of this Upgrade, as specified by the
+     * upstream operating system upgrade feed. For Windows the classification is
+     * one of the category_ids listed at
+     * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+     * 
+ * + * string classification = 2; + * + * @param value The bytes for classification to set. + * @return This builder for chaining. + */ + public Builder setClassificationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + classification_ = value; + onChanged(); + return this; + } + + private java.lang.Object severity_ = ""; + /** + * + * + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * + * @return The severity. + */ + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * + * @return The bytes for severity. + */ + public com.google.protobuf.ByteString getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + severity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + + severity_ = getDefaultInstance().getSeverity(); + onChanged(); + return this; + } + /** + * + * + *
+     * The severity as specified by the upstream operating system.
+     * 
+ * + * string severity = 3; + * + * @param value The bytes for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + severity_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCveIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cve_ = new com.google.protobuf.LazyStringArrayList(cve_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @return A list containing the cve. + */ + public com.google.protobuf.ProtocolStringList getCveList() { + return cve_.getUnmodifiableView(); + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @return The count of cve. + */ + public int getCveCount() { + return cve_.size(); + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @param index The index of the element to return. + * @return The cve at the given index. + */ + public java.lang.String getCve(int index) { + return cve_.get(index); + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + public com.google.protobuf.ByteString getCveBytes(int index) { + return cve_.getByteString(index); + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @param index The index to set the value at. + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCveIsMutable(); + cve_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @param value The cve to add. + * @return This builder for chaining. + */ + public Builder addCve(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCveIsMutable(); + cve_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @param values The cve to add. + * @return This builder for chaining. + */ + public Builder addAllCve(java.lang.Iterable values) { + ensureCveIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cve_); + onChanged(); + return this; + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @return This builder for chaining. + */ + public Builder clearCve() { + cve_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The cve tied to this Upgrade.
+     * 
+ * + * repeated string cve = 4; + * + * @param value The bytes of the cve to add. + * @return This builder for chaining. + */ + public Builder addCveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCveIsMutable(); + cve_.add(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.UpgradeDistribution) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeDistribution) + private static final io.grafeas.v1.UpgradeDistribution DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeDistribution(); + } + + public static io.grafeas.v1.UpgradeDistribution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeDistribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeDistribution(input, extensionRegistry); + } + }; + + 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.UpgradeDistribution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java b/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java new file mode 100644 index 00000000..fc9e5141 --- /dev/null +++ b/src/main/java/io/grafeas/v1/UpgradeDistributionOrBuilder.java @@ -0,0 +1,160 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeDistributionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeDistribution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * + * @return The cpeUri. + */ + java.lang.String getCpeUri(); + /** + * + * + *
+   * Required - The specific operating system this metadata applies to. See
+   * https://cpe.mitre.org/specification/.
+   * 
+ * + * string cpe_uri = 1; + * + * @return The bytes for cpeUri. + */ + com.google.protobuf.ByteString getCpeUriBytes(); + + /** + * + * + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * + * @return The classification. + */ + java.lang.String getClassification(); + /** + * + * + *
+   * The operating system classification of this Upgrade, as specified by the
+   * upstream operating system upgrade feed. For Windows the classification is
+   * one of the category_ids listed at
+   * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
+   * 
+ * + * string classification = 2; + * + * @return The bytes for classification. + */ + com.google.protobuf.ByteString getClassificationBytes(); + + /** + * + * + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * + * @return The severity. + */ + java.lang.String getSeverity(); + /** + * + * + *
+   * The severity as specified by the upstream operating system.
+   * 
+ * + * string severity = 3; + * + * @return The bytes for severity. + */ + com.google.protobuf.ByteString getSeverityBytes(); + + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @return A list containing the cve. + */ + java.util.List getCveList(); + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @return The count of cve. + */ + int getCveCount(); + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @param index The index of the element to return. + * @return The cve at the given index. + */ + java.lang.String getCve(int index); + /** + * + * + *
+   * The cve tied to this Upgrade.
+   * 
+ * + * repeated string cve = 4; + * + * @param index The index of the value to return. + * @return The bytes of the cve at the given index. + */ + com.google.protobuf.ByteString getCveBytes(int index); +} diff --git a/src/main/java/io/grafeas/v1/UpgradeNote.java b/src/main/java/io/grafeas/v1/UpgradeNote.java new file mode 100644 index 00000000..9bb76ffa --- /dev/null +++ b/src/main/java/io/grafeas/v1/UpgradeNote.java @@ -0,0 +1,1660 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +/** + * + * + *
+ * An Upgrade Note represents a potential upgrade of a package to a given
+ * version. For each package version combination (i.e. bash 4.0, bash 4.1,
+ * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
+ * represents the information related to the update.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeNote} + */ +public final class UpgradeNote extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeNote) + UpgradeNoteOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeNote.newBuilder() to construct. + private UpgradeNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeNote() { + package_ = ""; + distributions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeNote( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + package_ = s; + break; + } + case 18: + { + io.grafeas.v1.Version.Builder subBuilder = null; + if (version_ != null) { + subBuilder = version_.toBuilder(); + } + version_ = input.readMessage(io.grafeas.v1.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(version_); + version_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + distributions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + distributions_.add( + input.readMessage(io.grafeas.v1.UpgradeDistribution.parser(), extensionRegistry)); + break; + } + case 34: + { + io.grafeas.v1.WindowsUpdate.Builder subBuilder = null; + if (windowsUpdate_ != null) { + subBuilder = windowsUpdate_.toBuilder(); + } + windowsUpdate_ = + input.readMessage(io.grafeas.v1.WindowsUpdate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(windowsUpdate_); + windowsUpdate_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + distributions_ = java.util.Collections.unmodifiableList(distributions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); + } + + public static final int PACKAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object package_; + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + 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(); + package_ = s; + return s; + } + } + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The bytes for package. + */ + public com.google.protobuf.ByteString getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private io.grafeas.v1.Version version_; + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return version_ != null; + } + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return getVersion(); + } + + public static final int DISTRIBUTIONS_FIELD_NUMBER = 3; + private java.util.List distributions_; + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List getDistributionsList() { + return distributions_; + } + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List + getDistributionsOrBuilderList() { + return distributions_; + } + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public int getDistributionsCount() { + return distributions_.size(); + } + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { + return distributions_.get(index); + } + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder(int index) { + return distributions_.get(index); + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 4; + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + return windowsUpdate_ == null + ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() + : windowsUpdate_; + } + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + return getWindowsUpdate(); + } + + 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 (!getPackageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); + } + if (version_ != null) { + output.writeMessage(2, getVersion()); + } + for (int i = 0; i < distributions_.size(); i++) { + output.writeMessage(3, distributions_.get(i)); + } + if (windowsUpdate_ != null) { + output.writeMessage(4, getWindowsUpdate()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPackageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVersion()); + } + for (int i = 0; i < distributions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, distributions_.get(i)); + } + if (windowsUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getWindowsUpdate()); + } + size += unknownFields.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.UpgradeNote)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeNote other = (io.grafeas.v1.UpgradeNote) obj; + + if (!getPackage().equals(other.getPackage())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion().equals(other.getVersion())) return false; + } + if (!getDistributionsList().equals(other.getDistributionsList())) return false; + if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; + if (hasWindowsUpdate()) { + if (!getWindowsUpdate().equals(other.getWindowsUpdate())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + if (getDistributionsCount() > 0) { + hash = (37 * hash) + DISTRIBUTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDistributionsList().hashCode(); + } + if (hasWindowsUpdate()) { + hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getWindowsUpdate().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeNote parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeNote 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.UpgradeNote parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeNote 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.UpgradeNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeNote parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.UpgradeNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeNote 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.UpgradeNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeNote 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.UpgradeNote parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeNote 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.UpgradeNote 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; + } + /** + * + * + *
+   * An Upgrade Note represents a potential upgrade of a package to a given
+   * version. For each package version combination (i.e. bash 4.0, bash 4.1,
+   * bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
+   * represents the information related to the update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeNote} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeNote) + io.grafeas.v1.UpgradeNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeNote.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDistributionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + package_ = ""; + + if (versionBuilder_ == null) { + version_ = null; + } else { + version_ = null; + versionBuilder_ = null; + } + if (distributionsBuilder_ == null) { + distributions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + distributionsBuilder_.clear(); + } + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = null; + } else { + windowsUpdate_ = null; + windowsUpdateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeNote.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote build() { + io.grafeas.v1.UpgradeNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeNote buildPartial() { + io.grafeas.v1.UpgradeNote result = new io.grafeas.v1.UpgradeNote(this); + int from_bitField0_ = bitField0_; + result.package_ = package_; + if (versionBuilder_ == null) { + result.version_ = version_; + } else { + result.version_ = versionBuilder_.build(); + } + if (distributionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + distributions_ = java.util.Collections.unmodifiableList(distributions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.distributions_ = distributions_; + } else { + result.distributions_ = distributionsBuilder_.build(); + } + if (windowsUpdateBuilder_ == null) { + result.windowsUpdate_ = windowsUpdate_; + } else { + result.windowsUpdate_ = windowsUpdateBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.UpgradeNote) { + return mergeFrom((io.grafeas.v1.UpgradeNote) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeNote other) { + if (other == io.grafeas.v1.UpgradeNote.getDefaultInstance()) return this; + if (!other.getPackage().isEmpty()) { + package_ = other.package_; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (distributionsBuilder_ == null) { + if (!other.distributions_.isEmpty()) { + if (distributions_.isEmpty()) { + distributions_ = other.distributions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDistributionsIsMutable(); + distributions_.addAll(other.distributions_); + } + onChanged(); + } + } else { + if (!other.distributions_.isEmpty()) { + if (distributionsBuilder_.isEmpty()) { + distributionsBuilder_.dispose(); + distributionsBuilder_ = null; + distributions_ = other.distributions_; + bitField0_ = (bitField0_ & ~0x00000001); + distributionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDistributionsFieldBuilder() + : null; + } else { + distributionsBuilder_.addAllMessages(other.distributions_); + } + } + } + if (other.hasWindowsUpdate()) { + mergeWindowsUpdate(other.getWindowsUpdate()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + io.grafeas.v1.UpgradeNote parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.UpgradeNote) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object package_ = ""; + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @return The bytes for package. + */ + public com.google.protobuf.ByteString getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @param value The package to set. + * @return This builder for chaining. + */ + public Builder setPackage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + package_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @return This builder for chaining. + */ + public Builder clearPackage() { + + package_ = getDefaultInstance().getPackage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @param value The bytes for package to set. + * @return This builder for chaining. + */ + public Builder setPackageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + package_ = value; + onChanged(); + return this; + } + + private io.grafeas.v1.Version version_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + versionBuilder_; + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return versionBuilder_ != null || version_ != null; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + * + * @return The version. + */ + public io.grafeas.v1.Version getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + onChanged(); + } else { + versionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder setVersion(io.grafeas.v1.Version.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + onChanged(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (version_ != null) { + version_ = io.grafeas.v1.Version.newBuilder(version_).mergeFrom(value).buildPartial(); + } else { + version_ = value; + } + onChanged(); + } else { + versionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = null; + onChanged(); + } else { + version_ = null; + versionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { + + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_; + } + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in machine + human
+     * readable form.
+     * 
+ * + * .grafeas.v1.Version version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, + io.grafeas.v1.Version.Builder, + io.grafeas.v1.VersionOrBuilder>(getVersion(), getParentForChildren(), isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.util.List distributions_ = + java.util.Collections.emptyList(); + + private void ensureDistributionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + distributions_ = new java.util.ArrayList(distributions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, + io.grafeas.v1.UpgradeDistribution.Builder, + io.grafeas.v1.UpgradeDistributionOrBuilder> + distributionsBuilder_; + + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List getDistributionsList() { + if (distributionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(distributions_); + } else { + return distributionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public int getDistributionsCount() { + if (distributionsBuilder_ == null) { + return distributions_.size(); + } else { + return distributionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution getDistributions(int index) { + if (distributionsBuilder_ == null) { + return distributions_.get(index); + } else { + return distributionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder setDistributions(int index, io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.set(index, value); + onChanged(); + } else { + distributionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder setDistributions( + int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.set(index, builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions(io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.add(value); + onChanged(); + } else { + distributionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions(int index, io.grafeas.v1.UpgradeDistribution value) { + if (distributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDistributionsIsMutable(); + distributions_.add(index, value); + onChanged(); + } else { + distributionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions(io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addDistributions( + int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.add(index, builderForValue.build()); + onChanged(); + } else { + distributionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder addAllDistributions( + java.lang.Iterable values) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, distributions_); + onChanged(); + } else { + distributionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder clearDistributions() { + if (distributionsBuilder_ == null) { + distributions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + distributionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public Builder removeDistributions(int index) { + if (distributionsBuilder_ == null) { + ensureDistributionsIsMutable(); + distributions_.remove(index); + onChanged(); + } else { + distributionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder getDistributionsBuilder(int index) { + return getDistributionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder(int index) { + if (distributionsBuilder_ == null) { + return distributions_.get(index); + } else { + return distributionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List + getDistributionsOrBuilderList() { + if (distributionsBuilder_ != null) { + return distributionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(distributions_); + } + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder() { + return getDistributionsFieldBuilder() + .addBuilder(io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder(int index) { + return getDistributionsFieldBuilder() + .addBuilder(index, io.grafeas.v1.UpgradeDistribution.getDefaultInstance()); + } + /** + * + * + *
+     * Metadata about the upgrade for each specific operating system.
+     * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + public java.util.List getDistributionsBuilderList() { + return getDistributionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, + io.grafeas.v1.UpgradeDistribution.Builder, + io.grafeas.v1.UpgradeDistributionOrBuilder> + getDistributionsFieldBuilder() { + if (distributionsBuilder_ == null) { + distributionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, + io.grafeas.v1.UpgradeDistribution.Builder, + io.grafeas.v1.UpgradeDistributionOrBuilder>( + distributions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + distributions_ = null; + } + return distributionsBuilder_; + } + + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, + io.grafeas.v1.WindowsUpdate.Builder, + io.grafeas.v1.WindowsUpdateOrBuilder> + windowsUpdateBuilder_; + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return windowsUpdateBuilder_ != null || windowsUpdate_ != null; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null + ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() + : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsUpdate_ = value; + onChanged(); + } else { + windowsUpdateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate.Builder builderForValue) { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = builderForValue.build(); + onChanged(); + } else { + windowsUpdateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (windowsUpdate_ != null) { + windowsUpdate_ = + io.grafeas.v1.WindowsUpdate.newBuilder(windowsUpdate_) + .mergeFrom(value) + .buildPartial(); + } else { + windowsUpdate_ = value; + } + onChanged(); + } else { + windowsUpdateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public Builder clearWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = null; + onChanged(); + } else { + windowsUpdate_ = null; + windowsUpdateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { + + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null + ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() + : windowsUpdate_; + } + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, + io.grafeas.v1.WindowsUpdate.Builder, + io.grafeas.v1.WindowsUpdateOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, + io.grafeas.v1.WindowsUpdate.Builder, + io.grafeas.v1.WindowsUpdateOrBuilder>( + getWindowsUpdate(), getParentForChildren(), isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + + @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.UpgradeNote) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeNote) + private static final io.grafeas.v1.UpgradeNote DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeNote(); + } + + public static io.grafeas.v1.UpgradeNote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeNote(input, extensionRegistry); + } + }; + + 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.UpgradeNote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java b/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java new file mode 100644 index 00000000..009bae78 --- /dev/null +++ b/src/main/java/io/grafeas/v1/UpgradeNoteOrBuilder.java @@ -0,0 +1,176 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeNoteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeNote) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The package. + */ + java.lang.String getPackage(); + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The bytes for package. + */ + com.google.protobuf.ByteString getPackageBytes(); + + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + * + * @return The version. + */ + io.grafeas.v1.Version getVersion(); + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in machine + human
+   * readable form.
+   * 
+ * + * .grafeas.v1.Version version = 2; + */ + io.grafeas.v1.VersionOrBuilder getVersionOrBuilder(); + + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + java.util.List getDistributionsList(); + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + io.grafeas.v1.UpgradeDistribution getDistributions(int index); + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + int getDistributionsCount(); + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + java.util.List + getDistributionsOrBuilderList(); + /** + * + * + *
+   * Metadata about the upgrade for each specific operating system.
+   * 
+ * + * repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder(int index); + + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * + * @return Whether the windowsUpdate field is set. + */ + boolean hasWindowsUpdate(); + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + * + * @return The windowsUpdate. + */ + io.grafeas.v1.WindowsUpdate getWindowsUpdate(); + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 4; + */ + io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); +} diff --git a/src/main/java/io/grafeas/v1/UpgradeOccurrence.java b/src/main/java/io/grafeas/v1/UpgradeOccurrence.java new file mode 100644 index 00000000..96f5c8fb --- /dev/null +++ b/src/main/java/io/grafeas/v1/UpgradeOccurrence.java @@ -0,0 +1,1473 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +/** + * + * + *
+ * An Upgrade Occurrence represents that a specific resource_url could install a
+ * specific upgrade. This presence is supplied via local sources (i.e. it is
+ * present in the mirror and the running system has noticed its availability).
+ * For Windows, both distribution and windows_update contain information for the
+ * Windows update.
+ * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeOccurrence} + */ +public final class UpgradeOccurrence extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeOccurrence) + UpgradeOccurrenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeOccurrence.newBuilder() to construct. + private UpgradeOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeOccurrence() { + package_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeOccurrence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeOccurrence( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + package_ = s; + break; + } + case 26: + { + io.grafeas.v1.Version.Builder subBuilder = null; + if (parsedVersion_ != null) { + subBuilder = parsedVersion_.toBuilder(); + } + parsedVersion_ = input.readMessage(io.grafeas.v1.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parsedVersion_); + parsedVersion_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + io.grafeas.v1.UpgradeDistribution.Builder subBuilder = null; + if (distribution_ != null) { + subBuilder = distribution_.toBuilder(); + } + distribution_ = + input.readMessage(io.grafeas.v1.UpgradeDistribution.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(distribution_); + distribution_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + io.grafeas.v1.WindowsUpdate.Builder subBuilder = null; + if (windowsUpdate_ != null) { + subBuilder = windowsUpdate_.toBuilder(); + } + windowsUpdate_ = + input.readMessage(io.grafeas.v1.WindowsUpdate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(windowsUpdate_); + windowsUpdate_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); + } + + public static final int PACKAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object package_; + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + 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(); + package_ = s; + return s; + } + } + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The bytes for package. + */ + public com.google.protobuf.ByteString getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARSED_VERSION_FIELD_NUMBER = 3; + private io.grafeas.v1.Version parsedVersion_; + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * + * @return Whether the parsedVersion field is set. + */ + public boolean hasParsedVersion() { + return parsedVersion_ != null; + } + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * + * @return The parsedVersion. + */ + public io.grafeas.v1.Version getParsedVersion() { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { + return getParsedVersion(); + } + + public static final int DISTRIBUTION_FIELD_NUMBER = 4; + private io.grafeas.v1.UpgradeDistribution distribution_; + /** + * + * + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * + * @return Whether the distribution field is set. + */ + public boolean hasDistribution() { + return distribution_ != null; + } + /** + * + * + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * + * @return The distribution. + */ + public io.grafeas.v1.UpgradeDistribution getDistribution() { + return distribution_ == null + ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() + : distribution_; + } + /** + * + * + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { + return getDistribution(); + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 5; + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + return windowsUpdate_ == null + ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() + : windowsUpdate_; + } + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + return getWindowsUpdate(); + } + + 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 (!getPackageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_); + } + if (parsedVersion_ != null) { + output.writeMessage(3, getParsedVersion()); + } + if (distribution_ != null) { + output.writeMessage(4, getDistribution()); + } + if (windowsUpdate_ != null) { + output.writeMessage(5, getWindowsUpdate()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPackageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_); + } + if (parsedVersion_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParsedVersion()); + } + if (distribution_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDistribution()); + } + if (windowsUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getWindowsUpdate()); + } + size += unknownFields.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.UpgradeOccurrence)) { + return super.equals(obj); + } + io.grafeas.v1.UpgradeOccurrence other = (io.grafeas.v1.UpgradeOccurrence) obj; + + if (!getPackage().equals(other.getPackage())) return false; + if (hasParsedVersion() != other.hasParsedVersion()) return false; + if (hasParsedVersion()) { + if (!getParsedVersion().equals(other.getParsedVersion())) return false; + } + if (hasDistribution() != other.hasDistribution()) return false; + if (hasDistribution()) { + if (!getDistribution().equals(other.getDistribution())) return false; + } + if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; + if (hasWindowsUpdate()) { + if (!getWindowsUpdate().equals(other.getWindowsUpdate())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + if (hasParsedVersion()) { + hash = (37 * hash) + PARSED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getParsedVersion().hashCode(); + } + if (hasDistribution()) { + hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getDistribution().hashCode(); + } + if (hasWindowsUpdate()) { + hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getWindowsUpdate().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeOccurrence 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.UpgradeOccurrence parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeOccurrence 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.UpgradeOccurrence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.UpgradeOccurrence parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeOccurrence 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.UpgradeOccurrence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeOccurrence 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.UpgradeOccurrence parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.UpgradeOccurrence 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.UpgradeOccurrence 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; + } + /** + * + * + *
+   * An Upgrade Occurrence represents that a specific resource_url could install a
+   * specific upgrade. This presence is supplied via local sources (i.e. it is
+   * present in the mirror and the running system has noticed its availability).
+   * For Windows, both distribution and windows_update contain information for the
+   * Windows update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.UpgradeOccurrence} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeOccurrence) + io.grafeas.v1.UpgradeOccurrenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); + } + + // Construct using io.grafeas.v1.UpgradeOccurrence.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + package_ = ""; + + if (parsedVersionBuilder_ == null) { + parsedVersion_ = null; + } else { + parsedVersion_ = null; + parsedVersionBuilder_ = null; + } + if (distributionBuilder_ == null) { + distribution_ = null; + } else { + distribution_ = null; + distributionBuilder_ = null; + } + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = null; + } else { + windowsUpdate_ = null; + windowsUpdateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() { + return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence build() { + io.grafeas.v1.UpgradeOccurrence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.UpgradeOccurrence buildPartial() { + io.grafeas.v1.UpgradeOccurrence result = new io.grafeas.v1.UpgradeOccurrence(this); + result.package_ = package_; + if (parsedVersionBuilder_ == null) { + result.parsedVersion_ = parsedVersion_; + } else { + result.parsedVersion_ = parsedVersionBuilder_.build(); + } + if (distributionBuilder_ == null) { + result.distribution_ = distribution_; + } else { + result.distribution_ = distributionBuilder_.build(); + } + if (windowsUpdateBuilder_ == null) { + result.windowsUpdate_ = windowsUpdate_; + } else { + result.windowsUpdate_ = windowsUpdateBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.UpgradeOccurrence) { + return mergeFrom((io.grafeas.v1.UpgradeOccurrence) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.UpgradeOccurrence other) { + if (other == io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) return this; + if (!other.getPackage().isEmpty()) { + package_ = other.package_; + onChanged(); + } + if (other.hasParsedVersion()) { + mergeParsedVersion(other.getParsedVersion()); + } + if (other.hasDistribution()) { + mergeDistribution(other.getDistribution()); + } + if (other.hasWindowsUpdate()) { + mergeWindowsUpdate(other.getWindowsUpdate()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + io.grafeas.v1.UpgradeOccurrence parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.UpgradeOccurrence) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object package_ = ""; + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @return The package. + */ + public java.lang.String getPackage() { + java.lang.Object ref = package_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + package_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @return The bytes for package. + */ + public com.google.protobuf.ByteString getPackageBytes() { + java.lang.Object ref = package_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + package_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @param value The package to set. + * @return This builder for chaining. + */ + public Builder setPackage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + package_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @return This builder for chaining. + */ + public Builder clearPackage() { + + package_ = getDefaultInstance().getPackage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The package this Upgrade is for.
+     * 
+ * + * string package = 1; + * + * @param value The bytes for package to set. + * @return This builder for chaining. + */ + public Builder setPackageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + package_ = value; + onChanged(); + return this; + } + + private io.grafeas.v1.Version parsedVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + parsedVersionBuilder_; + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * + * @return Whether the parsedVersion field is set. + */ + public boolean hasParsedVersion() { + return parsedVersionBuilder_ != null || parsedVersion_ != null; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * + * @return The parsedVersion. + */ + public io.grafeas.v1.Version getParsedVersion() { + if (parsedVersionBuilder_ == null) { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } else { + return parsedVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder setParsedVersion(io.grafeas.v1.Version value) { + if (parsedVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parsedVersion_ = value; + onChanged(); + } else { + parsedVersionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder setParsedVersion(io.grafeas.v1.Version.Builder builderForValue) { + if (parsedVersionBuilder_ == null) { + parsedVersion_ = builderForValue.build(); + onChanged(); + } else { + parsedVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder mergeParsedVersion(io.grafeas.v1.Version value) { + if (parsedVersionBuilder_ == null) { + if (parsedVersion_ != null) { + parsedVersion_ = + io.grafeas.v1.Version.newBuilder(parsedVersion_).mergeFrom(value).buildPartial(); + } else { + parsedVersion_ = value; + } + onChanged(); + } else { + parsedVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public Builder clearParsedVersion() { + if (parsedVersionBuilder_ == null) { + parsedVersion_ = null; + onChanged(); + } else { + parsedVersion_ = null; + parsedVersionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public io.grafeas.v1.Version.Builder getParsedVersionBuilder() { + + onChanged(); + return getParsedVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() { + if (parsedVersionBuilder_ != null) { + return parsedVersionBuilder_.getMessageOrBuilder(); + } else { + return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_; + } + } + /** + * + * + *
+     * Required for non-Windows OS. The version of the package in a machine +
+     * human readable form.
+     * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder> + getParsedVersionFieldBuilder() { + if (parsedVersionBuilder_ == null) { + parsedVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.Version, + io.grafeas.v1.Version.Builder, + io.grafeas.v1.VersionOrBuilder>( + getParsedVersion(), getParentForChildren(), isClean()); + parsedVersion_ = null; + } + return parsedVersionBuilder_; + } + + private io.grafeas.v1.UpgradeDistribution distribution_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, + io.grafeas.v1.UpgradeDistribution.Builder, + io.grafeas.v1.UpgradeDistributionOrBuilder> + distributionBuilder_; + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * + * @return Whether the distribution field is set. + */ + public boolean hasDistribution() { + return distributionBuilder_ != null || distribution_ != null; + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * + * @return The distribution. + */ + public io.grafeas.v1.UpgradeDistribution getDistribution() { + if (distributionBuilder_ == null) { + return distribution_ == null + ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() + : distribution_; + } else { + return distributionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder setDistribution(io.grafeas.v1.UpgradeDistribution value) { + if (distributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + distribution_ = value; + onChanged(); + } else { + distributionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder setDistribution(io.grafeas.v1.UpgradeDistribution.Builder builderForValue) { + if (distributionBuilder_ == null) { + distribution_ = builderForValue.build(); + onChanged(); + } else { + distributionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder mergeDistribution(io.grafeas.v1.UpgradeDistribution value) { + if (distributionBuilder_ == null) { + if (distribution_ != null) { + distribution_ = + io.grafeas.v1.UpgradeDistribution.newBuilder(distribution_) + .mergeFrom(value) + .buildPartial(); + } else { + distribution_ = value; + } + onChanged(); + } else { + distributionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public Builder clearDistribution() { + if (distributionBuilder_ == null) { + distribution_ = null; + onChanged(); + } else { + distribution_ = null; + distributionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public io.grafeas.v1.UpgradeDistribution.Builder getDistributionBuilder() { + + onChanged(); + return getDistributionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() { + if (distributionBuilder_ != null) { + return distributionBuilder_.getMessageOrBuilder(); + } else { + return distribution_ == null + ? io.grafeas.v1.UpgradeDistribution.getDefaultInstance() + : distribution_; + } + } + /** + * + * + *
+     * Metadata about the upgrade for available for the specific operating system
+     * for the resource_url. This allows efficient filtering, as well as
+     * making it easier to use the occurrence.
+     * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, + io.grafeas.v1.UpgradeDistribution.Builder, + io.grafeas.v1.UpgradeDistributionOrBuilder> + getDistributionFieldBuilder() { + if (distributionBuilder_ == null) { + distributionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.UpgradeDistribution, + io.grafeas.v1.UpgradeDistribution.Builder, + io.grafeas.v1.UpgradeDistributionOrBuilder>( + getDistribution(), getParentForChildren(), isClean()); + distribution_ = null; + } + return distributionBuilder_; + } + + private io.grafeas.v1.WindowsUpdate windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, + io.grafeas.v1.WindowsUpdate.Builder, + io.grafeas.v1.WindowsUpdateOrBuilder> + windowsUpdateBuilder_; + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return windowsUpdateBuilder_ != null || windowsUpdate_ != null; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * + * @return The windowsUpdate. + */ + public io.grafeas.v1.WindowsUpdate getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null + ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() + : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsUpdate_ = value; + onChanged(); + } else { + windowsUpdateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate.Builder builderForValue) { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = builderForValue.build(); + onChanged(); + } else { + windowsUpdateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) { + if (windowsUpdateBuilder_ == null) { + if (windowsUpdate_ != null) { + windowsUpdate_ = + io.grafeas.v1.WindowsUpdate.newBuilder(windowsUpdate_) + .mergeFrom(value) + .buildPartial(); + } else { + windowsUpdate_ = value; + } + onChanged(); + } else { + windowsUpdateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public Builder clearWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = null; + onChanged(); + } else { + windowsUpdate_ = null; + windowsUpdateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() { + + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null + ? io.grafeas.v1.WindowsUpdate.getDefaultInstance() + : windowsUpdate_; + } + } + /** + * + * + *
+     * Required for Windows OS. Represents the metadata about the Windows update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, + io.grafeas.v1.WindowsUpdate.Builder, + io.grafeas.v1.WindowsUpdateOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate, + io.grafeas.v1.WindowsUpdate.Builder, + io.grafeas.v1.WindowsUpdateOrBuilder>( + getWindowsUpdate(), getParentForChildren(), isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + + @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.UpgradeOccurrence) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeOccurrence) + private static final io.grafeas.v1.UpgradeOccurrence DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeOccurrence(); + } + + public static io.grafeas.v1.UpgradeOccurrence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeOccurrence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeOccurrence(input, extensionRegistry); + } + }; + + 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.UpgradeOccurrence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java b/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java new file mode 100644 index 00000000..7e2a942d --- /dev/null +++ b/src/main/java/io/grafeas/v1/UpgradeOccurrenceOrBuilder.java @@ -0,0 +1,165 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +public interface UpgradeOccurrenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.UpgradeOccurrence) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The package. + */ + java.lang.String getPackage(); + /** + * + * + *
+   * Required for non-Windows OS. The package this Upgrade is for.
+   * 
+ * + * string package = 1; + * + * @return The bytes for package. + */ + com.google.protobuf.ByteString getPackageBytes(); + + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * + * @return Whether the parsedVersion field is set. + */ + boolean hasParsedVersion(); + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + * + * @return The parsedVersion. + */ + io.grafeas.v1.Version getParsedVersion(); + /** + * + * + *
+   * Required for non-Windows OS. The version of the package in a machine +
+   * human readable form.
+   * 
+ * + * .grafeas.v1.Version parsed_version = 3; + */ + io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder(); + + /** + * + * + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * + * @return Whether the distribution field is set. + */ + boolean hasDistribution(); + /** + * + * + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + * + * @return The distribution. + */ + io.grafeas.v1.UpgradeDistribution getDistribution(); + /** + * + * + *
+   * Metadata about the upgrade for available for the specific operating system
+   * for the resource_url. This allows efficient filtering, as well as
+   * making it easier to use the occurrence.
+   * 
+ * + * .grafeas.v1.UpgradeDistribution distribution = 4; + */ + io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder(); + + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * + * @return Whether the windowsUpdate field is set. + */ + boolean hasWindowsUpdate(); + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + * + * @return The windowsUpdate. + */ + io.grafeas.v1.WindowsUpdate getWindowsUpdate(); + /** + * + * + *
+   * Required for Windows OS. Represents the metadata about the Windows update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate windows_update = 5; + */ + io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder(); +} diff --git a/src/main/java/io/grafeas/v1/Vulnerability.java b/src/main/java/io/grafeas/v1/Vulnerability.java index cc2348c2..1ca5a5b7 100644 --- a/src/main/java/io/grafeas/v1/Vulnerability.java +++ b/src/main/java/io/grafeas/v1/Vulnerability.java @@ -62,52 +62,57 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\036grafeas/v1/vulnerability.proto\022\ngrafea" - + "s.v1\032\027grafeas/v1/common.proto\032\025grafeas/v" - + "1/cvss.proto\032\030grafeas/v1/package.proto\"\212" - + "\006\n\021VulnerabilityNote\022\022\n\ncvss_score\030\001 \001(\002" - + "\022&\n\010severity\030\002 \001(\0162\024.grafeas.v1.Severity" - + "\0225\n\007details\030\003 \003(\0132$.grafeas.v1.Vulnerabi" - + "lityNote.Detail\022#\n\007cvss_v3\030\004 \001(\0132\022.grafe" - + "as.v1.CVSSv3\022D\n\017windows_details\030\005 \003(\0132+." - + "grafeas.v1.VulnerabilityNote.WindowsDeta" - + "il\032\325\002\n\006Detail\022\025\n\rseverity_name\030\001 \001(\t\022\023\n\013" - + "description\030\002 \001(\t\022\024\n\014package_type\030\003 \001(\t\022" - + "\030\n\020affected_cpe_uri\030\004 \001(\t\022\030\n\020affected_pa" - + "ckage\030\005 \001(\t\0223\n\026affected_version_start\030\006 " - + "\001(\0132\023.grafeas.v1.Version\0221\n\024affected_ver" - + "sion_end\030\007 \001(\0132\023.grafeas.v1.Version\022\025\n\rf" - + "ixed_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.Ve" - + "rsion\022\023\n\013is_obsolete\030\013 \001(\010\032\276\001\n\rWindowsDe" - + "tail\022\017\n\007cpe_uri\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\023\n\013d" - + "escription\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\01329.g" - + "rafeas.v1.VulnerabilityNote.WindowsDetai" - + "l.KnowledgeBase\032*\n\rKnowledgeBase\022\014\n\004name" - + "\030\001 \001(\t\022\013\n\003url\030\002 \001(\t\"\275\004\n\027VulnerabilityOcc" - + "urrence\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\022G\n\rpackage_issue\030\004 \003(\01320.grafeas.v1.Vu" - + "lnerabilityOccurrence.PackageIssue\022\031\n\021sh" - + "ort_description\030\005 \001(\t\022\030\n\020long_descriptio" - + "n\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\032\342\001\n\014PackageIssue\022\030\n\020affected_cpe_" - + "uri\030\001 \001(\t\022\030\n\020affected_package\030\002 \001(\t\022-\n\020a" - + "ffected_version\030\003 \001(\0132\023.grafeas.v1.Versi" - + "on\022\025\n\rfixed_cpe_uri\030\004 \001(\t\022\025\n\rfixed_packa" - + "ge\030\005 \001(\t\022*\n\rfixed_version\030\006 \001(\0132\023.grafea" - + "s.v1.Version\022\025\n\rfix_available\030\007 \001(\010*^\n\010S" - + "everity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\013\n\007MIN" - + "IMAL\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020\004\022\014\n" - + "\010CRITICAL\020\005BQ\n\rio.grafeas.v1P\001Z8google.g" - + "olang.org/genproto/googleapis/grafeas/v1" - + ";grafeas\242\002\003GRAb\006proto3" + + "s.v1\032\037google/protobuf/timestamp.proto\032\027g" + + "rafeas/v1/common.proto\032\025grafeas/v1/cvss." + + "proto\032\030grafeas/v1/package.proto\"\372\006\n\021Vuln" + + "erabilityNote\022\022\n\ncvss_score\030\001 \001(\002\022&\n\010sev" + + "erity\030\002 \001(\0162\024.grafeas.v1.Severity\0225\n\007det" + + "ails\030\003 \003(\0132$.grafeas.v1.VulnerabilityNot" + + "e.Detail\022#\n\007cvss_v3\030\004 \001(\0132\022.grafeas.v1.C" + + "VSSv3\022D\n\017windows_details\030\005 \003(\0132+.grafeas" + + ".v1.VulnerabilityNote.WindowsDetail\0226\n\022s" + + "ource_update_time\030\006 \001(\0132\032.google.protobu" + + "f.Timestamp\032\215\003\n\006Detail\022\025\n\rseverity_name\030" + + "\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\024\n\014package_ty" + + "pe\030\003 \001(\t\022\030\n\020affected_cpe_uri\030\004 \001(\t\022\030\n\020af" + + "fected_package\030\005 \001(\t\0223\n\026affected_version" + + "_start\030\006 \001(\0132\023.grafeas.v1.Version\0221\n\024aff" + + "ected_version_end\030\007 \001(\0132\023.grafeas.v1.Ver" + + "sion\022\025\n\rfixed_cpe_uri\030\010 \001(\t\022\025\n\rfixed_pac" + + "kage\030\t \001(\t\022*\n\rfixed_version\030\n \001(\0132\023.graf" + + "eas.v1.Version\022\023\n\013is_obsolete\030\013 \001(\010\0226\n\022s" + + "ource_update_time\030\014 \001(\0132\032.google.protobu" + + "f.Timestamp\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.Vulne" + + "rabilityNote.WindowsDetail.KnowledgeBase" + + "\032*\n\rKnowledgeBase\022\014\n\004name\030\001 \001(\t\022\013\n\003url\030\002" + + " \001(\t\"\275\004\n\027VulnerabilityOccurrence\022\014\n\004type" + + "\030\001 \001(\t\022&\n\010severity\030\002 \001(\0162\024.grafeas.v1.Se" + + "verity\022\022\n\ncvss_score\030\003 \001(\002\022G\n\rpackage_is" + + "sue\030\004 \003(\01320.grafeas.v1.VulnerabilityOccu" + + "rrence.PackageIssue\022\031\n\021short_description" + + "\030\005 \001(\t\022\030\n\020long_description\030\006 \001(\t\022,\n\014rela" + + "ted_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\032\342\001\n\014Pack" + + "ageIssue\022\030\n\020affected_cpe_uri\030\001 \001(\t\022\030\n\020af" + + "fected_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\rfix" + + "ed_version\030\006 \001(\0132\023.grafeas.v1.Version\022\025\n" + + "\rfix_available\030\007 \001(\010*^\n\010Severity\022\030\n\024SEVE" + + "RITY_UNSPECIFIED\020\000\022\013\n\007MINIMAL\020\001\022\007\n\003LOW\020\002" + + "\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020\004\022\014\n\010CRITICAL\020\005BQ\n\r" + + "io.grafeas.v1P\001Z8google.golang.org/genpr" + + "oto/googleapis/grafeas/v1;grafeas\242\002\003GRAb" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), io.grafeas.v1.Common.getDescriptor(), io.grafeas.v1.Cvss.getDescriptor(), io.grafeas.v1.Package.getDescriptor(), @@ -118,7 +123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_grafeas_v1_VulnerabilityNote_descriptor, new java.lang.String[] { - "CvssScore", "Severity", "Details", "CvssV3", "WindowsDetails", + "CvssScore", "Severity", "Details", "CvssV3", "WindowsDetails", "SourceUpdateTime", }); internal_static_grafeas_v1_VulnerabilityNote_Detail_descriptor = internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(0); @@ -137,6 +142,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FixedPackage", "FixedVersion", "IsObsolete", + "SourceUpdateTime", }); internal_static_grafeas_v1_VulnerabilityNote_WindowsDetail_descriptor = internal_static_grafeas_v1_VulnerabilityNote_descriptor.getNestedTypes().get(1); @@ -186,6 +192,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FixedVersion", "FixAvailable", }); + com.google.protobuf.TimestampProto.getDescriptor(); io.grafeas.v1.Common.getDescriptor(); io.grafeas.v1.Cvss.getDescriptor(); io.grafeas.v1.Package.getDescriptor(); diff --git a/src/main/java/io/grafeas/v1/VulnerabilityNote.java b/src/main/java/io/grafeas/v1/VulnerabilityNote.java index 7c21e839..beaddd3d 100644 --- a/src/main/java/io/grafeas/v1/VulnerabilityNote.java +++ b/src/main/java/io/grafeas/v1/VulnerabilityNote.java @@ -123,6 +123,21 @@ private VulnerabilityNote( io.grafeas.v1.VulnerabilityNote.WindowsDetail.parser(), extensionRegistry)); break; } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (sourceUpdateTime_ != null) { + subBuilder = sourceUpdateTime_.toBuilder(); + } + sourceUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceUpdateTime_); + sourceUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -513,6 +528,47 @@ public interface DetailOrBuilder * @return The isObsolete. */ boolean getIsObsolete(); + + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * + * @return Whether the sourceUpdateTime field is set. + */ + boolean hasSourceUpdateTime(); + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * + * @return The sourceUpdateTime. + */ + com.google.protobuf.Timestamp getSourceUpdateTime(); + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); } /** * @@ -670,6 +726,21 @@ private Detail( case 88: { isObsolete_ = input.readBool(); + break; + } + case 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (sourceUpdateTime_ != null) { + subBuilder = sourceUpdateTime_.toBuilder(); + } + sourceUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceUpdateTime_); + sourceUpdateTime_ = subBuilder.buildPartial(); + } + break; } default: @@ -1240,6 +1311,57 @@ public boolean getIsObsolete() { return isObsolete_; } + public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp sourceUpdateTime_; + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return sourceUpdateTime_ != null; + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + return sourceUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceUpdateTime_; + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + return getSourceUpdateTime(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1287,6 +1409,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (isObsolete_ != false) { output.writeBool(11, isObsolete_); } + if (sourceUpdateTime_ != null) { + output.writeMessage(12, getSourceUpdateTime()); + } unknownFields.writeTo(output); } @@ -1331,6 +1456,9 @@ public int getSerializedSize() { if (isObsolete_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, isObsolete_); } + if (sourceUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getSourceUpdateTime()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1366,6 +1494,10 @@ public boolean equals(final java.lang.Object obj) { if (!getFixedVersion().equals(other.getFixedVersion())) return false; } if (getIsObsolete() != other.getIsObsolete()) return false; + if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; + if (hasSourceUpdateTime()) { + if (!getSourceUpdateTime().equals(other.getSourceUpdateTime())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1405,6 +1537,10 @@ public int hashCode() { } hash = (37 * hash) + IS_OBSOLETE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsObsolete()); + if (hasSourceUpdateTime()) { + hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSourceUpdateTime().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1587,6 +1723,12 @@ public Builder clear() { } isObsolete_ = false; + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = null; + } else { + sourceUpdateTime_ = null; + sourceUpdateTimeBuilder_ = null; + } return this; } @@ -1637,6 +1779,11 @@ public io.grafeas.v1.VulnerabilityNote.Detail buildPartial() { result.fixedVersion_ = fixedVersionBuilder_.build(); } result.isObsolete_ = isObsolete_; + if (sourceUpdateTimeBuilder_ == null) { + result.sourceUpdateTime_ = sourceUpdateTime_; + } else { + result.sourceUpdateTime_ = sourceUpdateTimeBuilder_.build(); + } onBuilt(); return result; } @@ -1728,6 +1875,9 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote.Detail other) { if (other.getIsObsolete() != false) { setIsObsolete(other.getIsObsolete()); } + if (other.hasSourceUpdateTime()) { + mergeSourceUpdateTime(other.getSourceUpdateTime()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3246,6 +3396,209 @@ public Builder clearIsObsolete() { return this; } + private com.google.protobuf.Timestamp sourceUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + sourceUpdateTimeBuilder_; + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return sourceUpdateTimeBuilder_ != null || sourceUpdateTime_ != null; + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + * + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + return sourceUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceUpdateTime_; + } else { + return sourceUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceUpdateTime_ = value; + onChanged(); + } else { + sourceUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (sourceUpdateTime_ != null) { + sourceUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(sourceUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceUpdateTime_ = value; + } + onChanged(); + } else { + sourceUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public Builder clearSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = null; + onChanged(); + } else { + sourceUpdateTime_ = null; + sourceUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { + + onChanged(); + return getSourceUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + if (sourceUpdateTimeBuilder_ != null) { + return sourceUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return sourceUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceUpdateTime_; + } + } + /** + * + * + *
+       * The time this information was last changed at the source. This is an
+       * upstream timestamp from the underlying information source - e.g. Ubuntu
+       * security tracker.
+       * 
+ * + * .google.protobuf.Timestamp source_update_time = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getSourceUpdateTimeFieldBuilder() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSourceUpdateTime(), getParentForChildren(), isClean()); + sourceUpdateTime_ = null; + } + return sourceUpdateTimeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -6112,6 +6465,57 @@ public io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsO return windowsDetails_.get(index); } + public static final int SOURCE_UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp sourceUpdateTime_; + /** + * + * + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return sourceUpdateTime_ != null; + } + /** + * + * + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + return sourceUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceUpdateTime_; + } + /** + * + * + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + return getSourceUpdateTime(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -6141,6 +6545,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < windowsDetails_.size(); i++) { output.writeMessage(5, windowsDetails_.get(i)); } + if (sourceUpdateTime_ != null) { + output.writeMessage(6, getSourceUpdateTime()); + } unknownFields.writeTo(output); } @@ -6165,6 +6572,9 @@ public int getSerializedSize() { for (int i = 0; i < windowsDetails_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, windowsDetails_.get(i)); } + if (sourceUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSourceUpdateTime()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -6189,6 +6599,10 @@ public boolean equals(final java.lang.Object obj) { if (!getCvssV3().equals(other.getCvssV3())) return false; } if (!getWindowsDetailsList().equals(other.getWindowsDetailsList())) return false; + if (hasSourceUpdateTime() != other.hasSourceUpdateTime()) return false; + if (hasSourceUpdateTime()) { + if (!getSourceUpdateTime().equals(other.getSourceUpdateTime())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6216,6 +6630,10 @@ public int hashCode() { hash = (37 * hash) + WINDOWS_DETAILS_FIELD_NUMBER; hash = (53 * hash) + getWindowsDetailsList().hashCode(); } + if (hasSourceUpdateTime()) { + hash = (37 * hash) + SOURCE_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSourceUpdateTime().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -6383,6 +6801,12 @@ public Builder clear() { } else { windowsDetailsBuilder_.clear(); } + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = null; + } else { + sourceUpdateTime_ = null; + sourceUpdateTimeBuilder_ = null; + } return this; } @@ -6434,6 +6858,11 @@ public io.grafeas.v1.VulnerabilityNote buildPartial() { } else { result.windowsDetails_ = windowsDetailsBuilder_.build(); } + if (sourceUpdateTimeBuilder_ == null) { + result.sourceUpdateTime_ = sourceUpdateTime_; + } else { + result.sourceUpdateTime_ = sourceUpdateTimeBuilder_.build(); + } onBuilt(); return result; } @@ -6546,6 +6975,9 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityNote other) { } } } + if (other.hasSourceUpdateTime()) { + mergeSourceUpdateTime(other.getSourceUpdateTime()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -7651,6 +8083,209 @@ public io.grafeas.v1.VulnerabilityNote.WindowsDetail.Builder addWindowsDetailsBu return windowsDetailsBuilder_; } + private com.google.protobuf.Timestamp sourceUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + sourceUpdateTimeBuilder_; + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * + * @return Whether the sourceUpdateTime field is set. + */ + public boolean hasSourceUpdateTime() { + return sourceUpdateTimeBuilder_ != null || sourceUpdateTime_ != null; + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * + * @return The sourceUpdateTime. + */ + public com.google.protobuf.Timestamp getSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + return sourceUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceUpdateTime_; + } else { + return sourceUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceUpdateTime_ = value; + onChanged(); + } else { + sourceUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder setSourceUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + sourceUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder mergeSourceUpdateTime(com.google.protobuf.Timestamp value) { + if (sourceUpdateTimeBuilder_ == null) { + if (sourceUpdateTime_ != null) { + sourceUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(sourceUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceUpdateTime_ = value; + } + onChanged(); + } else { + sourceUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public Builder clearSourceUpdateTime() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTime_ = null; + onChanged(); + } else { + sourceUpdateTime_ = null; + sourceUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getSourceUpdateTimeBuilder() { + + onChanged(); + return getSourceUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder() { + if (sourceUpdateTimeBuilder_ != null) { + return sourceUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return sourceUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceUpdateTime_; + } + } + /** + * + * + *
+     * The time this information was last changed at the source. This is an
+     * upstream timestamp from the underlying information source - e.g. Ubuntu
+     * security tracker.
+     * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getSourceUpdateTimeFieldBuilder() { + if (sourceUpdateTimeBuilder_ == null) { + sourceUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSourceUpdateTime(), getParentForChildren(), isClean()); + sourceUpdateTime_ = null; + } + return sourceUpdateTimeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java b/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java index d256be74..86dd8877 100644 --- a/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java +++ b/src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java @@ -216,4 +216,45 @@ public interface VulnerabilityNoteOrBuilder * repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; */ io.grafeas.v1.VulnerabilityNote.WindowsDetailOrBuilder getWindowsDetailsOrBuilder(int index); + + /** + * + * + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * + * @return Whether the sourceUpdateTime field is set. + */ + boolean hasSourceUpdateTime(); + /** + * + * + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + * + * @return The sourceUpdateTime. + */ + com.google.protobuf.Timestamp getSourceUpdateTime(); + /** + * + * + *
+   * The time this information was last changed at the source. This is an
+   * upstream timestamp from the underlying information source - e.g. Ubuntu
+   * security tracker.
+   * 
+ * + * .google.protobuf.Timestamp source_update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getSourceUpdateTimeOrBuilder(); } diff --git a/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java b/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java index bd90cb94..0298a8a3 100644 --- a/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java +++ b/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java @@ -2544,8 +2544,7 @@ public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrlsOrBuilder(int index) { * *
    * The distro assigned severity for this vulnerability when it is available,
-   * and note provider assigned severity when distro has not yet assigned a
-   * severity for this vulnerability.
+   * otherwise this is the note provider assigned severity.
    * 
* * .grafeas.v1.Severity effective_severity = 8; @@ -2560,8 +2559,7 @@ public int getEffectiveSeverityValue() { * *
    * The distro assigned severity for this vulnerability when it is available,
-   * and note provider assigned severity when distro has not yet assigned a
-   * severity for this vulnerability.
+   * otherwise this is the note provider assigned severity.
    * 
* * .grafeas.v1.Severity effective_severity = 8; @@ -4306,8 +4304,7 @@ public java.util.List getRelatedUrlsBuilderLis * *
      * The distro assigned severity for this vulnerability when it is available,
-     * and note provider assigned severity when distro has not yet assigned a
-     * severity for this vulnerability.
+     * otherwise this is the note provider assigned severity.
      * 
* * .grafeas.v1.Severity effective_severity = 8; @@ -4322,8 +4319,7 @@ public int getEffectiveSeverityValue() { * *
      * The distro assigned severity for this vulnerability when it is available,
-     * and note provider assigned severity when distro has not yet assigned a
-     * severity for this vulnerability.
+     * otherwise this is the note provider assigned severity.
      * 
* * .grafeas.v1.Severity effective_severity = 8; @@ -4341,8 +4337,7 @@ public Builder setEffectiveSeverityValue(int value) { * *
      * The distro assigned severity for this vulnerability when it is available,
-     * and note provider assigned severity when distro has not yet assigned a
-     * severity for this vulnerability.
+     * otherwise this is the note provider assigned severity.
      * 
* * .grafeas.v1.Severity effective_severity = 8; @@ -4359,8 +4354,7 @@ public io.grafeas.v1.Severity getEffectiveSeverity() { * *
      * The distro assigned severity for this vulnerability when it is available,
-     * and note provider assigned severity when distro has not yet assigned a
-     * severity for this vulnerability.
+     * otherwise this is the note provider assigned severity.
      * 
* * .grafeas.v1.Severity effective_severity = 8; @@ -4382,8 +4376,7 @@ public Builder setEffectiveSeverity(io.grafeas.v1.Severity value) { * *
      * The distro assigned severity for this vulnerability when it is available,
-     * and note provider assigned severity when distro has not yet assigned a
-     * severity for this vulnerability.
+     * otherwise this is the note provider assigned severity.
      * 
* * .grafeas.v1.Severity effective_severity = 8; diff --git a/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java b/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java index 012d77f0..95735c3f 100644 --- a/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java +++ b/src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java @@ -254,8 +254,7 @@ public interface VulnerabilityOccurrenceOrBuilder * *
    * The distro assigned severity for this vulnerability when it is available,
-   * and note provider assigned severity when distro has not yet assigned a
-   * severity for this vulnerability.
+   * otherwise this is the note provider assigned severity.
    * 
* * .grafeas.v1.Severity effective_severity = 8; @@ -268,8 +267,7 @@ public interface VulnerabilityOccurrenceOrBuilder * *
    * The distro assigned severity for this vulnerability when it is available,
-   * and note provider assigned severity when distro has not yet assigned a
-   * severity for this vulnerability.
+   * otherwise this is the note provider assigned severity.
    * 
* * .grafeas.v1.Severity effective_severity = 8; diff --git a/src/main/java/io/grafeas/v1/WindowsUpdate.java b/src/main/java/io/grafeas/v1/WindowsUpdate.java new file mode 100644 index 00000000..5a9a98f0 --- /dev/null +++ b/src/main/java/io/grafeas/v1/WindowsUpdate.java @@ -0,0 +1,3898 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +/** + * + * + *
+ * Windows Update represents the metadata about the update for the Windows
+ * operating system. The fields in this message come from the Windows Update API
+ * documented at
+ * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
+ * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate} + */ +public final class WindowsUpdate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate) + WindowsUpdateOrBuilder { + private static final long serialVersionUID = 0L; + // Use WindowsUpdate.newBuilder() to construct. + private WindowsUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WindowsUpdate() { + title_ = ""; + description_ = ""; + categories_ = java.util.Collections.emptyList(); + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + supportUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WindowsUpdate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WindowsUpdate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + io.grafeas.v1.WindowsUpdate.Identity.Builder subBuilder = null; + if (identity_ != null) { + subBuilder = identity_.toBuilder(); + } + identity_ = + input.readMessage( + io.grafeas.v1.WindowsUpdate.Identity.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(identity_); + identity_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + title_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + categories_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + categories_.add( + input.readMessage( + io.grafeas.v1.WindowsUpdate.Category.parser(), extensionRegistry)); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + kbArticleIds_.add(s); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + supportUrl_ = s; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastPublishedTimestamp_ != null) { + subBuilder = lastPublishedTimestamp_.toBuilder(); + } + lastPublishedTimestamp_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastPublishedTimestamp_); + lastPublishedTimestamp_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); + } + + public interface IdentityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Identity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * + * @return The updateId. + */ + java.lang.String getUpdateId(); + /** + * + * + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * + * @return The bytes for updateId. + */ + com.google.protobuf.ByteString getUpdateIdBytes(); + + /** + * + * + *
+     * The revision number of the update.
+     * 
+ * + * int32 revision = 2; + * + * @return The revision. + */ + int getRevision(); + } + /** + * + * + *
+   * The unique identifier of the update.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} + */ + public static final class Identity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Identity) + IdentityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Identity.newBuilder() to construct. + private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Identity() { + updateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Identity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Identity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + updateId_ = s; + break; + } + case 16: + { + revision_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade + .internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Identity.class, + io.grafeas.v1.WindowsUpdate.Identity.Builder.class); + } + + public static final int UPDATE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object updateId_; + /** + * + * + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * + * @return The updateId. + */ + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + 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(); + updateId_ = s; + return s; + } + } + /** + * + * + *
+     * The revision independent identifier of the update.
+     * 
+ * + * string update_id = 1; + * + * @return The bytes for updateId. + */ + public com.google.protobuf.ByteString getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_FIELD_NUMBER = 2; + private int revision_; + /** + * + * + *
+     * The revision number of the update.
+     * 
+ * + * int32 revision = 2; + * + * @return The revision. + */ + public int getRevision() { + return revision_; + } + + 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 (!getUpdateIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, updateId_); + } + if (revision_ != 0) { + output.writeInt32(2, revision_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUpdateIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, updateId_); + } + if (revision_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, revision_); + } + size += unknownFields.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.WindowsUpdate.Identity)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate.Identity other = (io.grafeas.v1.WindowsUpdate.Identity) obj; + + if (!getUpdateId().equals(other.getUpdateId())) return false; + if (getRevision() != other.getRevision()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + UPDATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUpdateId().hashCode(); + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate.Identity 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.WindowsUpdate.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate.Identity 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.WindowsUpdate.Identity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.WindowsUpdate.Identity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate.Identity 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.WindowsUpdate.Identity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate.Identity 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.WindowsUpdate.Identity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate.Identity 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.WindowsUpdate.Identity 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; + } + /** + * + * + *
+     * The unique identifier of the update.
+     * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Identity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Identity) + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade + .internal_static_grafeas_v1_WindowsUpdate_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Identity.class, + io.grafeas.v1.WindowsUpdate.Identity.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.Identity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + updateId_ = ""; + + revision_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Identity_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity build() { + io.grafeas.v1.WindowsUpdate.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Identity buildPartial() { + io.grafeas.v1.WindowsUpdate.Identity result = + new io.grafeas.v1.WindowsUpdate.Identity(this); + result.updateId_ = updateId_; + result.revision_ = revision_; + onBuilt(); + return result; + } + + @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.WindowsUpdate.Identity) { + return mergeFrom((io.grafeas.v1.WindowsUpdate.Identity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Identity other) { + if (other == io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance()) return this; + if (!other.getUpdateId().isEmpty()) { + updateId_ = other.updateId_; + onChanged(); + } + if (other.getRevision() != 0) { + setRevision(other.getRevision()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + io.grafeas.v1.WindowsUpdate.Identity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.WindowsUpdate.Identity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object updateId_ = ""; + /** + * + * + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * + * @return The updateId. + */ + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * + * @return The bytes for updateId. + */ + public com.google.protobuf.ByteString getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * + * @param value The updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + updateId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearUpdateId() { + + updateId_ = getDefaultInstance().getUpdateId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The revision independent identifier of the update.
+       * 
+ * + * string update_id = 1; + * + * @param value The bytes for updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + updateId_ = value; + onChanged(); + return this; + } + + private int revision_; + /** + * + * + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * + * @return The revision. + */ + public int getRevision() { + return revision_; + } + /** + * + * + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision(int value) { + + revision_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The revision number of the update.
+       * 
+ * + * int32 revision = 2; + * + * @return This builder for chaining. + */ + public Builder clearRevision() { + + revision_ = 0; + 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.WindowsUpdate.Identity) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Identity) + private static final io.grafeas.v1.WindowsUpdate.Identity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Identity(); + } + + public static io.grafeas.v1.WindowsUpdate.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Identity(input, extensionRegistry); + } + }; + + 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.WindowsUpdate.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate.Category) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * + * @return The categoryId. + */ + java.lang.String getCategoryId(); + /** + * + * + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * + * @return The bytes for categoryId. + */ + com.google.protobuf.ByteString getCategoryIdBytes(); + + /** + * + * + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * The category to which the update belongs.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} + */ + public static final class Category extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:grafeas.v1.WindowsUpdate.Category) + CategoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Category.newBuilder() to construct. + private Category(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Category() { + categoryId_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Category(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Category( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + categoryId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade + .internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Category.class, + io.grafeas.v1.WindowsUpdate.Category.Builder.class); + } + + public static final int CATEGORY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object categoryId_; + /** + * + * + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * + * @return The categoryId. + */ + public java.lang.String getCategoryId() { + java.lang.Object ref = categoryId_; + 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(); + categoryId_ = s; + return s; + } + } + /** + * + * + *
+     * The identifier of the category.
+     * 
+ * + * string category_id = 1; + * + * @return The bytes for categoryId. + */ + public com.google.protobuf.ByteString getCategoryIdBytes() { + java.lang.Object ref = categoryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + categoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + 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; + } + } + /** + * + * + *
+     * The localized name of the category.
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + 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; + } + } + + 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 (!getCategoryIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categoryId_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCategoryIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, categoryId_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + size += unknownFields.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.WindowsUpdate.Category)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate.Category other = (io.grafeas.v1.WindowsUpdate.Category) obj; + + if (!getCategoryId().equals(other.getCategoryId())) return false; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CATEGORY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCategoryId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate.Category parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate.Category 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.WindowsUpdate.Category parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate.Category 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.WindowsUpdate.Category parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate.Category parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.WindowsUpdate.Category parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate.Category 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.WindowsUpdate.Category parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate.Category 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.WindowsUpdate.Category parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate.Category 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.WindowsUpdate.Category 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; + } + /** + * + * + *
+     * The category to which the update belongs.
+     * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate.Category} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate.Category) + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade + .internal_static_grafeas_v1_WindowsUpdate_Category_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.Category.class, + io.grafeas.v1.WindowsUpdate.Category.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.Category.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + categoryId_ = ""; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_Category_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category build() { + io.grafeas.v1.WindowsUpdate.Category result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate.Category buildPartial() { + io.grafeas.v1.WindowsUpdate.Category result = + new io.grafeas.v1.WindowsUpdate.Category(this); + result.categoryId_ = categoryId_; + result.name_ = name_; + onBuilt(); + return result; + } + + @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.WindowsUpdate.Category) { + return mergeFrom((io.grafeas.v1.WindowsUpdate.Category) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate.Category other) { + if (other == io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()) return this; + if (!other.getCategoryId().isEmpty()) { + categoryId_ = other.categoryId_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + io.grafeas.v1.WindowsUpdate.Category parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.WindowsUpdate.Category) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object categoryId_ = ""; + /** + * + * + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * + * @return The categoryId. + */ + public java.lang.String getCategoryId() { + java.lang.Object ref = categoryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + categoryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * + * @return The bytes for categoryId. + */ + public com.google.protobuf.ByteString getCategoryIdBytes() { + java.lang.Object ref = categoryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + categoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * + * @param value The categoryId to set. + * @return This builder for chaining. + */ + public Builder setCategoryId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + categoryId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearCategoryId() { + + categoryId_ = getDefaultInstance().getCategoryId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The identifier of the category.
+       * 
+ * + * string category_id = 1; + * + * @param value The bytes for categoryId to set. + * @return This builder for chaining. + */ + public Builder setCategoryIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + categoryId_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The localized name of the category.
+       * 
+ * + * string name = 2; + * + * @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; + 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.WindowsUpdate.Category) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate.Category) + private static final io.grafeas.v1.WindowsUpdate.Category DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate.Category(); + } + + public static io.grafeas.v1.WindowsUpdate.Category getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Category parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Category(input, extensionRegistry); + } + }; + + 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.WindowsUpdate.Category getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int IDENTITY_FIELD_NUMBER = 1; + private io.grafeas.v1.WindowsUpdate.Identity identity_; + /** + * + * + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * + * @return Whether the identity field is set. + */ + public boolean hasIdentity() { + return identity_ != null; + } + /** + * + * + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * + * @return The identity. + */ + public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { + return identity_ == null + ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() + : identity_; + } + /** + * + * + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { + return getIdentity(); + } + + public static final int TITLE_FIELD_NUMBER = 2; + private volatile java.lang.Object title_; + /** + * + * + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + 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 localized title of the update.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + 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 DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORIES_FIELD_NUMBER = 4; + private java.util.List categories_; + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List getCategoriesList() { + return categories_; + } + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List + getCategoriesOrBuilderList() { + return categories_; + } + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public int getCategoriesCount() { + return categories_.size(); + } + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { + return categories_.get(index); + } + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder(int index) { + return categories_.get(index); + } + + public static final int KB_ARTICLE_IDS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList kbArticleIds_; + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList getKbArticleIdsList() { + return kbArticleIds_; + } + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + + public static final int SUPPORT_URL_FIELD_NUMBER = 6; + private volatile java.lang.Object supportUrl_; + /** + * + * + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * + * @return The supportUrl. + */ + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + 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(); + supportUrl_ = s; + return s; + } + } + /** + * + * + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * + * @return The bytes for supportUrl. + */ + public com.google.protobuf.ByteString getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp lastPublishedTimestamp_; + /** + * + * + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * + * @return Whether the lastPublishedTimestamp field is set. + */ + public boolean hasLastPublishedTimestamp() { + return lastPublishedTimestamp_ != null; + } + /** + * + * + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * + * @return The lastPublishedTimestamp. + */ + public com.google.protobuf.Timestamp getLastPublishedTimestamp() { + return lastPublishedTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastPublishedTimestamp_; + } + /** + * + * + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { + return getLastPublishedTimestamp(); + } + + 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 (identity_ != null) { + output.writeMessage(1, getIdentity()); + } + if (!getTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < categories_.size(); i++) { + output.writeMessage(4, categories_.get(i)); + } + for (int i = 0; i < kbArticleIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kbArticleIds_.getRaw(i)); + } + if (!getSupportUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, supportUrl_); + } + if (lastPublishedTimestamp_ != null) { + output.writeMessage(7, getLastPublishedTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (identity_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIdentity()); + } + if (!getTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < categories_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, categories_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < kbArticleIds_.size(); i++) { + dataSize += computeStringSizeNoTag(kbArticleIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getKbArticleIdsList().size(); + } + if (!getSupportUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, supportUrl_); + } + if (lastPublishedTimestamp_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLastPublishedTimestamp()); + } + size += unknownFields.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.WindowsUpdate)) { + return super.equals(obj); + } + io.grafeas.v1.WindowsUpdate other = (io.grafeas.v1.WindowsUpdate) obj; + + if (hasIdentity() != other.hasIdentity()) return false; + if (hasIdentity()) { + if (!getIdentity().equals(other.getIdentity())) return false; + } + if (!getTitle().equals(other.getTitle())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getCategoriesList().equals(other.getCategoriesList())) return false; + if (!getKbArticleIdsList().equals(other.getKbArticleIdsList())) return false; + if (!getSupportUrl().equals(other.getSupportUrl())) return false; + if (hasLastPublishedTimestamp() != other.hasLastPublishedTimestamp()) return false; + if (hasLastPublishedTimestamp()) { + if (!getLastPublishedTimestamp().equals(other.getLastPublishedTimestamp())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIdentity()) { + hash = (37 * hash) + IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getIdentity().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getCategoriesCount() > 0) { + hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoriesList().hashCode(); + } + if (getKbArticleIdsCount() > 0) { + hash = (37 * hash) + KB_ARTICLE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getKbArticleIdsList().hashCode(); + } + hash = (37 * hash) + SUPPORT_URL_FIELD_NUMBER; + hash = (53 * hash) + getSupportUrl().hashCode(); + if (hasLastPublishedTimestamp()) { + hash = (37 * hash) + LAST_PUBLISHED_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getLastPublishedTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grafeas.v1.WindowsUpdate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate 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.WindowsUpdate parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate 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.WindowsUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static io.grafeas.v1.WindowsUpdate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static io.grafeas.v1.WindowsUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate 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.WindowsUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate 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.WindowsUpdate parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static io.grafeas.v1.WindowsUpdate 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.WindowsUpdate 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; + } + /** + * + * + *
+   * Windows Update represents the metadata about the update for the Windows
+   * operating system. The fields in this message come from the Windows Update API
+   * documented at
+   * https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
+   * 
+ * + * Protobuf type {@code grafeas.v1.WindowsUpdate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:grafeas.v1.WindowsUpdate) + io.grafeas.v1.WindowsUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grafeas.v1.WindowsUpdate.class, io.grafeas.v1.WindowsUpdate.Builder.class); + } + + // Construct using io.grafeas.v1.WindowsUpdate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCategoriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (identityBuilder_ == null) { + identity_ = null; + } else { + identity_ = null; + identityBuilder_ = null; + } + title_ = ""; + + description_ = ""; + + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + categoriesBuilder_.clear(); + } + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + supportUrl_ = ""; + + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestamp_ = null; + } else { + lastPublishedTimestamp_ = null; + lastPublishedTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_WindowsUpdate_descriptor; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate getDefaultInstanceForType() { + return io.grafeas.v1.WindowsUpdate.getDefaultInstance(); + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate build() { + io.grafeas.v1.WindowsUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.grafeas.v1.WindowsUpdate buildPartial() { + io.grafeas.v1.WindowsUpdate result = new io.grafeas.v1.WindowsUpdate(this); + int from_bitField0_ = bitField0_; + if (identityBuilder_ == null) { + result.identity_ = identity_; + } else { + result.identity_ = identityBuilder_.build(); + } + result.title_ = title_; + result.description_ = description_; + if (categoriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.categories_ = categories_; + } else { + result.categories_ = categoriesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.kbArticleIds_ = kbArticleIds_; + result.supportUrl_ = supportUrl_; + if (lastPublishedTimestampBuilder_ == null) { + result.lastPublishedTimestamp_ = lastPublishedTimestamp_; + } else { + result.lastPublishedTimestamp_ = lastPublishedTimestampBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.WindowsUpdate) { + return mergeFrom((io.grafeas.v1.WindowsUpdate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grafeas.v1.WindowsUpdate other) { + if (other == io.grafeas.v1.WindowsUpdate.getDefaultInstance()) return this; + if (other.hasIdentity()) { + mergeIdentity(other.getIdentity()); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (categoriesBuilder_ == null) { + if (!other.categories_.isEmpty()) { + if (categories_.isEmpty()) { + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCategoriesIsMutable(); + categories_.addAll(other.categories_); + } + onChanged(); + } + } else { + if (!other.categories_.isEmpty()) { + if (categoriesBuilder_.isEmpty()) { + categoriesBuilder_.dispose(); + categoriesBuilder_ = null; + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000001); + categoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCategoriesFieldBuilder() + : null; + } else { + categoriesBuilder_.addAllMessages(other.categories_); + } + } + } + if (!other.kbArticleIds_.isEmpty()) { + if (kbArticleIds_.isEmpty()) { + kbArticleIds_ = other.kbArticleIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureKbArticleIdsIsMutable(); + kbArticleIds_.addAll(other.kbArticleIds_); + } + onChanged(); + } + if (!other.getSupportUrl().isEmpty()) { + supportUrl_ = other.supportUrl_; + onChanged(); + } + if (other.hasLastPublishedTimestamp()) { + mergeLastPublishedTimestamp(other.getLastPublishedTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + io.grafeas.v1.WindowsUpdate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.WindowsUpdate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private io.grafeas.v1.WindowsUpdate.Identity identity_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, + io.grafeas.v1.WindowsUpdate.Identity.Builder, + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> + identityBuilder_; + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * + * @return Whether the identity field is set. + */ + public boolean hasIdentity() { + return identityBuilder_ != null || identity_ != null; + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * + * @return The identity. + */ + public io.grafeas.v1.WindowsUpdate.Identity getIdentity() { + if (identityBuilder_ == null) { + return identity_ == null + ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() + : identity_; + } else { + return identityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder setIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { + if (identityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identity_ = value; + onChanged(); + } else { + identityBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder setIdentity(io.grafeas.v1.WindowsUpdate.Identity.Builder builderForValue) { + if (identityBuilder_ == null) { + identity_ = builderForValue.build(); + onChanged(); + } else { + identityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder mergeIdentity(io.grafeas.v1.WindowsUpdate.Identity value) { + if (identityBuilder_ == null) { + if (identity_ != null) { + identity_ = + io.grafeas.v1.WindowsUpdate.Identity.newBuilder(identity_) + .mergeFrom(value) + .buildPartial(); + } else { + identity_ = value; + } + onChanged(); + } else { + identityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public Builder clearIdentity() { + if (identityBuilder_ == null) { + identity_ = null; + onChanged(); + } else { + identity_ = null; + identityBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public io.grafeas.v1.WindowsUpdate.Identity.Builder getIdentityBuilder() { + + onChanged(); + return getIdentityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + public io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder() { + if (identityBuilder_ != null) { + return identityBuilder_.getMessageOrBuilder(); + } else { + return identity_ == null + ? io.grafeas.v1.WindowsUpdate.Identity.getDefaultInstance() + : identity_; + } + } + /** + * + * + *
+     * Required - The unique identifier for the update.
+     * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, + io.grafeas.v1.WindowsUpdate.Identity.Builder, + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder> + getIdentityFieldBuilder() { + if (identityBuilder_ == null) { + identityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Identity, + io.grafeas.v1.WindowsUpdate.Identity.Builder, + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder>( + getIdentity(), getParentForChildren(), isClean()); + identity_ = null; + } + return identityBuilder_; + } + + private java.lang.Object title_ = ""; + /** + * + * + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * + * @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 localized title of the update.
+     * 
+ * + * string title = 2; + * + * @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 localized title of the update.
+     * 
+ * + * string title = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + + title_ = getDefaultInstance().getTitle(); + onChanged(); + return this; + } + /** + * + * + *
+     * The localized title of the update.
+     * 
+ * + * string title = 2; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * The localized description of the update.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.util.List categories_ = + java.util.Collections.emptyList(); + + private void ensureCategoriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + categories_ = new java.util.ArrayList(categories_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, + io.grafeas.v1.WindowsUpdate.Category.Builder, + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> + categoriesBuilder_; + + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List getCategoriesList() { + if (categoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(categories_); + } else { + return categoriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public int getCategoriesCount() { + if (categoriesBuilder_ == null) { + return categories_.size(); + } else { + return categoriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category getCategories(int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); + } else { + return categoriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder setCategories(int index, io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.set(index, value); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder setCategories( + int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.set(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories(io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(value); + onChanged(); + } else { + categoriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories(int index, io.grafeas.v1.WindowsUpdate.Category value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(index, value); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories(io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addCategories( + int index, io.grafeas.v1.WindowsUpdate.Category.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder addAllCategories( + java.lang.Iterable values) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, categories_); + onChanged(); + } else { + categoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder clearCategories() { + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + categoriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public Builder removeCategories(int index) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.remove(index); + onChanged(); + } else { + categoriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder getCategoriesBuilder(int index) { + return getCategoriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder(int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); + } else { + return categoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List + getCategoriesOrBuilderList() { + if (categoriesBuilder_ != null) { + return categoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(categories_); + } + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder() { + return getCategoriesFieldBuilder() + .addBuilder(io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public io.grafeas.v1.WindowsUpdate.Category.Builder addCategoriesBuilder(int index) { + return getCategoriesFieldBuilder() + .addBuilder(index, io.grafeas.v1.WindowsUpdate.Category.getDefaultInstance()); + } + /** + * + * + *
+     * The list of categories to which the update belongs.
+     * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + public java.util.List getCategoriesBuilderList() { + return getCategoriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, + io.grafeas.v1.WindowsUpdate.Category.Builder, + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder> + getCategoriesFieldBuilder() { + if (categoriesBuilder_ == null) { + categoriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + io.grafeas.v1.WindowsUpdate.Category, + io.grafeas.v1.WindowsUpdate.Category.Builder, + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder>( + categories_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + categories_ = null; + } + return categoriesBuilder_; + } + + private com.google.protobuf.LazyStringList kbArticleIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureKbArticleIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(kbArticleIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList getKbArticleIdsList() { + return kbArticleIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @param index The index to set the value at. + * @param value The kbArticleIds to set. + * @return This builder for chaining. + */ + public Builder setKbArticleIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @param value The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @param values The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addAllKbArticleIds(java.lang.Iterable values) { + ensureKbArticleIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kbArticleIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @return This builder for chaining. + */ + public Builder clearKbArticleIds() { + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The Microsoft Knowledge Base article IDs that are associated with the
+     * update.
+     * 
+ * + * repeated string kb_article_ids = 5; + * + * @param value The bytes of the kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object supportUrl_ = ""; + /** + * + * + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * + * @return The supportUrl. + */ + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + supportUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * + * @return The bytes for supportUrl. + */ + public com.google.protobuf.ByteString getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * + * @param value The supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + supportUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * + * @return This builder for chaining. + */ + public Builder clearSupportUrl() { + + supportUrl_ = getDefaultInstance().getSupportUrl(); + onChanged(); + return this; + } + /** + * + * + *
+     * The hyperlink to the support information for the update.
+     * 
+ * + * string support_url = 6; + * + * @param value The bytes for supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + supportUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastPublishedTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastPublishedTimestampBuilder_; + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * + * @return Whether the lastPublishedTimestamp field is set. + */ + public boolean hasLastPublishedTimestamp() { + return lastPublishedTimestampBuilder_ != null || lastPublishedTimestamp_ != null; + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * + * @return The lastPublishedTimestamp. + */ + public com.google.protobuf.Timestamp getLastPublishedTimestamp() { + if (lastPublishedTimestampBuilder_ == null) { + return lastPublishedTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastPublishedTimestamp_; + } else { + return lastPublishedTimestampBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder setLastPublishedTimestamp(com.google.protobuf.Timestamp value) { + if (lastPublishedTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastPublishedTimestamp_ = value; + onChanged(); + } else { + lastPublishedTimestampBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder setLastPublishedTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestamp_ = builderForValue.build(); + onChanged(); + } else { + lastPublishedTimestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder mergeLastPublishedTimestamp(com.google.protobuf.Timestamp value) { + if (lastPublishedTimestampBuilder_ == null) { + if (lastPublishedTimestamp_ != null) { + lastPublishedTimestamp_ = + com.google.protobuf.Timestamp.newBuilder(lastPublishedTimestamp_) + .mergeFrom(value) + .buildPartial(); + } else { + lastPublishedTimestamp_ = value; + } + onChanged(); + } else { + lastPublishedTimestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public Builder clearLastPublishedTimestamp() { + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestamp_ = null; + onChanged(); + } else { + lastPublishedTimestamp_ = null; + lastPublishedTimestampBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public com.google.protobuf.Timestamp.Builder getLastPublishedTimestampBuilder() { + + onChanged(); + return getLastPublishedTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + public com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder() { + if (lastPublishedTimestampBuilder_ != null) { + return lastPublishedTimestampBuilder_.getMessageOrBuilder(); + } else { + return lastPublishedTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastPublishedTimestamp_; + } + } + /** + * + * + *
+     * The last published timestamp of the update.
+     * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastPublishedTimestampFieldBuilder() { + if (lastPublishedTimestampBuilder_ == null) { + lastPublishedTimestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastPublishedTimestamp(), getParentForChildren(), isClean()); + lastPublishedTimestamp_ = null; + } + return lastPublishedTimestampBuilder_; + } + + @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.WindowsUpdate) + } + + // @@protoc_insertion_point(class_scope:grafeas.v1.WindowsUpdate) + private static final io.grafeas.v1.WindowsUpdate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new io.grafeas.v1.WindowsUpdate(); + } + + public static io.grafeas.v1.WindowsUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsUpdate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WindowsUpdate(input, extensionRegistry); + } + }; + + 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.WindowsUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java b/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java new file mode 100644 index 00000000..d3559f3e --- /dev/null +++ b/src/main/java/io/grafeas/v1/WindowsUpdateOrBuilder.java @@ -0,0 +1,278 @@ +/* + * 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/upgrade.proto + +package io.grafeas.v1; + +public interface WindowsUpdateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:grafeas.v1.WindowsUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * + * @return Whether the identity field is set. + */ + boolean hasIdentity(); + /** + * + * + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + * + * @return The identity. + */ + io.grafeas.v1.WindowsUpdate.Identity getIdentity(); + /** + * + * + *
+   * Required - The unique identifier for the update.
+   * 
+ * + * .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + io.grafeas.v1.WindowsUpdate.IdentityOrBuilder getIdentityOrBuilder(); + + /** + * + * + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * The localized title of the update.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The localized description of the update.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + java.util.List getCategoriesList(); + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + io.grafeas.v1.WindowsUpdate.Category getCategories(int index); + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + int getCategoriesCount(); + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + java.util.List + getCategoriesOrBuilderList(); + /** + * + * + *
+   * The list of categories to which the update belongs.
+   * 
+ * + * repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + io.grafeas.v1.WindowsUpdate.CategoryOrBuilder getCategoriesOrBuilder(int index); + + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @return A list containing the kbArticleIds. + */ + java.util.List getKbArticleIdsList(); + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @return The count of kbArticleIds. + */ + int getKbArticleIdsCount(); + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + java.lang.String getKbArticleIds(int index); + /** + * + * + *
+   * The Microsoft Knowledge Base article IDs that are associated with the
+   * update.
+   * 
+ * + * repeated string kb_article_ids = 5; + * + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + com.google.protobuf.ByteString getKbArticleIdsBytes(int index); + + /** + * + * + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * + * @return The supportUrl. + */ + java.lang.String getSupportUrl(); + /** + * + * + *
+   * The hyperlink to the support information for the update.
+   * 
+ * + * string support_url = 6; + * + * @return The bytes for supportUrl. + */ + com.google.protobuf.ByteString getSupportUrlBytes(); + + /** + * + * + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * + * @return Whether the lastPublishedTimestamp field is set. + */ + boolean hasLastPublishedTimestamp(); + /** + * + * + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + * + * @return The lastPublishedTimestamp. + */ + com.google.protobuf.Timestamp getLastPublishedTimestamp(); + /** + * + * + *
+   * The last published timestamp of the update.
+   * 
+ * + * .google.protobuf.Timestamp last_published_timestamp = 7; + */ + com.google.protobuf.TimestampOrBuilder getLastPublishedTimestampOrBuilder(); +} diff --git a/src/main/proto/grafeas/v1/common.proto b/src/main/proto/grafeas/v1/common.proto index 846948a5..db780bb6 100644 --- a/src/main/proto/grafeas/v1/common.proto +++ b/src/main/proto/grafeas/v1/common.proto @@ -39,6 +39,8 @@ enum NoteKind { DISCOVERY = 6; // This represents a logical "role" that can attest to artifacts. ATTESTATION = 7; + // This represents an available package upgrade. + UPGRADE = 8; } // Metadata for any related URL information. diff --git a/src/main/proto/grafeas/v1/discovery.proto b/src/main/proto/grafeas/v1/discovery.proto index ba8034d3..e0799255 100644 --- a/src/main/proto/grafeas/v1/discovery.proto +++ b/src/main/proto/grafeas/v1/discovery.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package grafeas.v1; +import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "grafeas/v1/common.proto"; @@ -73,4 +74,10 @@ message DiscoveryOccurrence { // details to show to the user. The LocalizedMessage is output only and // populated by the API. google.rpc.Status analysis_status_error = 3; + + // The CPE of the resource being scanned. + string cpe = 4; + + // The last time this resource was scanned. + google.protobuf.Timestamp last_scan_time = 5; } diff --git a/src/main/proto/grafeas/v1/grafeas.proto b/src/main/proto/grafeas/v1/grafeas.proto index 1364b2aa..fdb26bcb 100644 --- a/src/main/proto/grafeas/v1/grafeas.proto +++ b/src/main/proto/grafeas/v1/grafeas.proto @@ -17,6 +17,9 @@ syntax = "proto3"; package grafeas.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -27,7 +30,7 @@ import "grafeas/v1/deployment.proto"; import "grafeas/v1/discovery.proto"; import "grafeas/v1/image.proto"; import "grafeas/v1/package.proto"; -import "grafeas/v1/provenance.proto"; +import "grafeas/v1/upgrade.proto"; import "grafeas/v1/vulnerability.proto"; option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas"; @@ -55,6 +58,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{name=projects/*/occurrences/*}" }; + option (google.api.method_signature) = "name"; } // Lists occurrences for the specified project. @@ -63,6 +67,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{parent=projects/*}/occurrences" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes the specified occurrence. For example, use this method to delete an @@ -73,6 +78,7 @@ service Grafeas { option (google.api.http) = { delete: "/v1/{name=projects/*/occurrences/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new occurrence. @@ -81,6 +87,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/occurrences" body: "occurrence" }; + option (google.api.method_signature) = "parent,occurrence"; } // Creates new occurrences in batch. @@ -90,6 +97,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/occurrences:batchCreate" body: "*" }; + option (google.api.method_signature) = "parent,occurrences"; } // Updates the specified occurrence. @@ -98,6 +106,7 @@ service Grafeas { patch: "/v1/{name=projects/*/occurrences/*}" body: "occurrence" }; + option (google.api.method_signature) = "name,occurrence,update_mask"; } // Gets the note attached to the specified occurrence. Consumer projects can @@ -106,6 +115,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{name=projects/*/occurrences/*}/notes" }; + option (google.api.method_signature) = "name"; } // Gets the specified note. @@ -113,6 +123,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{name=projects/*/notes/*}" }; + option (google.api.method_signature) = "name"; } // Lists notes for the specified project. @@ -120,6 +131,7 @@ service Grafeas { option (google.api.http) = { get: "/v1/{parent=projects/*}/notes" }; + option (google.api.method_signature) = "parent,filter"; } // Deletes the specified note. @@ -127,6 +139,7 @@ service Grafeas { option (google.api.http) = { delete: "/v1/{name=projects/*/notes/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new note. @@ -135,6 +148,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/notes" body: "note" }; + option (google.api.method_signature) = "parent,note_id,note"; } // Creates new notes in batch. @@ -144,6 +158,7 @@ service Grafeas { post: "/v1/{parent=projects/*}/notes:batchCreate" body: "*" }; + option (google.api.method_signature) = "parent,notes"; } // Updates the specified note. @@ -152,6 +167,7 @@ service Grafeas { patch: "/v1/{name=projects/*/notes/*}" body: "note" }; + option (google.api.method_signature) = "name,note,update_mask"; } // Lists occurrences referencing the specified note. Provider projects can use @@ -162,11 +178,17 @@ service Grafeas { option (google.api.http) = { get: "/v1/{name=projects/*/notes/*}/occurrences" }; + option (google.api.method_signature) = "name,filter"; } } // An instance of an analysis type that has been found on a resource. message Occurrence { + option (google.api.resource) = { + type: "grafeas.io/Occurrence" + pattern: "projects/{project}/occurrences/{occurrence}" + }; + // Output only. The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. string name = 1; @@ -212,11 +234,18 @@ message Occurrence { grafeas.v1.DiscoveryOccurrence discovery = 13; // Describes an attestation of an artifact. grafeas.v1.AttestationOccurrence attestation = 14; + // Describes an available package upgrade on the linked resource. + grafeas.v1.UpgradeOccurrence upgrade = 15; } } // A type of analysis that can be done for a resource. message Note { + option (google.api.resource) = { + type: "grafeas.io/Note" + pattern: "projects/{project}/notes/{note}" + }; + // Output only. The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. string name = 1; @@ -264,6 +293,8 @@ message Note { grafeas.v1.DiscoveryNote discovery = 15; // A note describing an attestation role. grafeas.v1.AttestationNote attestation = 16; + // A note describing available package upgrades. + grafeas.v1.UpgradeNote upgrade = 17; } } @@ -271,14 +302,21 @@ message Note { message GetOccurrenceRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; } // Request to list occurrences. message ListOccurrencesRequest { // The name of the project to list occurrences for in the form of // `projects/[PROJECT_ID]`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = + "cloudresourcemanager.googleapis.com/Project" + ]; // The filter expression. string filter = 2; @@ -301,29 +339,39 @@ message ListOccurrencesResponse { string next_page_token = 2; } -// Request to delete a occurrence. +// Request to delete an occurrence. message DeleteOccurrenceRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; } // Request to create a new occurrence. message CreateOccurrenceRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the occurrence is to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = + "cloudresourcemanager.googleapis.com/Project" + ]; // The occurrence to create. - Occurrence occurrence = 2; + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; } // Request to update an occurrence. message UpdateOccurrenceRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; // The updated occurrence. - Occurrence occurrence = 2; + Occurrence occurrence = 2 [(google.api.field_behavior) = REQUIRED]; // The fields to update. google.protobuf.FieldMask update_mask = 3; } @@ -332,21 +380,31 @@ message UpdateOccurrenceRequest { message GetNoteRequest { // The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; } // Request to get the note to which the specified occurrence is attached. message GetOccurrenceNoteRequest { // The name of the occurrence in the form of // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Occurrence" + ]; } // Request to list notes. message ListNotesRequest { // The name of the project to list notes for in the form of // `projects/[PROJECT_ID]`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = + "cloudresourcemanager.googleapis.com/Project" + ]; // The filter expression. string filter = 2; @@ -373,27 +431,37 @@ message ListNotesResponse { message DeleteNoteRequest { // The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; } // Request to create a new note. message CreateNoteRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the note is to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = + "cloudresourcemanager.googleapis.com/Project" + ]; // The ID to use for this note. - string note_id = 2; + string note_id = 2 [(google.api.field_behavior) = REQUIRED]; // The note to create. - Note note = 3; + Note note = 3 [(google.api.field_behavior) = REQUIRED]; } // Request to update a note. message UpdateNoteRequest { // The name of the note in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; // The updated note. - Note note = 2; + Note note = 2 [(google.api.field_behavior) = REQUIRED]; // The fields to update. google.protobuf.FieldMask update_mask = 3; } @@ -402,7 +470,10 @@ message UpdateNoteRequest { message ListNoteOccurrencesRequest { // The name of the note to list occurrences for in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "grafeas.io/Note" + ]; // The filter expression. string filter = 2; // Number of occurrences to return in the list. @@ -423,10 +494,14 @@ message ListNoteOccurrencesResponse { message BatchCreateNotesRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the notes are to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = + "cloudresourcemanager.googleapis.com/Project" + ]; // The notes to create. Max allowed length is 1000. - map notes = 2; + map notes = 2 [(google.api.field_behavior) = REQUIRED]; } // Response for creating notes in batch. @@ -439,10 +514,14 @@ message BatchCreateNotesResponse { message BatchCreateOccurrencesRequest { // The name of the project in the form of `projects/[PROJECT_ID]`, under which // the occurrences are to be created. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = + "cloudresourcemanager.googleapis.com/Project" + ]; // The occurrences to create. Max allowed length is 1000. - repeated Occurrence occurrences = 2; + repeated Occurrence occurrences = 2 [(google.api.field_behavior) = REQUIRED]; } // Response for creating occurrences in batch. diff --git a/src/main/proto/grafeas/v1/upgrade.proto b/src/main/proto/grafeas/v1/upgrade.proto new file mode 100644 index 00000000..89d38929 --- /dev/null +++ b/src/main/proto/grafeas/v1/upgrade.proto @@ -0,0 +1,114 @@ +// 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 +// +// 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 "google/protobuf/timestamp.proto"; +import "grafeas/v1/package.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"; + +// An Upgrade Note represents a potential upgrade of a package to a given +// version. For each package version combination (i.e. bash 4.0, bash 4.1, +// bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field +// represents the information related to the update. +message UpgradeNote { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in machine + human + // readable form. + grafeas.v1.Version version = 2; + // Metadata about the upgrade for each specific operating system. + repeated UpgradeDistribution distributions = 3; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 4; +} + +// The Upgrade Distribution represents metadata about the Upgrade for each +// operating system (CPE). Some distributions have additional metadata around +// updates, classifying them into various categories and severities. +message UpgradeDistribution { + // Required - The specific operating system this metadata applies to. See + // https://cpe.mitre.org/specification/. + string cpe_uri = 1; + // The operating system classification of this Upgrade, as specified by the + // upstream operating system upgrade feed. For Windows the classification is + // one of the category_ids listed at + // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + string classification = 2; + // The severity as specified by the upstream operating system. + string severity = 3; + // The cve tied to this Upgrade. + repeated string cve = 4; +} + +// Windows Update represents the metadata about the update for the Windows +// operating system. The fields in this message come from the Windows Update API +// documented at +// https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. +message WindowsUpdate { + // The unique identifier of the update. + message Identity { + // The revision independent identifier of the update. + string update_id = 1; + // The revision number of the update. + int32 revision = 2; + } + // Required - The unique identifier for the update. + Identity identity = 1; + // The localized title of the update. + string title = 2; + // The localized description of the update. + string description = 3; + // The category to which the update belongs. + message Category { + // The identifier of the category. + string category_id = 1; + // The localized name of the category. + string name = 2; + } + // The list of categories to which the update belongs. + repeated Category categories = 4; + // The Microsoft Knowledge Base article IDs that are associated with the + // update. + repeated string kb_article_ids = 5; + // The hyperlink to the support information for the update. + string support_url = 6; + // The last published timestamp of the update. + google.protobuf.Timestamp last_published_timestamp = 7; +} + +// An Upgrade Occurrence represents that a specific resource_url could install a +// specific upgrade. This presence is supplied via local sources (i.e. it is +// present in the mirror and the running system has noticed its availability). +// For Windows, both distribution and windows_update contain information for the +// Windows update. +message UpgradeOccurrence { + // Required for non-Windows OS. The package this Upgrade is for. + string package = 1; + // Required for non-Windows OS. The version of the package in a machine + + // human readable form. + grafeas.v1.Version parsed_version = 3; + // Metadata about the upgrade for available for the specific operating system + // for the resource_url. This allows efficient filtering, as well as + // making it easier to use the occurrence. + UpgradeDistribution distribution = 4; + // Required for Windows OS. Represents the metadata about the Windows update. + WindowsUpdate windows_update = 5; +} diff --git a/src/main/proto/grafeas/v1/vulnerability.proto b/src/main/proto/grafeas/v1/vulnerability.proto index 27a5d238..6c94cdf0 100644 --- a/src/main/proto/grafeas/v1/vulnerability.proto +++ b/src/main/proto/grafeas/v1/vulnerability.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package grafeas.v1; +import "google/protobuf/timestamp.proto"; import "grafeas/v1/common.proto"; import "grafeas/v1/cvss.proto"; import "grafeas/v1/package.proto"; @@ -109,6 +110,11 @@ message VulnerabilityNote { // Whether this detail is obsolete. Occurrences are expected not to point to // obsolete details. bool is_obsolete = 11; + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 12; } // The full description of the CVSSv3 for this vulnerability. @@ -145,6 +151,11 @@ message VulnerabilityNote { string url = 2; } } + + // The time this information was last changed at the source. This is an + // upstream timestamp from the underlying information source - e.g. Ubuntu + // security tracker. + google.protobuf.Timestamp source_update_time = 6; } // An occurrence of a severity vulnerability on a resource. @@ -206,8 +217,7 @@ message VulnerabilityOccurrence { repeated grafeas.v1.RelatedUrl related_urls = 7; // The distro assigned severity for this vulnerability when it is available, - // and note provider assigned severity when distro has not yet assigned a - // severity for this vulnerability. + // otherwise this is the note provider assigned severity. Severity effective_severity = 8; // Output only. Whether at least one of the affected packages has a fix diff --git a/synth.metadata b/synth.metadata index 35942b02..c0ddd98b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-01-07T08:50:37.123879Z", + "updateTime": "2020-01-09T08:48:52.551018Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cb79155f596e0396dd900da93872be7066f6340d", - "internalRef": "288441307" + "sha": "6ace586805c08896fef43e28a261337fcf3f022b", + "internalRef": "288783603" } }, { @@ -35,730 +35,5 @@ "config": "grafeas/artman_grafeas_v1.yaml" } } - ], - "newFiles": [ - { - "path": ".repo-metadata.json" - }, - { - "path": "renovate.json" - }, - { - "path": "license-checks.xml" - }, - { - "path": "synth.py" - }, - { - "path": "codecov.yaml" - }, - { - "path": "LICENSE" - }, - { - "path": ".gitignore" - }, - { - "path": "pom.xml" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "grafeas.header" - }, - { - "path": "synth.metadata" - }, - { - "path": "README.md" - }, - { - "path": "versions.txt" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "java.header" - }, - { - "path": "src/test/java/io/grafeas/v1/GrafeasClientTest.java" - }, - { - "path": "src/test/java/io/grafeas/v1/MockGrafeas.java" - }, - { - "path": "src/test/java/io/grafeas/v1/MockGrafeasImpl.java" - }, - { - "path": "src/main/proto/grafeas/v1/image.proto" - }, - { - "path": "src/main/proto/grafeas/v1/build.proto" - }, - { - "path": "src/main/proto/grafeas/v1/deployment.proto" - }, - { - "path": "src/main/proto/grafeas/v1/cvss.proto" - }, - { - "path": "src/main/proto/grafeas/v1/discovery.proto" - }, - { - "path": "src/main/proto/grafeas/v1/grafeas.proto" - }, - { - "path": "src/main/proto/grafeas/v1/common.proto" - }, - { - "path": "src/main/proto/grafeas/v1/package.proto" - }, - { - "path": "src/main/proto/grafeas/v1/provenance.proto" - }, - { - "path": "src/main/proto/grafeas/v1/attestation.proto" - }, - { - "path": "src/main/proto/grafeas/v1/vulnerability.proto" - }, - { - "path": "src/main/java/io/grafeas/v1/DiscoveryNote.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GerritSourceContextOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ImageOccurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Artifact.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GrafeasSettings.java" - }, - { - "path": "src/main/java/io/grafeas/v1/VulnerabilityNote.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListOccurrencesResponse.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Signature.java" - }, - { - "path": "src/main/java/io/grafeas/v1/VersionOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ImageOccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/HashOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Deployment.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNoteOccurrencesResponseOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/OccurrenceName.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateNotesResponse.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNotesRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BuildOccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/UpdateNoteRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/NoteName.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CloudRepoSourceContextOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/RelatedUrlOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeleteNoteRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DistributionOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DiscoveryOccurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ProjectName.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ArtifactOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/AttestationOccurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GrafeasClient.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Provenance.java" - }, - { - "path": "src/main/java/io/grafeas/v1/UpdateNoteRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Location.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GetNoteRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CommandOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeleteOccurrenceRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GitSourceContext.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GetOccurrenceNoteRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GrafeasOuterClass.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Layer.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Hash.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GetOccurrenceNoteRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateNotesResponseOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Distribution.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNotesResponseOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Vulnerability.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CVSSv3OrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNotesResponse.java" - }, - { - "path": "src/main/java/io/grafeas/v1/VulnerabilityNoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Fingerprint.java" - }, - { - "path": "src/main/java/io/grafeas/v1/SourceContextOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/FileHashesOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/NoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BuildNote.java" - }, - { - "path": "src/main/java/io/grafeas/v1/FingerprintOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeploymentOccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/VulnerabilityOccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Cvss.java" - }, - { - "path": "src/main/java/io/grafeas/v1/AttestationNoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/NoteKind.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ImageNote.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateNotesRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DiscoveryOccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/UpdateOccurrenceRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Attestation.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CVSSv3.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ImageNoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNoteOccurrencesRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListOccurrencesRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponse.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateNotesRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNotesRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/SignatureOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNoteOccurrencesResponse.java" - }, - { - "path": "src/main/java/io/grafeas/v1/OccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Version.java" - }, - { - "path": "src/main/java/io/grafeas/v1/RelatedUrl.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Image.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Note.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeploymentNoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BuildProvenance.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Discovery.java" - }, - { - "path": "src/main/java/io/grafeas/v1/RepoId.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeploymentNote.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeleteNoteRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/AliasContextOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/FileHashes.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CreateOccurrenceRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GerritSourceContext.java" - }, - { - "path": "src/main/java/io/grafeas/v1/package-info.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Severity.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Command.java" - }, - { - "path": "src/main/java/io/grafeas/v1/SourceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListNoteOccurrencesRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GrafeasGrpc.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BuildNoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GetOccurrenceRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GetNoteRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CreateNoteRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/AliasContext.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GetOccurrenceRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/LayerOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/PackageNote.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DiscoveryNoteOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/GitSourceContextOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Build.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CreateNoteRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeleteOccurrenceRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Architecture.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ProjectRepoIdOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListOccurrencesResponseOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/AttestationOccurrenceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Source.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Package.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateOccurrencesResponseOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/DeploymentOccurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CloudRepoSourceContext.java" - }, - { - "path": "src/main/java/io/grafeas/v1/PackageOccurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Common.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BuildProvenanceOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/SourceContext.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ProjectRepoId.java" - }, - { - "path": "src/main/java/io/grafeas/v1/AttestationNote.java" - }, - { - "path": "src/main/java/io/grafeas/v1/CreateOccurrenceRequest.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BuildOccurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/Occurrence.java" - }, - { - "path": "src/main/java/io/grafeas/v1/LocationOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/ListOccurrencesRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/BatchCreateOccurrencesRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/UpdateOccurrenceRequestOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/RepoIdOrBuilder.java" - }, - { - "path": "src/main/java/io/grafeas/v1/stub/GrpcGrafeasStub.java" - }, - { - "path": "src/main/java/io/grafeas/v1/stub/GrpcGrafeasCallableFactory.java" - }, - { - "path": "src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java" - }, - { - "path": "src/main/java/io/grafeas/v1/stub/GrafeasStub.java" - }, - { - "path": ".kokoro/build.bat" - }, - { - "path": ".kokoro/build.sh" - }, - { - "path": ".kokoro/dependencies.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/coerce_logs.sh" - }, - { - "path": ".kokoro/linkage-monitor.sh" - }, - { - "path": ".kokoro/continuous/dependencies.cfg" - }, - { - "path": ".kokoro/continuous/samples.cfg" - }, - { - "path": ".kokoro/continuous/java7.cfg" - }, - { - "path": ".kokoro/continuous/java8-osx.cfg" - }, - { - "path": ".kokoro/continuous/java8-win.cfg" - }, - { - "path": ".kokoro/continuous/propose_release.sh" - }, - { - "path": ".kokoro/continuous/lint.cfg" - }, - { - "path": ".kokoro/continuous/java11.cfg" - }, - { - "path": ".kokoro/continuous/common.cfg" - }, - { - "path": ".kokoro/continuous/propose_release.cfg" - }, - { - "path": ".kokoro/continuous/java8.cfg" - }, - { - "path": ".kokoro/continuous/integration.cfg" - }, - { - "path": ".kokoro/release/drop.sh" - }, - { - "path": ".kokoro/release/stage.cfg" - }, - { - "path": ".kokoro/release/promote.cfg" - }, - { - "path": ".kokoro/release/publish_javadoc.cfg" - }, - { - "path": ".kokoro/release/bump_snapshot.cfg" - }, - { - "path": ".kokoro/release/promote.sh" - }, - { - "path": ".kokoro/release/stage.sh" - }, - { - "path": ".kokoro/release/snapshot.sh" - }, - { - "path": ".kokoro/release/snapshot.cfg" - }, - { - "path": ".kokoro/release/common.cfg" - }, - { - "path": ".kokoro/release/bump_snapshot.sh" - }, - { - "path": ".kokoro/release/common.sh" - }, - { - "path": ".kokoro/release/drop.cfg" - }, - { - "path": ".kokoro/release/publish_javadoc.sh" - }, - { - "path": ".kokoro/presubmit/dependencies.cfg" - }, - { - "path": ".kokoro/presubmit/samples.cfg" - }, - { - "path": ".kokoro/presubmit/java7.cfg" - }, - { - "path": ".kokoro/presubmit/java8-osx.cfg" - }, - { - "path": ".kokoro/presubmit/linkage-monitor.cfg" - }, - { - "path": ".kokoro/presubmit/java8-win.cfg" - }, - { - "path": ".kokoro/presubmit/lint.cfg" - }, - { - "path": ".kokoro/presubmit/java11.cfg" - }, - { - "path": ".kokoro/presubmit/common.cfg" - }, - { - "path": ".kokoro/presubmit/clirr.cfg" - }, - { - "path": ".kokoro/presubmit/java8.cfg" - }, - { - "path": ".kokoro/presubmit/integration.cfg" - }, - { - "path": ".kokoro/nightly/dependencies.cfg" - }, - { - "path": ".kokoro/nightly/samples.cfg" - }, - { - "path": ".kokoro/nightly/java7.cfg" - }, - { - "path": ".kokoro/nightly/java8-osx.cfg" - }, - { - "path": ".kokoro/nightly/java8-win.cfg" - }, - { - "path": ".kokoro/nightly/lint.cfg" - }, - { - "path": ".kokoro/nightly/java11.cfg" - }, - { - "path": ".kokoro/nightly/common.cfg" - }, - { - "path": ".kokoro/nightly/java8.cfg" - }, - { - "path": ".kokoro/nightly/integration.cfg" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": "__pycache__/synth.cpython-36.pyc" - }, - { - "path": ".git/index" - }, - { - "path": ".git/packed-refs" - }, - { - "path": ".git/HEAD" - }, - { - "path": ".git/config" - }, - { - "path": ".git/shallow" - }, - { - "path": ".git/objects/pack/pack-36642214fc5866c6c08bee1c680a87059b098db1.idx" - }, - { - "path": ".git/objects/pack/pack-36642214fc5866c6c08bee1c680a87059b098db1.pack" - }, - { - "path": ".git/refs/remotes/origin/HEAD" - }, - { - "path": ".git/refs/heads/autosynth" - }, - { - "path": ".git/refs/heads/master" - }, - { - "path": ".git/logs/HEAD" - }, - { - "path": ".git/logs/refs/remotes/origin/HEAD" - }, - { - "path": ".git/logs/refs/heads/autosynth" - }, - { - "path": ".git/logs/refs/heads/master" - } ] } \ No newline at end of file