/*
 * Open Payments Cloud Application API
 * Open Payments Cloud API
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * 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 com.ixaris.ope.applications.client.model;

import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * A configuration describing how a password can be created and updated.
 */
@ApiModel(description = "A configuration describing how a password can be created and updated.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-30T15:46:40.836+02:00")
public class PasswordProfileConfig {
  @SerializedName("minimumLength")
  private Integer minimumLength = null;

  @SerializedName("maximumLength")
  private Integer maximumLength = null;

  @SerializedName("complexity")
  private Integer complexity = null;

  @SerializedName("historyCount")
  private Integer historyCount = null;

  @SerializedName("expiryPeriodDays")
  private Integer expiryPeriodDays = null;

  @SerializedName("expiryNotificationDays")
  private Integer expiryNotificationDays = null;

  @SerializedName("phaseOutPeriodDays")
  private Integer phaseOutPeriodDays = null;

  public PasswordProfileConfig minimumLength(Integer minimumLength) {
    this.minimumLength = minimumLength;
    return this;
  }

   /**
   * The minimum length allowed for a password during creation and update.
   * minimum: 8
   * maximum: 32
   * @return minimumLength
  **/
  @ApiModelProperty(example = "null", required = true, value = "The minimum length allowed for a password during creation and update.")
  public Integer getMinimumLength() {
    return minimumLength;
  }

  public void setMinimumLength(Integer minimumLength) {
    this.minimumLength = minimumLength;
  }

  public PasswordProfileConfig maximumLength(Integer maximumLength) {
    this.maximumLength = maximumLength;
    return this;
  }

   /**
   * The maximum length allowed for a password during creation and update. Defaults to 255 if not specified during profile creation.
   * @return maximumLength
  **/
  @ApiModelProperty(example = "null", value = "The maximum length allowed for a password during creation and update. Defaults to 255 if not specified during profile creation.")
  public Integer getMaximumLength() {
    return maximumLength;
  }

  public void setMaximumLength(Integer maximumLength) {
    this.maximumLength = maximumLength;
  }

  public PasswordProfileConfig complexity(Integer complexity) {
    this.complexity = complexity;
    return this;
  }

   /**
   * The minimum level of complexity allowed for a password during creation and update. The configured level dictates how many of the following conditions need to be satisfied: numeric digits, lowercase characters, uppercase characters, and special symbols
   * minimum: 1
   * maximum: 4
   * @return complexity
  **/
  @ApiModelProperty(example = "null", required = true, value = "The minimum level of complexity allowed for a password during creation and update. The configured level dictates how many of the following conditions need to be satisfied: numeric digits, lowercase characters, uppercase characters, and special symbols")
  public Integer getComplexity() {
    return complexity;
  }

  public void setComplexity(Integer complexity) {
    this.complexity = complexity;
  }

  public PasswordProfileConfig historyCount(Integer historyCount) {
    this.historyCount = historyCount;
    return this;
  }

   /**
   * The number of unique passwords that must be associated with a credential before an old password can be reused. Thus, a value of zero means that no such policy is enforced during updates.
   * minimum: 0
   * maximum: 100
   * @return historyCount
  **/
  @ApiModelProperty(example = "null", value = "The number of unique passwords that must be associated with a credential before an old password can be reused. Thus, a value of zero means that no such policy is enforced during updates.")
  public Integer getHistoryCount() {
    return historyCount;
  }

  public void setHistoryCount(Integer historyCount) {
    this.historyCount = historyCount;
  }

  public PasswordProfileConfig expiryPeriodDays(Integer expiryPeriodDays) {
    this.expiryPeriodDays = expiryPeriodDays;
    return this;
  }

   /**
   * The number of days after which a newly created password will expire. Once expired, a password must be updated; otherwise, it is not useable. If set to zero, then newly created passwords will never expire.
   * minimum: 0
   * maximum: 365
   * @return expiryPeriodDays
  **/
  @ApiModelProperty(example = "null", value = "The number of days after which a newly created password will expire. Once expired, a password must be updated; otherwise, it is not useable. If set to zero, then newly created passwords will never expire.")
  public Integer getExpiryPeriodDays() {
    return expiryPeriodDays;
  }

  public void setExpiryPeriodDays(Integer expiryPeriodDays) {
    this.expiryPeriodDays = expiryPeriodDays;
  }

  public PasswordProfileConfig expiryNotificationDays(Integer expiryNotificationDays) {
    this.expiryNotificationDays = expiryNotificationDays;
    return this;
  }

   /**
   * Expiry notification days not yet supported.
   * minimum: 0
   * maximum: 30
   * @return expiryNotificationDays
  **/
  @ApiModelProperty(example = "null", value = "Expiry notification days not yet supported.")
  public Integer getExpiryNotificationDays() {
    return expiryNotificationDays;
  }

  public void setExpiryNotificationDays(Integer expiryNotificationDays) {
    this.expiryNotificationDays = expiryNotificationDays;
  }

  public PasswordProfileConfig phaseOutPeriodDays(Integer phaseOutPeriodDays) {
    this.phaseOutPeriodDays = phaseOutPeriodDays;
    return this;
  }

   /**
   * Password phase out not yet supported.
   * minimum: 0
   * maximum: 30
   * @return phaseOutPeriodDays
  **/
  @ApiModelProperty(example = "null", value = "Password phase out not yet supported.")
  public Integer getPhaseOutPeriodDays() {
    return phaseOutPeriodDays;
  }

  public void setPhaseOutPeriodDays(Integer phaseOutPeriodDays) {
    this.phaseOutPeriodDays = phaseOutPeriodDays;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PasswordProfileConfig passwordProfileConfig = (PasswordProfileConfig) o;
    return Objects.equals(this.minimumLength, passwordProfileConfig.minimumLength) &&
        Objects.equals(this.maximumLength, passwordProfileConfig.maximumLength) &&
        Objects.equals(this.complexity, passwordProfileConfig.complexity) &&
        Objects.equals(this.historyCount, passwordProfileConfig.historyCount) &&
        Objects.equals(this.expiryPeriodDays, passwordProfileConfig.expiryPeriodDays) &&
        Objects.equals(this.expiryNotificationDays, passwordProfileConfig.expiryNotificationDays) &&
        Objects.equals(this.phaseOutPeriodDays, passwordProfileConfig.phaseOutPeriodDays);
  }

  @Override
  public int hashCode() {
    return Objects.hash(minimumLength, maximumLength, complexity, historyCount, expiryPeriodDays, expiryNotificationDays, phaseOutPeriodDays);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PasswordProfileConfig {\n");
    
    sb.append("    minimumLength: ").append(toIndentedString(minimumLength)).append("\n");
    sb.append("    maximumLength: ").append(toIndentedString(maximumLength)).append("\n");
    sb.append("    complexity: ").append(toIndentedString(complexity)).append("\n");
    sb.append("    historyCount: ").append(toIndentedString(historyCount)).append("\n");
    sb.append("    expiryPeriodDays: ").append(toIndentedString(expiryPeriodDays)).append("\n");
    sb.append("    expiryNotificationDays: ").append(toIndentedString(expiryNotificationDays)).append("\n");
    sb.append("    phaseOutPeriodDays: ").append(toIndentedString(phaseOutPeriodDays)).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    ");
  }
  
}

