org.cdk8s.operator.OperatorProps Maven / Gradle / Ivy
Show all versions of cdk8s-operator Show documentation
package org.cdk8s.operator;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-27T12:13:19.686Z")
@software.amazon.jsii.Jsii(module = org.cdk8s.operator.$Module.class, fqn = "cdk8s-operator.OperatorProps")
@software.amazon.jsii.Jsii.Proxy(OperatorProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface OperatorProps extends software.amazon.jsii.JsiiSerializable {
/**
* A Kubernetes JSON manifest with a single resource that is matched against one of the providers within this operator.
*
* Default: - first position command-line argument or "/dev/stdin"
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getInputFile() {
return null;
}
/**
* Where to write the synthesized output.
*
* Default: "/dev/stdout"
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getOutputFile() {
return null;
}
/**
* @return a {@link Builder} of {@link OperatorProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link OperatorProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String inputFile;
java.lang.String outputFile;
/**
* Sets the value of {@link OperatorProps#getInputFile}
* @param inputFile A Kubernetes JSON manifest with a single resource that is matched against one of the providers within this operator.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder inputFile(java.lang.String inputFile) {
this.inputFile = inputFile;
return this;
}
/**
* Sets the value of {@link OperatorProps#getOutputFile}
* @param outputFile Where to write the synthesized output.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder outputFile(java.lang.String outputFile) {
this.outputFile = outputFile;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link OperatorProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public OperatorProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link OperatorProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements OperatorProps {
private final java.lang.String inputFile;
private final java.lang.String outputFile;
/**
* 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.inputFile = software.amazon.jsii.Kernel.get(this, "inputFile", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.outputFile = software.amazon.jsii.Kernel.get(this, "outputFile", 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.inputFile = builder.inputFile;
this.outputFile = builder.outputFile;
}
@Override
public final java.lang.String getInputFile() {
return this.inputFile;
}
@Override
public final java.lang.String getOutputFile() {
return this.outputFile;
}
@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.getInputFile() != null) {
data.set("inputFile", om.valueToTree(this.getInputFile()));
}
if (this.getOutputFile() != null) {
data.set("outputFile", om.valueToTree(this.getOutputFile()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk8s-operator.OperatorProps"));
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;
OperatorProps.Jsii$Proxy that = (OperatorProps.Jsii$Proxy) o;
if (this.inputFile != null ? !this.inputFile.equals(that.inputFile) : that.inputFile != null) return false;
return this.outputFile != null ? this.outputFile.equals(that.outputFile) : that.outputFile == null;
}
@Override
public final int hashCode() {
int result = this.inputFile != null ? this.inputFile.hashCode() : 0;
result = 31 * result + (this.outputFile != null ? this.outputFile.hashCode() : 0);
return result;
}
}
}