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

com.hashicorp.cdktf.TerraformProviderConfig Maven / Gradle / Ivy

package com.hashicorp.cdktf;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.17.1 (build 2bac5fd)", date = "2021-02-18T13:56:39.653Z")
@software.amazon.jsii.Jsii(module = com.hashicorp.cdktf.$Module.class, fqn = "cdktf.TerraformProviderConfig")
@software.amazon.jsii.Jsii.Proxy(TerraformProviderConfig.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface TerraformProviderConfig extends software.amazon.jsii.JsiiSerializable {

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getTerraformResourceType();

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformGeneratorMetadata getTerraformGeneratorMetadata() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.lang.String getTerraformProviderSource() {
        return null;
    }

    /**
     * @return a {@link Builder} of {@link TerraformProviderConfig}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link TerraformProviderConfig}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        private java.lang.String terraformResourceType;
        private com.hashicorp.cdktf.TerraformGeneratorMetadata terraformGeneratorMetadata;
        private java.lang.String terraformProviderSource;

        /**
         * Sets the value of {@link TerraformProviderConfig#getTerraformResourceType}
         * @param terraformResourceType the value to be set. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder terraformResourceType(java.lang.String terraformResourceType) {
            this.terraformResourceType = terraformResourceType;
            return this;
        }

        /**
         * Sets the value of {@link TerraformProviderConfig#getTerraformGeneratorMetadata}
         * @param terraformGeneratorMetadata the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder terraformGeneratorMetadata(com.hashicorp.cdktf.TerraformGeneratorMetadata terraformGeneratorMetadata) {
            this.terraformGeneratorMetadata = terraformGeneratorMetadata;
            return this;
        }

        /**
         * Sets the value of {@link TerraformProviderConfig#getTerraformProviderSource}
         * @param terraformProviderSource the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder terraformProviderSource(java.lang.String terraformProviderSource) {
            this.terraformProviderSource = terraformProviderSource;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link TerraformProviderConfig}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @Override
        public TerraformProviderConfig build() {
            return new Jsii$Proxy(terraformResourceType, terraformGeneratorMetadata, terraformProviderSource);
        }
    }

    /**
     * An implementation for {@link TerraformProviderConfig}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TerraformProviderConfig {
        private final java.lang.String terraformResourceType;
        private final com.hashicorp.cdktf.TerraformGeneratorMetadata terraformGeneratorMetadata;
        private final java.lang.String terraformProviderSource;

        /**
         * 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.terraformResourceType = software.amazon.jsii.Kernel.get(this, "terraformResourceType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.terraformGeneratorMetadata = software.amazon.jsii.Kernel.get(this, "terraformGeneratorMetadata", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformGeneratorMetadata.class));
            this.terraformProviderSource = software.amazon.jsii.Kernel.get(this, "terraformProviderSource", 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 terraformResourceType, final com.hashicorp.cdktf.TerraformGeneratorMetadata terraformGeneratorMetadata, final java.lang.String terraformProviderSource) {
            super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
            this.terraformResourceType = java.util.Objects.requireNonNull(terraformResourceType, "terraformResourceType is required");
            this.terraformGeneratorMetadata = terraformGeneratorMetadata;
            this.terraformProviderSource = terraformProviderSource;
        }

        @Override
        public final java.lang.String getTerraformResourceType() {
            return this.terraformResourceType;
        }

        @Override
        public final com.hashicorp.cdktf.TerraformGeneratorMetadata getTerraformGeneratorMetadata() {
            return this.terraformGeneratorMetadata;
        }

        @Override
        public final java.lang.String getTerraformProviderSource() {
            return this.terraformProviderSource;
        }

        @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("terraformResourceType", om.valueToTree(this.getTerraformResourceType()));
            if (this.getTerraformGeneratorMetadata() != null) {
                data.set("terraformGeneratorMetadata", om.valueToTree(this.getTerraformGeneratorMetadata()));
            }
            if (this.getTerraformProviderSource() != null) {
                data.set("terraformProviderSource", om.valueToTree(this.getTerraformProviderSource()));
            }

            final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
            struct.set("fqn", om.valueToTree("cdktf.TerraformProviderConfig"));
            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;

            TerraformProviderConfig.Jsii$Proxy that = (TerraformProviderConfig.Jsii$Proxy) o;

            if (!terraformResourceType.equals(that.terraformResourceType)) return false;
            if (this.terraformGeneratorMetadata != null ? !this.terraformGeneratorMetadata.equals(that.terraformGeneratorMetadata) : that.terraformGeneratorMetadata != null) return false;
            return this.terraformProviderSource != null ? this.terraformProviderSource.equals(that.terraformProviderSource) : that.terraformProviderSource == null;
        }

        @Override
        public final int hashCode() {
            int result = this.terraformResourceType.hashCode();
            result = 31 * result + (this.terraformGeneratorMetadata != null ? this.terraformGeneratorMetadata.hashCode() : 0);
            result = 31 * result + (this.terraformProviderSource != null ? this.terraformProviderSource.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy