public MetricV2 withName(String name) {
        setName(name);
        return this;
    }
<p>
The name of the metric.
</p>
<important>
<p>
This parameter is required. The following Required = No is incorrect.
</p>
</important>

@param name
       The name of the metric.</p> <important>
       <p>
       This parameter is required. The following Required = No is incorrect.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/MetricV2.java