DeploymentOccurrence.java

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

package io.grafeas.v1;

/**
 *
 *
 * <pre>
 * The period during which some deployable was active in a runtime.
 * </pre>
 *
 * Protobuf type {@code grafeas.v1.DeploymentOccurrence}
 */
public final class DeploymentOccurrence extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:grafeas.v1.DeploymentOccurrence)
    DeploymentOccurrenceOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use DeploymentOccurrence.newBuilder() to construct.
  private DeploymentOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private DeploymentOccurrence() {
    userEmail_ = "";
    config_ = "";
    address_ = "";
    resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    platform_ = 0;
  }

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

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

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

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

  /**
   *
   *
   * <pre>
   * Types of platforms.
   * </pre>
   *
   * Protobuf enum {@code grafeas.v1.DeploymentOccurrence.Platform}
   */
  public enum Platform implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Unknown.
     * </pre>
     *
     * <code>PLATFORM_UNSPECIFIED = 0;</code>
     */
    PLATFORM_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Google Container Engine.
     * </pre>
     *
     * <code>GKE = 1;</code>
     */
    GKE(1),
    /**
     *
     *
     * <pre>
     * Google App Engine: Flexible Environment.
     * </pre>
     *
     * <code>FLEX = 2;</code>
     */
    FLEX(2),
    /**
     *
     *
     * <pre>
     * Custom user-defined platform.
     * </pre>
     *
     * <code>CUSTOM = 3;</code>
     */
    CUSTOM(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Unknown.
     * </pre>
     *
     * <code>PLATFORM_UNSPECIFIED = 0;</code>
     */
    public static final int PLATFORM_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Google Container Engine.
     * </pre>
     *
     * <code>GKE = 1;</code>
     */
    public static final int GKE_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Google App Engine: Flexible Environment.
     * </pre>
     *
     * <code>FLEX = 2;</code>
     */
    public static final int FLEX_VALUE = 2;
    /**
     *
     *
     * <pre>
     * Custom user-defined platform.
     * </pre>
     *
     * <code>CUSTOM = 3;</code>
     */
    public static final int CUSTOM_VALUE = 3;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Platform valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Platform forNumber(int value) {
      switch (value) {
        case 0:
          return PLATFORM_UNSPECIFIED;
        case 1:
          return GKE;
        case 2:
          return FLEX;
        case 3:
          return CUSTOM;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Platform> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<Platform> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Platform>() {
          public Platform findValueByNumber(int number) {
            return Platform.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return io.grafeas.v1.DeploymentOccurrence.getDescriptor().getEnumTypes().get(0);
    }

    private static final Platform[] VALUES = values();

    public static Platform valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Platform(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:grafeas.v1.DeploymentOccurrence.Platform)
  }

  public static final int USER_EMAIL_FIELD_NUMBER = 1;
  private volatile java.lang.Object userEmail_;
  /**
   *
   *
   * <pre>
   * Identity of the user that triggered this deployment.
   * </pre>
   *
   * <code>string user_email = 1;</code>
   *
   * @return The userEmail.
   */
  @java.lang.Override
  public java.lang.String getUserEmail() {
    java.lang.Object ref = userEmail_;
    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();
      userEmail_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Identity of the user that triggered this deployment.
   * </pre>
   *
   * <code>string user_email = 1;</code>
   *
   * @return The bytes for userEmail.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUserEmailBytes() {
    java.lang.Object ref = userEmail_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      userEmail_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEPLOY_TIME_FIELD_NUMBER = 2;
  private com.google.protobuf.Timestamp deployTime_;
  /**
   *
   *
   * <pre>
   * Required. Beginning of the lifetime of this deployment.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
   *
   * @return Whether the deployTime field is set.
   */
  @java.lang.Override
  public boolean hasDeployTime() {
    return deployTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Required. Beginning of the lifetime of this deployment.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
   *
   * @return The deployTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getDeployTime() {
    return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_;
  }
  /**
   *
   *
   * <pre>
   * Required. Beginning of the lifetime of this deployment.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() {
    return getDeployTime();
  }

  public static final int UNDEPLOY_TIME_FIELD_NUMBER = 3;
  private com.google.protobuf.Timestamp undeployTime_;
  /**
   *
   *
   * <pre>
   * End of the lifetime of this deployment.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
   *
   * @return Whether the undeployTime field is set.
   */
  @java.lang.Override
  public boolean hasUndeployTime() {
    return undeployTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * End of the lifetime of this deployment.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
   *
   * @return The undeployTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUndeployTime() {
    return undeployTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : undeployTime_;
  }
  /**
   *
   *
   * <pre>
   * End of the lifetime of this deployment.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() {
    return getUndeployTime();
  }

  public static final int CONFIG_FIELD_NUMBER = 4;
  private volatile java.lang.Object config_;
  /**
   *
   *
   * <pre>
   * Configuration used to create this deployment.
   * </pre>
   *
   * <code>string config = 4;</code>
   *
   * @return The config.
   */
  @java.lang.Override
  public java.lang.String getConfig() {
    java.lang.Object ref = config_;
    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();
      config_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Configuration used to create this deployment.
   * </pre>
   *
   * <code>string config = 4;</code>
   *
   * @return The bytes for config.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getConfigBytes() {
    java.lang.Object ref = config_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      config_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ADDRESS_FIELD_NUMBER = 5;
  private volatile java.lang.Object address_;
  /**
   *
   *
   * <pre>
   * Address of the runtime element hosting this deployment.
   * </pre>
   *
   * <code>string address = 5;</code>
   *
   * @return The address.
   */
  @java.lang.Override
  public java.lang.String getAddress() {
    java.lang.Object ref = address_;
    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();
      address_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Address of the runtime element hosting this deployment.
   * </pre>
   *
   * <code>string address = 5;</code>
   *
   * @return The bytes for address.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getAddressBytes() {
    java.lang.Object ref = address_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      address_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RESOURCE_URI_FIELD_NUMBER = 6;
  private com.google.protobuf.LazyStringList resourceUri_;
  /**
   *
   *
   * <pre>
   * Output only. Resource URI for the artifact being deployed taken from
   * the deployable field with the same name.
   * </pre>
   *
   * <code>repeated string resource_uri = 6;</code>
   *
   * @return A list containing the resourceUri.
   */
  public com.google.protobuf.ProtocolStringList getResourceUriList() {
    return resourceUri_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Resource URI for the artifact being deployed taken from
   * the deployable field with the same name.
   * </pre>
   *
   * <code>repeated string resource_uri = 6;</code>
   *
   * @return The count of resourceUri.
   */
  public int getResourceUriCount() {
    return resourceUri_.size();
  }
  /**
   *
   *
   * <pre>
   * Output only. Resource URI for the artifact being deployed taken from
   * the deployable field with the same name.
   * </pre>
   *
   * <code>repeated string resource_uri = 6;</code>
   *
   * @param index The index of the element to return.
   * @return The resourceUri at the given index.
   */
  public java.lang.String getResourceUri(int index) {
    return resourceUri_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Output only. Resource URI for the artifact being deployed taken from
   * the deployable field with the same name.
   * </pre>
   *
   * <code>repeated string resource_uri = 6;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the resourceUri at the given index.
   */
  public com.google.protobuf.ByteString getResourceUriBytes(int index) {
    return resourceUri_.getByteString(index);
  }

  public static final int PLATFORM_FIELD_NUMBER = 7;
  private int platform_;
  /**
   *
   *
   * <pre>
   * Platform hosting this deployment.
   * </pre>
   *
   * <code>.grafeas.v1.DeploymentOccurrence.Platform platform = 7;</code>
   *
   * @return The enum numeric value on the wire for platform.
   */
  @java.lang.Override
  public int getPlatformValue() {
    return platform_;
  }
  /**
   *
   *
   * <pre>
   * Platform hosting this deployment.
   * </pre>
   *
   * <code>.grafeas.v1.DeploymentOccurrence.Platform platform = 7;</code>
   *
   * @return The platform.
   */
  @java.lang.Override
  public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() {
    @SuppressWarnings("deprecation")
    io.grafeas.v1.DeploymentOccurrence.Platform result =
        io.grafeas.v1.DeploymentOccurrence.Platform.valueOf(platform_);
    return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result;
  }

  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(userEmail_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userEmail_);
    }
    if (deployTime_ != null) {
      output.writeMessage(2, getDeployTime());
    }
    if (undeployTime_ != null) {
      output.writeMessage(3, getUndeployTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, config_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, address_);
    }
    for (int i = 0; i < resourceUri_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, resourceUri_.getRaw(i));
    }
    if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) {
      output.writeEnum(7, platform_);
    }
    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(userEmail_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userEmail_);
    }
    if (deployTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployTime());
    }
    if (undeployTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUndeployTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, config_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, address_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < resourceUri_.size(); i++) {
        dataSize += computeStringSizeNoTag(resourceUri_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getResourceUriList().size();
    }
    if (platform_ != io.grafeas.v1.DeploymentOccurrence.Platform.PLATFORM_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, platform_);
    }
    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.DeploymentOccurrence)) {
      return super.equals(obj);
    }
    io.grafeas.v1.DeploymentOccurrence other = (io.grafeas.v1.DeploymentOccurrence) obj;

    if (!getUserEmail().equals(other.getUserEmail())) return false;
    if (hasDeployTime() != other.hasDeployTime()) return false;
    if (hasDeployTime()) {
      if (!getDeployTime().equals(other.getDeployTime())) return false;
    }
    if (hasUndeployTime() != other.hasUndeployTime()) return false;
    if (hasUndeployTime()) {
      if (!getUndeployTime().equals(other.getUndeployTime())) return false;
    }
    if (!getConfig().equals(other.getConfig())) return false;
    if (!getAddress().equals(other.getAddress())) return false;
    if (!getResourceUriList().equals(other.getResourceUriList())) return false;
    if (platform_ != other.platform_) 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) + USER_EMAIL_FIELD_NUMBER;
    hash = (53 * hash) + getUserEmail().hashCode();
    if (hasDeployTime()) {
      hash = (37 * hash) + DEPLOY_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getDeployTime().hashCode();
    }
    if (hasUndeployTime()) {
      hash = (37 * hash) + UNDEPLOY_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUndeployTime().hashCode();
    }
    hash = (37 * hash) + CONFIG_FIELD_NUMBER;
    hash = (53 * hash) + getConfig().hashCode();
    hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
    hash = (53 * hash) + getAddress().hashCode();
    if (getResourceUriCount() > 0) {
      hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER;
      hash = (53 * hash) + getResourceUriList().hashCode();
    }
    hash = (37 * hash) + PLATFORM_FIELD_NUMBER;
    hash = (53 * hash) + platform_;
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static io.grafeas.v1.DeploymentOccurrence 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.DeploymentOccurrence 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>
   * The period during which some deployable was active in a runtime.
   * </pre>
   *
   * Protobuf type {@code grafeas.v1.DeploymentOccurrence}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:grafeas.v1.DeploymentOccurrence)
      io.grafeas.v1.DeploymentOccurrenceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return io.grafeas.v1.Deployment.internal_static_grafeas_v1_DeploymentOccurrence_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      userEmail_ = "";

      if (deployTimeBuilder_ == null) {
        deployTime_ = null;
      } else {
        deployTime_ = null;
        deployTimeBuilder_ = null;
      }
      if (undeployTimeBuilder_ == null) {
        undeployTime_ = null;
      } else {
        undeployTime_ = null;
        undeployTimeBuilder_ = null;
      }
      config_ = "";

      address_ = "";

      resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      platform_ = 0;

      return this;
    }

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

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

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

    @java.lang.Override
    public io.grafeas.v1.DeploymentOccurrence buildPartial() {
      io.grafeas.v1.DeploymentOccurrence result = new io.grafeas.v1.DeploymentOccurrence(this);
      int from_bitField0_ = bitField0_;
      result.userEmail_ = userEmail_;
      if (deployTimeBuilder_ == null) {
        result.deployTime_ = deployTime_;
      } else {
        result.deployTime_ = deployTimeBuilder_.build();
      }
      if (undeployTimeBuilder_ == null) {
        result.undeployTime_ = undeployTime_;
      } else {
        result.undeployTime_ = undeployTimeBuilder_.build();
      }
      result.config_ = config_;
      result.address_ = address_;
      if (((bitField0_ & 0x00000001) != 0)) {
        resourceUri_ = resourceUri_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.resourceUri_ = resourceUri_;
      result.platform_ = platform_;
      onBuilt();
      return result;
    }

    @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.DeploymentOccurrence) {
        return mergeFrom((io.grafeas.v1.DeploymentOccurrence) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.grafeas.v1.DeploymentOccurrence other) {
      if (other == io.grafeas.v1.DeploymentOccurrence.getDefaultInstance()) return this;
      if (!other.getUserEmail().isEmpty()) {
        userEmail_ = other.userEmail_;
        onChanged();
      }
      if (other.hasDeployTime()) {
        mergeDeployTime(other.getDeployTime());
      }
      if (other.hasUndeployTime()) {
        mergeUndeployTime(other.getUndeployTime());
      }
      if (!other.getConfig().isEmpty()) {
        config_ = other.config_;
        onChanged();
      }
      if (!other.getAddress().isEmpty()) {
        address_ = other.address_;
        onChanged();
      }
      if (!other.resourceUri_.isEmpty()) {
        if (resourceUri_.isEmpty()) {
          resourceUri_ = other.resourceUri_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureResourceUriIsMutable();
          resourceUri_.addAll(other.resourceUri_);
        }
        onChanged();
      }
      if (other.platform_ != 0) {
        setPlatformValue(other.getPlatformValue());
      }
      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:
              {
                userEmail_ = input.readStringRequireUtf8();

                break;
              } // case 10
            case 18:
              {
                input.readMessage(getDeployTimeFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 18
            case 26:
              {
                input.readMessage(getUndeployTimeFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 26
            case 34:
              {
                config_ = input.readStringRequireUtf8();

                break;
              } // case 34
            case 42:
              {
                address_ = input.readStringRequireUtf8();

                break;
              } // case 42
            case 50:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureResourceUriIsMutable();
                resourceUri_.add(s);
                break;
              } // case 50
            case 56:
              {
                platform_ = input.readEnum();

                break;
              } // case 56
            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 userEmail_ = "";
    /**
     *
     *
     * <pre>
     * Identity of the user that triggered this deployment.
     * </pre>
     *
     * <code>string user_email = 1;</code>
     *
     * @return The userEmail.
     */
    public java.lang.String getUserEmail() {
      java.lang.Object ref = userEmail_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        userEmail_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Identity of the user that triggered this deployment.
     * </pre>
     *
     * <code>string user_email = 1;</code>
     *
     * @return The bytes for userEmail.
     */
    public com.google.protobuf.ByteString getUserEmailBytes() {
      java.lang.Object ref = userEmail_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        userEmail_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Identity of the user that triggered this deployment.
     * </pre>
     *
     * <code>string user_email = 1;</code>
     *
     * @param value The userEmail to set.
     * @return This builder for chaining.
     */
    public Builder setUserEmail(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      userEmail_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Identity of the user that triggered this deployment.
     * </pre>
     *
     * <code>string user_email = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUserEmail() {

      userEmail_ = getDefaultInstance().getUserEmail();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Identity of the user that triggered this deployment.
     * </pre>
     *
     * <code>string user_email = 1;</code>
     *
     * @param value The bytes for userEmail to set.
     * @return This builder for chaining.
     */
    public Builder setUserEmailBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      userEmail_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp deployTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        deployTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     *
     * @return Whether the deployTime field is set.
     */
    public boolean hasDeployTime() {
      return deployTimeBuilder_ != null || deployTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     *
     * @return The deployTime.
     */
    public com.google.protobuf.Timestamp getDeployTime() {
      if (deployTimeBuilder_ == null) {
        return deployTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : deployTime_;
      } else {
        return deployTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     */
    public Builder setDeployTime(com.google.protobuf.Timestamp value) {
      if (deployTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        deployTime_ = value;
        onChanged();
      } else {
        deployTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     */
    public Builder setDeployTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (deployTimeBuilder_ == null) {
        deployTime_ = builderForValue.build();
        onChanged();
      } else {
        deployTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     */
    public Builder mergeDeployTime(com.google.protobuf.Timestamp value) {
      if (deployTimeBuilder_ == null) {
        if (deployTime_ != null) {
          deployTime_ =
              com.google.protobuf.Timestamp.newBuilder(deployTime_).mergeFrom(value).buildPartial();
        } else {
          deployTime_ = value;
        }
        onChanged();
      } else {
        deployTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     */
    public Builder clearDeployTime() {
      if (deployTimeBuilder_ == null) {
        deployTime_ = null;
        onChanged();
      } else {
        deployTime_ = null;
        deployTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     */
    public com.google.protobuf.Timestamp.Builder getDeployTimeBuilder() {

      onChanged();
      return getDeployTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() {
      if (deployTimeBuilder_ != null) {
        return deployTimeBuilder_.getMessageOrBuilder();
      } else {
        return deployTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : deployTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Beginning of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp deploy_time = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getDeployTimeFieldBuilder() {
      if (deployTimeBuilder_ == null) {
        deployTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getDeployTime(), getParentForChildren(), isClean());
        deployTime_ = null;
      }
      return deployTimeBuilder_;
    }

    private com.google.protobuf.Timestamp undeployTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        undeployTimeBuilder_;
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     *
     * @return Whether the undeployTime field is set.
     */
    public boolean hasUndeployTime() {
      return undeployTimeBuilder_ != null || undeployTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     *
     * @return The undeployTime.
     */
    public com.google.protobuf.Timestamp getUndeployTime() {
      if (undeployTimeBuilder_ == null) {
        return undeployTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : undeployTime_;
      } else {
        return undeployTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     */
    public Builder setUndeployTime(com.google.protobuf.Timestamp value) {
      if (undeployTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        undeployTime_ = value;
        onChanged();
      } else {
        undeployTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     */
    public Builder setUndeployTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (undeployTimeBuilder_ == null) {
        undeployTime_ = builderForValue.build();
        onChanged();
      } else {
        undeployTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     */
    public Builder mergeUndeployTime(com.google.protobuf.Timestamp value) {
      if (undeployTimeBuilder_ == null) {
        if (undeployTime_ != null) {
          undeployTime_ =
              com.google.protobuf.Timestamp.newBuilder(undeployTime_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          undeployTime_ = value;
        }
        onChanged();
      } else {
        undeployTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     */
    public Builder clearUndeployTime() {
      if (undeployTimeBuilder_ == null) {
        undeployTime_ = null;
        onChanged();
      } else {
        undeployTime_ = null;
        undeployTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     */
    public com.google.protobuf.Timestamp.Builder getUndeployTimeBuilder() {

      onChanged();
      return getUndeployTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getUndeployTimeOrBuilder() {
      if (undeployTimeBuilder_ != null) {
        return undeployTimeBuilder_.getMessageOrBuilder();
      } else {
        return undeployTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : undeployTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * End of the lifetime of this deployment.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp undeploy_time = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUndeployTimeFieldBuilder() {
      if (undeployTimeBuilder_ == null) {
        undeployTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUndeployTime(), getParentForChildren(), isClean());
        undeployTime_ = null;
      }
      return undeployTimeBuilder_;
    }

    private java.lang.Object config_ = "";
    /**
     *
     *
     * <pre>
     * Configuration used to create this deployment.
     * </pre>
     *
     * <code>string config = 4;</code>
     *
     * @return The config.
     */
    public java.lang.String getConfig() {
      java.lang.Object ref = config_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        config_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Configuration used to create this deployment.
     * </pre>
     *
     * <code>string config = 4;</code>
     *
     * @return The bytes for config.
     */
    public com.google.protobuf.ByteString getConfigBytes() {
      java.lang.Object ref = config_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        config_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Configuration used to create this deployment.
     * </pre>
     *
     * <code>string config = 4;</code>
     *
     * @param value The config to set.
     * @return This builder for chaining.
     */
    public Builder setConfig(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      config_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration used to create this deployment.
     * </pre>
     *
     * <code>string config = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearConfig() {

      config_ = getDefaultInstance().getConfig();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration used to create this deployment.
     * </pre>
     *
     * <code>string config = 4;</code>
     *
     * @param value The bytes for config to set.
     * @return This builder for chaining.
     */
    public Builder setConfigBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      config_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object address_ = "";
    /**
     *
     *
     * <pre>
     * Address of the runtime element hosting this deployment.
     * </pre>
     *
     * <code>string address = 5;</code>
     *
     * @return The address.
     */
    public java.lang.String getAddress() {
      java.lang.Object ref = address_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        address_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Address of the runtime element hosting this deployment.
     * </pre>
     *
     * <code>string address = 5;</code>
     *
     * @return The bytes for address.
     */
    public com.google.protobuf.ByteString getAddressBytes() {
      java.lang.Object ref = address_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        address_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Address of the runtime element hosting this deployment.
     * </pre>
     *
     * <code>string address = 5;</code>
     *
     * @param value The address to set.
     * @return This builder for chaining.
     */
    public Builder setAddress(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      address_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Address of the runtime element hosting this deployment.
     * </pre>
     *
     * <code>string address = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAddress() {

      address_ = getDefaultInstance().getAddress();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Address of the runtime element hosting this deployment.
     * </pre>
     *
     * <code>string address = 5;</code>
     *
     * @param value The bytes for address to set.
     * @return This builder for chaining.
     */
    public Builder setAddressBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      address_ = value;
      onChanged();
      return this;
    }

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

    private void ensureResourceUriIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        resourceUri_ = new com.google.protobuf.LazyStringArrayList(resourceUri_);
        bitField0_ |= 0x00000001;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @return A list containing the resourceUri.
     */
    public com.google.protobuf.ProtocolStringList getResourceUriList() {
      return resourceUri_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @return The count of resourceUri.
     */
    public int getResourceUriCount() {
      return resourceUri_.size();
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @param index The index of the element to return.
     * @return The resourceUri at the given index.
     */
    public java.lang.String getResourceUri(int index) {
      return resourceUri_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the resourceUri at the given index.
     */
    public com.google.protobuf.ByteString getResourceUriBytes(int index) {
      return resourceUri_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @param index The index to set the value at.
     * @param value The resourceUri to set.
     * @return This builder for chaining.
     */
    public Builder setResourceUri(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureResourceUriIsMutable();
      resourceUri_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @param value The resourceUri to add.
     * @return This builder for chaining.
     */
    public Builder addResourceUri(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureResourceUriIsMutable();
      resourceUri_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @param values The resourceUri to add.
     * @return This builder for chaining.
     */
    public Builder addAllResourceUri(java.lang.Iterable<java.lang.String> values) {
      ensureResourceUriIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceUri_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearResourceUri() {
      resourceUri_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Resource URI for the artifact being deployed taken from
     * the deployable field with the same name.
     * </pre>
     *
     * <code>repeated string resource_uri = 6;</code>
     *
     * @param value The bytes of the resourceUri to add.
     * @return This builder for chaining.
     */
    public Builder addResourceUriBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureResourceUriIsMutable();
      resourceUri_.add(value);
      onChanged();
      return this;
    }

    private int platform_ = 0;
    /**
     *
     *
     * <pre>
     * Platform hosting this deployment.
     * </pre>
     *
     * <code>.grafeas.v1.DeploymentOccurrence.Platform platform = 7;</code>
     *
     * @return The enum numeric value on the wire for platform.
     */
    @java.lang.Override
    public int getPlatformValue() {
      return platform_;
    }
    /**
     *
     *
     * <pre>
     * Platform hosting this deployment.
     * </pre>
     *
     * <code>.grafeas.v1.DeploymentOccurrence.Platform platform = 7;</code>
     *
     * @param value The enum numeric value on the wire for platform to set.
     * @return This builder for chaining.
     */
    public Builder setPlatformValue(int value) {

      platform_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Platform hosting this deployment.
     * </pre>
     *
     * <code>.grafeas.v1.DeploymentOccurrence.Platform platform = 7;</code>
     *
     * @return The platform.
     */
    @java.lang.Override
    public io.grafeas.v1.DeploymentOccurrence.Platform getPlatform() {
      @SuppressWarnings("deprecation")
      io.grafeas.v1.DeploymentOccurrence.Platform result =
          io.grafeas.v1.DeploymentOccurrence.Platform.valueOf(platform_);
      return result == null ? io.grafeas.v1.DeploymentOccurrence.Platform.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Platform hosting this deployment.
     * </pre>
     *
     * <code>.grafeas.v1.DeploymentOccurrence.Platform platform = 7;</code>
     *
     * @param value The platform to set.
     * @return This builder for chaining.
     */
    public Builder setPlatform(io.grafeas.v1.DeploymentOccurrence.Platform value) {
      if (value == null) {
        throw new NullPointerException();
      }

      platform_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Platform hosting this deployment.
     * </pre>
     *
     * <code>.grafeas.v1.DeploymentOccurrence.Platform platform = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearPlatform() {

      platform_ = 0;
      onChanged();
      return this;
    }

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

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

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

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

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

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

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