package org.wfc.omada.api.log.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * LogNotificationSettingOpenApiVo
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")

public class LogNotificationSettingOpenApiVo   {
  @JsonProperty("webhookConfig")
  private Object webhookConfig;

  @JsonProperty("logNotifications")
  @Valid
  private List<LogNotificationOpenApiVo> logNotifications = null;

  @JsonProperty("alertEmailSetting")
  private LogAlertEmailOpenApiVo alertEmailSetting;

  public LogNotificationSettingOpenApiVo webhookConfig(Object webhookConfig) {
    this.webhookConfig = webhookConfig;
    return this;
  }

  /**
   * Get webhookConfig
   * @return webhookConfig
  */
  @ApiModelProperty(value = "")

  @Valid

  public Object getWebhookConfig() {
    return webhookConfig;
  }

  public void setWebhookConfig(Object webhookConfig) {
    this.webhookConfig = webhookConfig;
  }

  public LogNotificationSettingOpenApiVo logNotifications(List<LogNotificationOpenApiVo> logNotifications) {
    this.logNotifications = logNotifications;
    return this;
  }

  public LogNotificationSettingOpenApiVo addLogNotificationsItem(LogNotificationOpenApiVo logNotificationsItem) {
    if (this.logNotifications == null) {
      this.logNotifications = new ArrayList<>();
    }
    this.logNotifications.add(logNotificationsItem);
    return this;
  }

  /**
   * Log Notification List
   * @return logNotifications
  */
  @ApiModelProperty(value = "Log Notification List")

  @Valid

  public List<LogNotificationOpenApiVo> getLogNotifications() {
    return logNotifications;
  }

  public void setLogNotifications(List<LogNotificationOpenApiVo> logNotifications) {
    this.logNotifications = logNotifications;
  }

  public LogNotificationSettingOpenApiVo alertEmailSetting(LogAlertEmailOpenApiVo alertEmailSetting) {
    this.alertEmailSetting = alertEmailSetting;
    return this;
  }

  /**
   * Get alertEmailSetting
   * @return alertEmailSetting
  */
  @ApiModelProperty(value = "")

  @Valid

  public LogAlertEmailOpenApiVo getAlertEmailSetting() {
    return alertEmailSetting;
  }

  public void setAlertEmailSetting(LogAlertEmailOpenApiVo alertEmailSetting) {
    this.alertEmailSetting = alertEmailSetting;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LogNotificationSettingOpenApiVo logNotificationSettingOpenApiVo = (LogNotificationSettingOpenApiVo) o;
    return Objects.equals(this.webhookConfig, logNotificationSettingOpenApiVo.webhookConfig) &&
        Objects.equals(this.logNotifications, logNotificationSettingOpenApiVo.logNotifications) &&
        Objects.equals(this.alertEmailSetting, logNotificationSettingOpenApiVo.alertEmailSetting);
  }

  @Override
  public int hashCode() {
    return Objects.hash(webhookConfig, logNotifications, alertEmailSetting);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LogNotificationSettingOpenApiVo {\n");
    
    sb.append("    webhookConfig: ").append(toIndentedString(webhookConfig)).append("\n");
    sb.append("    logNotifications: ").append(toIndentedString(logNotifications)).append("\n");
    sb.append("    alertEmailSetting: ").append(toIndentedString(alertEmailSetting)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

