Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package io.github.cdklabs.cdk.amazonmq;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.102.0 (build e354887)", date = "2024-08-08T22:30:31.803Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.amazonmq.$Module.class, fqn = "@cdklabs/cdk-amazonmq.LdapUserStoreOptions")
@software.amazon.jsii.Jsii.Proxy(LdapUserStoreOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface LdapUserStoreOptions extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.cdk.amazonmq.ActiveMqLdapAuthorization {
/**
* @return a {@link Builder} of {@link LdapUserStoreOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link LdapUserStoreOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List hosts;
java.lang.String roleBase;
java.lang.String roleSearchMatching;
software.amazon.awscdk.SecretValue serviceAccountPassword;
software.amazon.awscdk.SecretValue serviceAccountUsername;
java.lang.String userBase;
java.lang.String userRoleName;
java.lang.String userSearchMatching;
java.lang.String roleName;
java.lang.Boolean roleSearchSubtree;
java.lang.Boolean userSearchSubtree;
/**
* Sets the value of {@link LdapUserStoreOptions#getHosts}
* @param hosts Sets the location of the LDAP server such as AWS Directory Service for Microsoft Active Directory. This parameter is required.
* Optional failover server.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder hosts(java.util.List hosts) {
this.hosts = hosts;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getRoleBase}
* @param roleBase The distinguished name of the node in the directory information tree (DIT) to search for roles or groups. This parameter is required.
* For example, ou=group, ou=corp, dc=corp, dc=example, dc=com.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder roleBase(java.lang.String roleBase) {
this.roleBase = roleBase;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getRoleSearchMatching}
* @param roleSearchMatching The LDAP search filter used to find roles within the roleBase. This parameter is required.
* The distinguished name of the user matched by userSearchMatching is substituted into the {0} placeholder in the search filter. The client's username is substituted into the {1} placeholder. For example, if you set this option to (member=uid={1}) for the user janedoe, the search filter becomes (member=uid=janedoe) after string substitution. It matches all role entries that have a member attribute equal to uid=janedoe under the subtree selected by the RoleBases.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder roleSearchMatching(java.lang.String roleSearchMatching) {
this.roleSearchMatching = roleSearchMatching;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getServiceAccountPassword}
* @param serviceAccountPassword Service account password. This parameter is required.
* A service account is an account in your LDAP server that has access to initiate a connection. For example, cn=admin,dc=corp, dc=example, dc=com.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder serviceAccountPassword(software.amazon.awscdk.SecretValue serviceAccountPassword) {
this.serviceAccountPassword = serviceAccountPassword;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getServiceAccountUsername}
* @param serviceAccountUsername Service account username. This parameter is required.
* A service account is an account in your LDAP server that has access to initiate a connection. For example, cn=admin, ou=corp, dc=corp, dc=example, dc=com.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder serviceAccountUsername(software.amazon.awscdk.SecretValue serviceAccountUsername) {
this.serviceAccountUsername = serviceAccountUsername;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getUserBase}
* @param userBase Select a particular subtree of the directory information tree (DIT) to search for user entries. This parameter is required.
* The subtree is specified by a DN, which specifies the base node of the subtree. For example, by setting this option to ou=Users,ou=corp, dc=corp, dc=example, dc=com, the search for user entries is restricted to the subtree beneath ou=Users,ou=corp, dc=corp, dc=example, dc=com.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder userBase(java.lang.String userBase) {
this.userBase = userBase;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getUserRoleName}
* @param userRoleName The name of the LDAP attribute in the user's directory entry for the user's group membership. This parameter is required.
* In some cases, user roles may be identified by the value of an attribute in the user's directory entry. The UserRoleName option allows you to provide the name of this attribute.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder userRoleName(java.lang.String userRoleName) {
this.userRoleName = userRoleName;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getUserSearchMatching}
* @param userSearchMatching The LDAP search filter used to find users within the userBase. This parameter is required.
* The client's username is substituted into the {0} placeholder in the search filter. For example, if this option is set to (uid={0}) and the received username is janedoe, the search filter becomes (uid=janedoe) after string substitution. It will result in matching an entry like uid=janedoe, ou=Users, ou=corp, dc=corp, dc=example, dc=com.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder userSearchMatching(java.lang.String userSearchMatching) {
this.userSearchMatching = userSearchMatching;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getRoleName}
* @param roleName The group name attribute in a role entry whose value is the name of that role.
* For example, you can specify cn for a group entry's common name. If authentication succeeds, then the user is assigned the the value of the cn attribute for each role entry that they are a member of.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder roleName(java.lang.String roleName) {
this.roleName = roleName;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getRoleSearchSubtree}
* @param roleSearchSubtree The directory search scope for the role.
* If set to true, scope is to search the entire subtree.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder roleSearchSubtree(java.lang.Boolean roleSearchSubtree) {
this.roleSearchSubtree = roleSearchSubtree;
return this;
}
/**
* Sets the value of {@link LdapUserStoreOptions#getUserSearchSubtree}
* @param userSearchSubtree The directory search scope for the user.
* If set to true, scope is to search the entire subtree.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder userSearchSubtree(java.lang.Boolean userSearchSubtree) {
this.userSearchSubtree = userSearchSubtree;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link LdapUserStoreOptions}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public LdapUserStoreOptions build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link LdapUserStoreOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements LdapUserStoreOptions {
private final java.util.List hosts;
private final java.lang.String roleBase;
private final java.lang.String roleSearchMatching;
private final software.amazon.awscdk.SecretValue serviceAccountPassword;
private final software.amazon.awscdk.SecretValue serviceAccountUsername;
private final java.lang.String userBase;
private final java.lang.String userRoleName;
private final java.lang.String userSearchMatching;
private final java.lang.String roleName;
private final java.lang.Boolean roleSearchSubtree;
private final java.lang.Boolean userSearchSubtree;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.hosts = software.amazon.jsii.Kernel.get(this, "hosts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.roleBase = software.amazon.jsii.Kernel.get(this, "roleBase", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.roleSearchMatching = software.amazon.jsii.Kernel.get(this, "roleSearchMatching", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.serviceAccountPassword = software.amazon.jsii.Kernel.get(this, "serviceAccountPassword", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.SecretValue.class));
this.serviceAccountUsername = software.amazon.jsii.Kernel.get(this, "serviceAccountUsername", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.SecretValue.class));
this.userBase = software.amazon.jsii.Kernel.get(this, "userBase", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.userRoleName = software.amazon.jsii.Kernel.get(this, "userRoleName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.userSearchMatching = software.amazon.jsii.Kernel.get(this, "userSearchMatching", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.roleName = software.amazon.jsii.Kernel.get(this, "roleName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.roleSearchSubtree = software.amazon.jsii.Kernel.get(this, "roleSearchSubtree", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.userSearchSubtree = software.amazon.jsii.Kernel.get(this, "userSearchSubtree", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.hosts = java.util.Objects.requireNonNull(builder.hosts, "hosts is required");
this.roleBase = java.util.Objects.requireNonNull(builder.roleBase, "roleBase is required");
this.roleSearchMatching = java.util.Objects.requireNonNull(builder.roleSearchMatching, "roleSearchMatching is required");
this.serviceAccountPassword = java.util.Objects.requireNonNull(builder.serviceAccountPassword, "serviceAccountPassword is required");
this.serviceAccountUsername = java.util.Objects.requireNonNull(builder.serviceAccountUsername, "serviceAccountUsername is required");
this.userBase = java.util.Objects.requireNonNull(builder.userBase, "userBase is required");
this.userRoleName = java.util.Objects.requireNonNull(builder.userRoleName, "userRoleName is required");
this.userSearchMatching = java.util.Objects.requireNonNull(builder.userSearchMatching, "userSearchMatching is required");
this.roleName = builder.roleName;
this.roleSearchSubtree = builder.roleSearchSubtree;
this.userSearchSubtree = builder.userSearchSubtree;
}
@Override
public final java.util.List getHosts() {
return this.hosts;
}
@Override
public final java.lang.String getRoleBase() {
return this.roleBase;
}
@Override
public final java.lang.String getRoleSearchMatching() {
return this.roleSearchMatching;
}
@Override
public final software.amazon.awscdk.SecretValue getServiceAccountPassword() {
return this.serviceAccountPassword;
}
@Override
public final software.amazon.awscdk.SecretValue getServiceAccountUsername() {
return this.serviceAccountUsername;
}
@Override
public final java.lang.String getUserBase() {
return this.userBase;
}
@Override
public final java.lang.String getUserRoleName() {
return this.userRoleName;
}
@Override
public final java.lang.String getUserSearchMatching() {
return this.userSearchMatching;
}
@Override
public final java.lang.String getRoleName() {
return this.roleName;
}
@Override
public final java.lang.Boolean getRoleSearchSubtree() {
return this.roleSearchSubtree;
}
@Override
public final java.lang.Boolean getUserSearchSubtree() {
return this.userSearchSubtree;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
data.set("hosts", om.valueToTree(this.getHosts()));
data.set("roleBase", om.valueToTree(this.getRoleBase()));
data.set("roleSearchMatching", om.valueToTree(this.getRoleSearchMatching()));
data.set("serviceAccountPassword", om.valueToTree(this.getServiceAccountPassword()));
data.set("serviceAccountUsername", om.valueToTree(this.getServiceAccountUsername()));
data.set("userBase", om.valueToTree(this.getUserBase()));
data.set("userRoleName", om.valueToTree(this.getUserRoleName()));
data.set("userSearchMatching", om.valueToTree(this.getUserSearchMatching()));
if (this.getRoleName() != null) {
data.set("roleName", om.valueToTree(this.getRoleName()));
}
if (this.getRoleSearchSubtree() != null) {
data.set("roleSearchSubtree", om.valueToTree(this.getRoleSearchSubtree()));
}
if (this.getUserSearchSubtree() != null) {
data.set("userSearchSubtree", om.valueToTree(this.getUserSearchSubtree()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/cdk-amazonmq.LdapUserStoreOptions"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
LdapUserStoreOptions.Jsii$Proxy that = (LdapUserStoreOptions.Jsii$Proxy) o;
if (!hosts.equals(that.hosts)) return false;
if (!roleBase.equals(that.roleBase)) return false;
if (!roleSearchMatching.equals(that.roleSearchMatching)) return false;
if (!serviceAccountPassword.equals(that.serviceAccountPassword)) return false;
if (!serviceAccountUsername.equals(that.serviceAccountUsername)) return false;
if (!userBase.equals(that.userBase)) return false;
if (!userRoleName.equals(that.userRoleName)) return false;
if (!userSearchMatching.equals(that.userSearchMatching)) return false;
if (this.roleName != null ? !this.roleName.equals(that.roleName) : that.roleName != null) return false;
if (this.roleSearchSubtree != null ? !this.roleSearchSubtree.equals(that.roleSearchSubtree) : that.roleSearchSubtree != null) return false;
return this.userSearchSubtree != null ? this.userSearchSubtree.equals(that.userSearchSubtree) : that.userSearchSubtree == null;
}
@Override
public final int hashCode() {
int result = this.hosts.hashCode();
result = 31 * result + (this.roleBase.hashCode());
result = 31 * result + (this.roleSearchMatching.hashCode());
result = 31 * result + (this.serviceAccountPassword.hashCode());
result = 31 * result + (this.serviceAccountUsername.hashCode());
result = 31 * result + (this.userBase.hashCode());
result = 31 * result + (this.userRoleName.hashCode());
result = 31 * result + (this.userSearchMatching.hashCode());
result = 31 * result + (this.roleName != null ? this.roleName.hashCode() : 0);
result = 31 * result + (this.roleSearchSubtree != null ? this.roleSearchSubtree.hashCode() : 0);
result = 31 * result + (this.userSearchSubtree != null ? this.userSearchSubtree.hashCode() : 0);
return result;
}
}
}