@Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getContainerPort() != null)
            sb.append("ContainerPort: ").append(getContainerPort()).append(",");
        if (getHostPort() != null)
            sb.append("HostPort: ").append(getHostPort()).append(",");
        if (getProtocol() != null)
            sb.append("Protocol: ").append(getProtocol()).append(",");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getAppProtocol() != null)
            sb.append("AppProtocol: ").append(getAppProtocol()).append(",");
        if (getContainerPortRange() != null)
            sb.append("ContainerPortRange: ").append(getContainerPortRange());
        sb.append("}");
        return sb.toString();
    }
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
redacted from this string using a placeholder value.

@return A string representation of this object.

@see java.lang.Object#toString()
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/PortMapping.java