io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUser Maven / Gradle / Ivy
Show all versions of cdk-hyperledger-fabric-network Show documentation
package io.github.cdklabs.cdkhyperledgerfabricnetwork;
/**
* Creates custom resources to register and enroll users identities with the CA using the fabric-ca-client SDK.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-02T00:17:22.470Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkhyperledgerfabricnetwork.$Module.class, fqn = "@cdklabs/cdk-hyperledger-fabric-network.HyperledgerFabricUser")
public class HyperledgerFabricUser extends software.constructs.Construct {
protected HyperledgerFabricUser(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected HyperledgerFabricUser(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public HyperledgerFabricUser(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUserProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* User's affiliation to the member.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAffiliation() {
return software.amazon.jsii.Kernel.get(this, "affiliation", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* User ID registered with CA.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getUserId() {
return software.amazon.jsii.Kernel.get(this, "userId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Secret for user private key.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.secretsmanager.Secret getUserPrivateKeySecret() {
return software.amazon.jsii.Kernel.get(this, "userPrivateKeySecret", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.Secret.class));
}
/**
* Secret for user signed certificate.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.secretsmanager.Secret getUserSignedCertSecret() {
return software.amazon.jsii.Kernel.get(this, "userSignedCertSecret", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.Secret.class));
}
/**
* A fluent builder for {@link io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUser}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope;
private final java.lang.String id;
private final io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUserProps.Builder props;
private Builder(final io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUserProps.Builder();
}
/**
* User's affiliation to the member.
*
* Should be hierarchical with member name as root(MemberName.Dept1
).
*
* @return {@code this}
* @param affilitation User's affiliation to the member. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder affilitation(final java.lang.String affilitation) {
this.props.affilitation(affilitation);
return this;
}
/**
* User ID to register with CA.
*
* @return {@code this}
* @param userId User ID to register with CA. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder userId(final java.lang.String userId) {
this.props.userId(userId);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUser}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUser build() {
return new io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUser(
this.scope,
this.id,
this.props.build()
);
}
}
}