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

ca.wheatstalk.cdkecskeycloak.KeycloakEc2TaskDefinitionProps Maven / Gradle / Ivy

There is a newer version: 0.0.164
Show newest version
package ca.wheatstalk.cdkecskeycloak;

/**
 * Props for `KeycloakEc2TaskDefinition`.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.29.0 (build 41df200)", date = "2021-04-28T04:27:48.371Z")
@software.amazon.jsii.Jsii(module = ca.wheatstalk.cdkecskeycloak.$Module.class, fqn = "@wheatstalk/cdk-ecs-keycloak.KeycloakEc2TaskDefinitionProps")
@software.amazon.jsii.Jsii.Proxy(KeycloakEc2TaskDefinitionProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface KeycloakEc2TaskDefinitionProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.ecs.Ec2TaskDefinitionProps {

    /**
     * Keycloak configuration.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    default @org.jetbrains.annotations.Nullable ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps getKeycloak() {
        return null;
    }

    /**
     * @return a {@link Builder} of {@link KeycloakEc2TaskDefinitionProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link KeycloakEc2TaskDefinitionProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static final class Builder implements software.amazon.jsii.Builder {
        private ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps keycloak;
        private java.util.List inferenceAccelerators;
        private software.amazon.awscdk.services.ecs.IpcMode ipcMode;
        private software.amazon.awscdk.services.ecs.NetworkMode networkMode;
        private software.amazon.awscdk.services.ecs.PidMode pidMode;
        private java.util.List placementConstraints;
        private software.amazon.awscdk.services.iam.IRole executionRole;
        private java.lang.String family;
        private software.amazon.awscdk.services.ecs.ProxyConfiguration proxyConfiguration;
        private software.amazon.awscdk.services.iam.IRole taskRole;
        private java.util.List volumes;

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getKeycloak}
         * @param keycloak Keycloak configuration.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder keycloak(ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps keycloak) {
            this.keycloak = keycloak;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getInferenceAccelerators}
         * @param inferenceAccelerators The inference accelerators to use for the containers in the task.
         *                              Not supported in Fargate.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @SuppressWarnings("unchecked")
        public Builder inferenceAccelerators(java.util.List inferenceAccelerators) {
            this.inferenceAccelerators = (java.util.List)inferenceAccelerators;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getIpcMode}
         * @param ipcMode The IPC resource namespace to use for the containers in the task.
         *                Not supported in Fargate and Windows containers.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder ipcMode(software.amazon.awscdk.services.ecs.IpcMode ipcMode) {
            this.ipcMode = ipcMode;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getNetworkMode}
         * @param networkMode The Docker networking mode to use for the containers in the task.
         *                    The valid values are none, bridge, awsvpc, and host.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder networkMode(software.amazon.awscdk.services.ecs.NetworkMode networkMode) {
            this.networkMode = networkMode;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getPidMode}
         * @param pidMode The process namespace to use for the containers in the task.
         *                Not supported in Fargate and Windows containers.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder pidMode(software.amazon.awscdk.services.ecs.PidMode pidMode) {
            this.pidMode = pidMode;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getPlacementConstraints}
         * @param placementConstraints An array of placement constraint objects to use for the task.
         *                             You can
         *                             specify a maximum of 10 constraints per task (this limit includes
         *                             constraints in the task definition and those specified at run time).
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @SuppressWarnings("unchecked")
        public Builder placementConstraints(java.util.List placementConstraints) {
            this.placementConstraints = (java.util.List)placementConstraints;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getExecutionRole}
         * @param executionRole The name of the IAM task execution role that grants the ECS agent to call AWS APIs on your behalf.
         *                      The role will be used to retrieve container images from ECR and create CloudWatch log groups.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder executionRole(software.amazon.awscdk.services.iam.IRole executionRole) {
            this.executionRole = executionRole;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getFamily}
         * @param family The name of a family that this task definition is registered to.
         *               A family groups multiple versions of a task definition.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder family(java.lang.String family) {
            this.family = family;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getProxyConfiguration}
         * @param proxyConfiguration The configuration details for the App Mesh proxy.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder proxyConfiguration(software.amazon.awscdk.services.ecs.ProxyConfiguration proxyConfiguration) {
            this.proxyConfiguration = proxyConfiguration;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getTaskRole}
         * @param taskRole The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder taskRole(software.amazon.awscdk.services.iam.IRole taskRole) {
            this.taskRole = taskRole;
            return this;
        }

        /**
         * Sets the value of {@link KeycloakEc2TaskDefinitionProps#getVolumes}
         * @param volumes The list of volume definitions for the task.
         *                For more information, see
         *                Task Definition Parameter Volumes.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @SuppressWarnings("unchecked")
        public Builder volumes(java.util.List volumes) {
            this.volumes = (java.util.List)volumes;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link KeycloakEc2TaskDefinitionProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @Override
        public KeycloakEc2TaskDefinitionProps build() {
            return new Jsii$Proxy(keycloak, inferenceAccelerators, ipcMode, networkMode, pidMode, placementConstraints, executionRole, family, proxyConfiguration, taskRole, volumes);
        }
    }

    /**
     * An implementation for {@link KeycloakEc2TaskDefinitionProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements KeycloakEc2TaskDefinitionProps {
        private final ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps keycloak;
        private final java.util.List inferenceAccelerators;
        private final software.amazon.awscdk.services.ecs.IpcMode ipcMode;
        private final software.amazon.awscdk.services.ecs.NetworkMode networkMode;
        private final software.amazon.awscdk.services.ecs.PidMode pidMode;
        private final java.util.List placementConstraints;
        private final software.amazon.awscdk.services.iam.IRole executionRole;
        private final java.lang.String family;
        private final software.amazon.awscdk.services.ecs.ProxyConfiguration proxyConfiguration;
        private final software.amazon.awscdk.services.iam.IRole taskRole;
        private final java.util.List volumes;

        /**
         * 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.keycloak = software.amazon.jsii.Kernel.get(this, "keycloak", software.amazon.jsii.NativeType.forClass(ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps.class));
            this.inferenceAccelerators = software.amazon.jsii.Kernel.get(this, "inferenceAccelerators", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.InferenceAccelerator.class)));
            this.ipcMode = software.amazon.jsii.Kernel.get(this, "ipcMode", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.IpcMode.class));
            this.networkMode = software.amazon.jsii.Kernel.get(this, "networkMode", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.NetworkMode.class));
            this.pidMode = software.amazon.jsii.Kernel.get(this, "pidMode", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.PidMode.class));
            this.placementConstraints = software.amazon.jsii.Kernel.get(this, "placementConstraints", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.PlacementConstraint.class)));
            this.executionRole = software.amazon.jsii.Kernel.get(this, "executionRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
            this.family = software.amazon.jsii.Kernel.get(this, "family", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.proxyConfiguration = software.amazon.jsii.Kernel.get(this, "proxyConfiguration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.ProxyConfiguration.class));
            this.taskRole = software.amazon.jsii.Kernel.get(this, "taskRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
            this.volumes = software.amazon.jsii.Kernel.get(this, "volumes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.Volume.class)));
        }

        /**
         * Constructor that initializes the object based on literal property values passed by the {@link Builder}.
         */
        @SuppressWarnings("unchecked")
        protected Jsii$Proxy(final ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps keycloak, final java.util.List inferenceAccelerators, final software.amazon.awscdk.services.ecs.IpcMode ipcMode, final software.amazon.awscdk.services.ecs.NetworkMode networkMode, final software.amazon.awscdk.services.ecs.PidMode pidMode, final java.util.List placementConstraints, final software.amazon.awscdk.services.iam.IRole executionRole, final java.lang.String family, final software.amazon.awscdk.services.ecs.ProxyConfiguration proxyConfiguration, final software.amazon.awscdk.services.iam.IRole taskRole, final java.util.List volumes) {
            super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
            this.keycloak = keycloak;
            this.inferenceAccelerators = (java.util.List)inferenceAccelerators;
            this.ipcMode = ipcMode;
            this.networkMode = networkMode;
            this.pidMode = pidMode;
            this.placementConstraints = (java.util.List)placementConstraints;
            this.executionRole = executionRole;
            this.family = family;
            this.proxyConfiguration = proxyConfiguration;
            this.taskRole = taskRole;
            this.volumes = (java.util.List)volumes;
        }

        @Override
        public final ca.wheatstalk.cdkecskeycloak.KeycloakContainerExtensionProps getKeycloak() {
            return this.keycloak;
        }

        @Override
        public final java.util.List getInferenceAccelerators() {
            return this.inferenceAccelerators;
        }

        @Override
        public final software.amazon.awscdk.services.ecs.IpcMode getIpcMode() {
            return this.ipcMode;
        }

        @Override
        public final software.amazon.awscdk.services.ecs.NetworkMode getNetworkMode() {
            return this.networkMode;
        }

        @Override
        public final software.amazon.awscdk.services.ecs.PidMode getPidMode() {
            return this.pidMode;
        }

        @Override
        public final java.util.List getPlacementConstraints() {
            return this.placementConstraints;
        }

        @Override
        public final software.amazon.awscdk.services.iam.IRole getExecutionRole() {
            return this.executionRole;
        }

        @Override
        public final java.lang.String getFamily() {
            return this.family;
        }

        @Override
        public final software.amazon.awscdk.services.ecs.ProxyConfiguration getProxyConfiguration() {
            return this.proxyConfiguration;
        }

        @Override
        public final software.amazon.awscdk.services.iam.IRole getTaskRole() {
            return this.taskRole;
        }

        @Override
        public final java.util.List getVolumes() {
            return this.volumes;
        }

        @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.getKeycloak() != null) {
                data.set("keycloak", om.valueToTree(this.getKeycloak()));
            }
            if (this.getInferenceAccelerators() != null) {
                data.set("inferenceAccelerators", om.valueToTree(this.getInferenceAccelerators()));
            }
            if (this.getIpcMode() != null) {
                data.set("ipcMode", om.valueToTree(this.getIpcMode()));
            }
            if (this.getNetworkMode() != null) {
                data.set("networkMode", om.valueToTree(this.getNetworkMode()));
            }
            if (this.getPidMode() != null) {
                data.set("pidMode", om.valueToTree(this.getPidMode()));
            }
            if (this.getPlacementConstraints() != null) {
                data.set("placementConstraints", om.valueToTree(this.getPlacementConstraints()));
            }
            if (this.getExecutionRole() != null) {
                data.set("executionRole", om.valueToTree(this.getExecutionRole()));
            }
            if (this.getFamily() != null) {
                data.set("family", om.valueToTree(this.getFamily()));
            }
            if (this.getProxyConfiguration() != null) {
                data.set("proxyConfiguration", om.valueToTree(this.getProxyConfiguration()));
            }
            if (this.getTaskRole() != null) {
                data.set("taskRole", om.valueToTree(this.getTaskRole()));
            }
            if (this.getVolumes() != null) {
                data.set("volumes", om.valueToTree(this.getVolumes()));
            }

            final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
            struct.set("fqn", om.valueToTree("@wheatstalk/cdk-ecs-keycloak.KeycloakEc2TaskDefinitionProps"));
            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;

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

            if (this.keycloak != null ? !this.keycloak.equals(that.keycloak) : that.keycloak != null) return false;
            if (this.inferenceAccelerators != null ? !this.inferenceAccelerators.equals(that.inferenceAccelerators) : that.inferenceAccelerators != null) return false;
            if (this.ipcMode != null ? !this.ipcMode.equals(that.ipcMode) : that.ipcMode != null) return false;
            if (this.networkMode != null ? !this.networkMode.equals(that.networkMode) : that.networkMode != null) return false;
            if (this.pidMode != null ? !this.pidMode.equals(that.pidMode) : that.pidMode != null) return false;
            if (this.placementConstraints != null ? !this.placementConstraints.equals(that.placementConstraints) : that.placementConstraints != null) return false;
            if (this.executionRole != null ? !this.executionRole.equals(that.executionRole) : that.executionRole != null) return false;
            if (this.family != null ? !this.family.equals(that.family) : that.family != null) return false;
            if (this.proxyConfiguration != null ? !this.proxyConfiguration.equals(that.proxyConfiguration) : that.proxyConfiguration != null) return false;
            if (this.taskRole != null ? !this.taskRole.equals(that.taskRole) : that.taskRole != null) return false;
            return this.volumes != null ? this.volumes.equals(that.volumes) : that.volumes == null;
        }

        @Override
        public final int hashCode() {
            int result = this.keycloak != null ? this.keycloak.hashCode() : 0;
            result = 31 * result + (this.inferenceAccelerators != null ? this.inferenceAccelerators.hashCode() : 0);
            result = 31 * result + (this.ipcMode != null ? this.ipcMode.hashCode() : 0);
            result = 31 * result + (this.networkMode != null ? this.networkMode.hashCode() : 0);
            result = 31 * result + (this.pidMode != null ? this.pidMode.hashCode() : 0);
            result = 31 * result + (this.placementConstraints != null ? this.placementConstraints.hashCode() : 0);
            result = 31 * result + (this.executionRole != null ? this.executionRole.hashCode() : 0);
            result = 31 * result + (this.family != null ? this.family.hashCode() : 0);
            result = 31 * result + (this.proxyConfiguration != null ? this.proxyConfiguration.hashCode() : 0);
            result = 31 * result + (this.taskRole != null ? this.taskRole.hashCode() : 0);
            result = 31 * result + (this.volumes != null ? this.volumes.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy