/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/devtools/artifactregistry/v1/artifact.proto

package com.google.devtools.artifactregistry.v1;

/**
 *
 *
 * <pre>
 * DockerImage represents a docker artifact.
 * The following fields are returned as untyped metadata in the Version
 * resource, using camelcase keys (i.e. metadata.imageSizeBytes):
 * * imageSizeBytes
 * * mediaType
 * * buildTime
 * </pre>
 *
 * Protobuf type {@code google.devtools.artifactregistry.v1.DockerImage}
 */
public final class DockerImage extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.DockerImage)
    DockerImageOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use DockerImage.newBuilder() to construct.
  private DockerImage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private DockerImage() {
    name_ = "";
    uri_ = "";
    tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    mediaType_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.devtools.artifactregistry.v1.ArtifactProto
        .internal_static_google_devtools_artifactregistry_v1_DockerImage_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.artifactregistry.v1.ArtifactProto
        .internal_static_google_devtools_artifactregistry_v1_DockerImage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.artifactregistry.v1.DockerImage.class,
            com.google.devtools.artifactregistry.v1.DockerImage.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Required. registry_location, project_id, repository_name and image id forms
   * a unique image
   * name:`projects/&lt;project_id&gt;/locations/&lt;location&gt;/repository/&lt;repository_name&gt;/dockerImages/&lt;docker_image&gt;`.
   * For example,
   * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
   * nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
   * where "us-west4" is the registry_location, "test-project" is the
   * project_id, "test-repo" is the repository_name and
   * "nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
   * is the image's digest.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
   * Required. registry_location, project_id, repository_name and image id forms
   * a unique image
   * name:`projects/&lt;project_id&gt;/locations/&lt;location&gt;/repository/&lt;repository_name&gt;/dockerImages/&lt;docker_image&gt;`.
   * For example,
   * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
   * nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
   * where "us-west4" is the registry_location, "test-project" is the
   * project_id, "test-repo" is the repository_name and
   * "nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
   * is the image's digest.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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 URI_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object uri_ = "";
  /**
   *
   *
   * <pre>
   * Required. URL to access the image.
   * Example:
   * us-west4-docker.pkg.dev/test-project/test-repo/nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
   * </pre>
   *
   * <code>string uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The uri.
   */
  @java.lang.Override
  public java.lang.String getUri() {
    java.lang.Object ref = uri_;
    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();
      uri_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. URL to access the image.
   * Example:
   * us-west4-docker.pkg.dev/test-project/test-repo/nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
   * </pre>
   *
   * <code>string uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The bytes for uri.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUriBytes() {
    java.lang.Object ref = uri_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      uri_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TAGS_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList tags_;
  /**
   *
   *
   * <pre>
   * Tags attached to this image.
   * </pre>
   *
   * <code>repeated string tags = 3;</code>
   *
   * @return A list containing the tags.
   */
  public com.google.protobuf.ProtocolStringList getTagsList() {
    return tags_;
  }
  /**
   *
   *
   * <pre>
   * Tags attached to this image.
   * </pre>
   *
   * <code>repeated string tags = 3;</code>
   *
   * @return The count of tags.
   */
  public int getTagsCount() {
    return tags_.size();
  }
  /**
   *
   *
   * <pre>
   * Tags attached to this image.
   * </pre>
   *
   * <code>repeated string tags = 3;</code>
   *
   * @param index The index of the element to return.
   * @return The tags at the given index.
   */
  public java.lang.String getTags(int index) {
    return tags_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Tags attached to this image.
   * </pre>
   *
   * <code>repeated string tags = 3;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the tags at the given index.
   */
  public com.google.protobuf.ByteString getTagsBytes(int index) {
    return tags_.getByteString(index);
  }

  public static final int IMAGE_SIZE_BYTES_FIELD_NUMBER = 4;
  private long imageSizeBytes_ = 0L;
  /**
   *
   *
   * <pre>
   * Calculated size of the image.
   * This field is returned as the 'metadata.imageSizeBytes' field in the
   * Version resource.
   * </pre>
   *
   * <code>int64 image_size_bytes = 4;</code>
   *
   * @return The imageSizeBytes.
   */
  @java.lang.Override
  public long getImageSizeBytes() {
    return imageSizeBytes_;
  }

  public static final int UPLOAD_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp uploadTime_;
  /**
   *
   *
   * <pre>
   * Time the image was uploaded.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp upload_time = 5;</code>
   *
   * @return Whether the uploadTime field is set.
   */
  @java.lang.Override
  public boolean hasUploadTime() {
    return uploadTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Time the image was uploaded.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp upload_time = 5;</code>
   *
   * @return The uploadTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUploadTime() {
    return uploadTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : uploadTime_;
  }
  /**
   *
   *
   * <pre>
   * Time the image was uploaded.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp upload_time = 5;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUploadTimeOrBuilder() {
    return uploadTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : uploadTime_;
  }

  public static final int MEDIA_TYPE_FIELD_NUMBER = 6;

  @SuppressWarnings("serial")
  private volatile java.lang.Object mediaType_ = "";
  /**
   *
   *
   * <pre>
   * Media type of this image, e.g.
   * "application/vnd.docker.distribution.manifest.v2+json".
   * This field is returned as the 'metadata.mediaType' field in the
   * Version resource.
   * </pre>
   *
   * <code>string media_type = 6;</code>
   *
   * @return The mediaType.
   */
  @java.lang.Override
  public java.lang.String getMediaType() {
    java.lang.Object ref = mediaType_;
    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();
      mediaType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Media type of this image, e.g.
   * "application/vnd.docker.distribution.manifest.v2+json".
   * This field is returned as the 'metadata.mediaType' field in the
   * Version resource.
   * </pre>
   *
   * <code>string media_type = 6;</code>
   *
   * @return The bytes for mediaType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getMediaTypeBytes() {
    java.lang.Object ref = mediaType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      mediaType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int BUILD_TIME_FIELD_NUMBER = 7;
  private com.google.protobuf.Timestamp buildTime_;
  /**
   *
   *
   * <pre>
   * The time this image was built.
   * This field is returned as the 'metadata.buildTime' field in the
   * Version resource.
   * The build time is returned to the client as an RFC 3339 string, which can
   * be easily used with the JavaScript Date constructor.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp build_time = 7;</code>
   *
   * @return Whether the buildTime field is set.
   */
  @java.lang.Override
  public boolean hasBuildTime() {
    return buildTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The time this image was built.
   * This field is returned as the 'metadata.buildTime' field in the
   * Version resource.
   * The build time is returned to the client as an RFC 3339 string, which can
   * be easily used with the JavaScript Date constructor.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp build_time = 7;</code>
   *
   * @return The buildTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getBuildTime() {
    return buildTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildTime_;
  }
  /**
   *
   *
   * <pre>
   * The time this image was built.
   * This field is returned as the 'metadata.buildTime' field in the
   * Version resource.
   * The build time is returned to the client as an RFC 3339 string, which can
   * be easily used with the JavaScript Date constructor.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp build_time = 7;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getBuildTimeOrBuilder() {
    return buildTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildTime_;
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 8;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time when the docker image was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time when the docker image was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time when the docker image was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }

  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_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_);
    }
    for (int i = 0; i < tags_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tags_.getRaw(i));
    }
    if (imageSizeBytes_ != 0L) {
      output.writeInt64(4, imageSizeBytes_);
    }
    if (uploadTime_ != null) {
      output.writeMessage(5, getUploadTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mediaType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, mediaType_);
    }
    if (buildTime_ != null) {
      output.writeMessage(7, getBuildTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(8, getUpdateTime());
    }
    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_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < tags_.size(); i++) {
        dataSize += computeStringSizeNoTag(tags_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getTagsList().size();
    }
    if (imageSizeBytes_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, imageSizeBytes_);
    }
    if (uploadTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUploadTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mediaType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, mediaType_);
    }
    if (buildTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getBuildTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime());
    }
    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 com.google.devtools.artifactregistry.v1.DockerImage)) {
      return super.equals(obj);
    }
    com.google.devtools.artifactregistry.v1.DockerImage other =
        (com.google.devtools.artifactregistry.v1.DockerImage) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getUri().equals(other.getUri())) return false;
    if (!getTagsList().equals(other.getTagsList())) return false;
    if (getImageSizeBytes() != other.getImageSizeBytes()) return false;
    if (hasUploadTime() != other.hasUploadTime()) return false;
    if (hasUploadTime()) {
      if (!getUploadTime().equals(other.getUploadTime())) return false;
    }
    if (!getMediaType().equals(other.getMediaType())) return false;
    if (hasBuildTime() != other.hasBuildTime()) return false;
    if (hasBuildTime()) {
      if (!getBuildTime().equals(other.getBuildTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) 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();
    hash = (37 * hash) + URI_FIELD_NUMBER;
    hash = (53 * hash) + getUri().hashCode();
    if (getTagsCount() > 0) {
      hash = (37 * hash) + TAGS_FIELD_NUMBER;
      hash = (53 * hash) + getTagsList().hashCode();
    }
    hash = (37 * hash) + IMAGE_SIZE_BYTES_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getImageSizeBytes());
    if (hasUploadTime()) {
      hash = (37 * hash) + UPLOAD_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUploadTime().hashCode();
    }
    hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getMediaType().hashCode();
    if (hasBuildTime()) {
      hash = (37 * hash) + BUILD_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getBuildTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.devtools.artifactregistry.v1.DockerImage parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.devtools.artifactregistry.v1.DockerImage parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.devtools.artifactregistry.v1.DockerImage parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.devtools.artifactregistry.v1.DockerImage parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.devtools.artifactregistry.v1.DockerImage parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

  public static com.google.devtools.artifactregistry.v1.DockerImage 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(com.google.devtools.artifactregistry.v1.DockerImage 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>
   * DockerImage represents a docker artifact.
   * The following fields are returned as untyped metadata in the Version
   * resource, using camelcase keys (i.e. metadata.imageSizeBytes):
   * * imageSizeBytes
   * * mediaType
   * * buildTime
   * </pre>
   *
   * Protobuf type {@code google.devtools.artifactregistry.v1.DockerImage}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.DockerImage)
      com.google.devtools.artifactregistry.v1.DockerImageOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.devtools.artifactregistry.v1.ArtifactProto
          .internal_static_google_devtools_artifactregistry_v1_DockerImage_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.artifactregistry.v1.ArtifactProto
          .internal_static_google_devtools_artifactregistry_v1_DockerImage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.artifactregistry.v1.DockerImage.class,
              com.google.devtools.artifactregistry.v1.DockerImage.Builder.class);
    }

    // Construct using com.google.devtools.artifactregistry.v1.DockerImage.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      uri_ = "";
      tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      imageSizeBytes_ = 0L;
      uploadTime_ = null;
      if (uploadTimeBuilder_ != null) {
        uploadTimeBuilder_.dispose();
        uploadTimeBuilder_ = null;
      }
      mediaType_ = "";
      buildTime_ = null;
      if (buildTimeBuilder_ != null) {
        buildTimeBuilder_.dispose();
        buildTimeBuilder_ = null;
      }
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.devtools.artifactregistry.v1.ArtifactProto
          .internal_static_google_devtools_artifactregistry_v1_DockerImage_descriptor;
    }

    @java.lang.Override
    public com.google.devtools.artifactregistry.v1.DockerImage getDefaultInstanceForType() {
      return com.google.devtools.artifactregistry.v1.DockerImage.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.devtools.artifactregistry.v1.DockerImage build() {
      com.google.devtools.artifactregistry.v1.DockerImage result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.devtools.artifactregistry.v1.DockerImage buildPartial() {
      com.google.devtools.artifactregistry.v1.DockerImage result =
          new com.google.devtools.artifactregistry.v1.DockerImage(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.devtools.artifactregistry.v1.DockerImage result) {
      if (((bitField0_ & 0x00000004) != 0)) {
        tags_ = tags_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000004);
      }
      result.tags_ = tags_;
    }

    private void buildPartial0(com.google.devtools.artifactregistry.v1.DockerImage result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.uri_ = uri_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.imageSizeBytes_ = imageSizeBytes_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.uploadTime_ = uploadTimeBuilder_ == null ? uploadTime_ : uploadTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.mediaType_ = mediaType_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.buildTime_ = buildTimeBuilder_ == null ? buildTime_ : buildTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.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 com.google.devtools.artifactregistry.v1.DockerImage) {
        return mergeFrom((com.google.devtools.artifactregistry.v1.DockerImage) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.devtools.artifactregistry.v1.DockerImage other) {
      if (other == com.google.devtools.artifactregistry.v1.DockerImage.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getUri().isEmpty()) {
        uri_ = other.uri_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.tags_.isEmpty()) {
        if (tags_.isEmpty()) {
          tags_ = other.tags_;
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          ensureTagsIsMutable();
          tags_.addAll(other.tags_);
        }
        onChanged();
      }
      if (other.getImageSizeBytes() != 0L) {
        setImageSizeBytes(other.getImageSizeBytes());
      }
      if (other.hasUploadTime()) {
        mergeUploadTime(other.getUploadTime());
      }
      if (!other.getMediaType().isEmpty()) {
        mediaType_ = other.mediaType_;
        bitField0_ |= 0x00000020;
        onChanged();
      }
      if (other.hasBuildTime()) {
        mergeBuildTime(other.getBuildTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      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 18:
              {
                uri_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureTagsIsMutable();
                tags_.add(s);
                break;
              } // case 26
            case 32:
              {
                imageSizeBytes_ = input.readInt64();
                bitField0_ |= 0x00000008;
                break;
              } // case 32
            case 42:
              {
                input.readMessage(getUploadTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                mediaType_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            case 58:
              {
                input.readMessage(getBuildTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000040;
                break;
              } // case 58
            case 66:
              {
                input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000080;
                break;
              } // case 66
            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>
     * Required. registry_location, project_id, repository_name and image id forms
     * a unique image
     * name:`projects/&lt;project_id&gt;/locations/&lt;location&gt;/repository/&lt;repository_name&gt;/dockerImages/&lt;docker_image&gt;`.
     * For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
     * nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
     * is the image's digest.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
     * Required. registry_location, project_id, repository_name and image id forms
     * a unique image
     * name:`projects/&lt;project_id&gt;/locations/&lt;location&gt;/repository/&lt;repository_name&gt;/dockerImages/&lt;docker_image&gt;`.
     * For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
     * nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
     * is the image's digest.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
     * Required. registry_location, project_id, repository_name and image id forms
     * a unique image
     * name:`projects/&lt;project_id&gt;/locations/&lt;location&gt;/repository/&lt;repository_name&gt;/dockerImages/&lt;docker_image&gt;`.
     * For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
     * nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
     * is the image's digest.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
     * Required. registry_location, project_id, repository_name and image id forms
     * a unique image
     * name:`projects/&lt;project_id&gt;/locations/&lt;location&gt;/repository/&lt;repository_name&gt;/dockerImages/&lt;docker_image&gt;`.
     * For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
     * nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
     * is the image's digest.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. registry_location, project_id, repository_name and image id forms
     * a unique image
     * name:`projects/&lt;project_id&gt;/locations/&lt;location&gt;/repository/&lt;repository_name&gt;/dockerImages/&lt;docker_image&gt;`.
     * For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/
     * nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
     * is the image's digest.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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.lang.Object uri_ = "";
    /**
     *
     *
     * <pre>
     * Required. URL to access the image.
     * Example:
     * us-west4-docker.pkg.dev/test-project/test-repo/nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
     * </pre>
     *
     * <code>string uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The uri.
     */
    public java.lang.String getUri() {
      java.lang.Object ref = uri_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        uri_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. URL to access the image.
     * Example:
     * us-west4-docker.pkg.dev/test-project/test-repo/nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
     * </pre>
     *
     * <code>string uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for uri.
     */
    public com.google.protobuf.ByteString getUriBytes() {
      java.lang.Object ref = uri_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        uri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. URL to access the image.
     * Example:
     * us-west4-docker.pkg.dev/test-project/test-repo/nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
     * </pre>
     *
     * <code>string uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The uri to set.
     * @return This builder for chaining.
     */
    public Builder setUri(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      uri_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. URL to access the image.
     * Example:
     * us-west4-docker.pkg.dev/test-project/test-repo/nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
     * </pre>
     *
     * <code>string uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUri() {
      uri_ = getDefaultInstance().getUri();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. URL to access the image.
     * Example:
     * us-west4-docker.pkg.dev/test-project/test-repo/nginx&#64;sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
     * </pre>
     *
     * <code>string uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The bytes for uri to set.
     * @return This builder for chaining.
     */
    public Builder setUriBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      uri_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList tags_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureTagsIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        tags_ = new com.google.protobuf.LazyStringArrayList(tags_);
        bitField0_ |= 0x00000004;
      }
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @return A list containing the tags.
     */
    public com.google.protobuf.ProtocolStringList getTagsList() {
      return tags_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @return The count of tags.
     */
    public int getTagsCount() {
      return tags_.size();
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @param index The index of the element to return.
     * @return The tags at the given index.
     */
    public java.lang.String getTags(int index) {
      return tags_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the tags at the given index.
     */
    public com.google.protobuf.ByteString getTagsBytes(int index) {
      return tags_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @param index The index to set the value at.
     * @param value The tags to set.
     * @return This builder for chaining.
     */
    public Builder setTags(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagsIsMutable();
      tags_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @param value The tags to add.
     * @return This builder for chaining.
     */
    public Builder addTags(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagsIsMutable();
      tags_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @param values The tags to add.
     * @return This builder for chaining.
     */
    public Builder addAllTags(java.lang.Iterable<java.lang.String> values) {
      ensureTagsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTags() {
      tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Tags attached to this image.
     * </pre>
     *
     * <code>repeated string tags = 3;</code>
     *
     * @param value The bytes of the tags to add.
     * @return This builder for chaining.
     */
    public Builder addTagsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureTagsIsMutable();
      tags_.add(value);
      onChanged();
      return this;
    }

    private long imageSizeBytes_;
    /**
     *
     *
     * <pre>
     * Calculated size of the image.
     * This field is returned as the 'metadata.imageSizeBytes' field in the
     * Version resource.
     * </pre>
     *
     * <code>int64 image_size_bytes = 4;</code>
     *
     * @return The imageSizeBytes.
     */
    @java.lang.Override
    public long getImageSizeBytes() {
      return imageSizeBytes_;
    }
    /**
     *
     *
     * <pre>
     * Calculated size of the image.
     * This field is returned as the 'metadata.imageSizeBytes' field in the
     * Version resource.
     * </pre>
     *
     * <code>int64 image_size_bytes = 4;</code>
     *
     * @param value The imageSizeBytes to set.
     * @return This builder for chaining.
     */
    public Builder setImageSizeBytes(long value) {

      imageSizeBytes_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Calculated size of the image.
     * This field is returned as the 'metadata.imageSizeBytes' field in the
     * Version resource.
     * </pre>
     *
     * <code>int64 image_size_bytes = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearImageSizeBytes() {
      bitField0_ = (bitField0_ & ~0x00000008);
      imageSizeBytes_ = 0L;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp uploadTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        uploadTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     *
     * @return Whether the uploadTime field is set.
     */
    public boolean hasUploadTime() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     *
     * @return The uploadTime.
     */
    public com.google.protobuf.Timestamp getUploadTime() {
      if (uploadTimeBuilder_ == null) {
        return uploadTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : uploadTime_;
      } else {
        return uploadTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     */
    public Builder setUploadTime(com.google.protobuf.Timestamp value) {
      if (uploadTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        uploadTime_ = value;
      } else {
        uploadTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     */
    public Builder setUploadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (uploadTimeBuilder_ == null) {
        uploadTime_ = builderForValue.build();
      } else {
        uploadTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     */
    public Builder mergeUploadTime(com.google.protobuf.Timestamp value) {
      if (uploadTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && uploadTime_ != null
            && uploadTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getUploadTimeBuilder().mergeFrom(value);
        } else {
          uploadTime_ = value;
        }
      } else {
        uploadTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     */
    public Builder clearUploadTime() {
      bitField0_ = (bitField0_ & ~0x00000010);
      uploadTime_ = null;
      if (uploadTimeBuilder_ != null) {
        uploadTimeBuilder_.dispose();
        uploadTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     */
    public com.google.protobuf.Timestamp.Builder getUploadTimeBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getUploadTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getUploadTimeOrBuilder() {
      if (uploadTimeBuilder_ != null) {
        return uploadTimeBuilder_.getMessageOrBuilder();
      } else {
        return uploadTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : uploadTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Time the image was uploaded.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp upload_time = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUploadTimeFieldBuilder() {
      if (uploadTimeBuilder_ == null) {
        uploadTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUploadTime(), getParentForChildren(), isClean());
        uploadTime_ = null;
      }
      return uploadTimeBuilder_;
    }

    private java.lang.Object mediaType_ = "";
    /**
     *
     *
     * <pre>
     * Media type of this image, e.g.
     * "application/vnd.docker.distribution.manifest.v2+json".
     * This field is returned as the 'metadata.mediaType' field in the
     * Version resource.
     * </pre>
     *
     * <code>string media_type = 6;</code>
     *
     * @return The mediaType.
     */
    public java.lang.String getMediaType() {
      java.lang.Object ref = mediaType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        mediaType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Media type of this image, e.g.
     * "application/vnd.docker.distribution.manifest.v2+json".
     * This field is returned as the 'metadata.mediaType' field in the
     * Version resource.
     * </pre>
     *
     * <code>string media_type = 6;</code>
     *
     * @return The bytes for mediaType.
     */
    public com.google.protobuf.ByteString getMediaTypeBytes() {
      java.lang.Object ref = mediaType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        mediaType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Media type of this image, e.g.
     * "application/vnd.docker.distribution.manifest.v2+json".
     * This field is returned as the 'metadata.mediaType' field in the
     * Version resource.
     * </pre>
     *
     * <code>string media_type = 6;</code>
     *
     * @param value The mediaType to set.
     * @return This builder for chaining.
     */
    public Builder setMediaType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      mediaType_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Media type of this image, e.g.
     * "application/vnd.docker.distribution.manifest.v2+json".
     * This field is returned as the 'metadata.mediaType' field in the
     * Version resource.
     * </pre>
     *
     * <code>string media_type = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMediaType() {
      mediaType_ = getDefaultInstance().getMediaType();
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Media type of this image, e.g.
     * "application/vnd.docker.distribution.manifest.v2+json".
     * This field is returned as the 'metadata.mediaType' field in the
     * Version resource.
     * </pre>
     *
     * <code>string media_type = 6;</code>
     *
     * @param value The bytes for mediaType to set.
     * @return This builder for chaining.
     */
    public Builder setMediaTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      mediaType_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp buildTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        buildTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     *
     * @return Whether the buildTime field is set.
     */
    public boolean hasBuildTime() {
      return ((bitField0_ & 0x00000040) != 0);
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     *
     * @return The buildTime.
     */
    public com.google.protobuf.Timestamp getBuildTime() {
      if (buildTimeBuilder_ == null) {
        return buildTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildTime_;
      } else {
        return buildTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     */
    public Builder setBuildTime(com.google.protobuf.Timestamp value) {
      if (buildTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        buildTime_ = value;
      } else {
        buildTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     */
    public Builder setBuildTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (buildTimeBuilder_ == null) {
        buildTime_ = builderForValue.build();
      } else {
        buildTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     */
    public Builder mergeBuildTime(com.google.protobuf.Timestamp value) {
      if (buildTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000040) != 0)
            && buildTime_ != null
            && buildTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getBuildTimeBuilder().mergeFrom(value);
        } else {
          buildTime_ = value;
        }
      } else {
        buildTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     */
    public Builder clearBuildTime() {
      bitField0_ = (bitField0_ & ~0x00000040);
      buildTime_ = null;
      if (buildTimeBuilder_ != null) {
        buildTimeBuilder_.dispose();
        buildTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     */
    public com.google.protobuf.Timestamp.Builder getBuildTimeBuilder() {
      bitField0_ |= 0x00000040;
      onChanged();
      return getBuildTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getBuildTimeOrBuilder() {
      if (buildTimeBuilder_ != null) {
        return buildTimeBuilder_.getMessageOrBuilder();
      } else {
        return buildTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : buildTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The time this image was built.
     * This field is returned as the 'metadata.buildTime' field in the
     * Version resource.
     * The build time is returned to the client as an RFC 3339 string, which can
     * be easily used with the JavaScript Date constructor.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp build_time = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getBuildTimeFieldBuilder() {
      if (buildTimeBuilder_ == null) {
        buildTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getBuildTime(), getParentForChildren(), isClean());
        buildTime_ = null;
      }
      return buildTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return ((bitField0_ & 0x00000080) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
      } else {
        updateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000080) != 0)
            && updateTime_ != null
            && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getUpdateTimeBuilder().mergeFrom(value);
        } else {
          updateTime_ = value;
        }
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearUpdateTime() {
      bitField0_ = (bitField0_ & ~0x00000080);
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      bitField0_ |= 0x00000080;
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time when the docker image was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    @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:google.devtools.artifactregistry.v1.DockerImage)
  }

  // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.DockerImage)
  private static final com.google.devtools.artifactregistry.v1.DockerImage DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.DockerImage();
  }

  public static com.google.devtools.artifactregistry.v1.DockerImage getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.devtools.artifactregistry.v1.DockerImage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
