
io.grafeas.v1beta1.pkg.Distribution Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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: google/devtools/containeranalysis/v1beta1/package/package.proto
// Protobuf Java Version: 3.25.5
package io.grafeas.v1beta1.pkg;
/**
*
*
*
* This represents a particular channel of distribution for a given package.
* E.g., Debian's jessie-backports dpkg mirror.
*
*
* Protobuf type {@code grafeas.v1beta1.package.Distribution}
*/
public final class Distribution extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:grafeas.v1beta1.package.Distribution)
DistributionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Distribution.newBuilder() to construct.
private Distribution(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Distribution() {
cpeUri_ = "";
architecture_ = 0;
maintainer_ = "";
url_ = "";
description_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Distribution();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1beta1.pkg.PackageOuterClass
.internal_static_grafeas_v1beta1_package_Distribution_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1beta1.pkg.PackageOuterClass
.internal_static_grafeas_v1beta1_package_Distribution_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1beta1.pkg.Distribution.class,
io.grafeas.v1beta1.pkg.Distribution.Builder.class);
}
private int bitField0_;
public static final int CPE_URI_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object cpeUri_ = "";
/**
*
*
*
* Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
* denoting the package manager version distributing a package.
*
*
* string cpe_uri = 1;
*
* @return The cpeUri.
*/
@java.lang.Override
public java.lang.String getCpeUri() {
java.lang.Object ref = cpeUri_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cpeUri_ = s;
return s;
}
}
/**
*
*
*
* Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
* denoting the package manager version distributing a package.
*
*
* string cpe_uri = 1;
*
* @return The bytes for cpeUri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCpeUriBytes() {
java.lang.Object ref = cpeUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cpeUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ARCHITECTURE_FIELD_NUMBER = 2;
private int architecture_ = 0;
/**
*
*
*
* The CPU architecture for which packages in this distribution channel were
* built.
*
*
* .grafeas.v1beta1.package.Architecture architecture = 2;
*
* @return The enum numeric value on the wire for architecture.
*/
@java.lang.Override
public int getArchitectureValue() {
return architecture_;
}
/**
*
*
*
* The CPU architecture for which packages in this distribution channel were
* built.
*
*
* .grafeas.v1beta1.package.Architecture architecture = 2;
*
* @return The architecture.
*/
@java.lang.Override
public io.grafeas.v1beta1.pkg.Architecture getArchitecture() {
io.grafeas.v1beta1.pkg.Architecture result =
io.grafeas.v1beta1.pkg.Architecture.forNumber(architecture_);
return result == null ? io.grafeas.v1beta1.pkg.Architecture.UNRECOGNIZED : result;
}
public static final int LATEST_VERSION_FIELD_NUMBER = 3;
private io.grafeas.v1beta1.pkg.Version latestVersion_;
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*
* @return Whether the latestVersion field is set.
*/
@java.lang.Override
public boolean hasLatestVersion() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*
* @return The latestVersion.
*/
@java.lang.Override
public io.grafeas.v1beta1.pkg.Version getLatestVersion() {
return latestVersion_ == null
? io.grafeas.v1beta1.pkg.Version.getDefaultInstance()
: latestVersion_;
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
@java.lang.Override
public io.grafeas.v1beta1.pkg.VersionOrBuilder getLatestVersionOrBuilder() {
return latestVersion_ == null
? io.grafeas.v1beta1.pkg.Version.getDefaultInstance()
: latestVersion_;
}
public static final int MAINTAINER_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object maintainer_ = "";
/**
*
*
*
* A freeform string denoting the maintainer of this package.
*
*
* string maintainer = 4;
*
* @return The maintainer.
*/
@java.lang.Override
public java.lang.String getMaintainer() {
java.lang.Object ref = maintainer_;
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();
maintainer_ = s;
return s;
}
}
/**
*
*
*
* A freeform string denoting the maintainer of this package.
*
*
* string maintainer = 4;
*
* @return The bytes for maintainer.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMaintainerBytes() {
java.lang.Object ref = maintainer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
maintainer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object url_ = "";
/**
*
*
*
* The distribution channel-specific homepage for this package.
*
*
* string url = 5;
*
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
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();
url_ = s;
return s;
}
}
/**
*
*
*
* The distribution channel-specific homepage for this package.
*
*
* string url = 5;
*
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* The distribution channel-specific description of this package.
*
*
* string description = 6;
*
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
*
*
* The distribution channel-specific description of this package.
*
*
* string description = 6;
*
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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(cpeUri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_);
}
if (architecture_ != io.grafeas.v1beta1.pkg.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) {
output.writeEnum(2, architecture_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getLatestVersion());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, maintainer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, url_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
}
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(cpeUri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_);
}
if (architecture_ != io.grafeas.v1beta1.pkg.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, architecture_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLatestVersion());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, maintainer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, url_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
}
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.v1beta1.pkg.Distribution)) {
return super.equals(obj);
}
io.grafeas.v1beta1.pkg.Distribution other = (io.grafeas.v1beta1.pkg.Distribution) obj;
if (!getCpeUri().equals(other.getCpeUri())) return false;
if (architecture_ != other.architecture_) return false;
if (hasLatestVersion() != other.hasLatestVersion()) return false;
if (hasLatestVersion()) {
if (!getLatestVersion().equals(other.getLatestVersion())) return false;
}
if (!getMaintainer().equals(other.getMaintainer())) return false;
if (!getUrl().equals(other.getUrl())) return false;
if (!getDescription().equals(other.getDescription())) 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) + CPE_URI_FIELD_NUMBER;
hash = (53 * hash) + getCpeUri().hashCode();
hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER;
hash = (53 * hash) + architecture_;
if (hasLatestVersion()) {
hash = (37 * hash) + LATEST_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getLatestVersion().hashCode();
}
hash = (37 * hash) + MAINTAINER_FIELD_NUMBER;
hash = (53 * hash) + getMaintainer().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1beta1.pkg.Distribution parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1beta1.pkg.Distribution parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1beta1.pkg.Distribution parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1beta1.pkg.Distribution 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.v1beta1.pkg.Distribution parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1beta1.pkg.Distribution parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1beta1.pkg.Distribution parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1beta1.pkg.Distribution 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.v1beta1.pkg.Distribution parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1beta1.pkg.Distribution 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.v1beta1.pkg.Distribution parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1beta1.pkg.Distribution 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.v1beta1.pkg.Distribution 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;
}
/**
*
*
*
* This represents a particular channel of distribution for a given package.
* E.g., Debian's jessie-backports dpkg mirror.
*
*
* Protobuf type {@code grafeas.v1beta1.package.Distribution}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:grafeas.v1beta1.package.Distribution)
io.grafeas.v1beta1.pkg.DistributionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1beta1.pkg.PackageOuterClass
.internal_static_grafeas_v1beta1_package_Distribution_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1beta1.pkg.PackageOuterClass
.internal_static_grafeas_v1beta1_package_Distribution_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1beta1.pkg.Distribution.class,
io.grafeas.v1beta1.pkg.Distribution.Builder.class);
}
// Construct using io.grafeas.v1beta1.pkg.Distribution.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getLatestVersionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
cpeUri_ = "";
architecture_ = 0;
latestVersion_ = null;
if (latestVersionBuilder_ != null) {
latestVersionBuilder_.dispose();
latestVersionBuilder_ = null;
}
maintainer_ = "";
url_ = "";
description_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.grafeas.v1beta1.pkg.PackageOuterClass
.internal_static_grafeas_v1beta1_package_Distribution_descriptor;
}
@java.lang.Override
public io.grafeas.v1beta1.pkg.Distribution getDefaultInstanceForType() {
return io.grafeas.v1beta1.pkg.Distribution.getDefaultInstance();
}
@java.lang.Override
public io.grafeas.v1beta1.pkg.Distribution build() {
io.grafeas.v1beta1.pkg.Distribution result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grafeas.v1beta1.pkg.Distribution buildPartial() {
io.grafeas.v1beta1.pkg.Distribution result = new io.grafeas.v1beta1.pkg.Distribution(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(io.grafeas.v1beta1.pkg.Distribution result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.cpeUri_ = cpeUri_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.architecture_ = architecture_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.latestVersion_ =
latestVersionBuilder_ == null ? latestVersion_ : latestVersionBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.maintainer_ = maintainer_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.url_ = url_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.description_ = description_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.grafeas.v1beta1.pkg.Distribution) {
return mergeFrom((io.grafeas.v1beta1.pkg.Distribution) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grafeas.v1beta1.pkg.Distribution other) {
if (other == io.grafeas.v1beta1.pkg.Distribution.getDefaultInstance()) return this;
if (!other.getCpeUri().isEmpty()) {
cpeUri_ = other.cpeUri_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.architecture_ != 0) {
setArchitectureValue(other.getArchitectureValue());
}
if (other.hasLatestVersion()) {
mergeLatestVersion(other.getLatestVersion());
}
if (!other.getMaintainer().isEmpty()) {
maintainer_ = other.maintainer_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
bitField0_ |= 0x00000010;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000020;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
cpeUri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
architecture_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
input.readMessage(getLatestVersionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
maintainer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
url_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object cpeUri_ = "";
/**
*
*
*
* Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
* denoting the package manager version distributing a package.
*
*
* string cpe_uri = 1;
*
* @return The cpeUri.
*/
public java.lang.String getCpeUri() {
java.lang.Object ref = cpeUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cpeUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
* denoting the package manager version distributing a package.
*
*
* string cpe_uri = 1;
*
* @return The bytes for cpeUri.
*/
public com.google.protobuf.ByteString getCpeUriBytes() {
java.lang.Object ref = cpeUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cpeUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
* denoting the package manager version distributing a package.
*
*
* string cpe_uri = 1;
*
* @param value The cpeUri to set.
* @return This builder for chaining.
*/
public Builder setCpeUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cpeUri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
* denoting the package manager version distributing a package.
*
*
* string cpe_uri = 1;
*
* @return This builder for chaining.
*/
public Builder clearCpeUri() {
cpeUri_ = getDefaultInstance().getCpeUri();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
* denoting the package manager version distributing a package.
*
*
* string cpe_uri = 1;
*
* @param value The bytes for cpeUri to set.
* @return This builder for chaining.
*/
public Builder setCpeUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cpeUri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int architecture_ = 0;
/**
*
*
*
* The CPU architecture for which packages in this distribution channel were
* built.
*
*
* .grafeas.v1beta1.package.Architecture architecture = 2;
*
* @return The enum numeric value on the wire for architecture.
*/
@java.lang.Override
public int getArchitectureValue() {
return architecture_;
}
/**
*
*
*
* The CPU architecture for which packages in this distribution channel were
* built.
*
*
* .grafeas.v1beta1.package.Architecture architecture = 2;
*
* @param value The enum numeric value on the wire for architecture to set.
* @return This builder for chaining.
*/
public Builder setArchitectureValue(int value) {
architecture_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The CPU architecture for which packages in this distribution channel were
* built.
*
*
* .grafeas.v1beta1.package.Architecture architecture = 2;
*
* @return The architecture.
*/
@java.lang.Override
public io.grafeas.v1beta1.pkg.Architecture getArchitecture() {
io.grafeas.v1beta1.pkg.Architecture result =
io.grafeas.v1beta1.pkg.Architecture.forNumber(architecture_);
return result == null ? io.grafeas.v1beta1.pkg.Architecture.UNRECOGNIZED : result;
}
/**
*
*
*
* The CPU architecture for which packages in this distribution channel were
* built.
*
*
* .grafeas.v1beta1.package.Architecture architecture = 2;
*
* @param value The architecture to set.
* @return This builder for chaining.
*/
public Builder setArchitecture(io.grafeas.v1beta1.pkg.Architecture value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
architecture_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The CPU architecture for which packages in this distribution channel were
* built.
*
*
* .grafeas.v1beta1.package.Architecture architecture = 2;
*
* @return This builder for chaining.
*/
public Builder clearArchitecture() {
bitField0_ = (bitField0_ & ~0x00000002);
architecture_ = 0;
onChanged();
return this;
}
private io.grafeas.v1beta1.pkg.Version latestVersion_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1beta1.pkg.Version,
io.grafeas.v1beta1.pkg.Version.Builder,
io.grafeas.v1beta1.pkg.VersionOrBuilder>
latestVersionBuilder_;
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*
* @return Whether the latestVersion field is set.
*/
public boolean hasLatestVersion() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*
* @return The latestVersion.
*/
public io.grafeas.v1beta1.pkg.Version getLatestVersion() {
if (latestVersionBuilder_ == null) {
return latestVersion_ == null
? io.grafeas.v1beta1.pkg.Version.getDefaultInstance()
: latestVersion_;
} else {
return latestVersionBuilder_.getMessage();
}
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
public Builder setLatestVersion(io.grafeas.v1beta1.pkg.Version value) {
if (latestVersionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
latestVersion_ = value;
} else {
latestVersionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
public Builder setLatestVersion(io.grafeas.v1beta1.pkg.Version.Builder builderForValue) {
if (latestVersionBuilder_ == null) {
latestVersion_ = builderForValue.build();
} else {
latestVersionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
public Builder mergeLatestVersion(io.grafeas.v1beta1.pkg.Version value) {
if (latestVersionBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& latestVersion_ != null
&& latestVersion_ != io.grafeas.v1beta1.pkg.Version.getDefaultInstance()) {
getLatestVersionBuilder().mergeFrom(value);
} else {
latestVersion_ = value;
}
} else {
latestVersionBuilder_.mergeFrom(value);
}
if (latestVersion_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
public Builder clearLatestVersion() {
bitField0_ = (bitField0_ & ~0x00000004);
latestVersion_ = null;
if (latestVersionBuilder_ != null) {
latestVersionBuilder_.dispose();
latestVersionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
public io.grafeas.v1beta1.pkg.Version.Builder getLatestVersionBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getLatestVersionFieldBuilder().getBuilder();
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
public io.grafeas.v1beta1.pkg.VersionOrBuilder getLatestVersionOrBuilder() {
if (latestVersionBuilder_ != null) {
return latestVersionBuilder_.getMessageOrBuilder();
} else {
return latestVersion_ == null
? io.grafeas.v1beta1.pkg.Version.getDefaultInstance()
: latestVersion_;
}
}
/**
*
*
*
* The latest available version of this package in this distribution channel.
*
*
* .grafeas.v1beta1.package.Version latest_version = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1beta1.pkg.Version,
io.grafeas.v1beta1.pkg.Version.Builder,
io.grafeas.v1beta1.pkg.VersionOrBuilder>
getLatestVersionFieldBuilder() {
if (latestVersionBuilder_ == null) {
latestVersionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1beta1.pkg.Version,
io.grafeas.v1beta1.pkg.Version.Builder,
io.grafeas.v1beta1.pkg.VersionOrBuilder>(
getLatestVersion(), getParentForChildren(), isClean());
latestVersion_ = null;
}
return latestVersionBuilder_;
}
private java.lang.Object maintainer_ = "";
/**
*
*
*
* A freeform string denoting the maintainer of this package.
*
*
* string maintainer = 4;
*
* @return The maintainer.
*/
public java.lang.String getMaintainer() {
java.lang.Object ref = maintainer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
maintainer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A freeform string denoting the maintainer of this package.
*
*
* string maintainer = 4;
*
* @return The bytes for maintainer.
*/
public com.google.protobuf.ByteString getMaintainerBytes() {
java.lang.Object ref = maintainer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
maintainer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A freeform string denoting the maintainer of this package.
*
*
* string maintainer = 4;
*
* @param value The maintainer to set.
* @return This builder for chaining.
*/
public Builder setMaintainer(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
maintainer_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* A freeform string denoting the maintainer of this package.
*
*
* string maintainer = 4;
*
* @return This builder for chaining.
*/
public Builder clearMaintainer() {
maintainer_ = getDefaultInstance().getMaintainer();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* A freeform string denoting the maintainer of this package.
*
*
* string maintainer = 4;
*
* @param value The bytes for maintainer to set.
* @return This builder for chaining.
*/
public Builder setMaintainerBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
maintainer_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
*
*
*
* The distribution channel-specific homepage for this package.
*
*
* string url = 5;
*
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The distribution channel-specific homepage for this package.
*
*
* string url = 5;
*
* @return The bytes for url.
*/
public com.google.protobuf.ByteString getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The distribution channel-specific homepage for this package.
*
*
* string url = 5;
*
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The distribution channel-specific homepage for this package.
*
*
* string url = 5;
*
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* The distribution channel-specific homepage for this package.
*
*
* string url = 5;
*
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* The distribution channel-specific description of this package.
*
*
* string description = 6;
*
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The distribution channel-specific description of this package.
*
*
* string description = 6;
*
* @return The bytes for description.
*/
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The distribution channel-specific description of this package.
*
*
* string description = 6;
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The distribution channel-specific description of this package.
*
*
* string description = 6;
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* The distribution channel-specific description of this package.
*
*
* string description = 6;
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000020;
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.v1beta1.package.Distribution)
}
// @@protoc_insertion_point(class_scope:grafeas.v1beta1.package.Distribution)
private static final io.grafeas.v1beta1.pkg.Distribution DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1beta1.pkg.Distribution();
}
public static io.grafeas.v1beta1.pkg.Distribution getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Distribution parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.grafeas.v1beta1.pkg.Distribution getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy