/*
 * 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
 *
 * http://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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.cloudbuild.v1alpha2.model;

/**
 * Notification is the container which holds the data that is relevant to this particular
 * notification.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Build API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Notification extends com.google.api.client.json.GenericJson {

  /**
   * The filter string to use for notification filtering. Currently, this is assumed to be a CEL
   * program. See https://opensource.google/projects/cel for more.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String filter;

  /**
   * Configuration for HTTP delivery.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private HTTPDelivery httpDelivery;

  /**
   * Configuration for Slack delivery.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SlackDelivery slackDelivery;

  /**
   * Configuration for SMTP (email) delivery.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SMTPDelivery smtpDelivery;

  /**
   * Escape hatch for users to supply custom delivery configs.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, java.lang.Object> structDelivery;

  /**
   * The filter string to use for notification filtering. Currently, this is assumed to be a CEL
   * program. See https://opensource.google/projects/cel for more.
   * @return value or {@code null} for none
   */
  public java.lang.String getFilter() {
    return filter;
  }

  /**
   * The filter string to use for notification filtering. Currently, this is assumed to be a CEL
   * program. See https://opensource.google/projects/cel for more.
   * @param filter filter or {@code null} for none
   */
  public Notification setFilter(java.lang.String filter) {
    this.filter = filter;
    return this;
  }

  /**
   * Configuration for HTTP delivery.
   * @return value or {@code null} for none
   */
  public HTTPDelivery getHttpDelivery() {
    return httpDelivery;
  }

  /**
   * Configuration for HTTP delivery.
   * @param httpDelivery httpDelivery or {@code null} for none
   */
  public Notification setHttpDelivery(HTTPDelivery httpDelivery) {
    this.httpDelivery = httpDelivery;
    return this;
  }

  /**
   * Configuration for Slack delivery.
   * @return value or {@code null} for none
   */
  public SlackDelivery getSlackDelivery() {
    return slackDelivery;
  }

  /**
   * Configuration for Slack delivery.
   * @param slackDelivery slackDelivery or {@code null} for none
   */
  public Notification setSlackDelivery(SlackDelivery slackDelivery) {
    this.slackDelivery = slackDelivery;
    return this;
  }

  /**
   * Configuration for SMTP (email) delivery.
   * @return value or {@code null} for none
   */
  public SMTPDelivery getSmtpDelivery() {
    return smtpDelivery;
  }

  /**
   * Configuration for SMTP (email) delivery.
   * @param smtpDelivery smtpDelivery or {@code null} for none
   */
  public Notification setSmtpDelivery(SMTPDelivery smtpDelivery) {
    this.smtpDelivery = smtpDelivery;
    return this;
  }

  /**
   * Escape hatch for users to supply custom delivery configs.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.Object> getStructDelivery() {
    return structDelivery;
  }

  /**
   * Escape hatch for users to supply custom delivery configs.
   * @param structDelivery structDelivery or {@code null} for none
   */
  public Notification setStructDelivery(java.util.Map<String, java.lang.Object> structDelivery) {
    this.structDelivery = structDelivery;
    return this;
  }

  @Override
  public Notification set(String fieldName, Object value) {
    return (Notification) super.set(fieldName, value);
  }

  @Override
  public Notification clone() {
    return (Notification) super.clone();
  }

}
