/* * Copyright 2019 The Grafeas Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: grafeas/v1/vex.proto package io.grafeas.v1; /** * * *
* A single VulnerabilityAssessmentNote represents * one particular product's vulnerability assessment for one CVE. ** * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote} */ public final class VulnerabilityAssessmentNote extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote) VulnerabilityAssessmentNoteOrBuilder { private static final long serialVersionUID = 0L; // Use VulnerabilityAssessmentNote.newBuilder() to construct. private VulnerabilityAssessmentNote(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private VulnerabilityAssessmentNote() { title_ = ""; shortDescription_ = ""; longDescription_ = ""; languageCode_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new VulnerabilityAssessmentNote(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Vex.internal_static_grafeas_v1_VulnerabilityAssessmentNote_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Vex .internal_static_grafeas_v1_VulnerabilityAssessmentNote_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.VulnerabilityAssessmentNote.class, io.grafeas.v1.VulnerabilityAssessmentNote.Builder.class); } public interface PublisherOrBuilder extends // @@protoc_insertion_point(interface_extends:grafeas.v1.VulnerabilityAssessmentNote.Publisher) com.google.protobuf.MessageOrBuilder { /** * * *
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @return The issuingAuthority.
*/
java.lang.String getIssuingAuthority();
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @return The bytes for issuingAuthority.
*/
com.google.protobuf.ByteString getIssuingAuthorityBytes();
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @return The publisherNamespace.
*/
java.lang.String getPublisherNamespace();
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @return The bytes for publisherNamespace.
*/
com.google.protobuf.ByteString getPublisherNamespaceBytes();
}
/**
*
*
* * Publisher contains information about the publisher of * this Note. * (-- api-linter: core::0123::resource-annotation=disabled * aip.dev/not-precedent: Publisher is not a separate resource. --) ** * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher} */ public static final class Publisher extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Publisher) PublisherOrBuilder { private static final long serialVersionUID = 0L; // Use Publisher.newBuilder() to construct. private Publisher(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private Publisher() { name_ = ""; issuingAuthority_ = ""; publisherNamespace_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Publisher(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Vex .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Vex .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Publisher_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.class, io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
*
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ISSUING_AUTHORITY_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object issuingAuthority_ = "";
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @return The issuingAuthority.
*/
@java.lang.Override
public java.lang.String getIssuingAuthority() {
java.lang.Object ref = issuingAuthority_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
issuingAuthority_ = s;
return s;
}
}
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @return The bytes for issuingAuthority.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIssuingAuthorityBytes() {
java.lang.Object ref = issuingAuthority_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
issuingAuthority_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PUBLISHER_NAMESPACE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object publisherNamespace_ = "";
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @return The publisherNamespace.
*/
@java.lang.Override
public java.lang.String getPublisherNamespace() {
java.lang.Object ref = publisherNamespace_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
publisherNamespace_ = s;
return s;
}
}
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @return The bytes for publisherNamespace.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPublisherNamespaceBytes() {
java.lang.Object ref = publisherNamespace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
publisherNamespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuingAuthority_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, issuingAuthority_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publisherNamespace_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publisherNamespace_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuingAuthority_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, issuingAuthority_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publisherNamespace_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publisherNamespace_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Publisher)) {
return super.equals(obj);
}
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher other =
(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher) obj;
if (!getName().equals(other.getName())) return false;
if (!getIssuingAuthority().equals(other.getIssuingAuthority())) return false;
if (!getPublisherNamespace().equals(other.getPublisherNamespace())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ISSUING_AUTHORITY_FIELD_NUMBER;
hash = (53 * hash) + getIssuingAuthority().hashCode();
hash = (37 * hash) + PUBLISHER_NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getPublisherNamespace().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Publisher contains information about the publisher of
* this Note.
* (-- api-linter: core::0123::resource-annotation=disabled
* aip.dev/not-precedent: Publisher is not a separate resource. --)
*
*
* Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Publisher}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Name of the publisher.
* Examples: 'Google', 'Google Cloud Platform'.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object issuingAuthority_ = "";
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @return The issuingAuthority.
*/
public java.lang.String getIssuingAuthority() {
java.lang.Object ref = issuingAuthority_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
issuingAuthority_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @return The bytes for issuingAuthority.
*/
public com.google.protobuf.ByteString getIssuingAuthorityBytes() {
java.lang.Object ref = issuingAuthority_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
issuingAuthority_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @param value The issuingAuthority to set.
* @return This builder for chaining.
*/
public Builder setIssuingAuthority(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
issuingAuthority_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @return This builder for chaining.
*/
public Builder clearIssuingAuthority() {
issuingAuthority_ = getDefaultInstance().getIssuingAuthority();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Provides information about the authority of the issuing party to
* release the document, in particular, the party's constituency and
* responsibilities or other obligations.
*
*
* string issuing_authority = 2;
*
* @param value The bytes for issuingAuthority to set.
* @return This builder for chaining.
*/
public Builder setIssuingAuthorityBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
issuingAuthority_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object publisherNamespace_ = "";
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @return The publisherNamespace.
*/
public java.lang.String getPublisherNamespace() {
java.lang.Object ref = publisherNamespace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
publisherNamespace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @return The bytes for publisherNamespace.
*/
public com.google.protobuf.ByteString getPublisherNamespaceBytes() {
java.lang.Object ref = publisherNamespace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
publisherNamespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @param value The publisherNamespace to set.
* @return This builder for chaining.
*/
public Builder setPublisherNamespace(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
publisherNamespace_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @return This builder for chaining.
*/
public Builder clearPublisherNamespace() {
publisherNamespace_ = getDefaultInstance().getPublisherNamespace();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The context or namespace.
* Contains a URL which is under control of the issuing party and can
* be used as a globally unique identifier for that issuing party.
* Example: https://csaf.io
*
*
* string publisher_namespace = 3;
*
* @param value The bytes for publisherNamespace to set.
* @return This builder for chaining.
*/
public Builder setPublisherNamespaceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
publisherNamespace_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Publisher)
private static final io.grafeas.v1.VulnerabilityAssessmentNote.Publisher DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Publisher();
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
* Name of the product.
*
*
* string name = 1;
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* Name of the product.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @return The id.
*/
java.lang.String getId();
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return Whether the genericUri field is set.
*/
boolean hasGenericUri();
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return The genericUri.
*/
java.lang.String getGenericUri();
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return The bytes for genericUri.
*/
com.google.protobuf.ByteString getGenericUriBytes();
public io.grafeas.v1.VulnerabilityAssessmentNote.Product.IdentifierCase getIdentifierCase();
}
/**
*
*
* * Product contains information about a product and how to uniquely identify * it. * (-- api-linter: core::0123::resource-annotation=disabled * aip.dev/not-precedent: Product is not a separate resource. --) ** * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product} */ public static final class Product extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Product) ProductOrBuilder { private static final long serialVersionUID = 0L; // Use Product.newBuilder() to construct. private Product(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private Product() { name_ = ""; id_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Product(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Vex .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Vex .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Product_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.VulnerabilityAssessmentNote.Product.class, io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder.class); } private int identifierCase_ = 0; private java.lang.Object identifier_; public enum IdentifierCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { GENERIC_URI(3), IDENTIFIER_NOT_SET(0); private final int value; private IdentifierCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static IdentifierCase valueOf(int value) { return forNumber(value); } public static IdentifierCase forNumber(int value) { switch (value) { case 3: return GENERIC_URI; case 0: return IDENTIFIER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public IdentifierCase getIdentifierCase() { return IdentifierCase.forNumber(identifierCase_); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
* Name of the product.
*
*
* string name = 1;
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
*
* Name of the product.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GENERIC_URI_FIELD_NUMBER = 3;
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return Whether the genericUri field is set.
*/
public boolean hasGenericUri() {
return identifierCase_ == 3;
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return The genericUri.
*/
public java.lang.String getGenericUri() {
java.lang.Object ref = "";
if (identifierCase_ == 3) {
ref = identifier_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (identifierCase_ == 3) {
identifier_ = s;
}
return s;
}
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return The bytes for genericUri.
*/
public com.google.protobuf.ByteString getGenericUriBytes() {
java.lang.Object ref = "";
if (identifierCase_ == 3) {
ref = identifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (identifierCase_ == 3) {
identifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
}
if (identifierCase_ == 3) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, identifier_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
}
if (identifierCase_ == 3) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, identifier_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Product)) {
return super.equals(obj);
}
io.grafeas.v1.VulnerabilityAssessmentNote.Product other =
(io.grafeas.v1.VulnerabilityAssessmentNote.Product) obj;
if (!getName().equals(other.getName())) return false;
if (!getId().equals(other.getId())) return false;
if (!getIdentifierCase().equals(other.getIdentifierCase())) return false;
switch (identifierCase_) {
case 3:
if (!getGenericUri().equals(other.getGenericUri())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
switch (identifierCase_) {
case 3:
hash = (37 * hash) + GENERIC_URI_FIELD_NUMBER;
hash = (53 * hash) + getGenericUri().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote.Product prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Product contains information about a product and how to uniquely identify
* it.
* (-- api-linter: core::0123::resource-annotation=disabled
* aip.dev/not-precedent: Product is not a separate resource. --)
*
*
* Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Product}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
* Name of the product.
*
*
* string name = 1;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the product.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the product.
*
*
* string name = 1;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Name of the product.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Name of the product.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @return The bytes for id.
*/
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Token that identifies a product so that it can be referred to from other
* parts in the document. There is no predefined format as long as it
* uniquely identifies a group in the context of the current document.
*
*
* string id = 2;
*
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return Whether the genericUri field is set.
*/
@java.lang.Override
public boolean hasGenericUri() {
return identifierCase_ == 3;
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return The genericUri.
*/
@java.lang.Override
public java.lang.String getGenericUri() {
java.lang.Object ref = "";
if (identifierCase_ == 3) {
ref = identifier_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (identifierCase_ == 3) {
identifier_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return The bytes for genericUri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getGenericUriBytes() {
java.lang.Object ref = "";
if (identifierCase_ == 3) {
ref = identifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (identifierCase_ == 3) {
identifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @param value The genericUri to set.
* @return This builder for chaining.
*/
public Builder setGenericUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
identifierCase_ = 3;
identifier_ = value;
onChanged();
return this;
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @return This builder for chaining.
*/
public Builder clearGenericUri() {
if (identifierCase_ == 3) {
identifierCase_ = 0;
identifier_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Contains a URI which is vendor-specific.
* Example: The artifact repository URL of an image.
*
*
* string generic_uri = 3;
*
* @param value The bytes for genericUri to set.
* @return This builder for chaining.
*/
public Builder setGenericUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
identifierCase_ = 3;
identifier_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Product)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Product)
private static final io.grafeas.v1.VulnerabilityAssessmentNote.Product DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Product();
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Product getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @return The cve.
*/
java.lang.String getCve();
/**
*
*
*
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @return The bytes for cve.
*/
com.google.protobuf.ByteString getCveBytes();
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The shortDescription.
*/
java.lang.String getShortDescription();
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The bytes for shortDescription.
*/
com.google.protobuf.ByteString getShortDescriptionBytes();
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The longDescription.
*/
java.lang.String getLongDescription();
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The bytes for longDescription.
*/
com.google.protobuf.ByteString getLongDescriptionBytes();
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
java.util.List
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
io.grafeas.v1.RelatedUrl getRelatedUris(int index);
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
int getRelatedUrisCount();
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
java.util.List extends io.grafeas.v1.RelatedUrlOrBuilder> getRelatedUrisOrBuilderList();
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index);
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @return The enum numeric value on the wire for state.
*/
int getStateValue();
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @return The state.
*/
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState();
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @return A list containing the impacts.
*/
java.util.List
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @return The count of impacts.
*/
int getImpactsCount();
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param index The index of the element to return.
* @return The impacts at the given index.
*/
java.lang.String getImpacts(int index);
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param index The index of the value to return.
* @return The bytes of the impacts at the given index.
*/
com.google.protobuf.ByteString getImpactsBytes(int index);
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*
* @return Whether the justification field is set.
*/
boolean hasJustification();
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*
* @return The justification.
*/
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification();
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder
getJustificationOrBuilder();
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
java.util.List
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(int index);
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
int getRemediationsCount();
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
java.util.List<
? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>
getRemediationsOrBuilderList();
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder
getRemediationsOrBuilder(int index);
}
/**
*
*
* * Assessment provides all information that is related to a single * vulnerability for this product. ** * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment} */ public static final class Assessment extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment) AssessmentOrBuilder { private static final long serialVersionUID = 0L; // Use Assessment.newBuilder() to construct. private Assessment(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private Assessment() { cve_ = ""; shortDescription_ = ""; longDescription_ = ""; relatedUris_ = java.util.Collections.emptyList(); state_ = 0; impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY; remediations_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Assessment(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Vex .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Vex .internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.class, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder.class); } /** * * *
* Provides the state of this Vulnerability assessment.
*
*
* Protobuf enum {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* No state is specified.
*
*
* STATE_UNSPECIFIED = 0;
*/
STATE_UNSPECIFIED(0),
/**
*
*
*
* This product is known to be affected by this vulnerability.
*
*
* AFFECTED = 1;
*/
AFFECTED(1),
/**
*
*
*
* This product is known to be not affected by this vulnerability.
*
*
* NOT_AFFECTED = 2;
*/
NOT_AFFECTED(2),
/**
*
*
*
* This product contains a fix for this vulnerability.
*
*
* FIXED = 3;
*/
FIXED(3),
/**
*
*
*
* It is not known yet whether these versions are or are not affected
* by the vulnerability. However, it is still under investigation.
*
*
* UNDER_INVESTIGATION = 4;
*/
UNDER_INVESTIGATION(4),
UNRECOGNIZED(-1),
;
/**
*
*
*
* No state is specified.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* This product is known to be affected by this vulnerability.
*
*
* AFFECTED = 1;
*/
public static final int AFFECTED_VALUE = 1;
/**
*
*
*
* This product is known to be not affected by this vulnerability.
*
*
* NOT_AFFECTED = 2;
*/
public static final int NOT_AFFECTED_VALUE = 2;
/**
*
*
*
* This product contains a fix for this vulnerability.
*
*
* FIXED = 3;
*/
public static final int FIXED_VALUE = 3;
/**
*
*
*
* It is not known yet whether these versions are or are not affected
* by the vulnerability. However, it is still under investigation.
*
*
* UNDER_INVESTIGATION = 4;
*/
public static final int UNDER_INVESTIGATION_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static State valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return AFFECTED;
case 2:
return NOT_AFFECTED;
case 3:
return FIXED;
case 4:
return UNDER_INVESTIGATION;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @return The enum numeric value on the wire for justificationType.
*/
int getJustificationTypeValue();
/**
*
*
*
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @return The justificationType.
*/
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
getJustificationType();
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @return The details.
*/
java.lang.String getDetails();
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @return The bytes for details.
*/
com.google.protobuf.ByteString getDetailsBytes();
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification}
*/
public static final class Justification extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)
JustificationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Justification.newBuilder() to construct.
private Justification(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Justification() {
justificationType_ = 0;
details_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Justification();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Vex
.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Vex
.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Justification_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.class,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder.class);
}
/**
*
*
*
* Provides the type of justification.
*
*
* Protobuf enum {@code
* grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType}
*/
public enum JustificationType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* JUSTIFICATION_TYPE_UNSPECIFIED.
*
*
* JUSTIFICATION_TYPE_UNSPECIFIED = 0;
*/
JUSTIFICATION_TYPE_UNSPECIFIED(0),
/**
*
*
*
* The vulnerable component is not present in the product.
*
*
* COMPONENT_NOT_PRESENT = 1;
*/
COMPONENT_NOT_PRESENT(1),
/**
*
*
*
* The vulnerable code is not present. Typically this case
* occurs when source code is configured or built in a way that excludes
* the vulnerable code.
*
*
* VULNERABLE_CODE_NOT_PRESENT = 2;
*/
VULNERABLE_CODE_NOT_PRESENT(2),
/**
*
*
*
* The vulnerable code can not be executed.
* Typically this case occurs when the product includes the vulnerable
* code but does not call or use the vulnerable code.
*
*
* VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3;
*/
VULNERABLE_CODE_NOT_IN_EXECUTE_PATH(3),
/**
*
*
*
* The vulnerable code cannot be controlled by an attacker to exploit
* the vulnerability.
*
*
* VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4;
*/
VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY(4),
/**
*
*
*
* The product includes built-in protections or features that prevent
* exploitation of the vulnerability. These built-in protections cannot
* be subverted by the attacker and cannot be configured or disabled by
* the user. These mitigations completely prevent exploitation based on
* known attack vectors.
*
*
* INLINE_MITIGATIONS_ALREADY_EXIST = 5;
*/
INLINE_MITIGATIONS_ALREADY_EXIST(5),
UNRECOGNIZED(-1),
;
/**
*
*
*
* JUSTIFICATION_TYPE_UNSPECIFIED.
*
*
* JUSTIFICATION_TYPE_UNSPECIFIED = 0;
*/
public static final int JUSTIFICATION_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The vulnerable component is not present in the product.
*
*
* COMPONENT_NOT_PRESENT = 1;
*/
public static final int COMPONENT_NOT_PRESENT_VALUE = 1;
/**
*
*
*
* The vulnerable code is not present. Typically this case
* occurs when source code is configured or built in a way that excludes
* the vulnerable code.
*
*
* VULNERABLE_CODE_NOT_PRESENT = 2;
*/
public static final int VULNERABLE_CODE_NOT_PRESENT_VALUE = 2;
/**
*
*
*
* The vulnerable code can not be executed.
* Typically this case occurs when the product includes the vulnerable
* code but does not call or use the vulnerable code.
*
*
* VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3;
*/
public static final int VULNERABLE_CODE_NOT_IN_EXECUTE_PATH_VALUE = 3;
/**
*
*
*
* The vulnerable code cannot be controlled by an attacker to exploit
* the vulnerability.
*
*
* VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4;
*/
public static final int VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY_VALUE = 4;
/**
*
*
*
* The product includes built-in protections or features that prevent
* exploitation of the vulnerability. These built-in protections cannot
* be subverted by the attacker and cannot be configured or disabled by
* the user. These mitigations completely prevent exploitation based on
* known attack vectors.
*
*
* INLINE_MITIGATIONS_ALREADY_EXIST = 5;
*/
public static final int INLINE_MITIGATIONS_ALREADY_EXIST_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static JustificationType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static JustificationType forNumber(int value) {
switch (value) {
case 0:
return JUSTIFICATION_TYPE_UNSPECIFIED;
case 1:
return COMPONENT_NOT_PRESENT;
case 2:
return VULNERABLE_CODE_NOT_PRESENT;
case 3:
return VULNERABLE_CODE_NOT_IN_EXECUTE_PATH;
case 4:
return VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY;
case 5:
return INLINE_MITIGATIONS_ALREADY_EXIST;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @return The enum numeric value on the wire for justificationType.
*/
@java.lang.Override
public int getJustificationTypeValue() {
return justificationType_;
}
/**
*
*
*
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @return The justificationType.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
getJustificationType() {
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
result =
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
.forNumber(justificationType_);
return result == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
.UNRECOGNIZED
: result;
}
public static final int DETAILS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object details_ = "";
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @return The details.
*/
@java.lang.Override
public java.lang.String getDetails() {
java.lang.Object ref = details_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
details_ = s;
return s;
}
}
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @return The bytes for details.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (justificationType_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
.JUSTIFICATION_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, justificationType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (justificationType_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
.JUSTIFICATION_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, justificationType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)) {
return super.equals(obj);
}
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification other =
(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification) obj;
if (justificationType_ != other.justificationType_) return false;
if (!getDetails().equals(other.getDetails())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + JUSTIFICATION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + justificationType_;
hash = (37 * hash) + DETAILS_FIELD_NUMBER;
hash = (53 * hash) + getDetails().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @return The enum numeric value on the wire for justificationType.
*/
@java.lang.Override
public int getJustificationTypeValue() {
return justificationType_;
}
/**
*
*
*
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @param value The enum numeric value on the wire for justificationType to set.
* @return This builder for chaining.
*/
public Builder setJustificationTypeValue(int value) {
justificationType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @return The justificationType.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
getJustificationType() {
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
result =
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
.JustificationType.forNumber(justificationType_);
return result == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
.UNRECOGNIZED
: result;
}
/**
*
*
*
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @param value The justificationType to set.
* @return This builder for chaining.
*/
public Builder setJustificationType(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType
value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
justificationType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The justification type for this vulnerability.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1;
*
*
* @return This builder for chaining.
*/
public Builder clearJustificationType() {
bitField0_ = (bitField0_ & ~0x00000001);
justificationType_ = 0;
onChanged();
return this;
}
private java.lang.Object details_ = "";
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @return The details.
*/
public java.lang.String getDetails() {
java.lang.Object ref = details_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
details_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @return The bytes for details.
*/
public com.google.protobuf.ByteString getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @param value The details to set.
* @return This builder for chaining.
*/
public Builder setDetails(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
details_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @return This builder for chaining.
*/
public Builder clearDetails() {
details_ = getDefaultInstance().getDetails();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Additional details on why this justification was chosen.
*
*
* string details = 2;
*
* @param value The bytes for details to set.
* @return This builder for chaining.
*/
public Builder setDetailsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
details_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification)
private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification();
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @return The enum numeric value on the wire for remediationType.
*/
int getRemediationTypeValue();
/**
*
*
*
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @return The remediationType.
*/
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
getRemediationType();
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @return The details.
*/
java.lang.String getDetails();
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @return The bytes for details.
*/
com.google.protobuf.ByteString getDetailsBytes();
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*
* @return Whether the remediationUri field is set.
*/
boolean hasRemediationUri();
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*
* @return The remediationUri.
*/
io.grafeas.v1.RelatedUrl getRemediationUri();
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder();
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
* Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation}
*/
public static final class Remediation extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)
RemediationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Remediation.newBuilder() to construct.
private Remediation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Remediation() {
remediationType_ = 0;
details_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Remediation();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Vex
.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Vex
.internal_static_grafeas_v1_VulnerabilityAssessmentNote_Assessment_Remediation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.class,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder.class);
}
/**
*
*
*
* The type of remediation that can be applied.
*
*
* Protobuf enum {@code
* grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType}
*/
public enum RemediationType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* No remediation type specified.
*
*
* REMEDIATION_TYPE_UNSPECIFIED = 0;
*/
REMEDIATION_TYPE_UNSPECIFIED(0),
/**
*
*
*
* A MITIGATION is available.
*
*
* MITIGATION = 1;
*/
MITIGATION(1),
/**
*
*
*
* No fix is planned.
*
*
* NO_FIX_PLANNED = 2;
*/
NO_FIX_PLANNED(2),
/**
*
*
*
* Not available.
*
*
* NONE_AVAILABLE = 3;
*/
NONE_AVAILABLE(3),
/**
*
*
*
* A vendor fix is available.
*
*
* VENDOR_FIX = 4;
*/
VENDOR_FIX(4),
/**
*
*
*
* A workaround is available.
*
*
* WORKAROUND = 5;
*/
WORKAROUND(5),
UNRECOGNIZED(-1),
;
/**
*
*
*
* No remediation type specified.
*
*
* REMEDIATION_TYPE_UNSPECIFIED = 0;
*/
public static final int REMEDIATION_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* A MITIGATION is available.
*
*
* MITIGATION = 1;
*/
public static final int MITIGATION_VALUE = 1;
/**
*
*
*
* No fix is planned.
*
*
* NO_FIX_PLANNED = 2;
*/
public static final int NO_FIX_PLANNED_VALUE = 2;
/**
*
*
*
* Not available.
*
*
* NONE_AVAILABLE = 3;
*/
public static final int NONE_AVAILABLE_VALUE = 3;
/**
*
*
*
* A vendor fix is available.
*
*
* VENDOR_FIX = 4;
*/
public static final int VENDOR_FIX_VALUE = 4;
/**
*
*
*
* A workaround is available.
*
*
* WORKAROUND = 5;
*/
public static final int WORKAROUND_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static RemediationType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static RemediationType forNumber(int value) {
switch (value) {
case 0:
return REMEDIATION_TYPE_UNSPECIFIED;
case 1:
return MITIGATION;
case 2:
return NO_FIX_PLANNED;
case 3:
return NONE_AVAILABLE;
case 4:
return VENDOR_FIX;
case 5:
return WORKAROUND;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @return The enum numeric value on the wire for remediationType.
*/
@java.lang.Override
public int getRemediationTypeValue() {
return remediationType_;
}
/**
*
*
*
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @return The remediationType.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
getRemediationType() {
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result =
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
.forNumber(remediationType_);
return result == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
.UNRECOGNIZED
: result;
}
public static final int DETAILS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object details_ = "";
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @return The details.
*/
@java.lang.Override
public java.lang.String getDetails() {
java.lang.Object ref = details_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
details_ = s;
return s;
}
}
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @return The bytes for details.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REMEDIATION_URI_FIELD_NUMBER = 3;
private io.grafeas.v1.RelatedUrl remediationUri_;
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*
* @return Whether the remediationUri field is set.
*/
@java.lang.Override
public boolean hasRemediationUri() {
return remediationUri_ != null;
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*
* @return The remediationUri.
*/
@java.lang.Override
public io.grafeas.v1.RelatedUrl getRemediationUri() {
return remediationUri_ == null
? io.grafeas.v1.RelatedUrl.getDefaultInstance()
: remediationUri_;
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
@java.lang.Override
public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() {
return remediationUri_ == null
? io.grafeas.v1.RelatedUrl.getDefaultInstance()
: remediationUri_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (remediationType_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
.REMEDIATION_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, remediationType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_);
}
if (remediationUri_ != null) {
output.writeMessage(3, getRemediationUri());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (remediationType_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
.REMEDIATION_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, remediationType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_);
}
if (remediationUri_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRemediationUri());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)) {
return super.equals(obj);
}
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation other =
(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation) obj;
if (remediationType_ != other.remediationType_) return false;
if (!getDetails().equals(other.getDetails())) return false;
if (hasRemediationUri() != other.hasRemediationUri()) return false;
if (hasRemediationUri()) {
if (!getRemediationUri().equals(other.getRemediationUri())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REMEDIATION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + remediationType_;
hash = (37 * hash) + DETAILS_FIELD_NUMBER;
hash = (53 * hash) + getDetails().hashCode();
if (hasRemediationUri()) {
hash = (37 * hash) + REMEDIATION_URI_FIELD_NUMBER;
hash = (53 * hash) + getRemediationUri().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation
parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
* Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @return The enum numeric value on the wire for remediationType.
*/
@java.lang.Override
public int getRemediationTypeValue() {
return remediationType_;
}
/**
*
*
*
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @param value The enum numeric value on the wire for remediationType to set.
* @return This builder for chaining.
*/
public Builder setRemediationTypeValue(int value) {
remediationType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @return The remediationType.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
getRemediationType() {
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType result =
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
.forNumber(remediationType_);
return result == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
.UNRECOGNIZED
: result;
}
/**
*
*
*
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @param value The remediationType to set.
* @return This builder for chaining.
*/
public Builder setRemediationType(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType
value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
remediationType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The type of remediation that can be applied.
*
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1;
*
*
* @return This builder for chaining.
*/
public Builder clearRemediationType() {
bitField0_ = (bitField0_ & ~0x00000001);
remediationType_ = 0;
onChanged();
return this;
}
private java.lang.Object details_ = "";
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @return The details.
*/
public java.lang.String getDetails() {
java.lang.Object ref = details_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
details_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @return The bytes for details.
*/
public com.google.protobuf.ByteString getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @param value The details to set.
* @return This builder for chaining.
*/
public Builder setDetails(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
details_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @return This builder for chaining.
*/
public Builder clearDetails() {
details_ = getDefaultInstance().getDetails();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Contains a comprehensive human-readable discussion of the remediation.
*
*
* string details = 2;
*
* @param value The bytes for details to set.
* @return This builder for chaining.
*/
public Builder setDetailsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
details_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private io.grafeas.v1.RelatedUrl remediationUri_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.RelatedUrl,
io.grafeas.v1.RelatedUrl.Builder,
io.grafeas.v1.RelatedUrlOrBuilder>
remediationUriBuilder_;
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*
* @return Whether the remediationUri field is set.
*/
public boolean hasRemediationUri() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*
* @return The remediationUri.
*/
public io.grafeas.v1.RelatedUrl getRemediationUri() {
if (remediationUriBuilder_ == null) {
return remediationUri_ == null
? io.grafeas.v1.RelatedUrl.getDefaultInstance()
: remediationUri_;
} else {
return remediationUriBuilder_.getMessage();
}
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
public Builder setRemediationUri(io.grafeas.v1.RelatedUrl value) {
if (remediationUriBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
remediationUri_ = value;
} else {
remediationUriBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
public Builder setRemediationUri(io.grafeas.v1.RelatedUrl.Builder builderForValue) {
if (remediationUriBuilder_ == null) {
remediationUri_ = builderForValue.build();
} else {
remediationUriBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
public Builder mergeRemediationUri(io.grafeas.v1.RelatedUrl value) {
if (remediationUriBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& remediationUri_ != null
&& remediationUri_ != io.grafeas.v1.RelatedUrl.getDefaultInstance()) {
getRemediationUriBuilder().mergeFrom(value);
} else {
remediationUri_ = value;
}
} else {
remediationUriBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
public Builder clearRemediationUri() {
bitField0_ = (bitField0_ & ~0x00000004);
remediationUri_ = null;
if (remediationUriBuilder_ != null) {
remediationUriBuilder_.dispose();
remediationUriBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
public io.grafeas.v1.RelatedUrl.Builder getRemediationUriBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getRemediationUriFieldBuilder().getBuilder();
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
public io.grafeas.v1.RelatedUrlOrBuilder getRemediationUriOrBuilder() {
if (remediationUriBuilder_ != null) {
return remediationUriBuilder_.getMessageOrBuilder();
} else {
return remediationUri_ == null
? io.grafeas.v1.RelatedUrl.getDefaultInstance()
: remediationUri_;
}
}
/**
*
*
*
* Contains the URL where to obtain the remediation.
*
*
* .grafeas.v1.RelatedUrl remediation_uri = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.RelatedUrl,
io.grafeas.v1.RelatedUrl.Builder,
io.grafeas.v1.RelatedUrlOrBuilder>
getRemediationUriFieldBuilder() {
if (remediationUriBuilder_ == null) {
remediationUriBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.RelatedUrl,
io.grafeas.v1.RelatedUrl.Builder,
io.grafeas.v1.RelatedUrlOrBuilder>(
getRemediationUri(), getParentForChildren(), isClean());
remediationUri_ = null;
}
return remediationUriBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation)
private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation();
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @return The cve.
*/
@java.lang.Override
public java.lang.String getCve() {
java.lang.Object ref = cve_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cve_ = s;
return s;
}
}
/**
*
*
*
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @return The bytes for cve.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCveBytes() {
java.lang.Object ref = cve_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cve_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object shortDescription_ = "";
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The shortDescription.
*/
@java.lang.Override
public java.lang.String getShortDescription() {
java.lang.Object ref = shortDescription_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shortDescription_ = s;
return s;
}
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The bytes for shortDescription.
*/
@java.lang.Override
public com.google.protobuf.ByteString getShortDescriptionBytes() {
java.lang.Object ref = shortDescription_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shortDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object longDescription_ = "";
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The longDescription.
*/
@java.lang.Override
public java.lang.String getLongDescription() {
java.lang.Object ref = longDescription_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
longDescription_ = s;
return s;
}
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The bytes for longDescription.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLongDescriptionBytes() {
java.lang.Object ref = longDescription_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
longDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RELATED_URIS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
@java.lang.Override
public java.util.List
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
@java.lang.Override
public java.util.List extends io.grafeas.v1.RelatedUrlOrBuilder>
getRelatedUrisOrBuilderList() {
return relatedUris_;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
@java.lang.Override
public int getRelatedUrisCount() {
return relatedUris_.size();
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
@java.lang.Override
public io.grafeas.v1.RelatedUrl getRelatedUris(int index) {
return relatedUris_.get(index);
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
@java.lang.Override
public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) {
return relatedUris_.get(index);
}
public static final int STATE_FIELD_NUMBER = 5;
private int state_ = 0;
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @return The state.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() {
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result =
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_);
return result == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED
: result;
}
public static final int IMPACTS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringList impacts_;
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @return A list containing the impacts.
*/
public com.google.protobuf.ProtocolStringList getImpactsList() {
return impacts_;
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @return The count of impacts.
*/
public int getImpactsCount() {
return impacts_.size();
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param index The index of the element to return.
* @return The impacts at the given index.
*/
public java.lang.String getImpacts(int index) {
return impacts_.get(index);
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param index The index of the value to return.
* @return The bytes of the impacts at the given index.
*/
public com.google.protobuf.ByteString getImpactsBytes(int index) {
return impacts_.getByteString(index);
}
public static final int JUSTIFICATION_FIELD_NUMBER = 7;
private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_;
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*
* @return Whether the justification field is set.
*/
@java.lang.Override
public boolean hasJustification() {
return justification_ != null;
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*
* @return The justification.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() {
return justification_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()
: justification_;
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder
getJustificationOrBuilder() {
return justification_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.getDefaultInstance()
: justification_;
}
public static final int REMEDIATIONS_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private java.util.List
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
@java.lang.Override
public java.util.List
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
@java.lang.Override
public java.util.List<
? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>
getRemediationsOrBuilderList() {
return remediations_;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
@java.lang.Override
public int getRemediationsCount() {
return remediations_.size();
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(
int index) {
return remediations_.get(index);
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder
getRemediationsOrBuilder(int index) {
return remediations_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_);
}
for (int i = 0; i < relatedUris_.size(); i++) {
output.writeMessage(4, relatedUris_.get(i));
}
if (state_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(5, state_);
}
for (int i = 0; i < impacts_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, impacts_.getRaw(i));
}
if (justification_ != null) {
output.writeMessage(7, getJustification());
}
for (int i = 0; i < remediations_.size(); i++) {
output.writeMessage(8, remediations_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cve_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_);
}
for (int i = 0; i < relatedUris_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, relatedUris_.get(i));
}
if (state_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_);
}
{
int dataSize = 0;
for (int i = 0; i < impacts_.size(); i++) {
dataSize += computeStringSizeNoTag(impacts_.getRaw(i));
}
size += dataSize;
size += 1 * getImpactsList().size();
}
if (justification_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getJustification());
}
for (int i = 0; i < remediations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, remediations_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote.Assessment)) {
return super.equals(obj);
}
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment other =
(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment) obj;
if (!getCve().equals(other.getCve())) return false;
if (!getShortDescription().equals(other.getShortDescription())) return false;
if (!getLongDescription().equals(other.getLongDescription())) return false;
if (!getRelatedUrisList().equals(other.getRelatedUrisList())) return false;
if (state_ != other.state_) return false;
if (!getImpactsList().equals(other.getImpactsList())) return false;
if (hasJustification() != other.hasJustification()) return false;
if (hasJustification()) {
if (!getJustification().equals(other.getJustification())) return false;
}
if (!getRemediationsList().equals(other.getRemediationsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CVE_FIELD_NUMBER;
hash = (53 * hash) + getCve().hashCode();
hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getShortDescription().hashCode();
hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getLongDescription().hashCode();
if (getRelatedUrisCount() > 0) {
hash = (37 * hash) + RELATED_URIS_FIELD_NUMBER;
hash = (53 * hash) + getRelatedUrisList().hashCode();
}
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
if (getImpactsCount() > 0) {
hash = (37 * hash) + IMPACTS_FIELD_NUMBER;
hash = (53 * hash) + getImpactsList().hashCode();
}
if (hasJustification()) {
hash = (37 * hash) + JUSTIFICATION_FIELD_NUMBER;
hash = (53 * hash) + getJustification().hashCode();
}
if (getRemediationsCount() > 0) {
hash = (37 * hash) + REMEDIATIONS_FIELD_NUMBER;
hash = (53 * hash) + getRemediationsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Assessment provides all information that is related to a single
* vulnerability for this product.
*
*
* Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote.Assessment}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @return The cve.
*/
public java.lang.String getCve() {
java.lang.Object ref = cve_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cve_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @return The bytes for cve.
*/
public com.google.protobuf.ByteString getCveBytes() {
java.lang.Object ref = cve_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cve_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @param value The cve to set.
* @return This builder for chaining.
*/
public Builder setCve(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cve_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @return This builder for chaining.
*/
public Builder clearCve() {
cve_ = getDefaultInstance().getCve();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
* tracking number for the vulnerability.
*
*
* string cve = 1;
*
* @param value The bytes for cve to set.
* @return This builder for chaining.
*/
public Builder setCveBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cve_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object shortDescription_ = "";
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The shortDescription.
*/
public java.lang.String getShortDescription() {
java.lang.Object ref = shortDescription_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shortDescription_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The bytes for shortDescription.
*/
public com.google.protobuf.ByteString getShortDescriptionBytes() {
java.lang.Object ref = shortDescription_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shortDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @param value The shortDescription to set.
* @return This builder for chaining.
*/
public Builder setShortDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shortDescription_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return This builder for chaining.
*/
public Builder clearShortDescription() {
shortDescription_ = getDefaultInstance().getShortDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @param value The bytes for shortDescription to set.
* @return This builder for chaining.
*/
public Builder setShortDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shortDescription_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object longDescription_ = "";
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The longDescription.
*/
public java.lang.String getLongDescription() {
java.lang.Object ref = longDescription_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
longDescription_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The bytes for longDescription.
*/
public com.google.protobuf.ByteString getLongDescriptionBytes() {
java.lang.Object ref = longDescription_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
longDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @param value The longDescription to set.
* @return This builder for chaining.
*/
public Builder setLongDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
longDescription_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return This builder for chaining.
*/
public Builder clearLongDescription() {
longDescription_ = getDefaultInstance().getLongDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @param value The bytes for longDescription to set.
* @return This builder for chaining.
*/
public Builder setLongDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
longDescription_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.util.List
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public java.util.List
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public int getRelatedUrisCount() {
if (relatedUrisBuilder_ == null) {
return relatedUris_.size();
} else {
return relatedUrisBuilder_.getCount();
}
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public io.grafeas.v1.RelatedUrl getRelatedUris(int index) {
if (relatedUrisBuilder_ == null) {
return relatedUris_.get(index);
} else {
return relatedUrisBuilder_.getMessage(index);
}
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl value) {
if (relatedUrisBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRelatedUrisIsMutable();
relatedUris_.set(index, value);
onChanged();
} else {
relatedUrisBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder setRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) {
if (relatedUrisBuilder_ == null) {
ensureRelatedUrisIsMutable();
relatedUris_.set(index, builderForValue.build());
onChanged();
} else {
relatedUrisBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder addRelatedUris(io.grafeas.v1.RelatedUrl value) {
if (relatedUrisBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRelatedUrisIsMutable();
relatedUris_.add(value);
onChanged();
} else {
relatedUrisBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl value) {
if (relatedUrisBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRelatedUrisIsMutable();
relatedUris_.add(index, value);
onChanged();
} else {
relatedUrisBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder addRelatedUris(io.grafeas.v1.RelatedUrl.Builder builderForValue) {
if (relatedUrisBuilder_ == null) {
ensureRelatedUrisIsMutable();
relatedUris_.add(builderForValue.build());
onChanged();
} else {
relatedUrisBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder addRelatedUris(int index, io.grafeas.v1.RelatedUrl.Builder builderForValue) {
if (relatedUrisBuilder_ == null) {
ensureRelatedUrisIsMutable();
relatedUris_.add(index, builderForValue.build());
onChanged();
} else {
relatedUrisBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder addAllRelatedUris(
java.lang.Iterable extends io.grafeas.v1.RelatedUrl> values) {
if (relatedUrisBuilder_ == null) {
ensureRelatedUrisIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedUris_);
onChanged();
} else {
relatedUrisBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder clearRelatedUris() {
if (relatedUrisBuilder_ == null) {
relatedUris_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
relatedUrisBuilder_.clear();
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public Builder removeRelatedUris(int index) {
if (relatedUrisBuilder_ == null) {
ensureRelatedUrisIsMutable();
relatedUris_.remove(index);
onChanged();
} else {
relatedUrisBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public io.grafeas.v1.RelatedUrl.Builder getRelatedUrisBuilder(int index) {
return getRelatedUrisFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public io.grafeas.v1.RelatedUrlOrBuilder getRelatedUrisOrBuilder(int index) {
if (relatedUrisBuilder_ == null) {
return relatedUris_.get(index);
} else {
return relatedUrisBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public java.util.List extends io.grafeas.v1.RelatedUrlOrBuilder>
getRelatedUrisOrBuilderList() {
if (relatedUrisBuilder_ != null) {
return relatedUrisBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(relatedUris_);
}
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder() {
return getRelatedUrisFieldBuilder()
.addBuilder(io.grafeas.v1.RelatedUrl.getDefaultInstance());
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public io.grafeas.v1.RelatedUrl.Builder addRelatedUrisBuilder(int index) {
return getRelatedUrisFieldBuilder()
.addBuilder(index, io.grafeas.v1.RelatedUrl.getDefaultInstance());
}
/**
*
*
*
* Holds a list of references associated with this vulnerability item and
* assessment. These uris have additional information about the
* vulnerability and the assessment itself. E.g. Link to a document which
* details how this assessment concluded the state of this vulnerability.
*
*
* repeated .grafeas.v1.RelatedUrl related_uris = 4;
*/
public java.util.List
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @return The state.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State getState() {
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State result =
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.forNumber(state_);
return result == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Provides the state of this Vulnerability assessment.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5;
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000010);
state_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList impacts_ =
com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureImpactsIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
impacts_ = new com.google.protobuf.LazyStringArrayList(impacts_);
bitField0_ |= 0x00000020;
}
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @return A list containing the impacts.
*/
public com.google.protobuf.ProtocolStringList getImpactsList() {
return impacts_.getUnmodifiableView();
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @return The count of impacts.
*/
public int getImpactsCount() {
return impacts_.size();
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param index The index of the element to return.
* @return The impacts at the given index.
*/
public java.lang.String getImpacts(int index) {
return impacts_.get(index);
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param index The index of the value to return.
* @return The bytes of the impacts at the given index.
*/
public com.google.protobuf.ByteString getImpactsBytes(int index) {
return impacts_.getByteString(index);
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param index The index to set the value at.
* @param value The impacts to set.
* @return This builder for chaining.
*/
public Builder setImpacts(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureImpactsIsMutable();
impacts_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param value The impacts to add.
* @return This builder for chaining.
*/
public Builder addImpacts(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureImpactsIsMutable();
impacts_.add(value);
onChanged();
return this;
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param values The impacts to add.
* @return This builder for chaining.
*/
public Builder addAllImpacts(java.lang.Iterable
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @return This builder for chaining.
*/
public Builder clearImpacts() {
impacts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* Contains information about the impact of this vulnerability,
* this will change with time.
*
*
* repeated string impacts = 6;
*
* @param value The bytes of the impacts to add.
* @return This builder for chaining.
*/
public Builder addImpactsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureImpactsIsMutable();
impacts_.add(value);
onChanged();
return this;
}
private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>
justificationBuilder_;
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*
* @return Whether the justification field is set.
*/
public boolean hasJustification() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*
* @return The justification.
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification getJustification() {
if (justificationBuilder_ == null) {
return justification_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
.getDefaultInstance()
: justification_;
} else {
return justificationBuilder_.getMessage();
}
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
public Builder setJustification(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) {
if (justificationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
justification_ = value;
} else {
justificationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
public Builder setJustification(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder
builderForValue) {
if (justificationBuilder_ == null) {
justification_ = builderForValue.build();
} else {
justificationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
public Builder mergeJustification(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification value) {
if (justificationBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& justification_ != null
&& justification_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
.getDefaultInstance()) {
getJustificationBuilder().mergeFrom(value);
} else {
justification_ = value;
}
} else {
justificationBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
public Builder clearJustification() {
bitField0_ = (bitField0_ & ~0x00000040);
justification_ = null;
if (justificationBuilder_ != null) {
justificationBuilder_.dispose();
justificationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder
getJustificationBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getJustificationFieldBuilder().getBuilder();
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder
getJustificationOrBuilder() {
if (justificationBuilder_ != null) {
return justificationBuilder_.getMessageOrBuilder();
} else {
return justification_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
.getDefaultInstance()
: justification_;
}
}
/**
*
*
*
* Justification provides the justification when the state of the
* assessment if NOT_AFFECTED.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>
getJustificationFieldBuilder() {
if (justificationBuilder_ == null) {
justificationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationOrBuilder>(
getJustification(), getParentForChildren(), isClean());
justification_ = null;
}
return justificationBuilder_;
}
private java.util.List
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public java.util.List
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public int getRemediationsCount() {
if (remediationsBuilder_ == null) {
return remediations_.size();
} else {
return remediationsBuilder_.getCount();
}
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation getRemediations(
int index) {
if (remediationsBuilder_ == null) {
return remediations_.get(index);
} else {
return remediationsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder setRemediations(
int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) {
if (remediationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRemediationsIsMutable();
remediations_.set(index, value);
onChanged();
} else {
remediationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder setRemediations(
int index,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder
builderForValue) {
if (remediationsBuilder_ == null) {
ensureRemediationsIsMutable();
remediations_.set(index, builderForValue.build());
onChanged();
} else {
remediationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder addRemediations(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) {
if (remediationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRemediationsIsMutable();
remediations_.add(value);
onChanged();
} else {
remediationsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder addRemediations(
int index, io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation value) {
if (remediationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRemediationsIsMutable();
remediations_.add(index, value);
onChanged();
} else {
remediationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder addRemediations(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder
builderForValue) {
if (remediationsBuilder_ == null) {
ensureRemediationsIsMutable();
remediations_.add(builderForValue.build());
onChanged();
} else {
remediationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder addRemediations(
int index,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder
builderForValue) {
if (remediationsBuilder_ == null) {
ensureRemediationsIsMutable();
remediations_.add(index, builderForValue.build());
onChanged();
} else {
remediationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder addAllRemediations(
java.lang.Iterable<
? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation>
values) {
if (remediationsBuilder_ == null) {
ensureRemediationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remediations_);
onChanged();
} else {
remediationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder clearRemediations() {
if (remediationsBuilder_ == null) {
remediations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
remediationsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public Builder removeRemediations(int index) {
if (remediationsBuilder_ == null) {
ensureRemediationsIsMutable();
remediations_.remove(index);
onChanged();
} else {
remediationsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder
getRemediationsBuilder(int index) {
return getRemediationsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder
getRemediationsOrBuilder(int index) {
if (remediationsBuilder_ == null) {
return remediations_.get(index);
} else {
return remediationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public java.util.List<
? extends io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>
getRemediationsOrBuilderList() {
if (remediationsBuilder_ != null) {
return remediationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(remediations_);
}
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder
addRemediationsBuilder() {
return getRemediationsFieldBuilder()
.addBuilder(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation
.getDefaultInstance());
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder
addRemediationsBuilder(int index) {
return getRemediationsFieldBuilder()
.addBuilder(
index,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation
.getDefaultInstance());
}
/**
*
*
*
* Specifies details on how to handle (and presumably, fix) a vulnerability.
*
*
*
* repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8;
*
*/
public java.util.List<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder>
getRemediationsBuilderList() {
return getRemediationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>
getRemediationsFieldBuilder() {
if (remediationsBuilder_ == null) {
remediationsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationOrBuilder>(
remediations_,
((bitField0_ & 0x00000080) != 0),
getParentForChildren(),
isClean());
remediations_ = null;
}
return remediationsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote.Assessment)
private static final io.grafeas.v1.VulnerabilityAssessmentNote.Assessment DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote.Assessment();
}
public static io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser* The title of the note. E.g. `Vex-Debian-11.4` ** *
string title = 1;
*
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
}
}
/**
*
*
* * The title of the note. E.g. `Vex-Debian-11.4` ** *
string title = 1;
*
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object shortDescription_ = "";
/**
*
*
* * A one sentence description of this Vex. ** *
string short_description = 2;
*
* @return The shortDescription.
*/
@java.lang.Override
public java.lang.String getShortDescription() {
java.lang.Object ref = shortDescription_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shortDescription_ = s;
return s;
}
}
/**
*
*
* * A one sentence description of this Vex. ** *
string short_description = 2;
*
* @return The bytes for shortDescription.
*/
@java.lang.Override
public com.google.protobuf.ByteString getShortDescriptionBytes() {
java.lang.Object ref = shortDescription_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shortDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LONG_DESCRIPTION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object longDescription_ = "";
/**
*
*
* * A detailed description of this Vex. ** *
string long_description = 3;
*
* @return The longDescription.
*/
@java.lang.Override
public java.lang.String getLongDescription() {
java.lang.Object ref = longDescription_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
longDescription_ = s;
return s;
}
}
/**
*
*
* * A detailed description of this Vex. ** *
string long_description = 3;
*
* @return The bytes for longDescription.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLongDescriptionBytes() {
java.lang.Object ref = longDescription_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
longDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LANGUAGE_CODE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object languageCode_ = "";
/**
*
*
* * Identifies the language used by this document, * corresponding to IETF BCP 47 / RFC 5646. ** *
string language_code = 4;
*
* @return The languageCode.
*/
@java.lang.Override
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
}
}
/**
*
*
* * Identifies the language used by this document, * corresponding to IETF BCP 47 / RFC 5646. ** *
string language_code = 4;
*
* @return The bytes for languageCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PUBLISHER_FIELD_NUMBER = 5;
private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_;
/**
*
*
* * Publisher details of this Note. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*
* @return Whether the publisher field is set.
*/
@java.lang.Override
public boolean hasPublisher() {
return publisher_ != null;
}
/**
*
*
* * Publisher details of this Note. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*
* @return The publisher.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() {
return publisher_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()
: publisher_;
}
/**
*
*
* * Publisher details of this Note. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder() {
return publisher_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()
: publisher_;
}
public static final int PRODUCT_FIELD_NUMBER = 6;
private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_;
/**
*
*
* * The product affected by this vex. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*
* @return Whether the product field is set.
*/
@java.lang.Override
public boolean hasProduct() {
return product_ != null;
}
/**
*
*
* * The product affected by this vex. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*
* @return The product.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() {
return product_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()
: product_;
}
/**
*
*
* * The product affected by this vex. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder() {
return product_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()
: product_;
}
public static final int ASSESSMENT_FIELD_NUMBER = 7;
private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_;
/**
*
*
* * Represents a vulnerability assessment for the product. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*
* @return Whether the assessment field is set.
*/
@java.lang.Override
public boolean hasAssessment() {
return assessment_ != null;
}
/**
*
*
* * Represents a vulnerability assessment for the product. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*
* @return The assessment.
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() {
return assessment_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()
: assessment_;
}
/**
*
*
* * Represents a vulnerability assessment for the product. ** *
.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
@java.lang.Override
public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder() {
return assessment_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()
: assessment_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, longDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_);
}
if (publisher_ != null) {
output.writeMessage(5, getPublisher());
}
if (product_ != null) {
output.writeMessage(6, getProduct());
}
if (assessment_ != null) {
output.writeMessage(7, getAssessment());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longDescription_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, longDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_);
}
if (publisher_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPublisher());
}
if (product_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProduct());
}
if (assessment_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAssessment());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grafeas.v1.VulnerabilityAssessmentNote)) {
return super.equals(obj);
}
io.grafeas.v1.VulnerabilityAssessmentNote other =
(io.grafeas.v1.VulnerabilityAssessmentNote) obj;
if (!getTitle().equals(other.getTitle())) return false;
if (!getShortDescription().equals(other.getShortDescription())) return false;
if (!getLongDescription().equals(other.getLongDescription())) return false;
if (!getLanguageCode().equals(other.getLanguageCode())) return false;
if (hasPublisher() != other.hasPublisher()) return false;
if (hasPublisher()) {
if (!getPublisher().equals(other.getPublisher())) return false;
}
if (hasProduct() != other.hasProduct()) return false;
if (hasProduct()) {
if (!getProduct().equals(other.getProduct())) return false;
}
if (hasAssessment() != other.hasAssessment()) return false;
if (hasAssessment()) {
if (!getAssessment().equals(other.getAssessment())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getShortDescription().hashCode();
hash = (37 * hash) + LONG_DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getLongDescription().hashCode();
hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
if (hasPublisher()) {
hash = (37 * hash) + PUBLISHER_FIELD_NUMBER;
hash = (53 * hash) + getPublisher().hashCode();
}
if (hasProduct()) {
hash = (37 * hash) + PRODUCT_FIELD_NUMBER;
hash = (53 * hash) + getProduct().hashCode();
}
if (hasAssessment()) {
hash = (37 * hash) + ASSESSMENT_FIELD_NUMBER;
hash = (53 * hash) + getAssessment().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.VulnerabilityAssessmentNote parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grafeas.v1.VulnerabilityAssessmentNote prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
* * A single VulnerabilityAssessmentNote represents * one particular product's vulnerability assessment for one CVE. ** * Protobuf type {@code grafeas.v1.VulnerabilityAssessmentNote} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* The title of the note. E.g. `Vex-Debian-11.4`
*
*
* string title = 1;
*
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The title of the note. E.g. `Vex-Debian-11.4`
*
*
* string title = 1;
*
* @return The bytes for title.
*/
public com.google.protobuf.ByteString getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The title of the note. E.g. `Vex-Debian-11.4`
*
*
* string title = 1;
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The title of the note. E.g. `Vex-Debian-11.4`
*
*
* string title = 1;
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The title of the note. E.g. `Vex-Debian-11.4`
*
*
* string title = 1;
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object shortDescription_ = "";
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The shortDescription.
*/
public java.lang.String getShortDescription() {
java.lang.Object ref = shortDescription_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shortDescription_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return The bytes for shortDescription.
*/
public com.google.protobuf.ByteString getShortDescriptionBytes() {
java.lang.Object ref = shortDescription_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shortDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @param value The shortDescription to set.
* @return This builder for chaining.
*/
public Builder setShortDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shortDescription_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @return This builder for chaining.
*/
public Builder clearShortDescription() {
shortDescription_ = getDefaultInstance().getShortDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* A one sentence description of this Vex.
*
*
* string short_description = 2;
*
* @param value The bytes for shortDescription to set.
* @return This builder for chaining.
*/
public Builder setShortDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shortDescription_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object longDescription_ = "";
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The longDescription.
*/
public java.lang.String getLongDescription() {
java.lang.Object ref = longDescription_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
longDescription_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return The bytes for longDescription.
*/
public com.google.protobuf.ByteString getLongDescriptionBytes() {
java.lang.Object ref = longDescription_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
longDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @param value The longDescription to set.
* @return This builder for chaining.
*/
public Builder setLongDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
longDescription_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @return This builder for chaining.
*/
public Builder clearLongDescription() {
longDescription_ = getDefaultInstance().getLongDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* A detailed description of this Vex.
*
*
* string long_description = 3;
*
* @param value The bytes for longDescription to set.
* @return This builder for chaining.
*/
public Builder setLongDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
longDescription_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object languageCode_ = "";
/**
*
*
*
* Identifies the language used by this document,
* corresponding to IETF BCP 47 / RFC 5646.
*
*
* string language_code = 4;
*
* @return The languageCode.
*/
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Identifies the language used by this document,
* corresponding to IETF BCP 47 / RFC 5646.
*
*
* string language_code = 4;
*
* @return The bytes for languageCode.
*/
public com.google.protobuf.ByteString getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Identifies the language used by this document,
* corresponding to IETF BCP 47 / RFC 5646.
*
*
* string language_code = 4;
*
* @param value The languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
languageCode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Identifies the language used by this document,
* corresponding to IETF BCP 47 / RFC 5646.
*
*
* string language_code = 4;
*
* @return This builder for chaining.
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Identifies the language used by this document,
* corresponding to IETF BCP 47 / RFC 5646.
*
*
* string language_code = 4;
*
* @param value The bytes for languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
languageCode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private io.grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher,
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder>
publisherBuilder_;
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*
* @return Whether the publisher field is set.
*/
public boolean hasPublisher() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*
* @return The publisher.
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher getPublisher() {
if (publisherBuilder_ == null) {
return publisher_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()
: publisher_;
} else {
return publisherBuilder_.getMessage();
}
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
public Builder setPublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher value) {
if (publisherBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
publisher_ = value;
} else {
publisherBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
public Builder setPublisher(
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder builderForValue) {
if (publisherBuilder_ == null) {
publisher_ = builderForValue.build();
} else {
publisherBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
public Builder mergePublisher(io.grafeas.v1.VulnerabilityAssessmentNote.Publisher value) {
if (publisherBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& publisher_ != null
&& publisher_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()) {
getPublisherBuilder().mergeFrom(value);
} else {
publisher_ = value;
}
} else {
publisherBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
public Builder clearPublisher() {
bitField0_ = (bitField0_ & ~0x00000010);
publisher_ = null;
if (publisherBuilder_ != null) {
publisherBuilder_.dispose();
publisherBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder getPublisherBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getPublisherFieldBuilder().getBuilder();
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder getPublisherOrBuilder() {
if (publisherBuilder_ != null) {
return publisherBuilder_.getMessageOrBuilder();
} else {
return publisher_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.getDefaultInstance()
: publisher_;
}
}
/**
*
*
*
* Publisher details of this Note.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher,
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder>
getPublisherFieldBuilder() {
if (publisherBuilder_ == null) {
publisherBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher,
io.grafeas.v1.VulnerabilityAssessmentNote.Publisher.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.PublisherOrBuilder>(
getPublisher(), getParentForChildren(), isClean());
publisher_ = null;
}
return publisherBuilder_;
}
private io.grafeas.v1.VulnerabilityAssessmentNote.Product product_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Product,
io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder>
productBuilder_;
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*
* @return Whether the product field is set.
*/
public boolean hasProduct() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*
* @return The product.
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Product getProduct() {
if (productBuilder_ == null) {
return product_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()
: product_;
} else {
return productBuilder_.getMessage();
}
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
public Builder setProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product value) {
if (productBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
} else {
productBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
public Builder setProduct(
io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder builderForValue) {
if (productBuilder_ == null) {
product_ = builderForValue.build();
} else {
productBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
public Builder mergeProduct(io.grafeas.v1.VulnerabilityAssessmentNote.Product value) {
if (productBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& product_ != null
&& product_ != io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()) {
getProductBuilder().mergeFrom(value);
} else {
product_ = value;
}
} else {
productBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
public Builder clearProduct() {
bitField0_ = (bitField0_ & ~0x00000020);
product_ = null;
if (productBuilder_ != null) {
productBuilder_.dispose();
productBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder getProductBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getProductFieldBuilder().getBuilder();
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder getProductOrBuilder() {
if (productBuilder_ != null) {
return productBuilder_.getMessageOrBuilder();
} else {
return product_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Product.getDefaultInstance()
: product_;
}
}
/**
*
*
*
* The product affected by this vex.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Product,
io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder>
getProductFieldBuilder() {
if (productBuilder_ == null) {
productBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Product,
io.grafeas.v1.VulnerabilityAssessmentNote.Product.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.ProductOrBuilder>(
getProduct(), getParentForChildren(), isClean());
product_ = null;
}
return productBuilder_;
}
private io.grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder>
assessmentBuilder_;
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*
* @return Whether the assessment field is set.
*/
public boolean hasAssessment() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*
* @return The assessment.
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment getAssessment() {
if (assessmentBuilder_ == null) {
return assessment_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()
: assessment_;
} else {
return assessmentBuilder_.getMessage();
}
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
public Builder setAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment value) {
if (assessmentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
assessment_ = value;
} else {
assessmentBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
public Builder setAssessment(
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder builderForValue) {
if (assessmentBuilder_ == null) {
assessment_ = builderForValue.build();
} else {
assessmentBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
public Builder mergeAssessment(io.grafeas.v1.VulnerabilityAssessmentNote.Assessment value) {
if (assessmentBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& assessment_ != null
&& assessment_
!= io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()) {
getAssessmentBuilder().mergeFrom(value);
} else {
assessment_ = value;
}
} else {
assessmentBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
public Builder clearAssessment() {
bitField0_ = (bitField0_ & ~0x00000040);
assessment_ = null;
if (assessmentBuilder_ != null) {
assessmentBuilder_.dispose();
assessmentBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder getAssessmentBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getAssessmentFieldBuilder().getBuilder();
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
public io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder getAssessmentOrBuilder() {
if (assessmentBuilder_ != null) {
return assessmentBuilder_.getMessageOrBuilder();
} else {
return assessment_ == null
? io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.getDefaultInstance()
: assessment_;
}
}
/**
*
*
*
* Represents a vulnerability assessment for the product.
*
*
* .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder>
getAssessmentFieldBuilder() {
if (assessmentBuilder_ == null) {
assessmentBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment,
io.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Builder,
io.grafeas.v1.VulnerabilityAssessmentNote.AssessmentOrBuilder>(
getAssessment(), getParentForChildren(), isClean());
assessment_ = null;
}
return assessmentBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.VulnerabilityAssessmentNote)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.VulnerabilityAssessmentNote)
private static final io.grafeas.v1.VulnerabilityAssessmentNote DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.VulnerabilityAssessmentNote();
}
public static io.grafeas.v1.VulnerabilityAssessmentNote getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser