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

com.mailslurp.models.GenerateDmarcRecordOptions Maven / Gradle / Ivy

Go to download

Official MailSlurp email API - create real inboxes then send and receive emails and attachments from tests and code.

The newest version!
/*
 * MailSlurp API
 * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
 *
 * The version of the OpenAPI document: 6.5.2
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.mailslurp.models;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * GenerateDmarcRecordOptions
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-03T06:03:24.997Z[GMT]")
public class GenerateDmarcRecordOptions {
  public static final String SERIALIZED_NAME_DOMAIN = "domain";
  @SerializedName(SERIALIZED_NAME_DOMAIN)
  private String domain;

  /**
   * Gets or Sets version
   */
  @JsonAdapter(VersionEnum.Adapter.class)
  public enum VersionEnum {
    DMARC1("DMARC1");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static VersionEnum fromValue(String value) {
      for (VersionEnum b : VersionEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final VersionEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public VersionEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return VersionEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_VERSION = "version";
  @SerializedName(SERIALIZED_NAME_VERSION)
  private VersionEnum version;

  /**
   * Gets or Sets policy
   */
  @JsonAdapter(PolicyEnum.Adapter.class)
  public enum PolicyEnum {
    NONE("NONE"),
    
    QUARANTINE("QUARANTINE"),
    
    REJECT("REJECT");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static PolicyEnum fromValue(String value) {
      for (PolicyEnum b : PolicyEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final PolicyEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public PolicyEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return PolicyEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_POLICY = "policy";
  @SerializedName(SERIALIZED_NAME_POLICY)
  private PolicyEnum policy;

  /**
   * Gets or Sets subdomainPolicy
   */
  @JsonAdapter(SubdomainPolicyEnum.Adapter.class)
  public enum SubdomainPolicyEnum {
    NONE("NONE"),
    
    QUARANTINE("QUARANTINE"),
    
    REJECT("REJECT");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static SubdomainPolicyEnum fromValue(String value) {
      for (SubdomainPolicyEnum b : SubdomainPolicyEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final SubdomainPolicyEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public SubdomainPolicyEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return SubdomainPolicyEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_SUBDOMAIN_POLICY = "subdomainPolicy";
  @SerializedName(SERIALIZED_NAME_SUBDOMAIN_POLICY)
  private SubdomainPolicyEnum subdomainPolicy;

  public static final String SERIALIZED_NAME_REPORT_EMAIL_ADDRESS = "reportEmailAddress";
  @SerializedName(SERIALIZED_NAME_REPORT_EMAIL_ADDRESS)
  private List reportEmailAddress = null;

  public static final String SERIALIZED_NAME_FORENSIC_EMAIL_ADDRESS = "forensicEmailAddress";
  @SerializedName(SERIALIZED_NAME_FORENSIC_EMAIL_ADDRESS)
  private List forensicEmailAddress = null;

  public static final String SERIALIZED_NAME_PERCENTAGE = "percentage";
  @SerializedName(SERIALIZED_NAME_PERCENTAGE)
  private Integer percentage;

  /**
   * Gets or Sets reportFormat
   */
  @JsonAdapter(ReportFormatEnum.Adapter.class)
  public enum ReportFormatEnum {
    AFRF("AFRF");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static ReportFormatEnum fromValue(String value) {
      for (ReportFormatEnum b : ReportFormatEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final ReportFormatEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ReportFormatEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return ReportFormatEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_REPORT_FORMAT = "reportFormat";
  @SerializedName(SERIALIZED_NAME_REPORT_FORMAT)
  private ReportFormatEnum reportFormat;

  public static final String SERIALIZED_NAME_SECONDS_BETWEEN_REPORTS = "secondsBetweenReports";
  @SerializedName(SERIALIZED_NAME_SECONDS_BETWEEN_REPORTS)
  private Integer secondsBetweenReports;

  /**
   * Gets or Sets adkim
   */
  @JsonAdapter(AdkimEnum.Adapter.class)
  public enum AdkimEnum {
    STRICT("STRICT"),
    
    RELAXED("RELAXED");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static AdkimEnum fromValue(String value) {
      for (AdkimEnum b : AdkimEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final AdkimEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AdkimEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return AdkimEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ADKIM = "adkim";
  @SerializedName(SERIALIZED_NAME_ADKIM)
  private AdkimEnum adkim;

  /**
   * Gets or Sets aspf
   */
  @JsonAdapter(AspfEnum.Adapter.class)
  public enum AspfEnum {
    STRICT("STRICT"),
    
    RELAXED("RELAXED");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static AspfEnum fromValue(String value) {
      for (AspfEnum b : AspfEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final AspfEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AspfEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return AspfEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ASPF = "aspf";
  @SerializedName(SERIALIZED_NAME_ASPF)
  private AspfEnum aspf;

  /**
   * Gets or Sets fo
   */
  @JsonAdapter(FoEnum.Adapter.class)
  public enum FoEnum {
    _0("FO_0"),
    
    _1("FO_1"),
    
    D("FO_D"),
    
    S("FO_S");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static FoEnum fromValue(String value) {
      for (FoEnum b : FoEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final FoEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public FoEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return FoEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_FO = "fo";
  @SerializedName(SERIALIZED_NAME_FO)
  private FoEnum fo;


  public GenerateDmarcRecordOptions domain(String domain) {
    
    this.domain = domain;
    return this;
  }

   /**
   * Get domain
   * @return domain
  **/
  @ApiModelProperty(required = true, value = "")

  public String getDomain() {
    return domain;
  }


  public void setDomain(String domain) {
    this.domain = domain;
  }


  public GenerateDmarcRecordOptions version(VersionEnum version) {
    
    this.version = version;
    return this;
  }

   /**
   * Get version
   * @return version
  **/
  @ApiModelProperty(required = true, value = "")

  public VersionEnum getVersion() {
    return version;
  }


  public void setVersion(VersionEnum version) {
    this.version = version;
  }


  public GenerateDmarcRecordOptions policy(PolicyEnum policy) {
    
    this.policy = policy;
    return this;
  }

   /**
   * Get policy
   * @return policy
  **/
  @ApiModelProperty(required = true, value = "")

  public PolicyEnum getPolicy() {
    return policy;
  }


  public void setPolicy(PolicyEnum policy) {
    this.policy = policy;
  }


  public GenerateDmarcRecordOptions subdomainPolicy(SubdomainPolicyEnum subdomainPolicy) {
    
    this.subdomainPolicy = subdomainPolicy;
    return this;
  }

   /**
   * Get subdomainPolicy
   * @return subdomainPolicy
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public SubdomainPolicyEnum getSubdomainPolicy() {
    return subdomainPolicy;
  }


  public void setSubdomainPolicy(SubdomainPolicyEnum subdomainPolicy) {
    this.subdomainPolicy = subdomainPolicy;
  }


  public GenerateDmarcRecordOptions reportEmailAddress(List reportEmailAddress) {
    
    this.reportEmailAddress = reportEmailAddress;
    return this;
  }

  public GenerateDmarcRecordOptions addReportEmailAddressItem(String reportEmailAddressItem) {
    if (this.reportEmailAddress == null) {
      this.reportEmailAddress = new ArrayList<>();
    }
    this.reportEmailAddress.add(reportEmailAddressItem);
    return this;
  }

   /**
   * Get reportEmailAddress
   * @return reportEmailAddress
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List getReportEmailAddress() {
    return reportEmailAddress;
  }


  public void setReportEmailAddress(List reportEmailAddress) {
    this.reportEmailAddress = reportEmailAddress;
  }


  public GenerateDmarcRecordOptions forensicEmailAddress(List forensicEmailAddress) {
    
    this.forensicEmailAddress = forensicEmailAddress;
    return this;
  }

  public GenerateDmarcRecordOptions addForensicEmailAddressItem(String forensicEmailAddressItem) {
    if (this.forensicEmailAddress == null) {
      this.forensicEmailAddress = new ArrayList<>();
    }
    this.forensicEmailAddress.add(forensicEmailAddressItem);
    return this;
  }

   /**
   * Get forensicEmailAddress
   * @return forensicEmailAddress
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List getForensicEmailAddress() {
    return forensicEmailAddress;
  }


  public void setForensicEmailAddress(List forensicEmailAddress) {
    this.forensicEmailAddress = forensicEmailAddress;
  }


  public GenerateDmarcRecordOptions percentage(Integer percentage) {
    
    this.percentage = percentage;
    return this;
  }

   /**
   * Get percentage
   * minimum: 1
   * maximum: 100
   * @return percentage
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Integer getPercentage() {
    return percentage;
  }


  public void setPercentage(Integer percentage) {
    this.percentage = percentage;
  }


  public GenerateDmarcRecordOptions reportFormat(ReportFormatEnum reportFormat) {
    
    this.reportFormat = reportFormat;
    return this;
  }

   /**
   * Get reportFormat
   * @return reportFormat
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ReportFormatEnum getReportFormat() {
    return reportFormat;
  }


  public void setReportFormat(ReportFormatEnum reportFormat) {
    this.reportFormat = reportFormat;
  }


  public GenerateDmarcRecordOptions secondsBetweenReports(Integer secondsBetweenReports) {
    
    this.secondsBetweenReports = secondsBetweenReports;
    return this;
  }

   /**
   * Get secondsBetweenReports
   * @return secondsBetweenReports
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Integer getSecondsBetweenReports() {
    return secondsBetweenReports;
  }


  public void setSecondsBetweenReports(Integer secondsBetweenReports) {
    this.secondsBetweenReports = secondsBetweenReports;
  }


  public GenerateDmarcRecordOptions adkim(AdkimEnum adkim) {
    
    this.adkim = adkim;
    return this;
  }

   /**
   * Get adkim
   * @return adkim
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public AdkimEnum getAdkim() {
    return adkim;
  }


  public void setAdkim(AdkimEnum adkim) {
    this.adkim = adkim;
  }


  public GenerateDmarcRecordOptions aspf(AspfEnum aspf) {
    
    this.aspf = aspf;
    return this;
  }

   /**
   * Get aspf
   * @return aspf
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public AspfEnum getAspf() {
    return aspf;
  }


  public void setAspf(AspfEnum aspf) {
    this.aspf = aspf;
  }


  public GenerateDmarcRecordOptions fo(FoEnum fo) {
    
    this.fo = fo;
    return this;
  }

   /**
   * Get fo
   * @return fo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public FoEnum getFo() {
    return fo;
  }


  public void setFo(FoEnum fo) {
    this.fo = fo;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GenerateDmarcRecordOptions generateDmarcRecordOptions = (GenerateDmarcRecordOptions) o;
    return Objects.equals(this.domain, generateDmarcRecordOptions.domain) &&
        Objects.equals(this.version, generateDmarcRecordOptions.version) &&
        Objects.equals(this.policy, generateDmarcRecordOptions.policy) &&
        Objects.equals(this.subdomainPolicy, generateDmarcRecordOptions.subdomainPolicy) &&
        Objects.equals(this.reportEmailAddress, generateDmarcRecordOptions.reportEmailAddress) &&
        Objects.equals(this.forensicEmailAddress, generateDmarcRecordOptions.forensicEmailAddress) &&
        Objects.equals(this.percentage, generateDmarcRecordOptions.percentage) &&
        Objects.equals(this.reportFormat, generateDmarcRecordOptions.reportFormat) &&
        Objects.equals(this.secondsBetweenReports, generateDmarcRecordOptions.secondsBetweenReports) &&
        Objects.equals(this.adkim, generateDmarcRecordOptions.adkim) &&
        Objects.equals(this.aspf, generateDmarcRecordOptions.aspf) &&
        Objects.equals(this.fo, generateDmarcRecordOptions.fo);
  }

  @Override
  public int hashCode() {
    return Objects.hash(domain, version, policy, subdomainPolicy, reportEmailAddress, forensicEmailAddress, percentage, reportFormat, secondsBetweenReports, adkim, aspf, fo);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GenerateDmarcRecordOptions {\n");
    sb.append("    domain: ").append(toIndentedString(domain)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    policy: ").append(toIndentedString(policy)).append("\n");
    sb.append("    subdomainPolicy: ").append(toIndentedString(subdomainPolicy)).append("\n");
    sb.append("    reportEmailAddress: ").append(toIndentedString(reportEmailAddress)).append("\n");
    sb.append("    forensicEmailAddress: ").append(toIndentedString(forensicEmailAddress)).append("\n");
    sb.append("    percentage: ").append(toIndentedString(percentage)).append("\n");
    sb.append("    reportFormat: ").append(toIndentedString(reportFormat)).append("\n");
    sb.append("    secondsBetweenReports: ").append(toIndentedString(secondsBetweenReports)).append("\n");
    sb.append("    adkim: ").append(toIndentedString(adkim)).append("\n");
    sb.append("    aspf: ").append(toIndentedString(aspf)).append("\n");
    sb.append("    fo: ").append(toIndentedString(fo)).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 - 2024 Weber Informatics LLC | Privacy Policy