software.aws.awsprototypingsdk.nxmonorepo.NXConfig Maven / Gradle / Ivy
package software.aws.awsprototypingsdk.nxmonorepo;
/**
* NX configurations.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.71.0 (build f1f58ae)", date = "2022-12-07T01:30:43.691Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.$Module.class, fqn = "aws-prototyping-sdk.nx_monorepo.NXConfig")
@software.amazon.jsii.Jsii.Proxy(NXConfig.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface NXConfig extends software.amazon.jsii.JsiiSerializable {
/**
* Affected branch.
*
* Default: mainline
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getAffectedBranch() {
return null;
}
/**
* Configuration for Implicit Dependnecies.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.Map> getImplicitDependencies() {
return null;
}
/**
* Read only access token if enabling nx cloud.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getNxCloudReadOnlyAccessToken() {
return null;
}
/**
* List of patterns to include in the .nxignore file.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getNxIgnore() {
return null;
}
/**
* Configuration for TargetDependencies.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.Map> getTargetDependencies() {
return null;
}
/**
* @return a {@link Builder} of {@link NXConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link NXConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String affectedBranch;
java.util.Map> implicitDependencies;
java.lang.String nxCloudReadOnlyAccessToken;
java.util.List nxIgnore;
java.util.Map> targetDependencies;
/**
* Sets the value of {@link NXConfig#getAffectedBranch}
* @param affectedBranch Affected branch.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder affectedBranch(java.lang.String affectedBranch) {
this.affectedBranch = affectedBranch;
return this;
}
/**
* Sets the value of {@link NXConfig#getImplicitDependencies}
* @param implicitDependencies Configuration for Implicit Dependnecies.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder implicitDependencies(java.util.Map> implicitDependencies) {
this.implicitDependencies = (java.util.Map>)implicitDependencies;
return this;
}
/**
* Sets the value of {@link NXConfig#getNxCloudReadOnlyAccessToken}
* @param nxCloudReadOnlyAccessToken Read only access token if enabling nx cloud.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder nxCloudReadOnlyAccessToken(java.lang.String nxCloudReadOnlyAccessToken) {
this.nxCloudReadOnlyAccessToken = nxCloudReadOnlyAccessToken;
return this;
}
/**
* Sets the value of {@link NXConfig#getNxIgnore}
* @param nxIgnore List of patterns to include in the .nxignore file.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder nxIgnore(java.util.List nxIgnore) {
this.nxIgnore = nxIgnore;
return this;
}
/**
* Sets the value of {@link NXConfig#getTargetDependencies}
* @param targetDependencies Configuration for TargetDependencies.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder targetDependencies(java.util.Map> targetDependencies) {
this.targetDependencies = (java.util.Map>)targetDependencies;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link NXConfig}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public NXConfig build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link NXConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NXConfig {
private final java.lang.String affectedBranch;
private final java.util.Map> implicitDependencies;
private final java.lang.String nxCloudReadOnlyAccessToken;
private final java.util.List nxIgnore;
private final java.util.Map> targetDependencies;
/**
* 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.affectedBranch = software.amazon.jsii.Kernel.get(this, "affectedBranch", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.implicitDependencies = software.amazon.jsii.Kernel.get(this, "implicitDependencies", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
this.nxCloudReadOnlyAccessToken = software.amazon.jsii.Kernel.get(this, "nxCloudReadOnlyAccessToken", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.nxIgnore = software.amazon.jsii.Kernel.get(this, "nxIgnore", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.targetDependencies = software.amazon.jsii.Kernel.get(this, "targetDependencies", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.nxmonorepo.TargetDependency.class))));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.affectedBranch = builder.affectedBranch;
this.implicitDependencies = (java.util.Map>)builder.implicitDependencies;
this.nxCloudReadOnlyAccessToken = builder.nxCloudReadOnlyAccessToken;
this.nxIgnore = builder.nxIgnore;
this.targetDependencies = (java.util.Map>)builder.targetDependencies;
}
@Override
public final java.lang.String getAffectedBranch() {
return this.affectedBranch;
}
@Override
public final java.util.Map> getImplicitDependencies() {
return this.implicitDependencies;
}
@Override
public final java.lang.String getNxCloudReadOnlyAccessToken() {
return this.nxCloudReadOnlyAccessToken;
}
@Override
public final java.util.List getNxIgnore() {
return this.nxIgnore;
}
@Override
public final java.util.Map> getTargetDependencies() {
return this.targetDependencies;
}
@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.getAffectedBranch() != null) {
data.set("affectedBranch", om.valueToTree(this.getAffectedBranch()));
}
if (this.getImplicitDependencies() != null) {
data.set("implicitDependencies", om.valueToTree(this.getImplicitDependencies()));
}
if (this.getNxCloudReadOnlyAccessToken() != null) {
data.set("nxCloudReadOnlyAccessToken", om.valueToTree(this.getNxCloudReadOnlyAccessToken()));
}
if (this.getNxIgnore() != null) {
data.set("nxIgnore", om.valueToTree(this.getNxIgnore()));
}
if (this.getTargetDependencies() != null) {
data.set("targetDependencies", om.valueToTree(this.getTargetDependencies()));
}
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.NXConfig"));
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;
NXConfig.Jsii$Proxy that = (NXConfig.Jsii$Proxy) o;
if (this.affectedBranch != null ? !this.affectedBranch.equals(that.affectedBranch) : that.affectedBranch != null) return false;
if (this.implicitDependencies != null ? !this.implicitDependencies.equals(that.implicitDependencies) : that.implicitDependencies != null) return false;
if (this.nxCloudReadOnlyAccessToken != null ? !this.nxCloudReadOnlyAccessToken.equals(that.nxCloudReadOnlyAccessToken) : that.nxCloudReadOnlyAccessToken != null) return false;
if (this.nxIgnore != null ? !this.nxIgnore.equals(that.nxIgnore) : that.nxIgnore != null) return false;
return this.targetDependencies != null ? this.targetDependencies.equals(that.targetDependencies) : that.targetDependencies == null;
}
@Override
public final int hashCode() {
int result = this.affectedBranch != null ? this.affectedBranch.hashCode() : 0;
result = 31 * result + (this.implicitDependencies != null ? this.implicitDependencies.hashCode() : 0);
result = 31 * result + (this.nxCloudReadOnlyAccessToken != null ? this.nxCloudReadOnlyAccessToken.hashCode() : 0);
result = 31 * result + (this.nxIgnore != null ? this.nxIgnore.hashCode() : 0);
result = 31 * result + (this.targetDependencies != null ? this.targetDependencies.hashCode() : 0);
return result;
}
}
}