io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode Maven / Gradle / Ivy
Show all versions of cdk-hyperledger-fabric-network Show documentation
package io.github.cdklabs.cdkhyperledgerfabricnetwork;
/**
* Creates a Hyperledger Fabric node on an Amazon Managed Blockchain network.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-02T00:17:22.468Z")
@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.HyperledgerFabricNode")
public class HyperledgerFabricNode extends software.constructs.Construct {
protected HyperledgerFabricNode(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected HyperledgerFabricNode(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public HyperledgerFabricNode(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNodeProps 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"), props });
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public HyperledgerFabricNode(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
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") });
}
/**
* Build out a list of HyperledgerFabricNode constructs given a list of input property objects;
*
* additionally checks to ensure node count is supported given the network type
*
* @param scope This parameter is required.
* @param nodeProps
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull java.util.List constructNodes(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope, final @org.jetbrains.annotations.Nullable java.util.List extends io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNodeProps> nodeProps) {
return java.util.Collections.unmodifiableList(software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode.class, "constructNodes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode.class)), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), nodeProps }));
}
/**
* Build out a list of HyperledgerFabricNode constructs given a list of input property objects;
*
* additionally checks to ensure node count is supported given the network type
*
* @param scope This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull java.util.List constructNodes(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope) {
return java.util.Collections.unmodifiableList(software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode.class, "constructNodes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode.class)), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required") }));
}
/**
* Configure logging for the node via SDK call;
*
* this function
* should be merged back into the constructor once the race condition is solved
*
* @param sdkCallPolicy This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void configureLogging(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.customresources.AwsCustomResourcePolicy sdkCallPolicy) {
software.amazon.jsii.Kernel.call(this, "configureLogging", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(sdkCallPolicy, "sdkCallPolicy is required") });
}
/**
* Populate the output properties that must be fetched via SDK call;
*
* this function
* should be merged back into the constructor once the race condition is solved
*
* @param dataSdkCallPolicy This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void fetchData(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.customresources.AwsCustomResourcePolicy dataSdkCallPolicy) {
software.amazon.jsii.Kernel.call(this, "fetchData", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(dataSdkCallPolicy, "dataSdkCallPolicy is required") });
}
/**
* The Availability Zone in which the node exists.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAvailabilityZone() {
return software.amazon.jsii.Kernel.get(this, "availabilityZone", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The configuration to enable or disable chaincode logging.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Boolean getEnableChaincodeLogging() {
return software.amazon.jsii.Kernel.get(this, "enableChaincodeLogging", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* The configuration to enable or disable node logging.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Boolean getEnableNodeLogging() {
return software.amazon.jsii.Kernel.get(this, "enableNodeLogging", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* The Amazon Managed Blockchain instance type for the node.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.InstanceType getInstanceType() {
return software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.InstanceType.class));
}
/**
* Managed Blockchain member identifier.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getMemberId() {
return software.amazon.jsii.Kernel.get(this, "memberId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Managed Blockchain network identifier.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getNetworkId() {
return software.amazon.jsii.Kernel.get(this, "networkId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Managed Blockchain node identifier generated on construction.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getNodeId() {
return software.amazon.jsii.Kernel.get(this, "nodeId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getEndpoint() {
return software.amazon.jsii.Kernel.get(this, "endpoint", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setEndpoint(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "endpoint", java.util.Objects.requireNonNull(value, "endpoint is required"));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getEventEndpoint() {
return software.amazon.jsii.Kernel.get(this, "eventEndpoint", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setEventEndpoint(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "eventEndpoint", java.util.Objects.requireNonNull(value, "eventEndpoint is required"));
}
/**
* A fluent builder for {@link io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode}.
*/
@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 io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNodeProps.Builder props;
private Builder(final io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
}
/**
* The Availability Zone in which the node will be created.
*
* Default: - The first AZ in the region
*
* @return {@code this}
* @param availabilityZone The Availability Zone in which the node will be created. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder availabilityZone(final java.lang.String availabilityZone) {
this.props().availabilityZone(availabilityZone);
return this;
}
/**
* The configuration to enable or disable chaincode logging.
*
* Default: - true
*
* @return {@code this}
* @param enableChaincodeLogging The configuration to enable or disable chaincode logging. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enableChaincodeLogging(final java.lang.Boolean enableChaincodeLogging) {
this.props().enableChaincodeLogging(enableChaincodeLogging);
return this;
}
/**
* The configuration to enable or disable node logging.
*
* Default: - true
*
* @return {@code this}
* @param enableNodeLogging The configuration to enable or disable node logging. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enableNodeLogging(final java.lang.Boolean enableNodeLogging) {
this.props().enableNodeLogging(enableNodeLogging);
return this;
}
/**
* The Amazon Managed Blockchain instance type for the node.
*
* Default: - BURSTABLE3_SMALL
*
* @return {@code this}
* @param instanceType The Amazon Managed Blockchain instance type for the node. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder instanceType(final io.github.cdklabs.cdkhyperledgerfabricnetwork.InstanceType instanceType) {
this.props().instanceType(instanceType);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode build() {
return new io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode(
this.scope,
this.id,
this.props != null ? this.props.build() : null
);
}
private io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNodeProps.Builder props() {
if (this.props == null) {
this.props = new io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNodeProps.Builder();
}
return this.props;
}
}
}