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

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

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

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

public class LogNotificationSettingEditOpenApiVo   {
  @JsonProperty("webhookConfig")
  private WebhookConfigEditOpenApiVo webhookConfig;

  @JsonProperty("logNotifications")
  @Valid
  private List<LogNotificationEditOpenApiVo> logNotifications = new ArrayList<>();

  @JsonProperty("alertEmailSetting")
  private LogAlertEmailOpenApiVo alertEmailSetting;

  public LogNotificationSettingEditOpenApiVo webhookConfig(WebhookConfigEditOpenApiVo webhookConfig) {
    this.webhookConfig = webhookConfig;
    return this;
  }

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

  @Valid

  public WebhookConfigEditOpenApiVo getWebhookConfig() {
    return webhookConfig;
  }

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

  public LogNotificationSettingEditOpenApiVo logNotifications(List<LogNotificationEditOpenApiVo> logNotifications) {
    this.logNotifications = logNotifications;
    return this;
  }

  public LogNotificationSettingEditOpenApiVo addLogNotificationsItem(LogNotificationEditOpenApiVo logNotificationsItem) {
    this.logNotifications.add(logNotificationsItem);
    return this;
  }

  /**
   * Log Notification List
   * @return logNotifications
  */
  @ApiModelProperty(required = true, value = "Log Notification List")
  @NotNull

  @Valid

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

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

  public LogNotificationSettingEditOpenApiVo 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;
    }
    LogNotificationSettingEditOpenApiVo logNotificationSettingEditOpenApiVo = (LogNotificationSettingEditOpenApiVo) o;
    return Objects.equals(this.webhookConfig, logNotificationSettingEditOpenApiVo.webhookConfig) &&
        Objects.equals(this.logNotifications, logNotificationSettingEditOpenApiVo.logNotifications) &&
        Objects.equals(this.alertEmailSetting, logNotificationSettingEditOpenApiVo.alertEmailSetting);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LogNotificationSettingEditOpenApiVo {\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    ");
  }
}

