public AwsEcsTaskDefinitionContainerDefinitionsDetails withPortMappings(AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails... portMappings) {
        if (this.portMappings == null) {
            setPortMappings(new java.util.ArrayList<AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails>(portMappings.length));
        }
        for (AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails ele : portMappings) {
            this.portMappings.add(ele);
        }
        return this;
    }
<p>
The list of port mappings for the container.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setPortMappings(java.util.Collection)} or {@link #withPortMappings(java.util.Collection)} if you want to
override the existing values.
</p>

@param portMappings
       The list of port mappings for the container.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsEcsTaskDefinitionContainerDefinitionsDetails.java