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

package com.google.cloud.advisorynotifications.v1;

/**
 *
 *
 * <pre>
 * A notification object for notifying customers about security and privacy
 * issues.
 * </pre>
 *
 * Protobuf type {@code google.cloud.advisorynotifications.v1.Notification}
 */
public final class Notification extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.advisorynotifications.v1.Notification)
    NotificationOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Notification.newBuilder() to construct.
  private Notification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Notification() {
    name_ = "";
    messages_ = java.util.Collections.emptyList();
    notificationType_ = 0;
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.advisorynotifications.v1.ServiceProto
        .internal_static_google_cloud_advisorynotifications_v1_Notification_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.advisorynotifications.v1.ServiceProto
        .internal_static_google_cloud_advisorynotifications_v1_Notification_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.advisorynotifications.v1.Notification.class,
            com.google.cloud.advisorynotifications.v1.Notification.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * The resource name of the notification.
   * Format:
   * organizations/{organization}/locations/{location}/notifications/{notification}.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The resource name of the notification.
   * Format:
   * organizations/{organization}/locations/{location}/notifications/{notification}.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SUBJECT_FIELD_NUMBER = 2;
  private com.google.cloud.advisorynotifications.v1.Subject subject_;
  /**
   *
   *
   * <pre>
   * The subject line of the notification.
   * </pre>
   *
   * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
   *
   * @return Whether the subject field is set.
   */
  @java.lang.Override
  public boolean hasSubject() {
    return subject_ != null;
  }
  /**
   *
   *
   * <pre>
   * The subject line of the notification.
   * </pre>
   *
   * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
   *
   * @return The subject.
   */
  @java.lang.Override
  public com.google.cloud.advisorynotifications.v1.Subject getSubject() {
    return subject_ == null
        ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
        : subject_;
  }
  /**
   *
   *
   * <pre>
   * The subject line of the notification.
   * </pre>
   *
   * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
   */
  @java.lang.Override
  public com.google.cloud.advisorynotifications.v1.SubjectOrBuilder getSubjectOrBuilder() {
    return subject_ == null
        ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
        : subject_;
  }

  public static final int MESSAGES_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.advisorynotifications.v1.Message> messages_;
  /**
   *
   *
   * <pre>
   * A list of messages in the notification.
   * </pre>
   *
   * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.advisorynotifications.v1.Message> getMessagesList() {
    return messages_;
  }
  /**
   *
   *
   * <pre>
   * A list of messages in the notification.
   * </pre>
   *
   * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
      getMessagesOrBuilderList() {
    return messages_;
  }
  /**
   *
   *
   * <pre>
   * A list of messages in the notification.
   * </pre>
   *
   * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
   */
  @java.lang.Override
  public int getMessagesCount() {
    return messages_.size();
  }
  /**
   *
   *
   * <pre>
   * A list of messages in the notification.
   * </pre>
   *
   * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
   */
  @java.lang.Override
  public com.google.cloud.advisorynotifications.v1.Message getMessages(int index) {
    return messages_.get(index);
  }
  /**
   *
   *
   * <pre>
   * A list of messages in the notification.
   * </pre>
   *
   * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
   */
  @java.lang.Override
  public com.google.cloud.advisorynotifications.v1.MessageOrBuilder getMessagesOrBuilder(
      int index) {
    return messages_.get(index);
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   * <pre>
   * Output only. Time the notification was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the createTime field is set.
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Time the notification was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The createTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Time the notification was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }

  public static final int NOTIFICATION_TYPE_FIELD_NUMBER = 12;
  private int notificationType_ = 0;
  /**
   *
   *
   * <pre>
   * Type of notification
   * </pre>
   *
   * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
   *
   * @return The enum numeric value on the wire for notificationType.
   */
  @java.lang.Override
  public int getNotificationTypeValue() {
    return notificationType_;
  }
  /**
   *
   *
   * <pre>
   * Type of notification
   * </pre>
   *
   * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
   *
   * @return The notificationType.
   */
  @java.lang.Override
  public com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType() {
    com.google.cloud.advisorynotifications.v1.NotificationType result =
        com.google.cloud.advisorynotifications.v1.NotificationType.forNumber(notificationType_);
    return result == null
        ? com.google.cloud.advisorynotifications.v1.NotificationType.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(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (subject_ != null) {
      output.writeMessage(2, getSubject());
    }
    for (int i = 0; i < messages_.size(); i++) {
      output.writeMessage(3, messages_.get(i));
    }
    if (createTime_ != null) {
      output.writeMessage(4, getCreateTime());
    }
    if (notificationType_
        != com.google.cloud.advisorynotifications.v1.NotificationType.NOTIFICATION_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(12, notificationType_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (subject_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubject());
    }
    for (int i = 0; i < messages_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, messages_.get(i));
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime());
    }
    if (notificationType_
        != com.google.cloud.advisorynotifications.v1.NotificationType.NOTIFICATION_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, notificationType_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.advisorynotifications.v1.Notification)) {
      return super.equals(obj);
    }
    com.google.cloud.advisorynotifications.v1.Notification other =
        (com.google.cloud.advisorynotifications.v1.Notification) obj;

    if (!getName().equals(other.getName())) return false;
    if (hasSubject() != other.hasSubject()) return false;
    if (hasSubject()) {
      if (!getSubject().equals(other.getSubject())) return false;
    }
    if (!getMessagesList().equals(other.getMessagesList())) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (notificationType_ != other.notificationType_) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (hasSubject()) {
      hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
      hash = (53 * hash) + getSubject().hashCode();
    }
    if (getMessagesCount() > 0) {
      hash = (37 * hash) + MESSAGES_FIELD_NUMBER;
      hash = (53 * hash) + getMessagesList().hashCode();
    }
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    hash = (37 * hash) + NOTIFICATION_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + notificationType_;
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

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

  public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(
      com.google.cloud.advisorynotifications.v1.Notification 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>
   * A notification object for notifying customers about security and privacy
   * issues.
   * </pre>
   *
   * Protobuf type {@code google.cloud.advisorynotifications.v1.Notification}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.advisorynotifications.v1.Notification)
      com.google.cloud.advisorynotifications.v1.NotificationOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.advisorynotifications.v1.ServiceProto
          .internal_static_google_cloud_advisorynotifications_v1_Notification_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.advisorynotifications.v1.ServiceProto
          .internal_static_google_cloud_advisorynotifications_v1_Notification_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.advisorynotifications.v1.Notification.class,
              com.google.cloud.advisorynotifications.v1.Notification.Builder.class);
    }

    // Construct using com.google.cloud.advisorynotifications.v1.Notification.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      subject_ = null;
      if (subjectBuilder_ != null) {
        subjectBuilder_.dispose();
        subjectBuilder_ = null;
      }
      if (messagesBuilder_ == null) {
        messages_ = java.util.Collections.emptyList();
      } else {
        messages_ = null;
        messagesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000004);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      notificationType_ = 0;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.advisorynotifications.v1.ServiceProto
          .internal_static_google_cloud_advisorynotifications_v1_Notification_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.advisorynotifications.v1.Notification getDefaultInstanceForType() {
      return com.google.cloud.advisorynotifications.v1.Notification.getDefaultInstance();
    }

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

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

    private void buildPartialRepeatedFields(
        com.google.cloud.advisorynotifications.v1.Notification result) {
      if (messagesBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)) {
          messages_ = java.util.Collections.unmodifiableList(messages_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.messages_ = messages_;
      } else {
        result.messages_ = messagesBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.advisorynotifications.v1.Notification result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.subject_ = subjectBuilder_ == null ? subject_ : subjectBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.notificationType_ = notificationType_;
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.advisorynotifications.v1.Notification) {
        return mergeFrom((com.google.cloud.advisorynotifications.v1.Notification) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.advisorynotifications.v1.Notification other) {
      if (other == com.google.cloud.advisorynotifications.v1.Notification.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.hasSubject()) {
        mergeSubject(other.getSubject());
      }
      if (messagesBuilder_ == null) {
        if (!other.messages_.isEmpty()) {
          if (messages_.isEmpty()) {
            messages_ = other.messages_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureMessagesIsMutable();
            messages_.addAll(other.messages_);
          }
          onChanged();
        }
      } else {
        if (!other.messages_.isEmpty()) {
          if (messagesBuilder_.isEmpty()) {
            messagesBuilder_.dispose();
            messagesBuilder_ = null;
            messages_ = other.messages_;
            bitField0_ = (bitField0_ & ~0x00000004);
            messagesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getMessagesFieldBuilder()
                    : null;
          } else {
            messagesBuilder_.addAllMessages(other.messages_);
          }
        }
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.notificationType_ != 0) {
        setNotificationTypeValue(other.getNotificationTypeValue());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(getSubjectFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                com.google.cloud.advisorynotifications.v1.Message m =
                    input.readMessage(
                        com.google.cloud.advisorynotifications.v1.Message.parser(),
                        extensionRegistry);
                if (messagesBuilder_ == null) {
                  ensureMessagesIsMutable();
                  messages_.add(m);
                } else {
                  messagesBuilder_.addMessage(m);
                }
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 96:
              {
                notificationType_ = input.readEnum();
                bitField0_ |= 0x00000010;
                break;
              } // case 96
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * The resource name of the notification.
     * Format:
     * organizations/{organization}/locations/{location}/notifications/{notification}.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The resource name of the notification.
     * Format:
     * organizations/{organization}/locations/{location}/notifications/{notification}.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The resource name of the notification.
     * Format:
     * organizations/{organization}/locations/{location}/notifications/{notification}.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The resource name of the notification.
     * Format:
     * organizations/{organization}/locations/{location}/notifications/{notification}.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The resource name of the notification.
     * Format:
     * organizations/{organization}/locations/{location}/notifications/{notification}.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private com.google.cloud.advisorynotifications.v1.Subject subject_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.advisorynotifications.v1.Subject,
            com.google.cloud.advisorynotifications.v1.Subject.Builder,
            com.google.cloud.advisorynotifications.v1.SubjectOrBuilder>
        subjectBuilder_;
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     *
     * @return Whether the subject field is set.
     */
    public boolean hasSubject() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     *
     * @return The subject.
     */
    public com.google.cloud.advisorynotifications.v1.Subject getSubject() {
      if (subjectBuilder_ == null) {
        return subject_ == null
            ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
            : subject_;
      } else {
        return subjectBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     */
    public Builder setSubject(com.google.cloud.advisorynotifications.v1.Subject value) {
      if (subjectBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        subject_ = value;
      } else {
        subjectBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     */
    public Builder setSubject(
        com.google.cloud.advisorynotifications.v1.Subject.Builder builderForValue) {
      if (subjectBuilder_ == null) {
        subject_ = builderForValue.build();
      } else {
        subjectBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     */
    public Builder mergeSubject(com.google.cloud.advisorynotifications.v1.Subject value) {
      if (subjectBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && subject_ != null
            && subject_ != com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()) {
          getSubjectBuilder().mergeFrom(value);
        } else {
          subject_ = value;
        }
      } else {
        subjectBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     */
    public Builder clearSubject() {
      bitField0_ = (bitField0_ & ~0x00000002);
      subject_ = null;
      if (subjectBuilder_ != null) {
        subjectBuilder_.dispose();
        subjectBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     */
    public com.google.cloud.advisorynotifications.v1.Subject.Builder getSubjectBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getSubjectFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     */
    public com.google.cloud.advisorynotifications.v1.SubjectOrBuilder getSubjectOrBuilder() {
      if (subjectBuilder_ != null) {
        return subjectBuilder_.getMessageOrBuilder();
      } else {
        return subject_ == null
            ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
            : subject_;
      }
    }
    /**
     *
     *
     * <pre>
     * The subject line of the notification.
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.advisorynotifications.v1.Subject,
            com.google.cloud.advisorynotifications.v1.Subject.Builder,
            com.google.cloud.advisorynotifications.v1.SubjectOrBuilder>
        getSubjectFieldBuilder() {
      if (subjectBuilder_ == null) {
        subjectBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.advisorynotifications.v1.Subject,
                com.google.cloud.advisorynotifications.v1.Subject.Builder,
                com.google.cloud.advisorynotifications.v1.SubjectOrBuilder>(
                getSubject(), getParentForChildren(), isClean());
        subject_ = null;
      }
      return subjectBuilder_;
    }

    private java.util.List<com.google.cloud.advisorynotifications.v1.Message> messages_ =
        java.util.Collections.emptyList();

    private void ensureMessagesIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        messages_ =
            new java.util.ArrayList<com.google.cloud.advisorynotifications.v1.Message>(messages_);
        bitField0_ |= 0x00000004;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.advisorynotifications.v1.Message,
            com.google.cloud.advisorynotifications.v1.Message.Builder,
            com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
        messagesBuilder_;

    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public java.util.List<com.google.cloud.advisorynotifications.v1.Message> getMessagesList() {
      if (messagesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(messages_);
      } else {
        return messagesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public int getMessagesCount() {
      if (messagesBuilder_ == null) {
        return messages_.size();
      } else {
        return messagesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public com.google.cloud.advisorynotifications.v1.Message getMessages(int index) {
      if (messagesBuilder_ == null) {
        return messages_.get(index);
      } else {
        return messagesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder setMessages(int index, com.google.cloud.advisorynotifications.v1.Message value) {
      if (messagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureMessagesIsMutable();
        messages_.set(index, value);
        onChanged();
      } else {
        messagesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder setMessages(
        int index, com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue) {
      if (messagesBuilder_ == null) {
        ensureMessagesIsMutable();
        messages_.set(index, builderForValue.build());
        onChanged();
      } else {
        messagesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder addMessages(com.google.cloud.advisorynotifications.v1.Message value) {
      if (messagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureMessagesIsMutable();
        messages_.add(value);
        onChanged();
      } else {
        messagesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder addMessages(int index, com.google.cloud.advisorynotifications.v1.Message value) {
      if (messagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureMessagesIsMutable();
        messages_.add(index, value);
        onChanged();
      } else {
        messagesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder addMessages(
        com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue) {
      if (messagesBuilder_ == null) {
        ensureMessagesIsMutable();
        messages_.add(builderForValue.build());
        onChanged();
      } else {
        messagesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder addMessages(
        int index, com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue) {
      if (messagesBuilder_ == null) {
        ensureMessagesIsMutable();
        messages_.add(index, builderForValue.build());
        onChanged();
      } else {
        messagesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder addAllMessages(
        java.lang.Iterable<? extends com.google.cloud.advisorynotifications.v1.Message> values) {
      if (messagesBuilder_ == null) {
        ensureMessagesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messages_);
        onChanged();
      } else {
        messagesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder clearMessages() {
      if (messagesBuilder_ == null) {
        messages_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        messagesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public Builder removeMessages(int index) {
      if (messagesBuilder_ == null) {
        ensureMessagesIsMutable();
        messages_.remove(index);
        onChanged();
      } else {
        messagesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public com.google.cloud.advisorynotifications.v1.Message.Builder getMessagesBuilder(int index) {
      return getMessagesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public com.google.cloud.advisorynotifications.v1.MessageOrBuilder getMessagesOrBuilder(
        int index) {
      if (messagesBuilder_ == null) {
        return messages_.get(index);
      } else {
        return messagesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public java.util.List<? extends com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
        getMessagesOrBuilderList() {
      if (messagesBuilder_ != null) {
        return messagesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(messages_);
      }
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public com.google.cloud.advisorynotifications.v1.Message.Builder addMessagesBuilder() {
      return getMessagesFieldBuilder()
          .addBuilder(com.google.cloud.advisorynotifications.v1.Message.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public com.google.cloud.advisorynotifications.v1.Message.Builder addMessagesBuilder(int index) {
      return getMessagesFieldBuilder()
          .addBuilder(
              index, com.google.cloud.advisorynotifications.v1.Message.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * A list of messages in the notification.
     * </pre>
     *
     * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
     */
    public java.util.List<com.google.cloud.advisorynotifications.v1.Message.Builder>
        getMessagesBuilderList() {
      return getMessagesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.advisorynotifications.v1.Message,
            com.google.cloud.advisorynotifications.v1.Message.Builder,
            com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
        getMessagesFieldBuilder() {
      if (messagesBuilder_ == null) {
        messagesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.advisorynotifications.v1.Message,
                com.google.cloud.advisorynotifications.v1.Message.Builder,
                com.google.cloud.advisorynotifications.v1.MessageOrBuilder>(
                messages_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
        messages_ = null;
      }
      return messagesBuilder_;
    }

    private com.google.protobuf.Timestamp createTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        createTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The createTime.
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
      } else {
        createTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && createTime_ != null
            && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getCreateTimeBuilder().mergeFrom(value);
        } else {
          createTime_ = value;
        }
      } else {
        createTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCreateTime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Time the notification was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(), getParentForChildren(), isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private int notificationType_ = 0;
    /**
     *
     *
     * <pre>
     * Type of notification
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
     *
     * @return The enum numeric value on the wire for notificationType.
     */
    @java.lang.Override
    public int getNotificationTypeValue() {
      return notificationType_;
    }
    /**
     *
     *
     * <pre>
     * Type of notification
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
     *
     * @param value The enum numeric value on the wire for notificationType to set.
     * @return This builder for chaining.
     */
    public Builder setNotificationTypeValue(int value) {
      notificationType_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Type of notification
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
     *
     * @return The notificationType.
     */
    @java.lang.Override
    public com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType() {
      com.google.cloud.advisorynotifications.v1.NotificationType result =
          com.google.cloud.advisorynotifications.v1.NotificationType.forNumber(notificationType_);
      return result == null
          ? com.google.cloud.advisorynotifications.v1.NotificationType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Type of notification
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
     *
     * @param value The notificationType to set.
     * @return This builder for chaining.
     */
    public Builder setNotificationType(
        com.google.cloud.advisorynotifications.v1.NotificationType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000010;
      notificationType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Type of notification
     * </pre>
     *
     * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNotificationType() {
      bitField0_ = (bitField0_ & ~0x00000010);
      notificationType_ = 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:google.cloud.advisorynotifications.v1.Notification)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.advisorynotifications.v1.Notification)
  private static final com.google.cloud.advisorynotifications.v1.Notification DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.advisorynotifications.v1.Notification();
  }

  public static com.google.cloud.advisorynotifications.v1.Notification getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.cloud.advisorynotifications.v1.Notification getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
