
io.grafeas.v1.UpgradeOccurrence 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 2024 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
// Protobuf Java Version: 3.25.4
package io.grafeas.v1;
/**
*
*
*
* An Upgrade Occurrence represents that a specific resource_url could install a
* specific upgrade. This presence is supplied via local sources (i.e. it is
* present in the mirror and the running system has noticed its availability).
* For Windows, both distribution and windows_update contain information for the
* Windows update.
*
*
* Protobuf type {@code grafeas.v1.UpgradeOccurrence}
*/
public final class UpgradeOccurrence extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeOccurrence)
UpgradeOccurrenceOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpgradeOccurrence.newBuilder() to construct.
private UpgradeOccurrence(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UpgradeOccurrence() {
package_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new UpgradeOccurrence();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class);
}
private int bitField0_;
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 PARSED_VERSION_FIELD_NUMBER = 3;
private io.grafeas.v1.Version parsedVersion_;
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*
* @return Whether the parsedVersion field is set.
*/
@java.lang.Override
public boolean hasParsedVersion() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*
* @return The parsedVersion.
*/
@java.lang.Override
public io.grafeas.v1.Version getParsedVersion() {
return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
@java.lang.Override
public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() {
return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_;
}
public static final int DISTRIBUTION_FIELD_NUMBER = 4;
private io.grafeas.v1.UpgradeDistribution distribution_;
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*
* @return Whether the distribution field is set.
*/
@java.lang.Override
public boolean hasDistribution() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*
* @return The distribution.
*/
@java.lang.Override
public io.grafeas.v1.UpgradeDistribution getDistribution() {
return distribution_ == null
? io.grafeas.v1.UpgradeDistribution.getDefaultInstance()
: distribution_;
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
@java.lang.Override
public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() {
return distribution_ == null
? io.grafeas.v1.UpgradeDistribution.getDefaultInstance()
: distribution_;
}
public static final int WINDOWS_UPDATE_FIELD_NUMBER = 5;
private io.grafeas.v1.WindowsUpdate windowsUpdate_;
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 5;
*
* @return Whether the windowsUpdate field is set.
*/
@java.lang.Override
public boolean hasWindowsUpdate() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 5;
*
* @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 = 5;
*/
@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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getParsedVersion());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getDistribution());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(5, 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 (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParsedVersion());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDistribution());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, 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.UpgradeOccurrence)) {
return super.equals(obj);
}
io.grafeas.v1.UpgradeOccurrence other = (io.grafeas.v1.UpgradeOccurrence) obj;
if (!getPackage().equals(other.getPackage())) return false;
if (hasParsedVersion() != other.hasParsedVersion()) return false;
if (hasParsedVersion()) {
if (!getParsedVersion().equals(other.getParsedVersion())) return false;
}
if (hasDistribution() != other.hasDistribution()) return false;
if (hasDistribution()) {
if (!getDistribution().equals(other.getDistribution())) return false;
}
if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false;
if (hasWindowsUpdate()) {
if (!getWindowsUpdate().equals(other.getWindowsUpdate())) return false;
}
if (!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 (hasParsedVersion()) {
hash = (37 * hash) + PARSED_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getParsedVersion().hashCode();
}
if (hasDistribution()) {
hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER;
hash = (53 * hash) + getDistribution().hashCode();
}
if (hasWindowsUpdate()) {
hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER;
hash = (53 * hash) + getWindowsUpdate().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.UpgradeOccurrence parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.UpgradeOccurrence parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grafeas.v1.UpgradeOccurrence prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* An Upgrade Occurrence represents that a specific resource_url could install a
* specific upgrade. This presence is supplied via local sources (i.e. it is
* present in the mirror and the running system has noticed its availability).
* For Windows, both distribution and windows_update contain information for the
* Windows update.
*
*
* Protobuf type {@code grafeas.v1.UpgradeOccurrence}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:grafeas.v1.UpgradeOccurrence)
io.grafeas.v1.UpgradeOccurrenceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class);
}
// Construct using io.grafeas.v1.UpgradeOccurrence.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getParsedVersionFieldBuilder();
getDistributionFieldBuilder();
getWindowsUpdateFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
package_ = "";
parsedVersion_ = null;
if (parsedVersionBuilder_ != null) {
parsedVersionBuilder_.dispose();
parsedVersionBuilder_ = null;
}
distribution_ = null;
if (distributionBuilder_ != null) {
distributionBuilder_.dispose();
distributionBuilder_ = null;
}
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_UpgradeOccurrence_descriptor;
}
@java.lang.Override
public io.grafeas.v1.UpgradeOccurrence getDefaultInstanceForType() {
return io.grafeas.v1.UpgradeOccurrence.getDefaultInstance();
}
@java.lang.Override
public io.grafeas.v1.UpgradeOccurrence build() {
io.grafeas.v1.UpgradeOccurrence result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grafeas.v1.UpgradeOccurrence buildPartial() {
io.grafeas.v1.UpgradeOccurrence result = new io.grafeas.v1.UpgradeOccurrence(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(io.grafeas.v1.UpgradeOccurrence result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.package_ = package_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.parsedVersion_ =
parsedVersionBuilder_ == null ? parsedVersion_ : parsedVersionBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.distribution_ =
distributionBuilder_ == null ? distribution_ : distributionBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.windowsUpdate_ =
windowsUpdateBuilder_ == null ? windowsUpdate_ : windowsUpdateBuilder_.build();
to_bitField0_ |= 0x00000004;
}
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.v1.UpgradeOccurrence) {
return mergeFrom((io.grafeas.v1.UpgradeOccurrence) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grafeas.v1.UpgradeOccurrence other) {
if (other == io.grafeas.v1.UpgradeOccurrence.getDefaultInstance()) return this;
if (!other.getPackage().isEmpty()) {
package_ = other.package_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasParsedVersion()) {
mergeParsedVersion(other.getParsedVersion());
}
if (other.hasDistribution()) {
mergeDistribution(other.getDistribution());
}
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 26:
{
input.readMessage(getParsedVersionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
case 34:
{
input.readMessage(getDistributionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 34
case 42:
{
input.readMessage(getWindowsUpdateFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 42
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 parsedVersion_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
parsedVersionBuilder_;
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*
* @return Whether the parsedVersion field is set.
*/
public boolean hasParsedVersion() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*
* @return The parsedVersion.
*/
public io.grafeas.v1.Version getParsedVersion() {
if (parsedVersionBuilder_ == null) {
return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_;
} else {
return parsedVersionBuilder_.getMessage();
}
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
public Builder setParsedVersion(io.grafeas.v1.Version value) {
if (parsedVersionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
parsedVersion_ = value;
} else {
parsedVersionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
public Builder setParsedVersion(io.grafeas.v1.Version.Builder builderForValue) {
if (parsedVersionBuilder_ == null) {
parsedVersion_ = builderForValue.build();
} else {
parsedVersionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
public Builder mergeParsedVersion(io.grafeas.v1.Version value) {
if (parsedVersionBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& parsedVersion_ != null
&& parsedVersion_ != io.grafeas.v1.Version.getDefaultInstance()) {
getParsedVersionBuilder().mergeFrom(value);
} else {
parsedVersion_ = value;
}
} else {
parsedVersionBuilder_.mergeFrom(value);
}
if (parsedVersion_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
public Builder clearParsedVersion() {
bitField0_ = (bitField0_ & ~0x00000002);
parsedVersion_ = null;
if (parsedVersionBuilder_ != null) {
parsedVersionBuilder_.dispose();
parsedVersionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
public io.grafeas.v1.Version.Builder getParsedVersionBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getParsedVersionFieldBuilder().getBuilder();
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
public io.grafeas.v1.VersionOrBuilder getParsedVersionOrBuilder() {
if (parsedVersionBuilder_ != null) {
return parsedVersionBuilder_.getMessageOrBuilder();
} else {
return parsedVersion_ == null ? io.grafeas.v1.Version.getDefaultInstance() : parsedVersion_;
}
}
/**
*
*
*
* Required for non-Windows OS. The version of the package in a machine +
* human readable form.
*
*
* .grafeas.v1.Version parsed_version = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
getParsedVersionFieldBuilder() {
if (parsedVersionBuilder_ == null) {
parsedVersionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Version,
io.grafeas.v1.Version.Builder,
io.grafeas.v1.VersionOrBuilder>(
getParsedVersion(), getParentForChildren(), isClean());
parsedVersion_ = null;
}
return parsedVersionBuilder_;
}
private io.grafeas.v1.UpgradeDistribution distribution_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.UpgradeDistribution,
io.grafeas.v1.UpgradeDistribution.Builder,
io.grafeas.v1.UpgradeDistributionOrBuilder>
distributionBuilder_;
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*
* @return Whether the distribution field is set.
*/
public boolean hasDistribution() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*
* @return The distribution.
*/
public io.grafeas.v1.UpgradeDistribution getDistribution() {
if (distributionBuilder_ == null) {
return distribution_ == null
? io.grafeas.v1.UpgradeDistribution.getDefaultInstance()
: distribution_;
} else {
return distributionBuilder_.getMessage();
}
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
public Builder setDistribution(io.grafeas.v1.UpgradeDistribution value) {
if (distributionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
distribution_ = value;
} else {
distributionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
public Builder setDistribution(io.grafeas.v1.UpgradeDistribution.Builder builderForValue) {
if (distributionBuilder_ == null) {
distribution_ = builderForValue.build();
} else {
distributionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
public Builder mergeDistribution(io.grafeas.v1.UpgradeDistribution value) {
if (distributionBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& distribution_ != null
&& distribution_ != io.grafeas.v1.UpgradeDistribution.getDefaultInstance()) {
getDistributionBuilder().mergeFrom(value);
} else {
distribution_ = value;
}
} else {
distributionBuilder_.mergeFrom(value);
}
if (distribution_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
public Builder clearDistribution() {
bitField0_ = (bitField0_ & ~0x00000004);
distribution_ = null;
if (distributionBuilder_ != null) {
distributionBuilder_.dispose();
distributionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
public io.grafeas.v1.UpgradeDistribution.Builder getDistributionBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getDistributionFieldBuilder().getBuilder();
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
public io.grafeas.v1.UpgradeDistributionOrBuilder getDistributionOrBuilder() {
if (distributionBuilder_ != null) {
return distributionBuilder_.getMessageOrBuilder();
} else {
return distribution_ == null
? io.grafeas.v1.UpgradeDistribution.getDefaultInstance()
: distribution_;
}
}
/**
*
*
*
* Metadata about the upgrade for available for the specific operating system
* for the resource_url. This allows efficient filtering, as well as
* making it easier to use the occurrence.
*
*
* .grafeas.v1.UpgradeDistribution distribution = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.UpgradeDistribution,
io.grafeas.v1.UpgradeDistribution.Builder,
io.grafeas.v1.UpgradeDistributionOrBuilder>
getDistributionFieldBuilder() {
if (distributionBuilder_ == null) {
distributionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.UpgradeDistribution,
io.grafeas.v1.UpgradeDistribution.Builder,
io.grafeas.v1.UpgradeDistributionOrBuilder>(
getDistribution(), getParentForChildren(), isClean());
distribution_ = null;
}
return distributionBuilder_;
}
private io.grafeas.v1.WindowsUpdate windowsUpdate_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.WindowsUpdate,
io.grafeas.v1.WindowsUpdate.Builder,
io.grafeas.v1.WindowsUpdateOrBuilder>
windowsUpdateBuilder_;
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 5;
*
* @return Whether the windowsUpdate field is set.
*/
public boolean hasWindowsUpdate() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 5;
*
* @return The windowsUpdate.
*/
public io.grafeas.v1.WindowsUpdate getWindowsUpdate() {
if (windowsUpdateBuilder_ == null) {
return windowsUpdate_ == null
? io.grafeas.v1.WindowsUpdate.getDefaultInstance()
: windowsUpdate_;
} else {
return windowsUpdateBuilder_.getMessage();
}
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 5;
*/
public Builder setWindowsUpdate(io.grafeas.v1.WindowsUpdate value) {
if (windowsUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
windowsUpdate_ = value;
} 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 = 5;
*/
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 = 5;
*/
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);
}
if (windowsUpdate_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 5;
*/
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 = 5;
*/
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 = 5;
*/
public io.grafeas.v1.WindowsUpdateOrBuilder getWindowsUpdateOrBuilder() {
if (windowsUpdateBuilder_ != null) {
return windowsUpdateBuilder_.getMessageOrBuilder();
} else {
return windowsUpdate_ == null
? io.grafeas.v1.WindowsUpdate.getDefaultInstance()
: windowsUpdate_;
}
}
/**
*
*
*
* Required for Windows OS. Represents the metadata about the Windows update.
*
*
* .grafeas.v1.WindowsUpdate windows_update = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.WindowsUpdate,
io.grafeas.v1.WindowsUpdate.Builder,
io.grafeas.v1.WindowsUpdateOrBuilder>
getWindowsUpdateFieldBuilder() {
if (windowsUpdateBuilder_ == null) {
windowsUpdateBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.WindowsUpdate,
io.grafeas.v1.WindowsUpdate.Builder,
io.grafeas.v1.WindowsUpdateOrBuilder>(
getWindowsUpdate(), getParentForChildren(), isClean());
windowsUpdate_ = null;
}
return windowsUpdateBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.UpgradeOccurrence)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.UpgradeOccurrence)
private static final io.grafeas.v1.UpgradeOccurrence DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.UpgradeOccurrence();
}
public static io.grafeas.v1.UpgradeOccurrence getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UpgradeOccurrence parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
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.UpgradeOccurrence getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy