org.projen.SampleReadme Maven / Gradle / Ivy
Show all versions of projen Show documentation
package org.projen;
/**
* (experimental) Represents a README.md sample file. You are expected to manage this file after creation.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.34.0 (build 9b72778)", date = "2021-09-05T18:03:07.365Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = org.projen.$Module.class, fqn = "projen.SampleReadme")
public class SampleReadme extends org.projen.SampleFile {
protected SampleReadme(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected SampleReadme(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param project This parameter is required.
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public SampleReadme(final @org.jetbrains.annotations.NotNull org.projen.Project project, final @org.jetbrains.annotations.Nullable org.projen.SampleReadmeProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(project, "project is required"), props });
}
/**
* @param project This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public SampleReadme(final @org.jetbrains.annotations.NotNull org.projen.Project project) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(project, "project is required") });
}
/**
* (experimental) A fluent builder for {@link org.projen.SampleReadme}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param project This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final org.projen.Project project) {
return new Builder(project);
}
private final org.projen.Project project;
private org.projen.SampleReadmeProps.Builder props;
private Builder(final org.projen.Project project) {
this.project = project;
}
/**
* (experimental) The contents.
*
* Default: "# replace this"
*
* @return {@code this}
* @param contents The contents. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder contents(final java.lang.String contents) {
this.props().contents(contents);
return this;
}
/**
* (experimental) The name of the README.md file.
*
* Default: "README.md"
*
* Example:
*
*
{@code
* // Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
* "readme.md";}
*
* @return {@code this}
* @param filename The name of the README.md file. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder filename(final java.lang.String filename) {
this.props().filename(filename);
return this;
}
/**
* @returns a newly built instance of {@link org.projen.SampleReadme}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public org.projen.SampleReadme build() {
return new org.projen.SampleReadme(
this.project,
this.props != null ? this.props.build() : null
);
}
private org.projen.SampleReadmeProps.Builder props() {
if (this.props == null) {
this.props = new org.projen.SampleReadmeProps.Builder();
}
return this.props;
}
}
}