org.projen.python.SetupPyOptions Maven / Gradle / Ivy
Show all versions of projen Show documentation
package org.projen.python;
/**
* (experimental) Fields to pass in the setup() function of setup.py.
*
* @see https://docs.python.org/3/distutils/setupscript.html
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.34.0 (build 9b72778)", date = "2021-09-05T18:03:10.788Z")
@software.amazon.jsii.Jsii(module = org.projen.$Module.class, fqn = "projen.python.SetupPyOptions")
@software.amazon.jsii.Jsii.Proxy(SetupPyOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SetupPyOptions extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Author's e-mail.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getAuthorEmail() {
return null;
}
/**
* (experimental) Author's name.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getAuthorName() {
return null;
}
/**
* (experimental) A list of PyPI trove classifiers that describe the project.
*
* @see https://pypi.org/classifiers/
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getClassifiers() {
return null;
}
/**
* (experimental) A short project description.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return null;
}
/**
* (experimental) Package's Homepage / Website.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getHomepage() {
return null;
}
/**
* (experimental) The project license.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getLicense() {
return null;
}
/**
* (experimental) Name of the package.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getName() {
return null;
}
/**
* (experimental) List of submodules to be packaged.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getPackages() {
return null;
}
/**
* (experimental) Manually specify package version.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getVersion() {
return null;
}
/**
* @return a {@link Builder} of {@link SetupPyOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SetupPyOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
private java.lang.String authorEmail;
private java.lang.String authorName;
private java.util.List classifiers;
private java.lang.String description;
private java.lang.String homepage;
private java.lang.String license;
private java.lang.String name;
private java.util.List packages;
private java.lang.String version;
/**
* Sets the value of {@link SetupPyOptions#getAuthorEmail}
* @param authorEmail Author's e-mail.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder authorEmail(java.lang.String authorEmail) {
this.authorEmail = authorEmail;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getAuthorName}
* @param authorName Author's name.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder authorName(java.lang.String authorName) {
this.authorName = authorName;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getClassifiers}
* @param classifiers A list of PyPI trove classifiers that describe the project.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder classifiers(java.util.List classifiers) {
this.classifiers = classifiers;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getDescription}
* @param description A short project description.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getHomepage}
* @param homepage Package's Homepage / Website.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder homepage(java.lang.String homepage) {
this.homepage = homepage;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getLicense}
* @param license The project license.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder license(java.lang.String license) {
this.license = license;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getName}
* @param name Name of the package.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder name(java.lang.String name) {
this.name = name;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getPackages}
* @param packages List of submodules to be packaged.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder packages(java.util.List packages) {
this.packages = packages;
return this;
}
/**
* Sets the value of {@link SetupPyOptions#getVersion}
* @param version Manually specify package version.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder version(java.lang.String version) {
this.version = version;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SetupPyOptions}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public SetupPyOptions build() {
return new Jsii$Proxy(authorEmail, authorName, classifiers, description, homepage, license, name, packages, version);
}
}
/**
* An implementation for {@link SetupPyOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SetupPyOptions {
private final java.lang.String authorEmail;
private final java.lang.String authorName;
private final java.util.List classifiers;
private final java.lang.String description;
private final java.lang.String homepage;
private final java.lang.String license;
private final java.lang.String name;
private final java.util.List packages;
private final java.lang.String version;
/**
* 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.authorEmail = software.amazon.jsii.Kernel.get(this, "authorEmail", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.authorName = software.amazon.jsii.Kernel.get(this, "authorName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.classifiers = software.amazon.jsii.Kernel.get(this, "classifiers", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.homepage = software.amazon.jsii.Kernel.get(this, "homepage", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.license = software.amazon.jsii.Kernel.get(this, "license", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.packages = software.amazon.jsii.Kernel.get(this, "packages", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.version = software.amazon.jsii.Kernel.get(this, "version", 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 java.lang.String authorEmail, final java.lang.String authorName, final java.util.List classifiers, final java.lang.String description, final java.lang.String homepage, final java.lang.String license, final java.lang.String name, final java.util.List packages, final java.lang.String version) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.authorEmail = authorEmail;
this.authorName = authorName;
this.classifiers = classifiers;
this.description = description;
this.homepage = homepage;
this.license = license;
this.name = name;
this.packages = packages;
this.version = version;
}
@Override
public final java.lang.String getAuthorEmail() {
return this.authorEmail;
}
@Override
public final java.lang.String getAuthorName() {
return this.authorName;
}
@Override
public final java.util.List getClassifiers() {
return this.classifiers;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final java.lang.String getHomepage() {
return this.homepage;
}
@Override
public final java.lang.String getLicense() {
return this.license;
}
@Override
public final java.lang.String getName() {
return this.name;
}
@Override
public final java.util.List getPackages() {
return this.packages;
}
@Override
public final java.lang.String getVersion() {
return this.version;
}
@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.getAuthorEmail() != null) {
data.set("authorEmail", om.valueToTree(this.getAuthorEmail()));
}
if (this.getAuthorName() != null) {
data.set("authorName", om.valueToTree(this.getAuthorName()));
}
if (this.getClassifiers() != null) {
data.set("classifiers", om.valueToTree(this.getClassifiers()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getHomepage() != null) {
data.set("homepage", om.valueToTree(this.getHomepage()));
}
if (this.getLicense() != null) {
data.set("license", om.valueToTree(this.getLicense()));
}
if (this.getName() != null) {
data.set("name", om.valueToTree(this.getName()));
}
if (this.getPackages() != null) {
data.set("packages", om.valueToTree(this.getPackages()));
}
if (this.getVersion() != null) {
data.set("version", om.valueToTree(this.getVersion()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("projen.python.SetupPyOptions"));
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;
SetupPyOptions.Jsii$Proxy that = (SetupPyOptions.Jsii$Proxy) o;
if (this.authorEmail != null ? !this.authorEmail.equals(that.authorEmail) : that.authorEmail != null) return false;
if (this.authorName != null ? !this.authorName.equals(that.authorName) : that.authorName != null) return false;
if (this.classifiers != null ? !this.classifiers.equals(that.classifiers) : that.classifiers != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.homepage != null ? !this.homepage.equals(that.homepage) : that.homepage != null) return false;
if (this.license != null ? !this.license.equals(that.license) : that.license != null) return false;
if (this.name != null ? !this.name.equals(that.name) : that.name != null) return false;
if (this.packages != null ? !this.packages.equals(that.packages) : that.packages != null) return false;
return this.version != null ? this.version.equals(that.version) : that.version == null;
}
@Override
public final int hashCode() {
int result = this.authorEmail != null ? this.authorEmail.hashCode() : 0;
result = 31 * result + (this.authorName != null ? this.authorName.hashCode() : 0);
result = 31 * result + (this.classifiers != null ? this.classifiers.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.homepage != null ? this.homepage.hashCode() : 0);
result = 31 * result + (this.license != null ? this.license.hashCode() : 0);
result = 31 * result + (this.name != null ? this.name.hashCode() : 0);
result = 31 * result + (this.packages != null ? this.packages.hashCode() : 0);
result = 31 * result + (this.version != null ? this.version.hashCode() : 0);
return result;
}
}
}