Package io.github.cdklabs.projen
Class TomlFileOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.TomlFileOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TomlFileOptions>
- Enclosing interface:
- TomlFileOptions
@Stability(Experimental) public static final class TomlFileOptions.Builder extends Object implements software.amazon.jsii.Builder<TomlFileOptions>
A builder forTomlFileOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TomlFileOptionsbuild()Builds the configured instance.TomlFileOptions.Buildercommitted(Boolean committed)Sets the value ofFileBaseOptions.getCommitted()TomlFileOptions.BuildereditGitignore(Boolean editGitignore)Sets the value ofFileBaseOptions.getEditGitignore()TomlFileOptions.Builderexecutable(Boolean executable)Sets the value ofFileBaseOptions.getExecutable()TomlFileOptions.Buildermarker(Boolean marker)Sets the value ofFileBaseOptions.getMarker()TomlFileOptions.Builderobj(Object obj)Sets the value ofObjectFileOptions.getObj()TomlFileOptions.BuilderomitEmpty(Boolean omitEmpty)Sets the value ofObjectFileOptions.getOmitEmpty()TomlFileOptions.Builderreadonly(Boolean readonly)Sets the value ofFileBaseOptions.getReadonly()
-
-
-
Method Detail
-
obj
@Stability(Experimental) public TomlFileOptions.Builder obj(Object obj)
Sets the value ofObjectFileOptions.getObj()- Parameters:
obj- The object that will be serialized. You can modify the object's contents before synthesis. Serialization of the object is similar to JSON.stringify with few enhancements:- values that are functions will be called during synthesis and the result will be serialized - this allow to have lazy values.
Setwill be converted to arrayMapwill be converted to a plain object ({ key: value, ... }})RegExpwithout flags will be converted to string representation of the source
- Returns:
this
-
omitEmpty
@Stability(Experimental) public TomlFileOptions.Builder omitEmpty(Boolean omitEmpty)
Sets the value ofObjectFileOptions.getOmitEmpty()- Parameters:
omitEmpty- Omits empty objects and arrays.- Returns:
this
-
committed
@Stability(Experimental) public TomlFileOptions.Builder committed(Boolean committed)
Sets the value ofFileBaseOptions.getCommitted()- Parameters:
committed- Indicates whether this file should be committed to git or ignored. By default, all generated files are committed and anti-tamper is used to protect against manual modifications.- Returns:
this
-
editGitignore
@Stability(Experimental) public TomlFileOptions.Builder editGitignore(Boolean editGitignore)
Sets the value ofFileBaseOptions.getEditGitignore()- Parameters:
editGitignore- Update the project's .gitignore file.- Returns:
this
-
executable
@Stability(Experimental) public TomlFileOptions.Builder executable(Boolean executable)
Sets the value ofFileBaseOptions.getExecutable()- Parameters:
executable- Whether the generated file should be marked as executable.- Returns:
this
-
marker
@Stability(Experimental) public TomlFileOptions.Builder marker(Boolean marker)
Sets the value ofFileBaseOptions.getMarker()- Parameters:
marker- Adds the projen marker to the file.- Returns:
this
-
readonly
@Stability(Experimental) public TomlFileOptions.Builder readonly(Boolean readonly)
Sets the value ofFileBaseOptions.getReadonly()- Parameters:
readonly- Whether the generated file should be readonly.- Returns:
this
-
build
@Stability(Experimental) public TomlFileOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TomlFileOptions>- Returns:
- a new instance of
TomlFileOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-