public ListMetricsResult withOwningAccounts(java.util.Collection<String> owningAccounts) {
        setOwningAccounts(owningAccounts);
        return this;
    }
<p>
If you are using this operation in a monitoring account, this array contains the account IDs of the source
accounts where the metrics in the returned data are from.
</p>
<p>
This field is a 1:1 mapping between each metric that is returned and the ID of the owning account.
</p>

@param owningAccounts
       If you are using this operation in a monitoring account, this array contains the account IDs of the source
       accounts where the metrics in the returned data are from.</p>
       <p>
       This field is a 1:1 mapping between each metric that is returned and the ID of the owning account.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/ListMetricsResult.java