
com.okta.sdk.resource.model.AccessPolicyConstraint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of okta-sdk-api Show documentation
Show all versions of okta-sdk-api Show documentation
The Okta Java SDK API .jar provides a Java API that your code can use to make calls to the Okta
API. This .jar is the only compile-time dependency within the Okta SDK project that your code should
depend on. Implementations of this API (implementation .jars) should be runtime dependencies only.
package com.okta.sdk.resource.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.okta.sdk.resource.model.AuthenticationMethodObject;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
/**
* AccessPolicyConstraint
*/
@JsonPropertyOrder({ AccessPolicyConstraint.JSON_PROPERTY_AUTHENTICATION_METHODS,
AccessPolicyConstraint.JSON_PROPERTY_EXCLUDED_AUTHENTICATION_METHODS,
AccessPolicyConstraint.JSON_PROPERTY_METHODS, AccessPolicyConstraint.JSON_PROPERTY_REAUTHENTICATE_IN,
AccessPolicyConstraint.JSON_PROPERTY_REQUIRED, AccessPolicyConstraint.JSON_PROPERTY_TYPES })
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-11-15T08:48:47.130589-06:00[America/Chicago]", comments = "Generator version: 7.8.0")
public class AccessPolicyConstraint implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_AUTHENTICATION_METHODS = "authenticationMethods";
private List authenticationMethods = null;
public static final String JSON_PROPERTY_EXCLUDED_AUTHENTICATION_METHODS = "excludedAuthenticationMethods";
private List excludedAuthenticationMethods = null;
/**
* Gets or Sets methods
*/
public enum MethodsEnum {
PASSWORD("PASSWORD"),
SECURITY_QUESTION("SECURITY_QUESTION"),
SMS("SMS"),
VOICE("VOICE"),
EMAIL("EMAIL"),
PUSH("PUSH"),
SIGNED_NONCE("SIGNED_NONCE"),
OTP("OTP"),
TOTP("TOTP"),
WEBAUTHN("WEBAUTHN"),
DUO("DUO"),
IDP("IDP"),
CERT("CERT"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
MethodsEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static MethodsEnum fromValue(String value) {
for (MethodsEnum b : MethodsEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return UNKNOWN_DEFAULT_OPEN_API;
}
}
public static final String JSON_PROPERTY_METHODS = "methods";
private List methods = null;
public static final String JSON_PROPERTY_REAUTHENTICATE_IN = "reauthenticateIn";
private String reauthenticateIn;
public static final String JSON_PROPERTY_REQUIRED = "required";
private Boolean required;
/**
* Gets or Sets types
*/
public enum TypesEnum {
SECURITY_KEY("SECURITY_KEY"),
PHONE("PHONE"),
EMAIL("EMAIL"),
PASSWORD("PASSWORD"),
SECURITY_QUESTION("SECURITY_QUESTION"),
APP("APP"),
FEDERATED("FEDERATED"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
TypesEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypesEnum fromValue(String value) {
for (TypesEnum b : TypesEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return UNKNOWN_DEFAULT_OPEN_API;
}
}
public static final String JSON_PROPERTY_TYPES = "types";
private List types = null;
public AccessPolicyConstraint() {
}
public AccessPolicyConstraint authenticationMethods(List authenticationMethods) {
this.authenticationMethods = authenticationMethods;
return this;
}
public AccessPolicyConstraint addauthenticationMethodsItem(AuthenticationMethodObject authenticationMethodsItem) {
if (this.authenticationMethods == null) {
this.authenticationMethods = new ArrayList<>();
}
this.authenticationMethods.add(authenticationMethodsItem);
return this;
}
/**
* This property specifies the precise authenticator and method for authentication. <x-lifecycle
* class=\"oie\"></x-lifecycle>
*
* @return authenticationMethods
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "This property specifies the precise authenticator and method for authentication. ")
@JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHODS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAuthenticationMethods() {
return authenticationMethods;
}
@JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHODS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAuthenticationMethods(List authenticationMethods) {
this.authenticationMethods = authenticationMethods;
}
public AccessPolicyConstraint excludedAuthenticationMethods(
List excludedAuthenticationMethods) {
this.excludedAuthenticationMethods = excludedAuthenticationMethods;
return this;
}
public AccessPolicyConstraint addexcludedAuthenticationMethodsItem(
AuthenticationMethodObject excludedAuthenticationMethodsItem) {
if (this.excludedAuthenticationMethods == null) {
this.excludedAuthenticationMethods = new ArrayList<>();
}
this.excludedAuthenticationMethods.add(excludedAuthenticationMethodsItem);
return this;
}
/**
* This property specifies the precise authenticator and method to exclude from authentication. <x-lifecycle
* class=\"oie\"></x-lifecycle>
*
* @return excludedAuthenticationMethods
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "This property specifies the precise authenticator and method to exclude from authentication. ")
@JsonProperty(JSON_PROPERTY_EXCLUDED_AUTHENTICATION_METHODS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getExcludedAuthenticationMethods() {
return excludedAuthenticationMethods;
}
@JsonProperty(JSON_PROPERTY_EXCLUDED_AUTHENTICATION_METHODS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExcludedAuthenticationMethods(List excludedAuthenticationMethods) {
this.excludedAuthenticationMethods = excludedAuthenticationMethods;
}
public AccessPolicyConstraint methods(List methods) {
this.methods = methods;
return this;
}
public AccessPolicyConstraint addmethodsItem(MethodsEnum methodsItem) {
if (this.methods == null) {
this.methods = new ArrayList<>();
}
this.methods.add(methodsItem);
return this;
}
/**
* The Authenticator methods that are permitted
*
* @return methods
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The Authenticator methods that are permitted")
@JsonProperty(JSON_PROPERTY_METHODS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getMethods() {
return methods;
}
@JsonProperty(JSON_PROPERTY_METHODS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMethods(List methods) {
this.methods = methods;
}
public AccessPolicyConstraint reauthenticateIn(String reauthenticateIn) {
this.reauthenticateIn = reauthenticateIn;
return this;
}
/**
* The duration after which the user must re-authenticate regardless of user activity. This re-authentication
* interval overrides the Verification Method object's `reauthenticateIn` interval. The supported
* values use ISO 8601 period format for recurring time intervals (for example, `PT1H`).
*
* @return reauthenticateIn
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`).")
@JsonProperty(JSON_PROPERTY_REAUTHENTICATE_IN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getReauthenticateIn() {
return reauthenticateIn;
}
@JsonProperty(JSON_PROPERTY_REAUTHENTICATE_IN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReauthenticateIn(String reauthenticateIn) {
this.reauthenticateIn = reauthenticateIn;
}
public AccessPolicyConstraint required(Boolean required) {
this.required = required;
return this;
}
/**
* This property indicates whether the knowledge or possession factor is required by the assurance. It's
* optional in the request, but is always returned in the response. By default, this field is `true`. If
* the knowledge or possession constraint has values for `excludedAuthenticationMethods` the
* `required` value is false. <x-lifecycle class=\"oie\"></x-lifecycle>
*
* @return required
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for `excludedAuthenticationMethods` the `required` value is false. ")
@JsonProperty(JSON_PROPERTY_REQUIRED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getRequired() {
return required;
}
@JsonProperty(JSON_PROPERTY_REQUIRED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRequired(Boolean required) {
this.required = required;
}
public AccessPolicyConstraint types(List types) {
this.types = types;
return this;
}
public AccessPolicyConstraint addtypesItem(TypesEnum typesItem) {
if (this.types == null) {
this.types = new ArrayList<>();
}
this.types.add(typesItem);
return this;
}
/**
* The Authenticator types that are permitted
*
* @return types
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The Authenticator types that are permitted")
@JsonProperty(JSON_PROPERTY_TYPES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getTypes() {
return types;
}
@JsonProperty(JSON_PROPERTY_TYPES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTypes(List types) {
this.types = types;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AccessPolicyConstraint accessPolicyConstraint = (AccessPolicyConstraint) o;
return Objects.equals(this.authenticationMethods, accessPolicyConstraint.authenticationMethods)
&& Objects.equals(this.excludedAuthenticationMethods,
accessPolicyConstraint.excludedAuthenticationMethods)
&& Objects.equals(this.methods, accessPolicyConstraint.methods)
&& Objects.equals(this.reauthenticateIn, accessPolicyConstraint.reauthenticateIn)
&& Objects.equals(this.required, accessPolicyConstraint.required)
&& Objects.equals(this.types, accessPolicyConstraint.types);
// ;
}
@Override
public int hashCode() {
return Objects.hash(authenticationMethods, excludedAuthenticationMethods, methods, reauthenticateIn, required,
types);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AccessPolicyConstraint {\n");
sb.append(" authenticationMethods: ").append(toIndentedString(authenticationMethods)).append("\n");
sb.append(" excludedAuthenticationMethods: ").append(toIndentedString(excludedAuthenticationMethods))
.append("\n");
sb.append(" methods: ").append(toIndentedString(methods)).append("\n");
sb.append(" reauthenticateIn: ").append(toIndentedString(reauthenticateIn)).append("\n");
sb.append(" required: ").append(toIndentedString(required)).append("\n");
sb.append(" types: ").append(toIndentedString(types)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy