io.grafeas.v1.UpgradeNote Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grafeas Show documentation
Show all versions of grafeas Show documentation
Java idiomatic client for Grafeas.
/*
* Copyright 2019 The Grafeas Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grafeas/v1/upgrade.proto
package io.grafeas.v1;
/**
*
*
*
* An Upgrade Note represents a potential upgrade of a package to a given
* version. For each package version combination (i.e. bash 4.0, bash 4.1,
* bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
* represents the information related to the update.
*
*
* Protobuf type {@code grafeas.v1.UpgradeNote}
*/
public final class UpgradeNote extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeNote)
UpgradeNoteOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpgradeNote.newBuilder() to construct.
private UpgradeNote(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UpgradeNote() {
package_ = "";
distributions_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new UpgradeNote();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class);
}
public static final int PACKAGE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object package_ = "";
/**
*
*
*
* Required for non-Windows OS. The package this Upgrade is for.
*
*
* string package = 1;
*
* @return The package.
*/
@java.lang.Override
public java.lang.String getPackage() {
java.lang.Object ref = package_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
package_ = s;
return s;
}
}
/**
*
*
*
* Required for non-Windows OS. The package this Upgrade is for.
*
*
* string package = 1;
*
* @return The bytes for package.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPackageBytes() {
java.lang.Object ref = package_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
package_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 2;
private io.grafeas.v1.Version version_;
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*
* @return Whether the version field is set.
*/
@java.lang.Override
public boolean hasVersion() {
return version_ != null;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*
* @return The version.
*/
@java.lang.Override
public io.grafeas.v1.Version getVersion() {
return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
@java.lang.Override
public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
}
public static final int DISTRIBUTIONS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List distributions_;
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
@java.lang.Override
public java.util.List getDistributionsList() {
return distributions_;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
@java.lang.Override
public java.util.List extends io.grafeas.v1.UpgradeDistributionOrBuilder>
getDistributionsOrBuilderList() {
return distributions_;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
@java.lang.Override
public int getDistributionsCount() {
return distributions_.size();
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
@java.lang.Override
public io.grafeas.v1.UpgradeDistribution getDistributions(int index) {
return distributions_.get(index);
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
@java.lang.Override
public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder(int index) {
return distributions_.get(index);
}
public static final int WINDOWS_UPDATE_FIELD_NUMBER = 4;
private io.grafeas.v1.WindowsUpdate windowsUpdate_;
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*
* @return Whether the windowsUpdate field is set.
*/
@java.lang.Override
public boolean hasWindowsUpdate() {
return windowsUpdate_ != null;
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*
* @return The windowsUpdate.
*/
@java.lang.Override
public io.grafeas.v1.WindowsUpdate getWindowsUpdate() {
return windowsUpdate_ == null
? io.grafeas.v1.WindowsUpdate.getDefaultInstance()
: windowsUpdate_;
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
@java.lang.Override
public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() {
return windowsUpdate_ == null
? io.grafeas.v1.WindowsUpdate.getDefaultInstance()
: windowsUpdate_;
}
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(package_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, package_);
}
if (version_ != null) {
output.writeMessage(2, getVersion());
}
for (int i = 0; i < distributions_.size(); i++) {
output.writeMessage(3, distributions_.get(i));
}
if (windowsUpdate_ != null) {
output.writeMessage(4, getWindowsUpdate());
}
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(package_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, package_);
}
if (version_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVersion());
}
for (int i = 0; i < distributions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, distributions_.get(i));
}
if (windowsUpdate_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getWindowsUpdate());
}
size += 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.UpgradeNote)) {
return super.equals(obj);
}
io.grafeas.v1.UpgradeNote other = (io.grafeas.v1.UpgradeNote) obj;
if (!getPackage().equals(other.getPackage())) return false;
if (hasVersion() != other.hasVersion()) return false;
if (hasVersion()) {
if (!getVersion().equals(other.getVersion())) return false;
}
if (!getDistributionsList().equals(other.getDistributionsList())) return false;
if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false;
if (hasWindowsUpdate()) {
if (!getWindowsUpdate().equals(other.getWindowsUpdate())) return false;
}
if (!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) + PACKAGE_FIELD_NUMBER;
hash = (53 * hash) + getPackage().hashCode();
if (hasVersion()) {
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
}
if (getDistributionsCount() > 0) {
hash = (37 * hash) + DISTRIBUTIONS_FIELD_NUMBER;
hash = (53 * hash) + getDistributionsList().hashCode();
}
if (hasWindowsUpdate()) {
hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER;
hash = (53 * hash) + getWindowsUpdate().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.UpgradeNote parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.UpgradeNote parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.UpgradeNote parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.UpgradeNote parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.UpgradeNote parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.UpgradeNote parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.UpgradeNote parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.UpgradeNote parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.UpgradeNote parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.UpgradeNote parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.UpgradeNote parseFrom(com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.UpgradeNote parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grafeas.v1.UpgradeNote prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* An Upgrade Note represents a potential upgrade of a package to a given
* version. For each package version combination (i.e. bash 4.0, bash 4.1,
* bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field
* represents the information related to the update.
*
*
* Protobuf type {@code grafeas.v1.UpgradeNote}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeNote)
io.grafeas.v1.UpgradeNoteOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.UpgradeNote.class, io.grafeas.v1.UpgradeNote.Builder.class);
}
// Construct using io.grafeas.v1.UpgradeNote.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
package_ = "";
version_ = null;
if (versionBuilder_ != null) {
versionBuilder_.dispose();
versionBuilder_ = null;
}
if (distributionsBuilder_ == null) {
distributions_ = java.util.Collections.emptyList();
} else {
distributions_ = null;
distributionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
windowsUpdate_ = null;
if (windowsUpdateBuilder_ != null) {
windowsUpdateBuilder_.dispose();
windowsUpdateBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeNote_descriptor;
}
@java.lang.Override
public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() {
return io.grafeas.v1.UpgradeNote.getDefaultInstance();
}
@java.lang.Override
public io.grafeas.v1.UpgradeNote build() {
io.grafeas.v1.UpgradeNote result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grafeas.v1.UpgradeNote buildPartial() {
io.grafeas.v1.UpgradeNote result = new io.grafeas.v1.UpgradeNote(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.grafeas.v1.UpgradeNote result) {
if (distributionsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
distributions_ = java.util.Collections.unmodifiableList(distributions_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.distributions_ = distributions_;
} else {
result.distributions_ = distributionsBuilder_.build();
}
}
private void buildPartial0(io.grafeas.v1.UpgradeNote result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.package_ = package_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.version_ = versionBuilder_ == null ? version_ : versionBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.windowsUpdate_ =
windowsUpdateBuilder_ == null ? windowsUpdate_ : windowsUpdateBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.grafeas.v1.UpgradeNote) {
return mergeFrom((io.grafeas.v1.UpgradeNote) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grafeas.v1.UpgradeNote other) {
if (other == io.grafeas.v1.UpgradeNote.getDefaultInstance()) return this;
if (!other.getPackage().isEmpty()) {
package_ = other.package_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasVersion()) {
mergeVersion(other.getVersion());
}
if (distributionsBuilder_ == null) {
if (!other.distributions_.isEmpty()) {
if (distributions_.isEmpty()) {
distributions_ = other.distributions_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureDistributionsIsMutable();
distributions_.addAll(other.distributions_);
}
onChanged();
}
} else {
if (!other.distributions_.isEmpty()) {
if (distributionsBuilder_.isEmpty()) {
distributionsBuilder_.dispose();
distributionsBuilder_ = null;
distributions_ = other.distributions_;
bitField0_ = (bitField0_ & ~0x00000004);
distributionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getDistributionsFieldBuilder()
: null;
} else {
distributionsBuilder_.addAllMessages(other.distributions_);
}
}
}
if (other.hasWindowsUpdate()) {
mergeWindowsUpdate(other.getWindowsUpdate());
}
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:
{
package_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(getVersionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
io.grafeas.v1.UpgradeDistribution m =
input.readMessage(
io.grafeas.v1.UpgradeDistribution.parser(), extensionRegistry);
if (distributionsBuilder_ == null) {
ensureDistributionsIsMutable();
distributions_.add(m);
} else {
distributionsBuilder_.addMessage(m);
}
break;
} // case 26
case 34:
{
input.readMessage(getWindowsUpdateFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
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 package_ = "";
/**
*
*
*
* Required for non-Windows OS. The package this Upgrade is for.
*
*
* string package = 1;
*
* @return The package.
*/
public java.lang.String getPackage() {
java.lang.Object ref = package_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
package_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required for non-Windows OS. The package this Upgrade is for.
*
*
* string package = 1;
*
* @return The bytes for package.
*/
public com.google.protobuf.ByteString getPackageBytes() {
java.lang.Object ref = package_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
package_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required for non-Windows OS. The package this Upgrade is for.
*
*
* string package = 1;
*
* @param value The package to set.
* @return This builder for chaining.
*/
public Builder setPackage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
package_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The package this Upgrade is for.
*
*
* string package = 1;
*
* @return This builder for chaining.
*/
public Builder clearPackage() {
package_ = getDefaultInstance().getPackage();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The package this Upgrade is for.
*
*
* string package = 1;
*
* @param value The bytes for package to set.
* @return This builder for chaining.
*/
public Builder setPackageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
package_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private io.grafeas.v1.Version version_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
versionBuilder_;
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*
* @return Whether the version field is set.
*/
public boolean hasVersion() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*
* @return The version.
*/
public io.grafeas.v1.Version getVersion() {
if (versionBuilder_ == null) {
return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
} else {
return versionBuilder_.getMessage();
}
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
public Builder setVersion(io.grafeas.v1.Version value) {
if (versionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
} else {
versionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
public Builder setVersion(io.grafeas.v1.Version.Builder builderForValue) {
if (versionBuilder_ == null) {
version_ = builderForValue.build();
} else {
versionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
public Builder mergeVersion(io.grafeas.v1.Version value) {
if (versionBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& version_ != null
&& version_ != io.grafeas.v1.Version.getDefaultInstance()) {
getVersionBuilder().mergeFrom(value);
} else {
version_ = value;
}
} else {
versionBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
public Builder clearVersion() {
bitField0_ = (bitField0_ & ~0x00000002);
version_ = null;
if (versionBuilder_ != null) {
versionBuilder_.dispose();
versionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
public io.grafeas.v1.Version.Builder getVersionBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getVersionFieldBuilder().getBuilder();
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
if (versionBuilder_ != null) {
return versionBuilder_.getMessageOrBuilder();
} else {
return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
}
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in machine + human
* readable form.
*
*
* .grafeas.v1.Version version = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
getVersionFieldBuilder() {
if (versionBuilder_ == null) {
versionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Version,
io.grafeas.v1.Version.Builder,
io.grafeas.v1.VersionOrBuilder>(getVersion(), getParentForChildren(), isClean());
version_ = null;
}
return versionBuilder_;
}
private java.util.List distributions_ =
java.util.Collections.emptyList();
private void ensureDistributionsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
distributions_ = new java.util.ArrayList(distributions_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grafeas.v1.UpgradeDistribution,
io.grafeas.v1.UpgradeDistribution.Builder,
io.grafeas.v1.UpgradeDistributionOrBuilder>
distributionsBuilder_;
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public java.util.List getDistributionsList() {
if (distributionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(distributions_);
} else {
return distributionsBuilder_.getMessageList();
}
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public int getDistributionsCount() {
if (distributionsBuilder_ == null) {
return distributions_.size();
} else {
return distributionsBuilder_.getCount();
}
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public io.grafeas.v1.UpgradeDistribution getDistributions(int index) {
if (distributionsBuilder_ == null) {
return distributions_.get(index);
} else {
return distributionsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder setDistributions(int index, io.grafeas.v1.UpgradeDistribution value) {
if (distributionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDistributionsIsMutable();
distributions_.set(index, value);
onChanged();
} else {
distributionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder setDistributions(
int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) {
if (distributionsBuilder_ == null) {
ensureDistributionsIsMutable();
distributions_.set(index, builderForValue.build());
onChanged();
} else {
distributionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder addDistributions(io.grafeas.v1.UpgradeDistribution value) {
if (distributionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDistributionsIsMutable();
distributions_.add(value);
onChanged();
} else {
distributionsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder addDistributions(int index, io.grafeas.v1.UpgradeDistribution value) {
if (distributionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDistributionsIsMutable();
distributions_.add(index, value);
onChanged();
} else {
distributionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder addDistributions(io.grafeas.v1.UpgradeDistribution.Builder builderForValue) {
if (distributionsBuilder_ == null) {
ensureDistributionsIsMutable();
distributions_.add(builderForValue.build());
onChanged();
} else {
distributionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder addDistributions(
int index, io.grafeas.v1.UpgradeDistribution.Builder builderForValue) {
if (distributionsBuilder_ == null) {
ensureDistributionsIsMutable();
distributions_.add(index, builderForValue.build());
onChanged();
} else {
distributionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder addAllDistributions(
java.lang.Iterable extends io.grafeas.v1.UpgradeDistribution> values) {
if (distributionsBuilder_ == null) {
ensureDistributionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, distributions_);
onChanged();
} else {
distributionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder clearDistributions() {
if (distributionsBuilder_ == null) {
distributions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
distributionsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public Builder removeDistributions(int index) {
if (distributionsBuilder_ == null) {
ensureDistributionsIsMutable();
distributions_.remove(index);
onChanged();
} else {
distributionsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public io.grafeas.v1.UpgradeDistribution.Builder getDistributionsBuilder(int index) {
return getDistributionsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionsOrBuilder(int index) {
if (distributionsBuilder_ == null) {
return distributions_.get(index);
} else {
return distributionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public java.util.List extends io.grafeas.v1.UpgradeDistributionOrBuilder>
getDistributionsOrBuilderList() {
if (distributionsBuilder_ != null) {
return distributionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(distributions_);
}
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder() {
return getDistributionsFieldBuilder()
.addBuilder(io.grafeas.v1.UpgradeDistribution.getDefaultInstance());
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public io.grafeas.v1.UpgradeDistribution.Builder addDistributionsBuilder(int index) {
return getDistributionsFieldBuilder()
.addBuilder(index, io.grafeas.v1.UpgradeDistribution.getDefaultInstance());
}
/**
*
*
*
* Metadata about the upgrade for each specific operating system.
*
*
* repeated .grafeas.v1.UpgradeDistribution distributions = 3;
*/
public java.util.List getDistributionsBuilderList() {
return getDistributionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grafeas.v1.UpgradeDistribution,
io.grafeas.v1.UpgradeDistribution.Builder,
io.grafeas.v1.UpgradeDistributionOrBuilder>
getDistributionsFieldBuilder() {
if (distributionsBuilder_ == null) {
distributionsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
io.grafeas.v1.UpgradeDistribution,
io.grafeas.v1.UpgradeDistribution.Builder,
io.grafeas.v1.UpgradeDistributionOrBuilder>(
distributions_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
distributions_ = null;
}
return distributionsBuilder_;
}
private io.grafeas.v1.WindowsUpdate windowsUpdate_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.WindowsUpdate,
io.grafeas.v1.WindowsUpdate.Builder,
io.grafeas.v1.WindowsUpdateOrBuilder>
windowsUpdateBuilder_;
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*
* @return Whether the windowsUpdate field is set.
*/
public boolean hasWindowsUpdate() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*
* @return The windowsUpdate.
*/
public io.grafeas.v1.WindowsUpdate getWindowsUpdate() {
if (windowsUpdateBuilder_ == null) {
return windowsUpdate_ == null
? io.grafeas.v1.WindowsUpdate.getDefaultInstance()
: windowsUpdate_;
} else {
return windowsUpdateBuilder_.getMessage();
}
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) {
if (windowsUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
windowsUpdate_ = value;
} else {
windowsUpdateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate.Builder builderForValue) {
if (windowsUpdateBuilder_ == null) {
windowsUpdate_ = builderForValue.build();
} else {
windowsUpdateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
public Builder mergeWindowsUpdate(io.grafeas.v1.WindowsUpdate value) {
if (windowsUpdateBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& windowsUpdate_ != null
&& windowsUpdate_ != io.grafeas.v1.WindowsUpdate.getDefaultInstance()) {
getWindowsUpdateBuilder().mergeFrom(value);
} else {
windowsUpdate_ = value;
}
} else {
windowsUpdateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
public Builder clearWindowsUpdate() {
bitField0_ = (bitField0_ & ~0x00000008);
windowsUpdate_ = null;
if (windowsUpdateBuilder_ != null) {
windowsUpdateBuilder_.dispose();
windowsUpdateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
public io.grafeas.v1.WindowsUpdate.Builder getWindowsUpdateBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getWindowsUpdateFieldBuilder().getBuilder();
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() {
if (windowsUpdateBuilder_ != null) {
return windowsUpdateBuilder_.getMessageOrBuilder();
} else {
return windowsUpdate_ == null
? io.grafeas.v1.WindowsUpdate.getDefaultInstance()
: windowsUpdate_;
}
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.WindowsUpdate,
io.grafeas.v1.WindowsUpdate.Builder,
io.grafeas.v1.WindowsUpdateOrBuilder>
getWindowsUpdateFieldBuilder() {
if (windowsUpdateBuilder_ == null) {
windowsUpdateBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.WindowsUpdate,
io.grafeas.v1.WindowsUpdate.Builder,
io.grafeas.v1.WindowsUpdateOrBuilder>(
getWindowsUpdate(), getParentForChildren(), isClean());
windowsUpdate_ = null;
}
return windowsUpdateBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeNote)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeNote)
private static final io.grafeas.v1.UpgradeNote DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeNote();
}
public static io.grafeas.v1.UpgradeNote getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UpgradeNote parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.grafeas.v1.UpgradeNote getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}