software.aws.awsprototypingsdk.nxmonorepo.MonorepoUpgradeDepsOptions Maven / Gradle / Ivy
package software.aws.awsprototypingsdk.nxmonorepo;
/**
* Configuration for Monorepo Upgrade Deps task.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.73.0 (build 6faeda3)", date = "2023-01-24T23:29:37.653Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.$Module.class, fqn = "aws-prototyping-sdk.nx_monorepo.MonorepoUpgradeDepsOptions")
@software.amazon.jsii.Jsii.Proxy(MonorepoUpgradeDepsOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface MonorepoUpgradeDepsOptions extends software.amazon.jsii.JsiiSerializable {
/**
* Syncpack configuration.
*
* No merging is performed and as such a complete syncpackConfig is required if supplied.
*
* Default: SyncpackConfig.DEFAULT_CONFIG
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.aws.awsprototypingsdk.nxmonorepo.SyncpackConfig getSyncpackConfig() {
return null;
}
/**
* Name of the task to create.
*
* Default: upgrade-deps
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getTaskName() {
return null;
}
/**
* @return a {@link Builder} of {@link MonorepoUpgradeDepsOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link MonorepoUpgradeDepsOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
software.aws.awsprototypingsdk.nxmonorepo.SyncpackConfig syncpackConfig;
java.lang.String taskName;
/**
* Sets the value of {@link MonorepoUpgradeDepsOptions#getSyncpackConfig}
* @param syncpackConfig Syncpack configuration.
* No merging is performed and as such a complete syncpackConfig is required if supplied.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder syncpackConfig(software.aws.awsprototypingsdk.nxmonorepo.SyncpackConfig syncpackConfig) {
this.syncpackConfig = syncpackConfig;
return this;
}
/**
* Sets the value of {@link MonorepoUpgradeDepsOptions#getTaskName}
* @param taskName Name of the task to create.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder taskName(java.lang.String taskName) {
this.taskName = taskName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link MonorepoUpgradeDepsOptions}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public MonorepoUpgradeDepsOptions build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link MonorepoUpgradeDepsOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MonorepoUpgradeDepsOptions {
private final software.aws.awsprototypingsdk.nxmonorepo.SyncpackConfig syncpackConfig;
private final java.lang.String taskName;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.syncpackConfig = software.amazon.jsii.Kernel.get(this, "syncpackConfig", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.nxmonorepo.SyncpackConfig.class));
this.taskName = software.amazon.jsii.Kernel.get(this, "taskName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.syncpackConfig = builder.syncpackConfig;
this.taskName = builder.taskName;
}
@Override
public final software.aws.awsprototypingsdk.nxmonorepo.SyncpackConfig getSyncpackConfig() {
return this.syncpackConfig;
}
@Override
public final java.lang.String getTaskName() {
return this.taskName;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getSyncpackConfig() != null) {
data.set("syncpackConfig", om.valueToTree(this.getSyncpackConfig()));
}
if (this.getTaskName() != null) {
data.set("taskName", om.valueToTree(this.getTaskName()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("aws-prototyping-sdk.nx_monorepo.MonorepoUpgradeDepsOptions"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MonorepoUpgradeDepsOptions.Jsii$Proxy that = (MonorepoUpgradeDepsOptions.Jsii$Proxy) o;
if (this.syncpackConfig != null ? !this.syncpackConfig.equals(that.syncpackConfig) : that.syncpackConfig != null) return false;
return this.taskName != null ? this.taskName.equals(that.taskName) : that.taskName == null;
}
@Override
public final int hashCode() {
int result = this.syncpackConfig != null ? this.syncpackConfig.hashCode() : 0;
result = 31 * result + (this.taskName != null ? this.taskName.hashCode() : 0);
return result;
}
}
}