public SendHeartbeatRequest withAgentMetrics(EdgeMetric... agentMetrics) {
        if (this.agentMetrics == null) {
            setAgentMetrics(new java.util.ArrayList<EdgeMetric>(agentMetrics.length));
        }
        for (EdgeMetric ele : agentMetrics) {
            this.agentMetrics.add(ele);
        }
        return this;
    }
<p>
For internal use. Returns a list of SageMaker Edge Manager agent operating metrics.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setAgentMetrics(java.util.Collection)} or {@link #withAgentMetrics(java.util.Collection)} if you want to
override the existing values.
</p>

@param agentMetrics
       For internal use. Returns a list of SageMaker Edge Manager agent operating metrics.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-sagemakeredgemanager/src/main/java/com/amazonaws/services/sagemakeredgemanager/model/SendHeartbeatRequest.java