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

package com.google.cloud.eventarc.v1;

/**
 *
 *
 * <pre>
 * A representation of the trigger resource.
 * </pre>
 *
 * Protobuf type {@code google.cloud.eventarc.v1.Trigger}
 */
public final class Trigger extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.eventarc.v1.Trigger)
    TriggerOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Trigger.newBuilder() to construct.
  private Trigger(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Trigger() {
    name_ = "";
    uid_ = "";
    eventFilters_ = java.util.Collections.emptyList();
    serviceAccount_ = "";
    channel_ = "";
    etag_ = "";
  }

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

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.eventarc.v1.TriggerProto
        .internal_static_google_cloud_eventarc_v1_Trigger_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 12:
        return internalGetLabels();
      case 15:
        return internalGetConditions();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.eventarc.v1.TriggerProto
        .internal_static_google_cloud_eventarc_v1_Trigger_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.eventarc.v1.Trigger.class,
            com.google.cloud.eventarc.v1.Trigger.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Required. The resource name of the trigger. Must be unique within the location of the
   * project and must be in
   * `projects/{project}/locations/{location}/triggers/{trigger}` format.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. The resource name of the trigger. Must be unique within the location of the
   * project and must be in
   * `projects/{project}/locations/{location}/triggers/{trigger}` format.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int UID_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object uid_ = "";
  /**
   *
   *
   * <pre>
   * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
   * string and guaranteed to remain unchanged until the resource is deleted.
   * </pre>
   *
   * <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The uid.
   */
  @java.lang.Override
  public java.lang.String getUid() {
    java.lang.Object ref = uid_;
    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();
      uid_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
   * string and guaranteed to remain unchanged until the resource is deleted.
   * </pre>
   *
   * <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for uid.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUidBytes() {
    java.lang.Object ref = uid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      uid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   * <pre>
   * Output only. The creation time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 5 [(.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. The creation time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 5 [(.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. The creation time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 5 [(.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 UPDATE_TIME_FIELD_NUMBER = 6;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   * <pre>
   * Output only. The last-modified time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The last-modified time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The last-modified time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }

  public static final int EVENT_FILTERS_FIELD_NUMBER = 8;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.eventarc.v1.EventFilter> eventFilters_;
  /**
   *
   *
   * <pre>
   * Required. Unordered list. The list of filters that applies to event attributes. Only events that
   * match all the provided filters are sent to the destination.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.eventarc.v1.EventFilter> getEventFiltersList() {
    return eventFilters_;
  }
  /**
   *
   *
   * <pre>
   * Required. Unordered list. The list of filters that applies to event attributes. Only events that
   * match all the provided filters are sent to the destination.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
   * </code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.eventarc.v1.EventFilterOrBuilder>
      getEventFiltersOrBuilderList() {
    return eventFilters_;
  }
  /**
   *
   *
   * <pre>
   * Required. Unordered list. The list of filters that applies to event attributes. Only events that
   * match all the provided filters are sent to the destination.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
   * </code>
   */
  @java.lang.Override
  public int getEventFiltersCount() {
    return eventFilters_.size();
  }
  /**
   *
   *
   * <pre>
   * Required. Unordered list. The list of filters that applies to event attributes. Only events that
   * match all the provided filters are sent to the destination.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.eventarc.v1.EventFilter getEventFilters(int index) {
    return eventFilters_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Required. Unordered list. The list of filters that applies to event attributes. Only events that
   * match all the provided filters are sent to the destination.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.eventarc.v1.EventFilterOrBuilder getEventFiltersOrBuilder(int index) {
    return eventFilters_.get(index);
  }

  public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 9;

  @SuppressWarnings("serial")
  private volatile java.lang.Object serviceAccount_ = "";
  /**
   *
   *
   * <pre>
   * Optional. The IAM service account email associated with the trigger. The
   * service account represents the identity of the trigger.
   * The principal who calls this API must have the `iam.serviceAccounts.actAs`
   * permission in the service account. See
   * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
   * for more information.
   * For Cloud Run destinations, this service account is used to generate
   * identity tokens when invoking the service. See
   * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
   * for information on how to invoke authenticated Cloud Run services.
   * To create Audit Log triggers, the service account should also
   * have the `roles/eventarc.eventReceiver` IAM role.
   * </pre>
   *
   * <code>
   * string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The serviceAccount.
   */
  @java.lang.Override
  public java.lang.String getServiceAccount() {
    java.lang.Object ref = serviceAccount_;
    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();
      serviceAccount_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional. The IAM service account email associated with the trigger. The
   * service account represents the identity of the trigger.
   * The principal who calls this API must have the `iam.serviceAccounts.actAs`
   * permission in the service account. See
   * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
   * for more information.
   * For Cloud Run destinations, this service account is used to generate
   * identity tokens when invoking the service. See
   * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
   * for information on how to invoke authenticated Cloud Run services.
   * To create Audit Log triggers, the service account should also
   * have the `roles/eventarc.eventReceiver` IAM role.
   * </pre>
   *
   * <code>
   * string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The bytes for serviceAccount.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getServiceAccountBytes() {
    java.lang.Object ref = serviceAccount_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      serviceAccount_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESTINATION_FIELD_NUMBER = 10;
  private com.google.cloud.eventarc.v1.Destination destination_;
  /**
   *
   *
   * <pre>
   * Required. Destination specifies where the events should be sent to.
   * </pre>
   *
   * <code>
   * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return Whether the destination field is set.
   */
  @java.lang.Override
  public boolean hasDestination() {
    return destination_ != null;
  }
  /**
   *
   *
   * <pre>
   * Required. Destination specifies where the events should be sent to.
   * </pre>
   *
   * <code>
   * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The destination.
   */
  @java.lang.Override
  public com.google.cloud.eventarc.v1.Destination getDestination() {
    return destination_ == null
        ? com.google.cloud.eventarc.v1.Destination.getDefaultInstance()
        : destination_;
  }
  /**
   *
   *
   * <pre>
   * Required. Destination specifies where the events should be sent to.
   * </pre>
   *
   * <code>
   * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.eventarc.v1.DestinationOrBuilder getDestinationOrBuilder() {
    return destination_ == null
        ? com.google.cloud.eventarc.v1.Destination.getDefaultInstance()
        : destination_;
  }

  public static final int TRANSPORT_FIELD_NUMBER = 11;
  private com.google.cloud.eventarc.v1.Transport transport_;
  /**
   *
   *
   * <pre>
   * Optional. To deliver messages, Eventarc might use other GCP
   * products as a transport intermediary. This field contains a reference to
   * that transport intermediary. This information can be used for debugging
   * purposes.
   * </pre>
   *
   * <code>
   * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the transport field is set.
   */
  @java.lang.Override
  public boolean hasTransport() {
    return transport_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. To deliver messages, Eventarc might use other GCP
   * products as a transport intermediary. This field contains a reference to
   * that transport intermediary. This information can be used for debugging
   * purposes.
   * </pre>
   *
   * <code>
   * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The transport.
   */
  @java.lang.Override
  public com.google.cloud.eventarc.v1.Transport getTransport() {
    return transport_ == null
        ? com.google.cloud.eventarc.v1.Transport.getDefaultInstance()
        : transport_;
  }
  /**
   *
   *
   * <pre>
   * Optional. To deliver messages, Eventarc might use other GCP
   * products as a transport intermediary. This field contains a reference to
   * that transport intermediary. This information can be used for debugging
   * purposes.
   * </pre>
   *
   * <code>
   * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.eventarc.v1.TransportOrBuilder getTransportOrBuilder() {
    return transport_ == null
        ? com.google.cloud.eventarc.v1.Transport.getDefaultInstance()
        : transport_;
  }

  public static final int LABELS_FIELD_NUMBER = 12;

  private static final class LabelsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.eventarc.v1.TriggerProto
                .internal_static_google_cloud_eventarc_v1_Trigger_LabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Optional. User labels attached to the triggers that can be used to group resources.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public boolean containsLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetLabels().getMap().containsKey(key);
  }
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   *
   *
   * <pre>
   * Optional. User labels attached to the triggers that can be used to group resources.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   *
   *
   * <pre>
   * Optional. User labels attached to the triggers that can be used to group resources.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getLabelsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Optional. User labels attached to the triggers that can be used to group resources.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public java.lang.String getLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int CHANNEL_FIELD_NUMBER = 13;

  @SuppressWarnings("serial")
  private volatile java.lang.Object channel_ = "";
  /**
   *
   *
   * <pre>
   * Optional. The name of the channel associated with the trigger in
   * `projects/{project}/locations/{location}/channels/{channel}` format.
   * You must provide a channel to receive events from Eventarc SaaS partners.
   * </pre>
   *
   * <code>string channel = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The channel.
   */
  @java.lang.Override
  public java.lang.String getChannel() {
    java.lang.Object ref = channel_;
    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();
      channel_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional. The name of the channel associated with the trigger in
   * `projects/{project}/locations/{location}/channels/{channel}` format.
   * You must provide a channel to receive events from Eventarc SaaS partners.
   * </pre>
   *
   * <code>string channel = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The bytes for channel.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getChannelBytes() {
    java.lang.Object ref = channel_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      channel_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CONDITIONS_FIELD_NUMBER = 15;

  private static final class ConditionsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
            java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
        defaultEntry =
            com.google.protobuf.MapEntry
                .<java.lang.String, com.google.cloud.eventarc.v1.StateCondition>newDefaultInstance(
                    com.google.cloud.eventarc.v1.TriggerProto
                        .internal_static_google_cloud_eventarc_v1_Trigger_ConditionsEntry_descriptor,
                    com.google.protobuf.WireFormat.FieldType.STRING,
                    "",
                    com.google.protobuf.WireFormat.FieldType.MESSAGE,
                    com.google.cloud.eventarc.v1.StateCondition.getDefaultInstance());
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
          java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
      conditions_;

  private com.google.protobuf.MapField<
          java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
      internalGetConditions() {
    if (conditions_ == null) {
      return com.google.protobuf.MapField.emptyMapField(ConditionsDefaultEntryHolder.defaultEntry);
    }
    return conditions_;
  }

  public int getConditionsCount() {
    return internalGetConditions().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Output only. The reason(s) why a trigger is in FAILED state.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public boolean containsConditions(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetConditions().getMap().containsKey(key);
  }
  /** Use {@link #getConditionsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
      getConditions() {
    return getConditionsMap();
  }
  /**
   *
   *
   * <pre>
   * Output only. The reason(s) why a trigger is in FAILED state.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
      getConditionsMap() {
    return internalGetConditions().getMap();
  }
  /**
   *
   *
   * <pre>
   * Output only. The reason(s) why a trigger is in FAILED state.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public /* nullable */ com.google.cloud.eventarc.v1.StateCondition getConditionsOrDefault(
      java.lang.String key,
      /* nullable */
      com.google.cloud.eventarc.v1.StateCondition defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition> map =
        internalGetConditions().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Output only. The reason(s) why a trigger is in FAILED state.
   * </pre>
   *
   * <code>
   * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.eventarc.v1.StateCondition getConditionsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition> map =
        internalGetConditions().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int ETAG_FIELD_NUMBER = 99;

  @SuppressWarnings("serial")
  private volatile java.lang.Object etag_ = "";
  /**
   *
   *
   * <pre>
   * Output only. This checksum is computed by the server based on the value of other
   * fields, and might be sent only on create requests to ensure that the
   * client has an up-to-date value before proceeding.
   * </pre>
   *
   * <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The etag.
   */
  @java.lang.Override
  public java.lang.String getEtag() {
    java.lang.Object ref = etag_;
    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();
      etag_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. This checksum is computed by the server based on the value of other
   * fields, and might be sent only on create requests to ensure that the
   * client has an up-to-date value before proceeding.
   * </pre>
   *
   * <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for etag.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getEtagBytes() {
    java.lang.Object ref = etag_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      etag_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_);
    }
    if (createTime_ != null) {
      output.writeMessage(5, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(6, getUpdateTime());
    }
    for (int i = 0; i < eventFilters_.size(); i++) {
      output.writeMessage(8, eventFilters_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceAccount_);
    }
    if (destination_ != null) {
      output.writeMessage(10, getDestination());
    }
    if (transport_ != null) {
      output.writeMessage(11, getTransport());
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, channel_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetConditions(), ConditionsDefaultEntryHolder.defaultEntry, 15);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 99, etag_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime());
    }
    for (int i = 0; i < eventFilters_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, eventFilters_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceAccount_);
    }
    if (destination_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDestination());
    }
    if (transport_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getTransport());
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, channel_);
    }
    for (java.util.Map.Entry<java.lang.String, com.google.cloud.eventarc.v1.StateCondition> entry :
        internalGetConditions().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
          conditions__ =
              ConditionsDefaultEntryHolder.defaultEntry
                  .newBuilderForType()
                  .setKey(entry.getKey())
                  .setValue(entry.getValue())
                  .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, conditions__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(99, etag_);
    }
    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.eventarc.v1.Trigger)) {
      return super.equals(obj);
    }
    com.google.cloud.eventarc.v1.Trigger other = (com.google.cloud.eventarc.v1.Trigger) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getUid().equals(other.getUid())) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (!getEventFiltersList().equals(other.getEventFiltersList())) return false;
    if (!getServiceAccount().equals(other.getServiceAccount())) return false;
    if (hasDestination() != other.hasDestination()) return false;
    if (hasDestination()) {
      if (!getDestination().equals(other.getDestination())) return false;
    }
    if (hasTransport() != other.hasTransport()) return false;
    if (hasTransport()) {
      if (!getTransport().equals(other.getTransport())) return false;
    }
    if (!internalGetLabels().equals(other.internalGetLabels())) return false;
    if (!getChannel().equals(other.getChannel())) return false;
    if (!internalGetConditions().equals(other.internalGetConditions())) return false;
    if (!getEtag().equals(other.getEtag())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + UID_FIELD_NUMBER;
    hash = (53 * hash) + getUid().hashCode();
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    if (getEventFiltersCount() > 0) {
      hash = (37 * hash) + EVENT_FILTERS_FIELD_NUMBER;
      hash = (53 * hash) + getEventFiltersList().hashCode();
    }
    hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER;
    hash = (53 * hash) + getServiceAccount().hashCode();
    if (hasDestination()) {
      hash = (37 * hash) + DESTINATION_FIELD_NUMBER;
      hash = (53 * hash) + getDestination().hashCode();
    }
    if (hasTransport()) {
      hash = (37 * hash) + TRANSPORT_FIELD_NUMBER;
      hash = (53 * hash) + getTransport().hashCode();
    }
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    hash = (37 * hash) + CHANNEL_FIELD_NUMBER;
    hash = (53 * hash) + getChannel().hashCode();
    if (!internalGetConditions().getMap().isEmpty()) {
      hash = (37 * hash) + CONDITIONS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetConditions().hashCode();
    }
    hash = (37 * hash) + ETAG_FIELD_NUMBER;
    hash = (53 * hash) + getEtag().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.cloud.eventarc.v1.Trigger 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.eventarc.v1.Trigger 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 representation of the trigger resource.
   * </pre>
   *
   * Protobuf type {@code google.cloud.eventarc.v1.Trigger}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.eventarc.v1.Trigger)
      com.google.cloud.eventarc.v1.TriggerOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.eventarc.v1.TriggerProto
          .internal_static_google_cloud_eventarc_v1_Trigger_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 12:
          return internalGetLabels();
        case 15:
          return internalGetConditions();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 12:
          return internalGetMutableLabels();
        case 15:
          return internalGetMutableConditions();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.eventarc.v1.TriggerProto
          .internal_static_google_cloud_eventarc_v1_Trigger_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.eventarc.v1.Trigger.class,
              com.google.cloud.eventarc.v1.Trigger.Builder.class);
    }

    // Construct using com.google.cloud.eventarc.v1.Trigger.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      uid_ = "";
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      if (eventFiltersBuilder_ == null) {
        eventFilters_ = java.util.Collections.emptyList();
      } else {
        eventFilters_ = null;
        eventFiltersBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000010);
      serviceAccount_ = "";
      destination_ = null;
      if (destinationBuilder_ != null) {
        destinationBuilder_.dispose();
        destinationBuilder_ = null;
      }
      transport_ = null;
      if (transportBuilder_ != null) {
        transportBuilder_.dispose();
        transportBuilder_ = null;
      }
      internalGetMutableLabels().clear();
      channel_ = "";
      internalGetMutableConditions().clear();
      etag_ = "";
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.eventarc.v1.TriggerProto
          .internal_static_google_cloud_eventarc_v1_Trigger_descriptor;
    }

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

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

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

    private void buildPartialRepeatedFields(com.google.cloud.eventarc.v1.Trigger result) {
      if (eventFiltersBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)) {
          eventFilters_ = java.util.Collections.unmodifiableList(eventFilters_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.eventFilters_ = eventFilters_;
      } else {
        result.eventFilters_ = eventFiltersBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.eventarc.v1.Trigger result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.uid_ = uid_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.serviceAccount_ = serviceAccount_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.destination_ =
            destinationBuilder_ == null ? destination_ : destinationBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.transport_ = transportBuilder_ == null ? transport_ : transportBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.labels_ = internalGetLabels();
        result.labels_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.channel_ = channel_;
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.conditions_ = internalGetConditions();
        result.conditions_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000800) != 0)) {
        result.etag_ = etag_;
      }
    }

    @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.eventarc.v1.Trigger) {
        return mergeFrom((com.google.cloud.eventarc.v1.Trigger) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.eventarc.v1.Trigger other) {
      if (other == com.google.cloud.eventarc.v1.Trigger.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getUid().isEmpty()) {
        uid_ = other.uid_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      if (eventFiltersBuilder_ == null) {
        if (!other.eventFilters_.isEmpty()) {
          if (eventFilters_.isEmpty()) {
            eventFilters_ = other.eventFilters_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureEventFiltersIsMutable();
            eventFilters_.addAll(other.eventFilters_);
          }
          onChanged();
        }
      } else {
        if (!other.eventFilters_.isEmpty()) {
          if (eventFiltersBuilder_.isEmpty()) {
            eventFiltersBuilder_.dispose();
            eventFiltersBuilder_ = null;
            eventFilters_ = other.eventFilters_;
            bitField0_ = (bitField0_ & ~0x00000010);
            eventFiltersBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getEventFiltersFieldBuilder()
                    : null;
          } else {
            eventFiltersBuilder_.addAllMessages(other.eventFilters_);
          }
        }
      }
      if (!other.getServiceAccount().isEmpty()) {
        serviceAccount_ = other.serviceAccount_;
        bitField0_ |= 0x00000020;
        onChanged();
      }
      if (other.hasDestination()) {
        mergeDestination(other.getDestination());
      }
      if (other.hasTransport()) {
        mergeTransport(other.getTransport());
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      bitField0_ |= 0x00000100;
      if (!other.getChannel().isEmpty()) {
        channel_ = other.channel_;
        bitField0_ |= 0x00000200;
        onChanged();
      }
      internalGetMutableConditions().mergeFrom(other.internalGetConditions());
      bitField0_ |= 0x00000400;
      if (!other.getEtag().isEmpty()) {
        etag_ = other.etag_;
        bitField0_ |= 0x00000800;
        onChanged();
      }
      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:
              {
                uid_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 42:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 42
            case 50:
              {
                input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 50
            case 66:
              {
                com.google.cloud.eventarc.v1.EventFilter m =
                    input.readMessage(
                        com.google.cloud.eventarc.v1.EventFilter.parser(), extensionRegistry);
                if (eventFiltersBuilder_ == null) {
                  ensureEventFiltersIsMutable();
                  eventFilters_.add(m);
                } else {
                  eventFiltersBuilder_.addMessage(m);
                }
                break;
              } // case 66
            case 74:
              {
                serviceAccount_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000020;
                break;
              } // case 74
            case 82:
              {
                input.readMessage(getDestinationFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000040;
                break;
              } // case 82
            case 90:
              {
                input.readMessage(getTransportFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000080;
                break;
              } // case 90
            case 98:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                bitField0_ |= 0x00000100;
                break;
              } // case 98
            case 106:
              {
                channel_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000200;
                break;
              } // case 106
            case 122:
              {
                com.google.protobuf.MapEntry<
                        java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
                    conditions__ =
                        input.readMessage(
                            ConditionsDefaultEntryHolder.defaultEntry.getParserForType(),
                            extensionRegistry);
                internalGetMutableConditions()
                    .getMutableMap()
                    .put(conditions__.getKey(), conditions__.getValue());
                bitField0_ |= 0x00000400;
                break;
              } // case 122
            case 794:
              {
                etag_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000800;
                break;
              } // case 794
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Required. The resource name of the trigger. Must be unique within the location of the
     * project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The resource name of the trigger. Must be unique within the location of the
     * project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The resource name of the trigger. Must be unique within the location of the
     * project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The resource name of the trigger. Must be unique within the location of the
     * project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The resource name of the trigger. Must be unique within the location of the
     * project and must be in
     * `projects/{project}/locations/{location}/triggers/{trigger}` format.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object uid_ = "";
    /**
     *
     *
     * <pre>
     * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
     * string and guaranteed to remain unchanged until the resource is deleted.
     * </pre>
     *
     * <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The uid.
     */
    public java.lang.String getUid() {
      java.lang.Object ref = uid_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        uid_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
     * string and guaranteed to remain unchanged until the resource is deleted.
     * </pre>
     *
     * <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for uid.
     */
    public com.google.protobuf.ByteString getUidBytes() {
      java.lang.Object ref = uid_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        uid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
     * string and guaranteed to remain unchanged until the resource is deleted.
     * </pre>
     *
     * <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The uid to set.
     * @return This builder for chaining.
     */
    public Builder setUid(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      uid_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
     * string and guaranteed to remain unchanged until the resource is deleted.
     * </pre>
     *
     * <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUid() {
      uid_ = getDefaultInstance().getUid();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
     * string and guaranteed to remain unchanged until the resource is deleted.
     * </pre>
     *
     * <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for uid to set.
     * @return This builder for chaining.
     */
    public Builder setUidBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      uid_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    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. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.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. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && createTime_ != null
            && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getCreateTimeBuilder().mergeFrom(value);
        } else {
          createTime_ = value;
        }
      } else {
        createTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCreateTime() {
      bitField0_ = (bitField0_ & ~0x00000004);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.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. The creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.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 com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
      } else {
        updateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && updateTime_ != null
            && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getUpdateTimeBuilder().mergeFrom(value);
        } else {
          updateTime_ = value;
        }
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearUpdateTime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The last-modified time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    private java.util.List<com.google.cloud.eventarc.v1.EventFilter> eventFilters_ =
        java.util.Collections.emptyList();

    private void ensureEventFiltersIsMutable() {
      if (!((bitField0_ & 0x00000010) != 0)) {
        eventFilters_ =
            new java.util.ArrayList<com.google.cloud.eventarc.v1.EventFilter>(eventFilters_);
        bitField0_ |= 0x00000010;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.eventarc.v1.EventFilter,
            com.google.cloud.eventarc.v1.EventFilter.Builder,
            com.google.cloud.eventarc.v1.EventFilterOrBuilder>
        eventFiltersBuilder_;

    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public java.util.List<com.google.cloud.eventarc.v1.EventFilter> getEventFiltersList() {
      if (eventFiltersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(eventFilters_);
      } else {
        return eventFiltersBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public int getEventFiltersCount() {
      if (eventFiltersBuilder_ == null) {
        return eventFilters_.size();
      } else {
        return eventFiltersBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.eventarc.v1.EventFilter getEventFilters(int index) {
      if (eventFiltersBuilder_ == null) {
        return eventFilters_.get(index);
      } else {
        return eventFiltersBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder setEventFilters(int index, com.google.cloud.eventarc.v1.EventFilter value) {
      if (eventFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEventFiltersIsMutable();
        eventFilters_.set(index, value);
        onChanged();
      } else {
        eventFiltersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder setEventFilters(
        int index, com.google.cloud.eventarc.v1.EventFilter.Builder builderForValue) {
      if (eventFiltersBuilder_ == null) {
        ensureEventFiltersIsMutable();
        eventFilters_.set(index, builderForValue.build());
        onChanged();
      } else {
        eventFiltersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder addEventFilters(com.google.cloud.eventarc.v1.EventFilter value) {
      if (eventFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEventFiltersIsMutable();
        eventFilters_.add(value);
        onChanged();
      } else {
        eventFiltersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder addEventFilters(int index, com.google.cloud.eventarc.v1.EventFilter value) {
      if (eventFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEventFiltersIsMutable();
        eventFilters_.add(index, value);
        onChanged();
      } else {
        eventFiltersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder addEventFilters(
        com.google.cloud.eventarc.v1.EventFilter.Builder builderForValue) {
      if (eventFiltersBuilder_ == null) {
        ensureEventFiltersIsMutable();
        eventFilters_.add(builderForValue.build());
        onChanged();
      } else {
        eventFiltersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder addEventFilters(
        int index, com.google.cloud.eventarc.v1.EventFilter.Builder builderForValue) {
      if (eventFiltersBuilder_ == null) {
        ensureEventFiltersIsMutable();
        eventFilters_.add(index, builderForValue.build());
        onChanged();
      } else {
        eventFiltersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder addAllEventFilters(
        java.lang.Iterable<? extends com.google.cloud.eventarc.v1.EventFilter> values) {
      if (eventFiltersBuilder_ == null) {
        ensureEventFiltersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, eventFilters_);
        onChanged();
      } else {
        eventFiltersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder clearEventFilters() {
      if (eventFiltersBuilder_ == null) {
        eventFilters_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
      } else {
        eventFiltersBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder removeEventFilters(int index) {
      if (eventFiltersBuilder_ == null) {
        ensureEventFiltersIsMutable();
        eventFilters_.remove(index);
        onChanged();
      } else {
        eventFiltersBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.eventarc.v1.EventFilter.Builder getEventFiltersBuilder(int index) {
      return getEventFiltersFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.eventarc.v1.EventFilterOrBuilder getEventFiltersOrBuilder(int index) {
      if (eventFiltersBuilder_ == null) {
        return eventFilters_.get(index);
      } else {
        return eventFiltersBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public java.util.List<? extends com.google.cloud.eventarc.v1.EventFilterOrBuilder>
        getEventFiltersOrBuilderList() {
      if (eventFiltersBuilder_ != null) {
        return eventFiltersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(eventFilters_);
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.eventarc.v1.EventFilter.Builder addEventFiltersBuilder() {
      return getEventFiltersFieldBuilder()
          .addBuilder(com.google.cloud.eventarc.v1.EventFilter.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.eventarc.v1.EventFilter.Builder addEventFiltersBuilder(int index) {
      return getEventFiltersFieldBuilder()
          .addBuilder(index, com.google.cloud.eventarc.v1.EventFilter.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Required. Unordered list. The list of filters that applies to event attributes. Only events that
     * match all the provided filters are sent to the destination.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public java.util.List<com.google.cloud.eventarc.v1.EventFilter.Builder>
        getEventFiltersBuilderList() {
      return getEventFiltersFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.eventarc.v1.EventFilter,
            com.google.cloud.eventarc.v1.EventFilter.Builder,
            com.google.cloud.eventarc.v1.EventFilterOrBuilder>
        getEventFiltersFieldBuilder() {
      if (eventFiltersBuilder_ == null) {
        eventFiltersBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.eventarc.v1.EventFilter,
                com.google.cloud.eventarc.v1.EventFilter.Builder,
                com.google.cloud.eventarc.v1.EventFilterOrBuilder>(
                eventFilters_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
        eventFilters_ = null;
      }
      return eventFiltersBuilder_;
    }

    private java.lang.Object serviceAccount_ = "";
    /**
     *
     *
     * <pre>
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * </pre>
     *
     * <code>
     * string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The serviceAccount.
     */
    public java.lang.String getServiceAccount() {
      java.lang.Object ref = serviceAccount_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        serviceAccount_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * </pre>
     *
     * <code>
     * string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The bytes for serviceAccount.
     */
    public com.google.protobuf.ByteString getServiceAccountBytes() {
      java.lang.Object ref = serviceAccount_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        serviceAccount_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * </pre>
     *
     * <code>
     * string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The serviceAccount to set.
     * @return This builder for chaining.
     */
    public Builder setServiceAccount(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      serviceAccount_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * </pre>
     *
     * <code>
     * string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearServiceAccount() {
      serviceAccount_ = getDefaultInstance().getServiceAccount();
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The IAM service account email associated with the trigger. The
     * service account represents the identity of the trigger.
     * The principal who calls this API must have the `iam.serviceAccounts.actAs`
     * permission in the service account. See
     * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
     * for more information.
     * For Cloud Run destinations, this service account is used to generate
     * identity tokens when invoking the service. See
     * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
     * for information on how to invoke authenticated Cloud Run services.
     * To create Audit Log triggers, the service account should also
     * have the `roles/eventarc.eventReceiver` IAM role.
     * </pre>
     *
     * <code>
     * string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The bytes for serviceAccount to set.
     * @return This builder for chaining.
     */
    public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      serviceAccount_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    private com.google.cloud.eventarc.v1.Destination destination_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.eventarc.v1.Destination,
            com.google.cloud.eventarc.v1.Destination.Builder,
            com.google.cloud.eventarc.v1.DestinationOrBuilder>
        destinationBuilder_;
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return Whether the destination field is set.
     */
    public boolean hasDestination() {
      return ((bitField0_ & 0x00000040) != 0);
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The destination.
     */
    public com.google.cloud.eventarc.v1.Destination getDestination() {
      if (destinationBuilder_ == null) {
        return destination_ == null
            ? com.google.cloud.eventarc.v1.Destination.getDefaultInstance()
            : destination_;
      } else {
        return destinationBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder setDestination(com.google.cloud.eventarc.v1.Destination value) {
      if (destinationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        destination_ = value;
      } else {
        destinationBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder setDestination(
        com.google.cloud.eventarc.v1.Destination.Builder builderForValue) {
      if (destinationBuilder_ == null) {
        destination_ = builderForValue.build();
      } else {
        destinationBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder mergeDestination(com.google.cloud.eventarc.v1.Destination value) {
      if (destinationBuilder_ == null) {
        if (((bitField0_ & 0x00000040) != 0)
            && destination_ != null
            && destination_ != com.google.cloud.eventarc.v1.Destination.getDefaultInstance()) {
          getDestinationBuilder().mergeFrom(value);
        } else {
          destination_ = value;
        }
      } else {
        destinationBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder clearDestination() {
      bitField0_ = (bitField0_ & ~0x00000040);
      destination_ = null;
      if (destinationBuilder_ != null) {
        destinationBuilder_.dispose();
        destinationBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.eventarc.v1.Destination.Builder getDestinationBuilder() {
      bitField0_ |= 0x00000040;
      onChanged();
      return getDestinationFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.eventarc.v1.DestinationOrBuilder getDestinationOrBuilder() {
      if (destinationBuilder_ != null) {
        return destinationBuilder_.getMessageOrBuilder();
      } else {
        return destination_ == null
            ? com.google.cloud.eventarc.v1.Destination.getDefaultInstance()
            : destination_;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Destination specifies where the events should be sent to.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.eventarc.v1.Destination,
            com.google.cloud.eventarc.v1.Destination.Builder,
            com.google.cloud.eventarc.v1.DestinationOrBuilder>
        getDestinationFieldBuilder() {
      if (destinationBuilder_ == null) {
        destinationBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.eventarc.v1.Destination,
                com.google.cloud.eventarc.v1.Destination.Builder,
                com.google.cloud.eventarc.v1.DestinationOrBuilder>(
                getDestination(), getParentForChildren(), isClean());
        destination_ = null;
      }
      return destinationBuilder_;
    }

    private com.google.cloud.eventarc.v1.Transport transport_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.eventarc.v1.Transport,
            com.google.cloud.eventarc.v1.Transport.Builder,
            com.google.cloud.eventarc.v1.TransportOrBuilder>
        transportBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the transport field is set.
     */
    public boolean hasTransport() {
      return ((bitField0_ & 0x00000080) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The transport.
     */
    public com.google.cloud.eventarc.v1.Transport getTransport() {
      if (transportBuilder_ == null) {
        return transport_ == null
            ? com.google.cloud.eventarc.v1.Transport.getDefaultInstance()
            : transport_;
      } else {
        return transportBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setTransport(com.google.cloud.eventarc.v1.Transport value) {
      if (transportBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        transport_ = value;
      } else {
        transportBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setTransport(com.google.cloud.eventarc.v1.Transport.Builder builderForValue) {
      if (transportBuilder_ == null) {
        transport_ = builderForValue.build();
      } else {
        transportBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeTransport(com.google.cloud.eventarc.v1.Transport value) {
      if (transportBuilder_ == null) {
        if (((bitField0_ & 0x00000080) != 0)
            && transport_ != null
            && transport_ != com.google.cloud.eventarc.v1.Transport.getDefaultInstance()) {
          getTransportBuilder().mergeFrom(value);
        } else {
          transport_ = value;
        }
      } else {
        transportBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearTransport() {
      bitField0_ = (bitField0_ & ~0x00000080);
      transport_ = null;
      if (transportBuilder_ != null) {
        transportBuilder_.dispose();
        transportBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.eventarc.v1.Transport.Builder getTransportBuilder() {
      bitField0_ |= 0x00000080;
      onChanged();
      return getTransportFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.eventarc.v1.TransportOrBuilder getTransportOrBuilder() {
      if (transportBuilder_ != null) {
        return transportBuilder_.getMessageOrBuilder();
      } else {
        return transport_ == null
            ? com.google.cloud.eventarc.v1.Transport.getDefaultInstance()
            : transport_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. To deliver messages, Eventarc might use other GCP
     * products as a transport intermediary. This field contains a reference to
     * that transport intermediary. This information can be used for debugging
     * purposes.
     * </pre>
     *
     * <code>
     * .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.eventarc.v1.Transport,
            com.google.cloud.eventarc.v1.Transport.Builder,
            com.google.cloud.eventarc.v1.TransportOrBuilder>
        getTransportFieldBuilder() {
      if (transportBuilder_ == null) {
        transportBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.eventarc.v1.Transport,
                com.google.cloud.eventarc.v1.Transport.Builder,
                com.google.cloud.eventarc.v1.TransportOrBuilder>(
                getTransport(), getParentForChildren(), isClean());
        transport_ = null;
      }
      return transportBuilder_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableLabels() {
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Optional. User labels attached to the triggers that can be used to group resources.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public boolean containsLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetLabels().getMap().containsKey(key);
    }
    /** Use {@link #getLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. User labels attached to the triggers that can be used to group resources.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. User labels attached to the triggers that can be used to group resources.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getLabelsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Optional. User labels attached to the triggers that can be used to group resources.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public java.lang.String getLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearLabels() {
      bitField0_ = (bitField0_ & ~0x00000100);
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. User labels attached to the triggers that can be used to group resources.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder removeLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
      bitField0_ |= 0x00000100;
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. User labels attached to the triggers that can be used to group resources.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder putLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableLabels().getMutableMap().put(key, value);
      bitField0_ |= 0x00000100;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. User labels attached to the triggers that can be used to group resources.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      bitField0_ |= 0x00000100;
      return this;
    }

    private java.lang.Object channel_ = "";
    /**
     *
     *
     * <pre>
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * </pre>
     *
     * <code>string channel = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The channel.
     */
    public java.lang.String getChannel() {
      java.lang.Object ref = channel_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        channel_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * </pre>
     *
     * <code>string channel = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The bytes for channel.
     */
    public com.google.protobuf.ByteString getChannelBytes() {
      java.lang.Object ref = channel_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        channel_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * </pre>
     *
     * <code>string channel = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The channel to set.
     * @return This builder for chaining.
     */
    public Builder setChannel(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      channel_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * </pre>
     *
     * <code>string channel = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearChannel() {
      channel_ = getDefaultInstance().getChannel();
      bitField0_ = (bitField0_ & ~0x00000200);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The name of the channel associated with the trigger in
     * `projects/{project}/locations/{location}/channels/{channel}` format.
     * You must provide a channel to receive events from Eventarc SaaS partners.
     * </pre>
     *
     * <code>string channel = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The bytes for channel to set.
     * @return This builder for chaining.
     */
    public Builder setChannelBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      channel_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
            java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
        conditions_;

    private com.google.protobuf.MapField<
            java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
        internalGetConditions() {
      if (conditions_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ConditionsDefaultEntryHolder.defaultEntry);
      }
      return conditions_;
    }

    private com.google.protobuf.MapField<
            java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
        internalGetMutableConditions() {
      if (conditions_ == null) {
        conditions_ =
            com.google.protobuf.MapField.newMapField(ConditionsDefaultEntryHolder.defaultEntry);
      }
      if (!conditions_.isMutable()) {
        conditions_ = conditions_.copy();
      }
      bitField0_ |= 0x00000400;
      onChanged();
      return conditions_;
    }

    public int getConditionsCount() {
      return internalGetConditions().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Output only. The reason(s) why a trigger is in FAILED state.
     * </pre>
     *
     * <code>
     * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    @java.lang.Override
    public boolean containsConditions(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetConditions().getMap().containsKey(key);
    }
    /** Use {@link #getConditionsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
        getConditions() {
      return getConditionsMap();
    }
    /**
     *
     *
     * <pre>
     * Output only. The reason(s) why a trigger is in FAILED state.
     * </pre>
     *
     * <code>
     * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
        getConditionsMap() {
      return internalGetConditions().getMap();
    }
    /**
     *
     *
     * <pre>
     * Output only. The reason(s) why a trigger is in FAILED state.
     * </pre>
     *
     * <code>
     * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    @java.lang.Override
    public /* nullable */ com.google.cloud.eventarc.v1.StateCondition getConditionsOrDefault(
        java.lang.String key,
        /* nullable */
        com.google.cloud.eventarc.v1.StateCondition defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition> map =
          internalGetConditions().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Output only. The reason(s) why a trigger is in FAILED state.
     * </pre>
     *
     * <code>
     * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.eventarc.v1.StateCondition getConditionsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition> map =
          internalGetConditions().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearConditions() {
      bitField0_ = (bitField0_ & ~0x00000400);
      internalGetMutableConditions().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The reason(s) why a trigger is in FAILED state.
     * </pre>
     *
     * <code>
     * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder removeConditions(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableConditions().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition>
        getMutableConditions() {
      bitField0_ |= 0x00000400;
      return internalGetMutableConditions().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Output only. The reason(s) why a trigger is in FAILED state.
     * </pre>
     *
     * <code>
     * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder putConditions(
        java.lang.String key, com.google.cloud.eventarc.v1.StateCondition value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableConditions().getMutableMap().put(key, value);
      bitField0_ |= 0x00000400;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The reason(s) why a trigger is in FAILED state.
     * </pre>
     *
     * <code>
     * map&lt;string, .google.cloud.eventarc.v1.StateCondition&gt; conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder putAllConditions(
        java.util.Map<java.lang.String, com.google.cloud.eventarc.v1.StateCondition> values) {
      internalGetMutableConditions().getMutableMap().putAll(values);
      bitField0_ |= 0x00000400;
      return this;
    }

    private java.lang.Object etag_ = "";
    /**
     *
     *
     * <pre>
     * Output only. This checksum is computed by the server based on the value of other
     * fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * </pre>
     *
     * <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The etag.
     */
    public java.lang.String getEtag() {
      java.lang.Object ref = etag_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        etag_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. This checksum is computed by the server based on the value of other
     * fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * </pre>
     *
     * <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for etag.
     */
    public com.google.protobuf.ByteString getEtagBytes() {
      java.lang.Object ref = etag_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        etag_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. This checksum is computed by the server based on the value of other
     * fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * </pre>
     *
     * <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The etag to set.
     * @return This builder for chaining.
     */
    public Builder setEtag(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      etag_ = value;
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This checksum is computed by the server based on the value of other
     * fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * </pre>
     *
     * <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearEtag() {
      etag_ = getDefaultInstance().getEtag();
      bitField0_ = (bitField0_ & ~0x00000800);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This checksum is computed by the server based on the value of other
     * fields, and might be sent only on create requests to ensure that the
     * client has an up-to-date value before proceeding.
     * </pre>
     *
     * <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for etag to set.
     * @return This builder for chaining.
     */
    public Builder setEtagBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      etag_ = value;
      bitField0_ |= 0x00000800;
      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.eventarc.v1.Trigger)
  }

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

  static {
    DEFAULT_INSTANCE = new com.google.cloud.eventarc.v1.Trigger();
  }

  public static com.google.cloud.eventarc.v1.Trigger getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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