All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.leanix.mtm.api.models.NotificationBatch Maven / Gradle / Ivy

There is a newer version: 1.7.25
Show newest version
/*
 * MTM
 * Multi-tenancy-manager for LeanIX. Manages accounts, contracts, users, workspaces, permissions, and more.
 *
 * OpenAPI spec version: 1.6.348
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package net.leanix.mtm.api.models;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.leanix.mtm.api.models.NotificationTemplate;
import net.leanix.mtm.api.models.User;

/**
 * NotificationBatch
 */

public class NotificationBatch {
  @JsonProperty("recipients")
  private List recipients = null;

  @JsonProperty("subject")
  private String subject = null;

  @JsonProperty("i18NSubjects")
  private Map i18NSubjects = null;

  @JsonProperty("subjectAggregated")
  private String subjectAggregated = null;

  @JsonProperty("i18NSubjectsAggregated")
  private Map i18NSubjectsAggregated = null;

  @JsonProperty("workspaceId")
  private String workspaceId = null;

  @JsonProperty("type")
  private String type = null;

  @JsonProperty("templates")
  private List templates = null;

  @JsonProperty("i18NTemplates")
  private Map> i18NTemplates = null;

  @JsonProperty("payload")
  private String payload = null;

  /**
   * Gets or Sets priority
   */
  public enum PriorityEnum {
    HIGH("HIGH"),
    
    MEDIUM("MEDIUM"),
    
    LOW("LOW");

    private String value;

    PriorityEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static PriorityEnum fromValue(String text) {
      for (PriorityEnum b : PriorityEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("priority")
  private PriorityEnum priority = null;

  /**
   * Gets or Sets rules
   */
  public enum RulesEnum {
    CONTACTS("ACCEPT_CONTACTS"),
    
    INVITED("ACCEPT_INVITED");

    private String value;

    RulesEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static RulesEnum fromValue(String text) {
      for (RulesEnum b : RulesEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("rules")
  private List rules = null;

  public NotificationBatch recipients(List recipients) {
    this.recipients = recipients;
    return this;
  }

  public NotificationBatch addRecipientsItem(User recipientsItem) {
    if (this.recipients == null) {
      this.recipients = new ArrayList();
    }
    this.recipients.add(recipientsItem);
    return this;
  }

   /**
   * Get recipients
   * @return recipients
  **/
  @ApiModelProperty(value = "")
  public List getRecipients() {
    return recipients;
  }

  public void setRecipients(List recipients) {
    this.recipients = recipients;
  }

  public NotificationBatch subject(String subject) {
    this.subject = subject;
    return this;
  }

   /**
   * Get subject
   * @return subject
  **/
  @ApiModelProperty(value = "")
  public String getSubject() {
    return subject;
  }

  public void setSubject(String subject) {
    this.subject = subject;
  }

  public NotificationBatch i18NSubjects(Map i18NSubjects) {
    this.i18NSubjects = i18NSubjects;
    return this;
  }

  public NotificationBatch putI18NSubjectsItem(String key, String i18NSubjectsItem) {
    if (this.i18NSubjects == null) {
      this.i18NSubjects = new HashMap();
    }
    this.i18NSubjects.put(key, i18NSubjectsItem);
    return this;
  }

   /**
   * Get i18NSubjects
   * @return i18NSubjects
  **/
  @ApiModelProperty(value = "")
  public Map getI18NSubjects() {
    return i18NSubjects;
  }

  public void setI18NSubjects(Map i18NSubjects) {
    this.i18NSubjects = i18NSubjects;
  }

  public NotificationBatch subjectAggregated(String subjectAggregated) {
    this.subjectAggregated = subjectAggregated;
    return this;
  }

   /**
   * Get subjectAggregated
   * @return subjectAggregated
  **/
  @ApiModelProperty(value = "")
  public String getSubjectAggregated() {
    return subjectAggregated;
  }

  public void setSubjectAggregated(String subjectAggregated) {
    this.subjectAggregated = subjectAggregated;
  }

  public NotificationBatch i18NSubjectsAggregated(Map i18NSubjectsAggregated) {
    this.i18NSubjectsAggregated = i18NSubjectsAggregated;
    return this;
  }

  public NotificationBatch putI18NSubjectsAggregatedItem(String key, String i18NSubjectsAggregatedItem) {
    if (this.i18NSubjectsAggregated == null) {
      this.i18NSubjectsAggregated = new HashMap();
    }
    this.i18NSubjectsAggregated.put(key, i18NSubjectsAggregatedItem);
    return this;
  }

   /**
   * Get i18NSubjectsAggregated
   * @return i18NSubjectsAggregated
  **/
  @ApiModelProperty(value = "")
  public Map getI18NSubjectsAggregated() {
    return i18NSubjectsAggregated;
  }

  public void setI18NSubjectsAggregated(Map i18NSubjectsAggregated) {
    this.i18NSubjectsAggregated = i18NSubjectsAggregated;
  }

  public NotificationBatch workspaceId(String workspaceId) {
    this.workspaceId = workspaceId;
    return this;
  }

   /**
   * Get workspaceId
   * @return workspaceId
  **/
  @ApiModelProperty(value = "")
  public String getWorkspaceId() {
    return workspaceId;
  }

  public void setWorkspaceId(String workspaceId) {
    this.workspaceId = workspaceId;
  }

  public NotificationBatch type(String type) {
    this.type = type;
    return this;
  }

   /**
   * Get type
   * @return type
  **/
  @ApiModelProperty(value = "")
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public NotificationBatch templates(List templates) {
    this.templates = templates;
    return this;
  }

  public NotificationBatch addTemplatesItem(NotificationTemplate templatesItem) {
    if (this.templates == null) {
      this.templates = new ArrayList();
    }
    this.templates.add(templatesItem);
    return this;
  }

   /**
   * Get templates
   * @return templates
  **/
  @ApiModelProperty(value = "")
  public List getTemplates() {
    return templates;
  }

  public void setTemplates(List templates) {
    this.templates = templates;
  }

  public NotificationBatch i18NTemplates(Map> i18NTemplates) {
    this.i18NTemplates = i18NTemplates;
    return this;
  }

  public NotificationBatch putI18NTemplatesItem(String key, Map i18NTemplatesItem) {
    if (this.i18NTemplates == null) {
      this.i18NTemplates = new HashMap>();
    }
    this.i18NTemplates.put(key, i18NTemplatesItem);
    return this;
  }

   /**
   * Get i18NTemplates
   * @return i18NTemplates
  **/
  @ApiModelProperty(value = "")
  public Map> getI18NTemplates() {
    return i18NTemplates;
  }

  public void setI18NTemplates(Map> i18NTemplates) {
    this.i18NTemplates = i18NTemplates;
  }

  public NotificationBatch payload(String payload) {
    this.payload = payload;
    return this;
  }

   /**
   * Get payload
   * @return payload
  **/
  @ApiModelProperty(value = "")
  public String getPayload() {
    return payload;
  }

  public void setPayload(String payload) {
    this.payload = payload;
  }

  public NotificationBatch priority(PriorityEnum priority) {
    this.priority = priority;
    return this;
  }

   /**
   * Get priority
   * @return priority
  **/
  @ApiModelProperty(value = "")
  public PriorityEnum getPriority() {
    return priority;
  }

  public void setPriority(PriorityEnum priority) {
    this.priority = priority;
  }

  public NotificationBatch rules(List rules) {
    this.rules = rules;
    return this;
  }

  public NotificationBatch addRulesItem(RulesEnum rulesItem) {
    if (this.rules == null) {
      this.rules = new ArrayList();
    }
    this.rules.add(rulesItem);
    return this;
  }

   /**
   * Get rules
   * @return rules
  **/
  @ApiModelProperty(value = "")
  public List getRules() {
    return rules;
  }

  public void setRules(List rules) {
    this.rules = rules;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    NotificationBatch notificationBatch = (NotificationBatch) o;
    return Objects.equals(this.recipients, notificationBatch.recipients) &&
        Objects.equals(this.subject, notificationBatch.subject) &&
        Objects.equals(this.i18NSubjects, notificationBatch.i18NSubjects) &&
        Objects.equals(this.subjectAggregated, notificationBatch.subjectAggregated) &&
        Objects.equals(this.i18NSubjectsAggregated, notificationBatch.i18NSubjectsAggregated) &&
        Objects.equals(this.workspaceId, notificationBatch.workspaceId) &&
        Objects.equals(this.type, notificationBatch.type) &&
        Objects.equals(this.templates, notificationBatch.templates) &&
        Objects.equals(this.i18NTemplates, notificationBatch.i18NTemplates) &&
        Objects.equals(this.payload, notificationBatch.payload) &&
        Objects.equals(this.priority, notificationBatch.priority) &&
        Objects.equals(this.rules, notificationBatch.rules);
  }

  @Override
  public int hashCode() {
    return Objects.hash(recipients, subject, i18NSubjects, subjectAggregated, i18NSubjectsAggregated, workspaceId, type, templates, i18NTemplates, payload, priority, rules);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class NotificationBatch {\n");
    
    sb.append("    recipients: ").append(toIndentedString(recipients)).append("\n");
    sb.append("    subject: ").append(toIndentedString(subject)).append("\n");
    sb.append("    i18NSubjects: ").append(toIndentedString(i18NSubjects)).append("\n");
    sb.append("    subjectAggregated: ").append(toIndentedString(subjectAggregated)).append("\n");
    sb.append("    i18NSubjectsAggregated: ").append(toIndentedString(i18NSubjectsAggregated)).append("\n");
    sb.append("    workspaceId: ").append(toIndentedString(workspaceId)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    templates: ").append(toIndentedString(templates)).append("\n");
    sb.append("    i18NTemplates: ").append(toIndentedString(i18NTemplates)).append("\n");
    sb.append("    payload: ").append(toIndentedString(payload)).append("\n");
    sb.append("    priority: ").append(toIndentedString(priority)).append("\n");
    sb.append("    rules: ").append(toIndentedString(rules)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
  
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy