public CrossAccountResource withEndpointId(String endpointId) {
        setEndpointId(endpointId);
        return this;
    }
<p>
The endpoint ID for the endpoint that is listed in a cross-account attachment and can be added to an accelerator
by specified principals.
</p>

@param endpointId
       The endpoint ID for the endpoint that is listed in a cross-account attachment and can be added to an
       accelerator by specified principals.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-globalaccelerator/src/main/java/com/amazonaws/services/globalaccelerator/model/CrossAccountResource.java