All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.cdklabs.cdkenterpriseiac.AddCfnInitProxyProps Maven / Gradle / Ivy

The newest version!
package io.github.cdklabs.cdkenterpriseiac;

/**
 * (experimental) Properties for the proxy server to use with cfn helper commands.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-08-31T18:15:44.899Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkenterpriseiac.$Module.class, fqn = "@cdklabs/cdk-enterprise-iac.AddCfnInitProxyProps")
@software.amazon.jsii.Jsii.Proxy(AddCfnInitProxyProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface AddCfnInitProxyProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) host of your proxy.
     * 

* Example: *

*

     * // Example automatically generated from non-compiling source. May contain errors.
     * example.getCom();
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getProxyHost(); /** * (experimental) proxy port. *

* Example: *

*

     * 8080;
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.Number getProxyPort(); /** * (experimental) JSON secret containing user and password properties to use if your proxy requires credentials http://user:password@host:port could contain sensitive data, so using a Secret. *

* Note that while the user and password won't be visible in the cloudformation template * they will be in plain text inside your UserData *

* Example: *

*

     * // Example automatically generated from non-compiling source. May contain errors.
     * Object secret = Secret.Builder.create(stack, "TestSecret")
     *         .secretObjectValue(Map.of(
     *                 "user", SecretValue,
     *                 "password", SecretValue))
     *         .build();
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.secretsmanager.ISecret getProxyCredentials() { return null; } /** * (experimental) Proxy Type. *

* Default: ProxyType.HTTP *

* Example: *

*

     * // Example automatically generated from non-compiling source. May contain errors.
     * ProxyType.getHTTPS();
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdkenterpriseiac.ProxyType getProxyType() { return null; } /** * @return a {@link Builder} of {@link AddCfnInitProxyProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link AddCfnInitProxyProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String proxyHost; java.lang.Number proxyPort; software.amazon.awscdk.services.secretsmanager.ISecret proxyCredentials; io.github.cdklabs.cdkenterpriseiac.ProxyType proxyType; /** * Sets the value of {@link AddCfnInitProxyProps#getProxyHost} * @param proxyHost host of your proxy. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder proxyHost(java.lang.String proxyHost) { this.proxyHost = proxyHost; return this; } /** * Sets the value of {@link AddCfnInitProxyProps#getProxyPort} * @param proxyPort proxy port. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder proxyPort(java.lang.Number proxyPort) { this.proxyPort = proxyPort; return this; } /** * Sets the value of {@link AddCfnInitProxyProps#getProxyCredentials} * @param proxyCredentials JSON secret containing user and password properties to use if your proxy requires credentials http://user:password@host:port could contain sensitive data, so using a Secret. * Note that while the user and password won't be visible in the cloudformation template * they will be in plain text inside your UserData * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder proxyCredentials(software.amazon.awscdk.services.secretsmanager.ISecret proxyCredentials) { this.proxyCredentials = proxyCredentials; return this; } /** * Sets the value of {@link AddCfnInitProxyProps#getProxyType} * @param proxyType Proxy Type. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder proxyType(io.github.cdklabs.cdkenterpriseiac.ProxyType proxyType) { this.proxyType = proxyType; return this; } /** * Builds the configured instance. * @return a new instance of {@link AddCfnInitProxyProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public AddCfnInitProxyProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link AddCfnInitProxyProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AddCfnInitProxyProps { private final java.lang.String proxyHost; private final java.lang.Number proxyPort; private final software.amazon.awscdk.services.secretsmanager.ISecret proxyCredentials; private final io.github.cdklabs.cdkenterpriseiac.ProxyType proxyType; /** * 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.proxyHost = software.amazon.jsii.Kernel.get(this, "proxyHost", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.proxyPort = software.amazon.jsii.Kernel.get(this, "proxyPort", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.proxyCredentials = software.amazon.jsii.Kernel.get(this, "proxyCredentials", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.ISecret.class)); this.proxyType = software.amazon.jsii.Kernel.get(this, "proxyType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkenterpriseiac.ProxyType.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.proxyHost = java.util.Objects.requireNonNull(builder.proxyHost, "proxyHost is required"); this.proxyPort = java.util.Objects.requireNonNull(builder.proxyPort, "proxyPort is required"); this.proxyCredentials = builder.proxyCredentials; this.proxyType = builder.proxyType; } @Override public final java.lang.String getProxyHost() { return this.proxyHost; } @Override public final java.lang.Number getProxyPort() { return this.proxyPort; } @Override public final software.amazon.awscdk.services.secretsmanager.ISecret getProxyCredentials() { return this.proxyCredentials; } @Override public final io.github.cdklabs.cdkenterpriseiac.ProxyType getProxyType() { return this.proxyType; } @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(); data.set("proxyHost", om.valueToTree(this.getProxyHost())); data.set("proxyPort", om.valueToTree(this.getProxyPort())); if (this.getProxyCredentials() != null) { data.set("proxyCredentials", om.valueToTree(this.getProxyCredentials())); } if (this.getProxyType() != null) { data.set("proxyType", om.valueToTree(this.getProxyType())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@cdklabs/cdk-enterprise-iac.AddCfnInitProxyProps")); 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; AddCfnInitProxyProps.Jsii$Proxy that = (AddCfnInitProxyProps.Jsii$Proxy) o; if (!proxyHost.equals(that.proxyHost)) return false; if (!proxyPort.equals(that.proxyPort)) return false; if (this.proxyCredentials != null ? !this.proxyCredentials.equals(that.proxyCredentials) : that.proxyCredentials != null) return false; return this.proxyType != null ? this.proxyType.equals(that.proxyType) : that.proxyType == null; } @Override public final int hashCode() { int result = this.proxyHost.hashCode(); result = 31 * result + (this.proxyPort.hashCode()); result = 31 * result + (this.proxyCredentials != null ? this.proxyCredentials.hashCode() : 0); result = 31 * result + (this.proxyType != null ? this.proxyType.hashCode() : 0); return result; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy