public ContainerDefinitionInput withEnvironment(ContainerEnvironment... environment) {
        if (this.environment == null) {
            setEnvironment(new java.util.ArrayList<ContainerEnvironment>(environment.length));
        }
        for (ContainerEnvironment ele : environment) {
            this.environment.add(ele);
        }
        return this;
    }
<p>
A set of environment variables to pass to the container on startup. See the <a href=
"https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-environment"
>ContainerDefinition::environment</a> parameter in the <i>Amazon Elastic Container Service API Reference</i>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEnvironment(java.util.Collection)} or {@link #withEnvironment(java.util.Collection)} if you want to
override the existing values.
</p>

@param environment
       A set of environment variables to pass to the container on startup. See the <a href=
       "https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-environment"
       >ContainerDefinition::environment</a> parameter in the <i>Amazon Elastic Container Service API
       Reference</i>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/ContainerDefinitionInput.java