public CreateLinkRequest withResourceTypes(String... resourceTypes) {
        if (this.resourceTypes == null) {
            setResourceTypes(new java.util.ArrayList<String>(resourceTypes.length));
        }
        for (String ele : resourceTypes) {
            this.resourceTypes.add(ele);
        }
        return this;
    }
<p>
An array of strings that define which types of data that the source account shares with the monitoring account.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setResourceTypes(java.util.Collection)} or {@link #withResourceTypes(java.util.Collection)} if you want
to override the existing values.
</p>

@param resourceTypes
       An array of strings that define which types of data that the source account shares with the monitoring
       account.
@return Returns a reference to this object so that method calls can be chained together.
@see ResourceType
aws-java-sdk-oam/src/main/java/com/amazonaws/services/oam/model/CreateLinkRequest.java