// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/devtools/clouderrorreporting/v1beta1/common.proto

package com.google.devtools.clouderrorreporting.v1beta1;

/**
 * <pre>
 * An error event which is returned by the Error Reporting system.
 * </pre>
 *
 * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ErrorEvent}
 */
public  final class ErrorEvent extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.devtools.clouderrorreporting.v1beta1.ErrorEvent)
    ErrorEventOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ErrorEvent.newBuilder() to construct.
  private ErrorEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ErrorEvent() {
    message_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ErrorEvent(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (eventTime_ != null) {
              subBuilder = eventTime_.toBuilder();
            }
            eventTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(eventTime_);
              eventTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder subBuilder = null;
            if (serviceContext_ != null) {
              subBuilder = serviceContext_.toBuilder();
            }
            serviceContext_ = input.readMessage(com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(serviceContext_);
              serviceContext_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            message_ = s;
            break;
          }
          case 42: {
            com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.Builder subBuilder = null;
            if (context_ != null) {
              subBuilder = context_.toBuilder();
            }
            context_ = input.readMessage(com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(context_);
              context_ = subBuilder.buildPartial();
            }

            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorEvent_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorEvent_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.class, com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder.class);
  }

  public static final int EVENT_TIME_FIELD_NUMBER = 1;
  private com.google.protobuf.Timestamp eventTime_;
  /**
   * <pre>
   * Time when the event occurred as provided in the error report.
   * If the report did not contain a timestamp, the time the error was received
   * by the Error Reporting system is used.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp event_time = 1;</code>
   */
  public boolean hasEventTime() {
    return eventTime_ != null;
  }
  /**
   * <pre>
   * Time when the event occurred as provided in the error report.
   * If the report did not contain a timestamp, the time the error was received
   * by the Error Reporting system is used.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp event_time = 1;</code>
   */
  public com.google.protobuf.Timestamp getEventTime() {
    return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
  }
  /**
   * <pre>
   * Time when the event occurred as provided in the error report.
   * If the report did not contain a timestamp, the time the error was received
   * by the Error Reporting system is used.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp event_time = 1;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() {
    return getEventTime();
  }

  public static final int SERVICE_CONTEXT_FIELD_NUMBER = 2;
  private com.google.devtools.clouderrorreporting.v1beta1.ServiceContext serviceContext_;
  /**
   * <pre>
   * The `ServiceContext` for which this error was reported.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
   */
  public boolean hasServiceContext() {
    return serviceContext_ != null;
  }
  /**
   * <pre>
   * The `ServiceContext` for which this error was reported.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext getServiceContext() {
    return serviceContext_ == null ? com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.getDefaultInstance() : serviceContext_;
  }
  /**
   * <pre>
   * The `ServiceContext` for which this error was reported.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder getServiceContextOrBuilder() {
    return getServiceContext();
  }

  public static final int MESSAGE_FIELD_NUMBER = 3;
  private volatile java.lang.Object message_;
  /**
   * <pre>
   * The stack trace that was reported or logged by the service.
   * </pre>
   *
   * <code>string message = 3;</code>
   */
  public java.lang.String getMessage() {
    java.lang.Object ref = message_;
    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();
      message_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The stack trace that was reported or logged by the service.
   * </pre>
   *
   * <code>string message = 3;</code>
   */
  public com.google.protobuf.ByteString
      getMessageBytes() {
    java.lang.Object ref = message_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      message_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CONTEXT_FIELD_NUMBER = 5;
  private com.google.devtools.clouderrorreporting.v1beta1.ErrorContext context_;
  /**
   * <pre>
   * Data about the context in which the error occurred.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
   */
  public boolean hasContext() {
    return context_ != null;
  }
  /**
   * <pre>
   * Data about the context in which the error occurred.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorContext getContext() {
    return context_ == null ? com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.getDefaultInstance() : context_;
  }
  /**
   * <pre>
   * Data about the context in which the error occurred.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorContextOrBuilder getContextOrBuilder() {
    return getContext();
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (eventTime_ != null) {
      output.writeMessage(1, getEventTime());
    }
    if (serviceContext_ != null) {
      output.writeMessage(2, getServiceContext());
    }
    if (!getMessageBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_);
    }
    if (context_ != null) {
      output.writeMessage(5, getContext());
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (eventTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getEventTime());
    }
    if (serviceContext_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getServiceContext());
    }
    if (!getMessageBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_);
    }
    if (context_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, getContext());
    }
    size += unknownFields.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.clouderrorreporting.v1beta1.ErrorEvent)) {
      return super.equals(obj);
    }
    com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent other = (com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent) obj;

    boolean result = true;
    result = result && (hasEventTime() == other.hasEventTime());
    if (hasEventTime()) {
      result = result && getEventTime()
          .equals(other.getEventTime());
    }
    result = result && (hasServiceContext() == other.hasServiceContext());
    if (hasServiceContext()) {
      result = result && getServiceContext()
          .equals(other.getServiceContext());
    }
    result = result && getMessage()
        .equals(other.getMessage());
    result = result && (hasContext() == other.hasContext());
    if (hasContext()) {
      result = result && getContext()
          .equals(other.getContext());
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasEventTime()) {
      hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getEventTime().hashCode();
    }
    if (hasServiceContext()) {
      hash = (37 * hash) + SERVICE_CONTEXT_FIELD_NUMBER;
      hash = (53 * hash) + getServiceContext().hashCode();
    }
    hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
    hash = (53 * hash) + getMessage().hashCode();
    if (hasContext()) {
      hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
      hash = (53 * hash) + getContext().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent 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.clouderrorreporting.v1beta1.ErrorEvent parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent 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.clouderrorreporting.v1beta1.ErrorEvent parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent 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.clouderrorreporting.v1beta1.ErrorEvent parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent 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.clouderrorreporting.v1beta1.ErrorEvent parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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>
   * An error event which is returned by the Error Reporting system.
   * </pre>
   *
   * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ErrorEvent}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.devtools.clouderrorreporting.v1beta1.ErrorEvent)
      com.google.devtools.clouderrorreporting.v1beta1.ErrorEventOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorEvent_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorEvent_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.class, com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder.class);
    }

    // Construct using com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      if (eventTimeBuilder_ == null) {
        eventTime_ = null;
      } else {
        eventTime_ = null;
        eventTimeBuilder_ = null;
      }
      if (serviceContextBuilder_ == null) {
        serviceContext_ = null;
      } else {
        serviceContext_ = null;
        serviceContextBuilder_ = null;
      }
      message_ = "";

      if (contextBuilder_ == null) {
        context_ = null;
      } else {
        context_ = null;
        contextBuilder_ = null;
      }
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorEvent_descriptor;
    }

    public com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent getDefaultInstanceForType() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.getDefaultInstance();
    }

    public com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent build() {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent buildPartial() {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent result = new com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent(this);
      if (eventTimeBuilder_ == null) {
        result.eventTime_ = eventTime_;
      } else {
        result.eventTime_ = eventTimeBuilder_.build();
      }
      if (serviceContextBuilder_ == null) {
        result.serviceContext_ = serviceContext_;
      } else {
        result.serviceContext_ = serviceContextBuilder_.build();
      }
      result.message_ = message_;
      if (contextBuilder_ == null) {
        result.context_ = context_;
      } else {
        result.context_ = contextBuilder_.build();
      }
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent) {
        return mergeFrom((com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent other) {
      if (other == com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.getDefaultInstance()) return this;
      if (other.hasEventTime()) {
        mergeEventTime(other.getEventTime());
      }
      if (other.hasServiceContext()) {
        mergeServiceContext(other.getServiceContext());
      }
      if (!other.getMessage().isEmpty()) {
        message_ = other.message_;
        onChanged();
      }
      if (other.hasContext()) {
        mergeContext(other.getContext());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private com.google.protobuf.Timestamp eventTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> eventTimeBuilder_;
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public boolean hasEventTime() {
      return eventTimeBuilder_ != null || eventTime_ != null;
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public com.google.protobuf.Timestamp getEventTime() {
      if (eventTimeBuilder_ == null) {
        return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
      } else {
        return eventTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder setEventTime(com.google.protobuf.Timestamp value) {
      if (eventTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        eventTime_ = value;
        onChanged();
      } else {
        eventTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder setEventTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (eventTimeBuilder_ == null) {
        eventTime_ = builderForValue.build();
        onChanged();
      } else {
        eventTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder mergeEventTime(com.google.protobuf.Timestamp value) {
      if (eventTimeBuilder_ == null) {
        if (eventTime_ != null) {
          eventTime_ =
            com.google.protobuf.Timestamp.newBuilder(eventTime_).mergeFrom(value).buildPartial();
        } else {
          eventTime_ = value;
        }
        onChanged();
      } else {
        eventTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder clearEventTime() {
      if (eventTimeBuilder_ == null) {
        eventTime_ = null;
        onChanged();
      } else {
        eventTime_ = null;
        eventTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() {
      
      onChanged();
      return getEventTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() {
      if (eventTimeBuilder_ != null) {
        return eventTimeBuilder_.getMessageOrBuilder();
      } else {
        return eventTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
      }
    }
    /**
     * <pre>
     * Time when the event occurred as provided in the error report.
     * If the report did not contain a timestamp, the time the error was received
     * by the Error Reporting system is used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getEventTimeFieldBuilder() {
      if (eventTimeBuilder_ == null) {
        eventTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getEventTime(),
                getParentForChildren(),
                isClean());
        eventTime_ = null;
      }
      return eventTimeBuilder_;
    }

    private com.google.devtools.clouderrorreporting.v1beta1.ServiceContext serviceContext_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext, com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder> serviceContextBuilder_;
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public boolean hasServiceContext() {
      return serviceContextBuilder_ != null || serviceContext_ != null;
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext getServiceContext() {
      if (serviceContextBuilder_ == null) {
        return serviceContext_ == null ? com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.getDefaultInstance() : serviceContext_;
      } else {
        return serviceContextBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public Builder setServiceContext(com.google.devtools.clouderrorreporting.v1beta1.ServiceContext value) {
      if (serviceContextBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        serviceContext_ = value;
        onChanged();
      } else {
        serviceContextBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public Builder setServiceContext(
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder builderForValue) {
      if (serviceContextBuilder_ == null) {
        serviceContext_ = builderForValue.build();
        onChanged();
      } else {
        serviceContextBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public Builder mergeServiceContext(com.google.devtools.clouderrorreporting.v1beta1.ServiceContext value) {
      if (serviceContextBuilder_ == null) {
        if (serviceContext_ != null) {
          serviceContext_ =
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.newBuilder(serviceContext_).mergeFrom(value).buildPartial();
        } else {
          serviceContext_ = value;
        }
        onChanged();
      } else {
        serviceContextBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public Builder clearServiceContext() {
      if (serviceContextBuilder_ == null) {
        serviceContext_ = null;
        onChanged();
      } else {
        serviceContext_ = null;
        serviceContextBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder getServiceContextBuilder() {
      
      onChanged();
      return getServiceContextFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder getServiceContextOrBuilder() {
      if (serviceContextBuilder_ != null) {
        return serviceContextBuilder_.getMessageOrBuilder();
      } else {
        return serviceContext_ == null ?
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.getDefaultInstance() : serviceContext_;
      }
    }
    /**
     * <pre>
     * The `ServiceContext` for which this error was reported.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext, com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder> 
        getServiceContextFieldBuilder() {
      if (serviceContextBuilder_ == null) {
        serviceContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext, com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder>(
                getServiceContext(),
                getParentForChildren(),
                isClean());
        serviceContext_ = null;
      }
      return serviceContextBuilder_;
    }

    private java.lang.Object message_ = "";
    /**
     * <pre>
     * The stack trace that was reported or logged by the service.
     * </pre>
     *
     * <code>string message = 3;</code>
     */
    public java.lang.String getMessage() {
      java.lang.Object ref = message_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        message_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The stack trace that was reported or logged by the service.
     * </pre>
     *
     * <code>string message = 3;</code>
     */
    public com.google.protobuf.ByteString
        getMessageBytes() {
      java.lang.Object ref = message_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        message_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The stack trace that was reported or logged by the service.
     * </pre>
     *
     * <code>string message = 3;</code>
     */
    public Builder setMessage(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      message_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The stack trace that was reported or logged by the service.
     * </pre>
     *
     * <code>string message = 3;</code>
     */
    public Builder clearMessage() {
      
      message_ = getDefaultInstance().getMessage();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The stack trace that was reported or logged by the service.
     * </pre>
     *
     * <code>string message = 3;</code>
     */
    public Builder setMessageBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      message_ = value;
      onChanged();
      return this;
    }

    private com.google.devtools.clouderrorreporting.v1beta1.ErrorContext context_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.ErrorContext, com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.Builder, com.google.devtools.clouderrorreporting.v1beta1.ErrorContextOrBuilder> contextBuilder_;
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public boolean hasContext() {
      return contextBuilder_ != null || context_ != null;
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorContext getContext() {
      if (contextBuilder_ == null) {
        return context_ == null ? com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.getDefaultInstance() : context_;
      } else {
        return contextBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public Builder setContext(com.google.devtools.clouderrorreporting.v1beta1.ErrorContext value) {
      if (contextBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        context_ = value;
        onChanged();
      } else {
        contextBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public Builder setContext(
        com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.Builder builderForValue) {
      if (contextBuilder_ == null) {
        context_ = builderForValue.build();
        onChanged();
      } else {
        contextBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public Builder mergeContext(com.google.devtools.clouderrorreporting.v1beta1.ErrorContext value) {
      if (contextBuilder_ == null) {
        if (context_ != null) {
          context_ =
            com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.newBuilder(context_).mergeFrom(value).buildPartial();
        } else {
          context_ = value;
        }
        onChanged();
      } else {
        contextBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public Builder clearContext() {
      if (contextBuilder_ == null) {
        context_ = null;
        onChanged();
      } else {
        context_ = null;
        contextBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.Builder getContextBuilder() {
      
      onChanged();
      return getContextFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorContextOrBuilder getContextOrBuilder() {
      if (contextBuilder_ != null) {
        return contextBuilder_.getMessageOrBuilder();
      } else {
        return context_ == null ?
            com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.getDefaultInstance() : context_;
      }
    }
    /**
     * <pre>
     * Data about the context in which the error occurred.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.ErrorContext, com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.Builder, com.google.devtools.clouderrorreporting.v1beta1.ErrorContextOrBuilder> 
        getContextFieldBuilder() {
      if (contextBuilder_ == null) {
        contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ErrorContext, com.google.devtools.clouderrorreporting.v1beta1.ErrorContext.Builder, com.google.devtools.clouderrorreporting.v1beta1.ErrorContextOrBuilder>(
                getContext(),
                getParentForChildren(),
                isClean());
        context_ = null;
      }
      return contextBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:google.devtools.clouderrorreporting.v1beta1.ErrorEvent)
  }

  // @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ErrorEvent)
  private static final com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent();
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ErrorEvent>
      PARSER = new com.google.protobuf.AbstractParser<ErrorEvent>() {
    public ErrorEvent parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ErrorEvent(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<ErrorEvent> parser() {
    return PARSER;
  }

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

  public com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

