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

software.amazon.awscdk.services.ecs.CfnPrimaryTaskSetProps Maven / Gradle / Ivy

package software.amazon.awscdk.services.ecs;

/**
 * Properties for defining a `AWS::ECS::PrimaryTaskSet`.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.31.0 (build 6fa403d)", date = "2021-07-21T15:56:51.162Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.CfnPrimaryTaskSetProps")
@software.amazon.jsii.Jsii.Proxy(CfnPrimaryTaskSetProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnPrimaryTaskSetProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * `AWS::ECS::PrimaryTaskSet.Cluster`.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getCluster();

    /**
     * `AWS::ECS::PrimaryTaskSet.Service`.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getService();

    /**
     * `AWS::ECS::PrimaryTaskSet.TaskSetId`.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getTaskSetId();

    /**
     * @return a {@link Builder} of {@link CfnPrimaryTaskSetProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link CfnPrimaryTaskSetProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static final class Builder implements software.amazon.jsii.Builder {
        private java.lang.String cluster;
        private java.lang.String service;
        private java.lang.String taskSetId;

        /**
         * Sets the value of {@link CfnPrimaryTaskSetProps#getCluster}
         * @param cluster `AWS::ECS::PrimaryTaskSet.Cluster`. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder cluster(java.lang.String cluster) {
            this.cluster = cluster;
            return this;
        }

        /**
         * Sets the value of {@link CfnPrimaryTaskSetProps#getService}
         * @param service `AWS::ECS::PrimaryTaskSet.Service`. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder service(java.lang.String service) {
            this.service = service;
            return this;
        }

        /**
         * Sets the value of {@link CfnPrimaryTaskSetProps#getTaskSetId}
         * @param taskSetId `AWS::ECS::PrimaryTaskSet.TaskSetId`. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder taskSetId(java.lang.String taskSetId) {
            this.taskSetId = taskSetId;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link CfnPrimaryTaskSetProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @Override
        public CfnPrimaryTaskSetProps build() {
            return new Jsii$Proxy(cluster, service, taskSetId);
        }
    }

    /**
     * An implementation for {@link CfnPrimaryTaskSetProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnPrimaryTaskSetProps {
        private final java.lang.String cluster;
        private final java.lang.String service;
        private final java.lang.String taskSetId;

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

        @Override
        public final java.lang.String getCluster() {
            return this.cluster;
        }

        @Override
        public final java.lang.String getService() {
            return this.service;
        }

        @Override
        public final java.lang.String getTaskSetId() {
            return this.taskSetId;
        }

        @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("cluster", om.valueToTree(this.getCluster()));
            data.set("service", om.valueToTree(this.getService()));
            data.set("taskSetId", om.valueToTree(this.getTaskSetId()));

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

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

            if (!cluster.equals(that.cluster)) return false;
            if (!service.equals(that.service)) return false;
            return this.taskSetId.equals(that.taskSetId);
        }

        @Override
        public final int hashCode() {
            int result = this.cluster.hashCode();
            result = 31 * result + (this.service.hashCode());
            result = 31 * result + (this.taskSetId.hashCode());
            return result;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy