diff --git a/src/main/java/com/smatechnologies/opcon/restapiclient/model/ServerOptions.java b/src/main/java/com/smatechnologies/opcon/restapiclient/model/ServerOptions.java index dc035d1..537bdbc 100644 --- a/src/main/java/com/smatechnologies/opcon/restapiclient/model/ServerOptions.java +++ b/src/main/java/com/smatechnologies/opcon/restapiclient/model/ServerOptions.java @@ -175,6 +175,9 @@ public static class PasswordPolicy { private Integer daysBeforeExpirationToWarn; private Integer numberOfPasswordsToRetain; private Integer attemptsBeforeAccountLock; + private Integer minimumNumberOfLowerCaseCharacters; + private Integer minimumNumberOfUpperCaseCharacters; + private Integer minimumNumberOfDaysToChangePassword; public Integer getMinimumCharacters() { return minimumCharacters; @@ -248,47 +251,54 @@ public void setAttemptsBeforeAccountLock(Integer attemptsBeforeAccountLock) { this.attemptsBeforeAccountLock = attemptsBeforeAccountLock; } + public Integer getMinimumNumberOfLowerCaseCharacters() { + return minimumNumberOfLowerCaseCharacters; + } + + public void setMinimumNumberOfLowerCaseCharacters(Integer minimumNumberOfLowerCaseCharacters) { + this.minimumNumberOfLowerCaseCharacters = minimumNumberOfLowerCaseCharacters; + } + + public Integer getMinimumNumberOfUpperCaseCharacters() { + return minimumNumberOfUpperCaseCharacters; + } + + public void setMinimumNumberOfUpperCaseCharacters(Integer minimumNumberOfUpperCaseCharacters) { + this.minimumNumberOfUpperCaseCharacters = minimumNumberOfUpperCaseCharacters; + } + + public Integer getMinimumNumberOfDaysToChangePassword() { + return minimumNumberOfDaysToChangePassword; + } + + public void setMinimumNumberOfDaysToChangePassword(Integer minimumNumberOfDaysToChangePassword) { + this.minimumNumberOfDaysToChangePassword = minimumNumberOfDaysToChangePassword; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - PasswordPolicy that = (PasswordPolicy) o; - - if (minimumCharacters != null ? !minimumCharacters.equals(that.minimumCharacters) : that.minimumCharacters != null) - return false; - if (numericRequired != null ? !numericRequired.equals(that.numericRequired) : that.numericRequired != null) - return false; - if (alphaRequired != null ? !alphaRequired.equals(that.alphaRequired) : that.alphaRequired != null) - return false; - if (specialCharacterRequired != null ? !specialCharacterRequired.equals(that.specialCharacterRequired) : that.specialCharacterRequired != null) - return false; - if (repeatedCharacterOccurrencesAllowed != null ? !repeatedCharacterOccurrencesAllowed.equals(that.repeatedCharacterOccurrencesAllowed) : that.repeatedCharacterOccurrencesAllowed != null) - return false; - if (daysValid != null ? !daysValid.equals(that.daysValid) : that.daysValid != null) - return false; - if (daysBeforeExpirationToWarn != null ? !daysBeforeExpirationToWarn.equals(that.daysBeforeExpirationToWarn) : that.daysBeforeExpirationToWarn != null) - return false; - if (numberOfPasswordsToRetain != null ? !numberOfPasswordsToRetain.equals(that.numberOfPasswordsToRetain) : that.numberOfPasswordsToRetain != null) - return false; - return attemptsBeforeAccountLock != null ? attemptsBeforeAccountLock.equals(that.attemptsBeforeAccountLock) : that.attemptsBeforeAccountLock == null; - + return Objects.equals(minimumCharacters, that.minimumCharacters) && + Objects.equals(numericRequired, that.numericRequired) && + Objects.equals(alphaRequired, that.alphaRequired) && + Objects.equals(specialCharacterRequired, that.specialCharacterRequired) && + Objects.equals(repeatedCharacterOccurrencesAllowed, that.repeatedCharacterOccurrencesAllowed) && + Objects.equals(daysValid, that.daysValid) && + Objects.equals(daysBeforeExpirationToWarn, that.daysBeforeExpirationToWarn) && + Objects.equals(numberOfPasswordsToRetain, that.numberOfPasswordsToRetain) && + Objects.equals(attemptsBeforeAccountLock, that.attemptsBeforeAccountLock) && + Objects.equals(minimumNumberOfLowerCaseCharacters, that.minimumNumberOfLowerCaseCharacters) && + Objects.equals(minimumNumberOfUpperCaseCharacters, that.minimumNumberOfUpperCaseCharacters) && + Objects.equals(minimumNumberOfDaysToChangePassword, that.minimumNumberOfDaysToChangePassword); } @Override public int hashCode() { - int result = minimumCharacters != null ? minimumCharacters.hashCode() : 0; - result = 31 * result + (numericRequired != null ? numericRequired.hashCode() : 0); - result = 31 * result + (alphaRequired != null ? alphaRequired.hashCode() : 0); - result = 31 * result + (specialCharacterRequired != null ? specialCharacterRequired.hashCode() : 0); - result = 31 * result + (repeatedCharacterOccurrencesAllowed != null ? repeatedCharacterOccurrencesAllowed.hashCode() : 0); - result = 31 * result + (daysValid != null ? daysValid.hashCode() : 0); - result = 31 * result + (daysBeforeExpirationToWarn != null ? daysBeforeExpirationToWarn.hashCode() : 0); - result = 31 * result + (numberOfPasswordsToRetain != null ? numberOfPasswordsToRetain.hashCode() : 0); - result = 31 * result + (attemptsBeforeAccountLock != null ? attemptsBeforeAccountLock.hashCode() : 0); - return result; + return Objects.hash(minimumCharacters, numericRequired, alphaRequired, specialCharacterRequired, repeatedCharacterOccurrencesAllowed, daysValid, daysBeforeExpirationToWarn, numberOfPasswordsToRetain, attemptsBeforeAccountLock, minimumNumberOfLowerCaseCharacters, minimumNumberOfUpperCaseCharacters, minimumNumberOfDaysToChangePassword); } }