public Deployment withServiceConnectResources(ServiceConnectServiceResource... serviceConnectResources) {
        if (this.serviceConnectResources == null) {
            setServiceConnectResources(new com.amazonaws.internal.SdkInternalList<ServiceConnectServiceResource>(serviceConnectResources.length));
        }
        for (ServiceConnectServiceResource ele : serviceConnectResources) {
            this.serviceConnectResources.add(ele);
        }
        return this;
    }
<p>
The list of Service Connect resources that are associated with this deployment. Each list entry maps a discovery
name to a Cloud Map service name.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setServiceConnectResources(java.util.Collection)} or
{@link #withServiceConnectResources(java.util.Collection)} if you want to override the existing values.
</p>

@param serviceConnectResources
       The list of Service Connect resources that are associated with this deployment. Each list entry maps a
       discovery name to a Cloud Map service name.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/Deployment.java