/* * Copyright 2019 The Grafeas Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: grafeas/v1/upgrade.proto package io.grafeas.v1; /** * * *
* An Upgrade Occurrence represents that a specific resource_url could install a * specific upgrade. This presence is supplied via local sources (i.e. it is * present in the mirror and the running system has noticed its availability). * For Windows, both distribution and windows_update contain information for the * Windows update. ** * Protobuf type {@code grafeas.v1.UpgradeOccurrence} */ public final class UpgradeOccurrence extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.UpgradeOccurrence) UpgradeOccurrenceOrBuilder { private static final long serialVersionUID = 0L; // Use UpgradeOccurrence.newBuilder() to construct. private UpgradeOccurrence(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private UpgradeOccurrence() { package_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new UpgradeOccurrence(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Upgrade.internal_static_grafeas_v1_UpgradeOccurrence_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.UpgradeOccurrence.class, io.grafeas.v1.UpgradeOccurrence.Builder.class); } public static final int PACKAGE_FIELD_NUMBER = 1; @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 parsedVersion_ != null;
}
/**
*
*
* * Required for non-Windows OS. The version of the package in a machine + * human readable form. ** *
.grafeas.v1.Version parsed_version = 3;
*
* @return The parsedVersion.
*/
@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 distribution_ != null;
}
/**
*
*
* * Metadata about the upgrade for available for the specific operating system * for the resource_url. This allows efficient filtering, as well as * making it easier to use the occurrence. ** *
.grafeas.v1.UpgradeDistribution distribution = 4;
*
* @return The distribution.
*/
@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 windowsUpdate_ != null;
}
/**
*
*
* * 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 (parsedVersion_ != null) {
output.writeMessage(3, getParsedVersion());
}
if (distribution_ != null) {
output.writeMessage(4, getDistribution());
}
if (windowsUpdate_ != null) {
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 (parsedVersion_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParsedVersion());
}
if (distribution_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDistribution());
}
if (windowsUpdate_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getWindowsUpdate());
}
size += 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
* 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);
}
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);
}
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);
}
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