software.aws.awsprototypingsdk.cdkgraph.CdkGraphContext Maven / Gradle / Ivy
Show all versions of cdk-graph Show documentation
package software.aws.awsprototypingsdk.cdkgraph;
/**
* (experimental) CdkGraph context.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:45:13.676Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.cdkgraph.$Module.class, fqn = "@aws-prototyping-sdk/cdk-graph.CdkGraphContext")
public class CdkGraphContext extends software.amazon.jsii.JsiiObject {
protected CdkGraphContext(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CdkGraphContext(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param store This parameter is required.
* @param outdir This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public CdkGraphContext(final @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.Store store, final @org.jetbrains.annotations.NotNull java.lang.String outdir) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(store, "store is required"), java.util.Objects.requireNonNull(outdir, "outdir is required") });
}
/**
* (experimental) Get CdkGraph artifact by id.
*
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact getArtifact(final @org.jetbrains.annotations.NotNull java.lang.String id) {
return software.amazon.jsii.Kernel.call(this, "getArtifact", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") });
}
/**
* (experimental) Indicates if context has an artifact with filename defined.
*
* @param filename This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Boolean hasArtifactFile(final @org.jetbrains.annotations.NotNull java.lang.String filename) {
return software.amazon.jsii.Kernel.call(this, "hasArtifactFile", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(filename, "filename is required") });
}
/**
* (experimental) Logs an artifact entry.
*
* In general this should not be called directly, as writeArtifact
should be utilized
* to perform writing and logging artifacts. However some plugins utilize other tools that generate the artifacts,
* in which case the plugin would call this method to log the entry.
*
* @param source The source of the artifact, such as the name of plugin. This parameter is required.
* @param id Unique id of the artifact. This parameter is required.
* @param filepath Full path where the artifact is stored. This parameter is required.
* @param description Description of the artifact.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact logArtifact(final @org.jetbrains.annotations.NotNull java.lang.Object source, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String filepath, final @org.jetbrains.annotations.Nullable java.lang.String description) {
if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
if (
!(source instanceof software.aws.awsprototypingsdk.cdkgraph.CdkGraph)
&& !(source instanceof software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin)
&& !(source.getClass().equals(software.amazon.jsii.JsiiObject.class))
) {
throw new IllegalArgumentException(
new java.lang.StringBuilder("Expected ")
.append("source")
.append(" to be one of: software.aws.awsprototypingsdk.cdkgraph.CdkGraph, software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin; received ")
.append(source.getClass()).toString());
}
}
return software.amazon.jsii.Kernel.call(this, "logArtifact", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact.class), new Object[] { java.util.Objects.requireNonNull(source, "source is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(filepath, "filepath is required"), description });
}
/**
* (experimental) Logs an artifact entry.
*
* In general this should not be called directly, as writeArtifact
should be utilized
* to perform writing and logging artifacts. However some plugins utilize other tools that generate the artifacts,
* in which case the plugin would call this method to log the entry.
*
* @param source The source of the artifact, such as the name of plugin. This parameter is required.
* @param id Unique id of the artifact. This parameter is required.
* @param filepath Full path where the artifact is stored. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact logArtifact(final @org.jetbrains.annotations.NotNull java.lang.Object source, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String filepath) {
if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
if (
!(source instanceof software.aws.awsprototypingsdk.cdkgraph.CdkGraph)
&& !(source instanceof software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin)
&& !(source.getClass().equals(software.amazon.jsii.JsiiObject.class))
) {
throw new IllegalArgumentException(
new java.lang.StringBuilder("Expected ")
.append("source")
.append(" to be one of: software.aws.awsprototypingsdk.cdkgraph.CdkGraph, software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin; received ")
.append(source.getClass()).toString());
}
}
return software.amazon.jsii.Kernel.call(this, "logArtifact", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact.class), new Object[] { java.util.Objects.requireNonNull(source, "source is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(filepath, "filepath is required") });
}
/**
* (experimental) Writes artifact data to outdir and logs the entry.
*
* @param source The source of the artifact, such as the name of plugin. This parameter is required.
* @param id Unique id of the artifact. This parameter is required.
* @param filename Relative name of the file. This parameter is required.
* @param data This parameter is required.
* @param description Description of the artifact.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact writeArtifact(final @org.jetbrains.annotations.NotNull java.lang.Object source, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String filename, final @org.jetbrains.annotations.NotNull java.lang.String data, final @org.jetbrains.annotations.Nullable java.lang.String description) {
if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
if (
!(source instanceof software.aws.awsprototypingsdk.cdkgraph.CdkGraph)
&& !(source instanceof software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin)
&& !(source.getClass().equals(software.amazon.jsii.JsiiObject.class))
) {
throw new IllegalArgumentException(
new java.lang.StringBuilder("Expected ")
.append("source")
.append(" to be one of: software.aws.awsprototypingsdk.cdkgraph.CdkGraph, software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin; received ")
.append(source.getClass()).toString());
}
}
return software.amazon.jsii.Kernel.call(this, "writeArtifact", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact.class), new Object[] { java.util.Objects.requireNonNull(source, "source is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(filename, "filename is required"), java.util.Objects.requireNonNull(data, "data is required"), description });
}
/**
* (experimental) Writes artifact data to outdir and logs the entry.
*
* @param source The source of the artifact, such as the name of plugin. This parameter is required.
* @param id Unique id of the artifact. This parameter is required.
* @param filename Relative name of the file. This parameter is required.
* @param data This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact writeArtifact(final @org.jetbrains.annotations.NotNull java.lang.Object source, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String filename, final @org.jetbrains.annotations.NotNull java.lang.String data) {
if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
if (
!(source instanceof software.aws.awsprototypingsdk.cdkgraph.CdkGraph)
&& !(source instanceof software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin)
&& !(source.getClass().equals(software.amazon.jsii.JsiiObject.class))
) {
throw new IllegalArgumentException(
new java.lang.StringBuilder("Expected ")
.append("source")
.append(" to be one of: software.aws.awsprototypingsdk.cdkgraph.CdkGraph, software.aws.awsprototypingsdk.cdkgraph.ICdkGraphPlugin; received ")
.append(source.getClass()).toString());
}
}
return software.amazon.jsii.Kernel.call(this, "writeArtifact", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact.class), new Object[] { java.util.Objects.requireNonNull(source, "source is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(filename, "filename is required"), java.util.Objects.requireNonNull(data, "data is required") });
}
/**
* (experimental) Get record of all graph artifacts keyed by artifact id.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.Map getArtifacts() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "artifacts", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact.class))));
}
/**
* (experimental) Get CdkGraph core graph.json
artifact.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact getGraphJson() {
return software.amazon.jsii.Kernel.get(this, "graphJson", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getOutdir() {
return software.amazon.jsii.Kernel.get(this, "outdir", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.Store getStore() {
return software.amazon.jsii.Kernel.get(this, "store", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.Store.class));
}
}