/*
 * 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/package.proto

package io.grafeas.v1;

/**
 *
 *
 * <pre>
 * PackageNote represents a particular package version.
 * </pre>
 *
 * Protobuf type {@code grafeas.v1.PackageNote}
 */
public final class PackageNote extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:grafeas.v1.PackageNote)
    PackageNoteOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use PackageNote.newBuilder() to construct.
  private PackageNote(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private PackageNote() {
    name_ = "";
    distribution_ = java.util.Collections.emptyList();
    packageType_ = "";
    cpeUri_ = "";
    architecture_ = 0;
    maintainer_ = "";
    url_ = "";
    description_ = "";
    digest_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new PackageNote();
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * The name of the package.
   * </pre>
   *
   * <code>
   * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The name of the package.
   * </pre>
   *
   * <code>
   * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DISTRIBUTION_FIELD_NUMBER = 10;

  @SuppressWarnings("serial")
  private java.util.List<io.grafeas.v1.Distribution> distribution_;
  /**
   *
   *
   * <pre>
   * Deprecated.
   * The various channels by which a package is distributed.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
   */
  @java.lang.Override
  public java.util.List<io.grafeas.v1.Distribution> getDistributionList() {
    return distribution_;
  }
  /**
   *
   *
   * <pre>
   * Deprecated.
   * The various channels by which a package is distributed.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
   */
  @java.lang.Override
  public java.util.List<? extends io.grafeas.v1.DistributionOrBuilder>
      getDistributionOrBuilderList() {
    return distribution_;
  }
  /**
   *
   *
   * <pre>
   * Deprecated.
   * The various channels by which a package is distributed.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
   */
  @java.lang.Override
  public int getDistributionCount() {
    return distribution_.size();
  }
  /**
   *
   *
   * <pre>
   * Deprecated.
   * The various channels by which a package is distributed.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
   */
  @java.lang.Override
  public io.grafeas.v1.Distribution getDistribution(int index) {
    return distribution_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Deprecated.
   * The various channels by which a package is distributed.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
   */
  @java.lang.Override
  public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder(int index) {
    return distribution_.get(index);
  }

  public static final int PACKAGE_TYPE_FIELD_NUMBER = 11;

  @SuppressWarnings("serial")
  private volatile java.lang.Object packageType_ = "";
  /**
   *
   *
   * <pre>
   * The type of package; whether native or non native (e.g., ruby gems,
   * node.js packages, etc.).
   * </pre>
   *
   * <code>string package_type = 11;</code>
   *
   * @return The packageType.
   */
  @java.lang.Override
  public java.lang.String getPackageType() {
    java.lang.Object ref = packageType_;
    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();
      packageType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The type of package; whether native or non native (e.g., ruby gems,
   * node.js packages, etc.).
   * </pre>
   *
   * <code>string package_type = 11;</code>
   *
   * @return The bytes for packageType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getPackageTypeBytes() {
    java.lang.Object ref = packageType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      packageType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CPE_URI_FIELD_NUMBER = 12;

  @SuppressWarnings("serial")
  private volatile java.lang.Object cpeUri_ = "";
  /**
   *
   *
   * <pre>
   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
   * denoting the package manager version distributing a package.
   * The cpe_uri will be blank for language packages.
   * </pre>
   *
   * <code>string cpe_uri = 12;</code>
   *
   * @return The cpeUri.
   */
  @java.lang.Override
  public java.lang.String getCpeUri() {
    java.lang.Object ref = cpeUri_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      cpeUri_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
   * denoting the package manager version distributing a package.
   * The cpe_uri will be blank for language packages.
   * </pre>
   *
   * <code>string cpe_uri = 12;</code>
   *
   * @return The bytes for cpeUri.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getCpeUriBytes() {
    java.lang.Object ref = cpeUri_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      cpeUri_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ARCHITECTURE_FIELD_NUMBER = 13;
  private int architecture_ = 0;
  /**
   *
   *
   * <pre>
   * The CPU architecture for which packages in this distribution channel were
   * built. Architecture will be blank for language packages.
   * </pre>
   *
   * <code>.grafeas.v1.Architecture architecture = 13;</code>
   *
   * @return The enum numeric value on the wire for architecture.
   */
  @java.lang.Override
  public int getArchitectureValue() {
    return architecture_;
  }
  /**
   *
   *
   * <pre>
   * The CPU architecture for which packages in this distribution channel were
   * built. Architecture will be blank for language packages.
   * </pre>
   *
   * <code>.grafeas.v1.Architecture architecture = 13;</code>
   *
   * @return The architecture.
   */
  @java.lang.Override
  public io.grafeas.v1.Architecture getArchitecture() {
    io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_);
    return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result;
  }

  public static final int VERSION_FIELD_NUMBER = 14;
  private io.grafeas.v1.Version version_;
  /**
   *
   *
   * <pre>
   * The version of the package.
   * </pre>
   *
   * <code>.grafeas.v1.Version version = 14;</code>
   *
   * @return Whether the version field is set.
   */
  @java.lang.Override
  public boolean hasVersion() {
    return version_ != null;
  }
  /**
   *
   *
   * <pre>
   * The version of the package.
   * </pre>
   *
   * <code>.grafeas.v1.Version version = 14;</code>
   *
   * @return The version.
   */
  @java.lang.Override
  public io.grafeas.v1.Version getVersion() {
    return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
  }
  /**
   *
   *
   * <pre>
   * The version of the package.
   * </pre>
   *
   * <code>.grafeas.v1.Version version = 14;</code>
   */
  @java.lang.Override
  public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
    return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
  }

  public static final int MAINTAINER_FIELD_NUMBER = 15;

  @SuppressWarnings("serial")
  private volatile java.lang.Object maintainer_ = "";
  /**
   *
   *
   * <pre>
   * A freeform text denoting the maintainer of this package.
   * </pre>
   *
   * <code>string maintainer = 15;</code>
   *
   * @return The maintainer.
   */
  @java.lang.Override
  public java.lang.String getMaintainer() {
    java.lang.Object ref = maintainer_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      maintainer_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * A freeform text denoting the maintainer of this package.
   * </pre>
   *
   * <code>string maintainer = 15;</code>
   *
   * @return The bytes for maintainer.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getMaintainerBytes() {
    java.lang.Object ref = maintainer_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      maintainer_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int URL_FIELD_NUMBER = 16;

  @SuppressWarnings("serial")
  private volatile java.lang.Object url_ = "";
  /**
   *
   *
   * <pre>
   * The homepage for this package.
   * </pre>
   *
   * <code>string url = 16;</code>
   *
   * @return The url.
   */
  @java.lang.Override
  public java.lang.String getUrl() {
    java.lang.Object ref = url_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      url_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The homepage for this package.
   * </pre>
   *
   * <code>string url = 16;</code>
   *
   * @return The bytes for url.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUrlBytes() {
    java.lang.Object ref = url_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      url_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 17;

  @SuppressWarnings("serial")
  private volatile java.lang.Object description_ = "";
  /**
   *
   *
   * <pre>
   * The description of this package.
   * </pre>
   *
   * <code>string description = 17;</code>
   *
   * @return The description.
   */
  @java.lang.Override
  public java.lang.String getDescription() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      description_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The description of this package.
   * </pre>
   *
   * <code>string description = 17;</code>
   *
   * @return The bytes for description.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDescriptionBytes() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      description_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LICENSE_FIELD_NUMBER = 18;
  private io.grafeas.v1.License license_;
  /**
   *
   *
   * <pre>
   * Licenses that have been declared by the authors of the package.
   * </pre>
   *
   * <code>.grafeas.v1.License license = 18;</code>
   *
   * @return Whether the license field is set.
   */
  @java.lang.Override
  public boolean hasLicense() {
    return license_ != null;
  }
  /**
   *
   *
   * <pre>
   * Licenses that have been declared by the authors of the package.
   * </pre>
   *
   * <code>.grafeas.v1.License license = 18;</code>
   *
   * @return The license.
   */
  @java.lang.Override
  public io.grafeas.v1.License getLicense() {
    return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
  }
  /**
   *
   *
   * <pre>
   * Licenses that have been declared by the authors of the package.
   * </pre>
   *
   * <code>.grafeas.v1.License license = 18;</code>
   */
  @java.lang.Override
  public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() {
    return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
  }

  public static final int DIGEST_FIELD_NUMBER = 19;

  @SuppressWarnings("serial")
  private java.util.List<io.grafeas.v1.Digest> digest_;
  /**
   *
   *
   * <pre>
   * Hash value, typically a file digest, that allows unique
   * identification a specific package.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Digest digest = 19;</code>
   */
  @java.lang.Override
  public java.util.List<io.grafeas.v1.Digest> getDigestList() {
    return digest_;
  }
  /**
   *
   *
   * <pre>
   * Hash value, typically a file digest, that allows unique
   * identification a specific package.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Digest digest = 19;</code>
   */
  @java.lang.Override
  public java.util.List<? extends io.grafeas.v1.DigestOrBuilder> getDigestOrBuilderList() {
    return digest_;
  }
  /**
   *
   *
   * <pre>
   * Hash value, typically a file digest, that allows unique
   * identification a specific package.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Digest digest = 19;</code>
   */
  @java.lang.Override
  public int getDigestCount() {
    return digest_.size();
  }
  /**
   *
   *
   * <pre>
   * Hash value, typically a file digest, that allows unique
   * identification a specific package.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Digest digest = 19;</code>
   */
  @java.lang.Override
  public io.grafeas.v1.Digest getDigest(int index) {
    return digest_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Hash value, typically a file digest, that allows unique
   * identification a specific package.
   * </pre>
   *
   * <code>repeated .grafeas.v1.Digest digest = 19;</code>
   */
  @java.lang.Override
  public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder(int index) {
    return digest_.get(index);
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    for (int i = 0; i < distribution_.size(); i++) {
      output.writeMessage(10, distribution_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, packageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, cpeUri_);
    }
    if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) {
      output.writeEnum(13, architecture_);
    }
    if (version_ != null) {
      output.writeMessage(14, getVersion());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, maintainer_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, url_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, description_);
    }
    if (license_ != null) {
      output.writeMessage(18, getLicense());
    }
    for (int i = 0; i < digest_.size(); i++) {
      output.writeMessage(19, digest_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    for (int i = 0; i < distribution_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, distribution_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, packageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, cpeUri_);
    }
    if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, architecture_);
    }
    if (version_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getVersion());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintainer_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, maintainer_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, url_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, description_);
    }
    if (license_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getLicense());
    }
    for (int i = 0; i < digest_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, digest_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof io.grafeas.v1.PackageNote)) {
      return super.equals(obj);
    }
    io.grafeas.v1.PackageNote other = (io.grafeas.v1.PackageNote) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getDistributionList().equals(other.getDistributionList())) return false;
    if (!getPackageType().equals(other.getPackageType())) return false;
    if (!getCpeUri().equals(other.getCpeUri())) return false;
    if (architecture_ != other.architecture_) return false;
    if (hasVersion() != other.hasVersion()) return false;
    if (hasVersion()) {
      if (!getVersion().equals(other.getVersion())) return false;
    }
    if (!getMaintainer().equals(other.getMaintainer())) return false;
    if (!getUrl().equals(other.getUrl())) return false;
    if (!getDescription().equals(other.getDescription())) return false;
    if (hasLicense() != other.hasLicense()) return false;
    if (hasLicense()) {
      if (!getLicense().equals(other.getLicense())) return false;
    }
    if (!getDigestList().equals(other.getDigestList())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (getDistributionCount() > 0) {
      hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER;
      hash = (53 * hash) + getDistributionList().hashCode();
    }
    hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getPackageType().hashCode();
    hash = (37 * hash) + CPE_URI_FIELD_NUMBER;
    hash = (53 * hash) + getCpeUri().hashCode();
    hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER;
    hash = (53 * hash) + architecture_;
    if (hasVersion()) {
      hash = (37 * hash) + VERSION_FIELD_NUMBER;
      hash = (53 * hash) + getVersion().hashCode();
    }
    hash = (37 * hash) + MAINTAINER_FIELD_NUMBER;
    hash = (53 * hash) + getMaintainer().hashCode();
    hash = (37 * hash) + URL_FIELD_NUMBER;
    hash = (53 * hash) + getUrl().hashCode();
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    if (hasLicense()) {
      hash = (37 * hash) + LICENSE_FIELD_NUMBER;
      hash = (53 * hash) + getLicense().hashCode();
    }
    if (getDigestCount() > 0) {
      hash = (37 * hash) + DIGEST_FIELD_NUMBER;
      hash = (53 * hash) + getDigestList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.grafeas.v1.PackageNote parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.grafeas.v1.PackageNote 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.PackageNote parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.grafeas.v1.PackageNote 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.PackageNote parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.grafeas.v1.PackageNote parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static io.grafeas.v1.PackageNote parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static io.grafeas.v1.PackageNote 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.PackageNote parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static io.grafeas.v1.PackageNote 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.PackageNote parseFrom(com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static io.grafeas.v1.PackageNote 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.PackageNote 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;
  }
  /**
   *
   *
   * <pre>
   * PackageNote represents a particular package version.
   * </pre>
   *
   * Protobuf type {@code grafeas.v1.PackageNote}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageNote)
      io.grafeas.v1.PackageNoteOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.grafeas.v1.PackageNote.class, io.grafeas.v1.PackageNote.Builder.class);
    }

    // Construct using io.grafeas.v1.PackageNote.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      if (distributionBuilder_ == null) {
        distribution_ = java.util.Collections.emptyList();
      } else {
        distribution_ = null;
        distributionBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000002);
      packageType_ = "";
      cpeUri_ = "";
      architecture_ = 0;
      version_ = null;
      if (versionBuilder_ != null) {
        versionBuilder_.dispose();
        versionBuilder_ = null;
      }
      maintainer_ = "";
      url_ = "";
      description_ = "";
      license_ = null;
      if (licenseBuilder_ != null) {
        licenseBuilder_.dispose();
        licenseBuilder_ = null;
      }
      if (digestBuilder_ == null) {
        digest_ = java.util.Collections.emptyList();
      } else {
        digest_ = null;
        digestBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000400);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor;
    }

    @java.lang.Override
    public io.grafeas.v1.PackageNote getDefaultInstanceForType() {
      return io.grafeas.v1.PackageNote.getDefaultInstance();
    }

    @java.lang.Override
    public io.grafeas.v1.PackageNote build() {
      io.grafeas.v1.PackageNote result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.grafeas.v1.PackageNote buildPartial() {
      io.grafeas.v1.PackageNote result = new io.grafeas.v1.PackageNote(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(io.grafeas.v1.PackageNote result) {
      if (distributionBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          distribution_ = java.util.Collections.unmodifiableList(distribution_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.distribution_ = distribution_;
      } else {
        result.distribution_ = distributionBuilder_.build();
      }
      if (digestBuilder_ == null) {
        if (((bitField0_ & 0x00000400) != 0)) {
          digest_ = java.util.Collections.unmodifiableList(digest_);
          bitField0_ = (bitField0_ & ~0x00000400);
        }
        result.digest_ = digest_;
      } else {
        result.digest_ = digestBuilder_.build();
      }
    }

    private void buildPartial0(io.grafeas.v1.PackageNote result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.packageType_ = packageType_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.cpeUri_ = cpeUri_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.architecture_ = architecture_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.version_ = versionBuilder_ == null ? version_ : versionBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.maintainer_ = maintainer_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.url_ = url_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.description_ = description_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.license_ = licenseBuilder_ == null ? license_ : licenseBuilder_.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.PackageNote) {
        return mergeFrom((io.grafeas.v1.PackageNote) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.grafeas.v1.PackageNote other) {
      if (other == io.grafeas.v1.PackageNote.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (distributionBuilder_ == null) {
        if (!other.distribution_.isEmpty()) {
          if (distribution_.isEmpty()) {
            distribution_ = other.distribution_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureDistributionIsMutable();
            distribution_.addAll(other.distribution_);
          }
          onChanged();
        }
      } else {
        if (!other.distribution_.isEmpty()) {
          if (distributionBuilder_.isEmpty()) {
            distributionBuilder_.dispose();
            distributionBuilder_ = null;
            distribution_ = other.distribution_;
            bitField0_ = (bitField0_ & ~0x00000002);
            distributionBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getDistributionFieldBuilder()
                    : null;
          } else {
            distributionBuilder_.addAllMessages(other.distribution_);
          }
        }
      }
      if (!other.getPackageType().isEmpty()) {
        packageType_ = other.packageType_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (!other.getCpeUri().isEmpty()) {
        cpeUri_ = other.cpeUri_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (other.architecture_ != 0) {
        setArchitectureValue(other.getArchitectureValue());
      }
      if (other.hasVersion()) {
        mergeVersion(other.getVersion());
      }
      if (!other.getMaintainer().isEmpty()) {
        maintainer_ = other.maintainer_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (!other.getUrl().isEmpty()) {
        url_ = other.url_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        bitField0_ |= 0x00000100;
        onChanged();
      }
      if (other.hasLicense()) {
        mergeLicense(other.getLicense());
      }
      if (digestBuilder_ == null) {
        if (!other.digest_.isEmpty()) {
          if (digest_.isEmpty()) {
            digest_ = other.digest_;
            bitField0_ = (bitField0_ & ~0x00000400);
          } else {
            ensureDigestIsMutable();
            digest_.addAll(other.digest_);
          }
          onChanged();
        }
      } else {
        if (!other.digest_.isEmpty()) {
          if (digestBuilder_.isEmpty()) {
            digestBuilder_.dispose();
            digestBuilder_ = null;
            digest_ = other.digest_;
            bitField0_ = (bitField0_ & ~0x00000400);
            digestBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getDigestFieldBuilder()
                    : null;
          } else {
            digestBuilder_.addAllMessages(other.digest_);
          }
        }
      }
      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:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 82:
              {
                io.grafeas.v1.Distribution m =
                    input.readMessage(io.grafeas.v1.Distribution.parser(), extensionRegistry);
                if (distributionBuilder_ == null) {
                  ensureDistributionIsMutable();
                  distribution_.add(m);
                } else {
                  distributionBuilder_.addMessage(m);
                }
                break;
              } // case 82
            case 90:
              {
                packageType_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 90
            case 98:
              {
                cpeUri_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000008;
                break;
              } // case 98
            case 104:
              {
                architecture_ = input.readEnum();
                bitField0_ |= 0x00000010;
                break;
              } // case 104
            case 114:
              {
                input.readMessage(getVersionFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 114
            case 122:
              {
                maintainer_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000040;
                break;
              } // case 122
            case 130:
              {
                url_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000080;
                break;
              } // case 130
            case 138:
              {
                description_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000100;
                break;
              } // case 138
            case 146:
              {
                input.readMessage(getLicenseFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000200;
                break;
              } // case 146
            case 154:
              {
                io.grafeas.v1.Digest m =
                    input.readMessage(io.grafeas.v1.Digest.parser(), extensionRegistry);
                if (digestBuilder_ == null) {
                  ensureDigestIsMutable();
                  digest_.add(m);
                } else {
                  digestBuilder_.addMessage(m);
                }
                break;
              } // case 154
            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 name_ = "";
    /**
     *
     *
     * <pre>
     * The name of the package.
     * </pre>
     *
     * <code>
     * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the package.
     * </pre>
     *
     * <code>
     * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the package.
     * </pre>
     *
     * <code>
     * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the package.
     * </pre>
     *
     * <code>
     * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the package.
     * </pre>
     *
     * <code>
     * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.util.List<io.grafeas.v1.Distribution> distribution_ =
        java.util.Collections.emptyList();

    private void ensureDistributionIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        distribution_ = new java.util.ArrayList<io.grafeas.v1.Distribution>(distribution_);
        bitField0_ |= 0x00000002;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            io.grafeas.v1.Distribution,
            io.grafeas.v1.Distribution.Builder,
            io.grafeas.v1.DistributionOrBuilder>
        distributionBuilder_;

    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public java.util.List<io.grafeas.v1.Distribution> getDistributionList() {
      if (distributionBuilder_ == null) {
        return java.util.Collections.unmodifiableList(distribution_);
      } else {
        return distributionBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public int getDistributionCount() {
      if (distributionBuilder_ == null) {
        return distribution_.size();
      } else {
        return distributionBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public io.grafeas.v1.Distribution getDistribution(int index) {
      if (distributionBuilder_ == null) {
        return distribution_.get(index);
      } else {
        return distributionBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder setDistribution(int index, io.grafeas.v1.Distribution value) {
      if (distributionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDistributionIsMutable();
        distribution_.set(index, value);
        onChanged();
      } else {
        distributionBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder setDistribution(int index, io.grafeas.v1.Distribution.Builder builderForValue) {
      if (distributionBuilder_ == null) {
        ensureDistributionIsMutable();
        distribution_.set(index, builderForValue.build());
        onChanged();
      } else {
        distributionBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder addDistribution(io.grafeas.v1.Distribution value) {
      if (distributionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDistributionIsMutable();
        distribution_.add(value);
        onChanged();
      } else {
        distributionBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder addDistribution(int index, io.grafeas.v1.Distribution value) {
      if (distributionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDistributionIsMutable();
        distribution_.add(index, value);
        onChanged();
      } else {
        distributionBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder addDistribution(io.grafeas.v1.Distribution.Builder builderForValue) {
      if (distributionBuilder_ == null) {
        ensureDistributionIsMutable();
        distribution_.add(builderForValue.build());
        onChanged();
      } else {
        distributionBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder addDistribution(int index, io.grafeas.v1.Distribution.Builder builderForValue) {
      if (distributionBuilder_ == null) {
        ensureDistributionIsMutable();
        distribution_.add(index, builderForValue.build());
        onChanged();
      } else {
        distributionBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder addAllDistribution(
        java.lang.Iterable<? extends io.grafeas.v1.Distribution> values) {
      if (distributionBuilder_ == null) {
        ensureDistributionIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, distribution_);
        onChanged();
      } else {
        distributionBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder clearDistribution() {
      if (distributionBuilder_ == null) {
        distribution_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        distributionBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public Builder removeDistribution(int index) {
      if (distributionBuilder_ == null) {
        ensureDistributionIsMutable();
        distribution_.remove(index);
        onChanged();
      } else {
        distributionBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public io.grafeas.v1.Distribution.Builder getDistributionBuilder(int index) {
      return getDistributionFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder(int index) {
      if (distributionBuilder_ == null) {
        return distribution_.get(index);
      } else {
        return distributionBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public java.util.List<? extends io.grafeas.v1.DistributionOrBuilder>
        getDistributionOrBuilderList() {
      if (distributionBuilder_ != null) {
        return distributionBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(distribution_);
      }
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public io.grafeas.v1.Distribution.Builder addDistributionBuilder() {
      return getDistributionFieldBuilder()
          .addBuilder(io.grafeas.v1.Distribution.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public io.grafeas.v1.Distribution.Builder addDistributionBuilder(int index) {
      return getDistributionFieldBuilder()
          .addBuilder(index, io.grafeas.v1.Distribution.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Deprecated.
     * The various channels by which a package is distributed.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Distribution distribution = 10;</code>
     */
    public java.util.List<io.grafeas.v1.Distribution.Builder> getDistributionBuilderList() {
      return getDistributionFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            io.grafeas.v1.Distribution,
            io.grafeas.v1.Distribution.Builder,
            io.grafeas.v1.DistributionOrBuilder>
        getDistributionFieldBuilder() {
      if (distributionBuilder_ == null) {
        distributionBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                io.grafeas.v1.Distribution,
                io.grafeas.v1.Distribution.Builder,
                io.grafeas.v1.DistributionOrBuilder>(
                distribution_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
        distribution_ = null;
      }
      return distributionBuilder_;
    }

    private java.lang.Object packageType_ = "";
    /**
     *
     *
     * <pre>
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     * </pre>
     *
     * <code>string package_type = 11;</code>
     *
     * @return The packageType.
     */
    public java.lang.String getPackageType() {
      java.lang.Object ref = packageType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        packageType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     * </pre>
     *
     * <code>string package_type = 11;</code>
     *
     * @return The bytes for packageType.
     */
    public com.google.protobuf.ByteString getPackageTypeBytes() {
      java.lang.Object ref = packageType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        packageType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     * </pre>
     *
     * <code>string package_type = 11;</code>
     *
     * @param value The packageType to set.
     * @return This builder for chaining.
     */
    public Builder setPackageType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      packageType_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     * </pre>
     *
     * <code>string package_type = 11;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearPackageType() {
      packageType_ = getDefaultInstance().getPackageType();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     * </pre>
     *
     * <code>string package_type = 11;</code>
     *
     * @param value The bytes for packageType to set.
     * @return This builder for chaining.
     */
    public Builder setPackageTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      packageType_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private java.lang.Object cpeUri_ = "";
    /**
     *
     *
     * <pre>
     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
     * denoting the package manager version distributing a package.
     * The cpe_uri will be blank for language packages.
     * </pre>
     *
     * <code>string cpe_uri = 12;</code>
     *
     * @return The cpeUri.
     */
    public java.lang.String getCpeUri() {
      java.lang.Object ref = cpeUri_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        cpeUri_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
     * denoting the package manager version distributing a package.
     * The cpe_uri will be blank for language packages.
     * </pre>
     *
     * <code>string cpe_uri = 12;</code>
     *
     * @return The bytes for cpeUri.
     */
    public com.google.protobuf.ByteString getCpeUriBytes() {
      java.lang.Object ref = cpeUri_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        cpeUri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
     * denoting the package manager version distributing a package.
     * The cpe_uri will be blank for language packages.
     * </pre>
     *
     * <code>string cpe_uri = 12;</code>
     *
     * @param value The cpeUri to set.
     * @return This builder for chaining.
     */
    public Builder setCpeUri(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      cpeUri_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
     * denoting the package manager version distributing a package.
     * The cpe_uri will be blank for language packages.
     * </pre>
     *
     * <code>string cpe_uri = 12;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCpeUri() {
      cpeUri_ = getDefaultInstance().getCpeUri();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
     * denoting the package manager version distributing a package.
     * The cpe_uri will be blank for language packages.
     * </pre>
     *
     * <code>string cpe_uri = 12;</code>
     *
     * @param value The bytes for cpeUri to set.
     * @return This builder for chaining.
     */
    public Builder setCpeUriBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      cpeUri_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private int architecture_ = 0;
    /**
     *
     *
     * <pre>
     * The CPU architecture for which packages in this distribution channel were
     * built. Architecture will be blank for language packages.
     * </pre>
     *
     * <code>.grafeas.v1.Architecture architecture = 13;</code>
     *
     * @return The enum numeric value on the wire for architecture.
     */
    @java.lang.Override
    public int getArchitectureValue() {
      return architecture_;
    }
    /**
     *
     *
     * <pre>
     * The CPU architecture for which packages in this distribution channel were
     * built. Architecture will be blank for language packages.
     * </pre>
     *
     * <code>.grafeas.v1.Architecture architecture = 13;</code>
     *
     * @param value The enum numeric value on the wire for architecture to set.
     * @return This builder for chaining.
     */
    public Builder setArchitectureValue(int value) {
      architecture_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The CPU architecture for which packages in this distribution channel were
     * built. Architecture will be blank for language packages.
     * </pre>
     *
     * <code>.grafeas.v1.Architecture architecture = 13;</code>
     *
     * @return The architecture.
     */
    @java.lang.Override
    public io.grafeas.v1.Architecture getArchitecture() {
      io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_);
      return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * The CPU architecture for which packages in this distribution channel were
     * built. Architecture will be blank for language packages.
     * </pre>
     *
     * <code>.grafeas.v1.Architecture architecture = 13;</code>
     *
     * @param value The architecture to set.
     * @return This builder for chaining.
     */
    public Builder setArchitecture(io.grafeas.v1.Architecture value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000010;
      architecture_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The CPU architecture for which packages in this distribution channel were
     * built. Architecture will be blank for language packages.
     * </pre>
     *
     * <code>.grafeas.v1.Architecture architecture = 13;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearArchitecture() {
      bitField0_ = (bitField0_ & ~0x00000010);
      architecture_ = 0;
      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_;
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     *
     * @return Whether the version field is set.
     */
    public boolean hasVersion() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     *
     * @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();
      }
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     */
    public Builder setVersion(io.grafeas.v1.Version value) {
      if (versionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        version_ = value;
      } else {
        versionBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     */
    public Builder setVersion(io.grafeas.v1.Version.Builder builderForValue) {
      if (versionBuilder_ == null) {
        version_ = builderForValue.build();
      } else {
        versionBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     */
    public Builder mergeVersion(io.grafeas.v1.Version value) {
      if (versionBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)
            && version_ != null
            && version_ != io.grafeas.v1.Version.getDefaultInstance()) {
          getVersionBuilder().mergeFrom(value);
        } else {
          version_ = value;
        }
      } else {
        versionBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     */
    public Builder clearVersion() {
      bitField0_ = (bitField0_ & ~0x00000020);
      version_ = null;
      if (versionBuilder_ != null) {
        versionBuilder_.dispose();
        versionBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     */
    public io.grafeas.v1.Version.Builder getVersionBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getVersionFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     */
    public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
      if (versionBuilder_ != null) {
        return versionBuilder_.getMessageOrBuilder();
      } else {
        return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
      }
    }
    /**
     *
     *
     * <pre>
     * The version of the package.
     * </pre>
     *
     * <code>.grafeas.v1.Version version = 14;</code>
     */
    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.lang.Object maintainer_ = "";
    /**
     *
     *
     * <pre>
     * A freeform text denoting the maintainer of this package.
     * </pre>
     *
     * <code>string maintainer = 15;</code>
     *
     * @return The maintainer.
     */
    public java.lang.String getMaintainer() {
      java.lang.Object ref = maintainer_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        maintainer_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * A freeform text denoting the maintainer of this package.
     * </pre>
     *
     * <code>string maintainer = 15;</code>
     *
     * @return The bytes for maintainer.
     */
    public com.google.protobuf.ByteString getMaintainerBytes() {
      java.lang.Object ref = maintainer_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        maintainer_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * A freeform text denoting the maintainer of this package.
     * </pre>
     *
     * <code>string maintainer = 15;</code>
     *
     * @param value The maintainer to set.
     * @return This builder for chaining.
     */
    public Builder setMaintainer(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      maintainer_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A freeform text denoting the maintainer of this package.
     * </pre>
     *
     * <code>string maintainer = 15;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMaintainer() {
      maintainer_ = getDefaultInstance().getMaintainer();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A freeform text denoting the maintainer of this package.
     * </pre>
     *
     * <code>string maintainer = 15;</code>
     *
     * @param value The bytes for maintainer to set.
     * @return This builder for chaining.
     */
    public Builder setMaintainerBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      maintainer_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private java.lang.Object url_ = "";
    /**
     *
     *
     * <pre>
     * The homepage for this package.
     * </pre>
     *
     * <code>string url = 16;</code>
     *
     * @return The url.
     */
    public java.lang.String getUrl() {
      java.lang.Object ref = url_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        url_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The homepage for this package.
     * </pre>
     *
     * <code>string url = 16;</code>
     *
     * @return The bytes for url.
     */
    public com.google.protobuf.ByteString getUrlBytes() {
      java.lang.Object ref = url_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        url_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The homepage for this package.
     * </pre>
     *
     * <code>string url = 16;</code>
     *
     * @param value The url to set.
     * @return This builder for chaining.
     */
    public Builder setUrl(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      url_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The homepage for this package.
     * </pre>
     *
     * <code>string url = 16;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUrl() {
      url_ = getDefaultInstance().getUrl();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The homepage for this package.
     * </pre>
     *
     * <code>string url = 16;</code>
     *
     * @param value The bytes for url to set.
     * @return This builder for chaining.
     */
    public Builder setUrlBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      url_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }

    private java.lang.Object description_ = "";
    /**
     *
     *
     * <pre>
     * The description of this package.
     * </pre>
     *
     * <code>string description = 17;</code>
     *
     * @return The description.
     */
    public java.lang.String getDescription() {
      java.lang.Object ref = description_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        description_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The description of this package.
     * </pre>
     *
     * <code>string description = 17;</code>
     *
     * @return The bytes for description.
     */
    public com.google.protobuf.ByteString getDescriptionBytes() {
      java.lang.Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The description of this package.
     * </pre>
     *
     * <code>string description = 17;</code>
     *
     * @param value The description to set.
     * @return This builder for chaining.
     */
    public Builder setDescription(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      description_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The description of this package.
     * </pre>
     *
     * <code>string description = 17;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDescription() {
      description_ = getDefaultInstance().getDescription();
      bitField0_ = (bitField0_ & ~0x00000100);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The description of this package.
     * </pre>
     *
     * <code>string description = 17;</code>
     *
     * @param value The bytes for description to set.
     * @return This builder for chaining.
     */
    public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      description_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }

    private io.grafeas.v1.License license_;
    private com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>
        licenseBuilder_;
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     *
     * @return Whether the license field is set.
     */
    public boolean hasLicense() {
      return ((bitField0_ & 0x00000200) != 0);
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     *
     * @return The license.
     */
    public io.grafeas.v1.License getLicense() {
      if (licenseBuilder_ == null) {
        return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
      } else {
        return licenseBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     */
    public Builder setLicense(io.grafeas.v1.License value) {
      if (licenseBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        license_ = value;
      } else {
        licenseBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     */
    public Builder setLicense(io.grafeas.v1.License.Builder builderForValue) {
      if (licenseBuilder_ == null) {
        license_ = builderForValue.build();
      } else {
        licenseBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     */
    public Builder mergeLicense(io.grafeas.v1.License value) {
      if (licenseBuilder_ == null) {
        if (((bitField0_ & 0x00000200) != 0)
            && license_ != null
            && license_ != io.grafeas.v1.License.getDefaultInstance()) {
          getLicenseBuilder().mergeFrom(value);
        } else {
          license_ = value;
        }
      } else {
        licenseBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     */
    public Builder clearLicense() {
      bitField0_ = (bitField0_ & ~0x00000200);
      license_ = null;
      if (licenseBuilder_ != null) {
        licenseBuilder_.dispose();
        licenseBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     */
    public io.grafeas.v1.License.Builder getLicenseBuilder() {
      bitField0_ |= 0x00000200;
      onChanged();
      return getLicenseFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     */
    public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() {
      if (licenseBuilder_ != null) {
        return licenseBuilder_.getMessageOrBuilder();
      } else {
        return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
      }
    }
    /**
     *
     *
     * <pre>
     * Licenses that have been declared by the authors of the package.
     * </pre>
     *
     * <code>.grafeas.v1.License license = 18;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>
        getLicenseFieldBuilder() {
      if (licenseBuilder_ == null) {
        licenseBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                io.grafeas.v1.License,
                io.grafeas.v1.License.Builder,
                io.grafeas.v1.LicenseOrBuilder>(getLicense(), getParentForChildren(), isClean());
        license_ = null;
      }
      return licenseBuilder_;
    }

    private java.util.List<io.grafeas.v1.Digest> digest_ = java.util.Collections.emptyList();

    private void ensureDigestIsMutable() {
      if (!((bitField0_ & 0x00000400) != 0)) {
        digest_ = new java.util.ArrayList<io.grafeas.v1.Digest>(digest_);
        bitField0_ |= 0x00000400;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>
        digestBuilder_;

    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public java.util.List<io.grafeas.v1.Digest> getDigestList() {
      if (digestBuilder_ == null) {
        return java.util.Collections.unmodifiableList(digest_);
      } else {
        return digestBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public int getDigestCount() {
      if (digestBuilder_ == null) {
        return digest_.size();
      } else {
        return digestBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public io.grafeas.v1.Digest getDigest(int index) {
      if (digestBuilder_ == null) {
        return digest_.get(index);
      } else {
        return digestBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder setDigest(int index, io.grafeas.v1.Digest value) {
      if (digestBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDigestIsMutable();
        digest_.set(index, value);
        onChanged();
      } else {
        digestBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder setDigest(int index, io.grafeas.v1.Digest.Builder builderForValue) {
      if (digestBuilder_ == null) {
        ensureDigestIsMutable();
        digest_.set(index, builderForValue.build());
        onChanged();
      } else {
        digestBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder addDigest(io.grafeas.v1.Digest value) {
      if (digestBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDigestIsMutable();
        digest_.add(value);
        onChanged();
      } else {
        digestBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder addDigest(int index, io.grafeas.v1.Digest value) {
      if (digestBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDigestIsMutable();
        digest_.add(index, value);
        onChanged();
      } else {
        digestBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder addDigest(io.grafeas.v1.Digest.Builder builderForValue) {
      if (digestBuilder_ == null) {
        ensureDigestIsMutable();
        digest_.add(builderForValue.build());
        onChanged();
      } else {
        digestBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder addDigest(int index, io.grafeas.v1.Digest.Builder builderForValue) {
      if (digestBuilder_ == null) {
        ensureDigestIsMutable();
        digest_.add(index, builderForValue.build());
        onChanged();
      } else {
        digestBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder addAllDigest(java.lang.Iterable<? extends io.grafeas.v1.Digest> values) {
      if (digestBuilder_ == null) {
        ensureDigestIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, digest_);
        onChanged();
      } else {
        digestBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder clearDigest() {
      if (digestBuilder_ == null) {
        digest_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
        onChanged();
      } else {
        digestBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public Builder removeDigest(int index) {
      if (digestBuilder_ == null) {
        ensureDigestIsMutable();
        digest_.remove(index);
        onChanged();
      } else {
        digestBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public io.grafeas.v1.Digest.Builder getDigestBuilder(int index) {
      return getDigestFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder(int index) {
      if (digestBuilder_ == null) {
        return digest_.get(index);
      } else {
        return digestBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public java.util.List<? extends io.grafeas.v1.DigestOrBuilder> getDigestOrBuilderList() {
      if (digestBuilder_ != null) {
        return digestBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(digest_);
      }
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public io.grafeas.v1.Digest.Builder addDigestBuilder() {
      return getDigestFieldBuilder().addBuilder(io.grafeas.v1.Digest.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public io.grafeas.v1.Digest.Builder addDigestBuilder(int index) {
      return getDigestFieldBuilder().addBuilder(index, io.grafeas.v1.Digest.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Hash value, typically a file digest, that allows unique
     * identification a specific package.
     * </pre>
     *
     * <code>repeated .grafeas.v1.Digest digest = 19;</code>
     */
    public java.util.List<io.grafeas.v1.Digest.Builder> getDigestBuilderList() {
      return getDigestFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>
        getDigestFieldBuilder() {
      if (digestBuilder_ == null) {
        digestBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>(
                digest_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean());
        digest_ = null;
      }
      return digestBuilder_;
    }

    @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.PackageNote)
  }

  // @@protoc_insertion_point(class_scope:grafeas.v1.PackageNote)
  private static final io.grafeas.v1.PackageNote DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new io.grafeas.v1.PackageNote();
  }

  public static io.grafeas.v1.PackageNote getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<PackageNote> PARSER =
      new com.google.protobuf.AbstractParser<PackageNote>() {
        @java.lang.Override
        public PackageNote 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<PackageNote> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<PackageNote> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public io.grafeas.v1.PackageNote getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
