public TestAuthorizationRequest withPolicyNamesToAdd(java.util.Collection<String> policyNamesToAdd) {
        setPolicyNamesToAdd(policyNamesToAdd);
        return this;
    }
<p>
When testing custom authorization, the policies specified here are treated as if they are attached to the
principal being authorized.
</p>

@param policyNamesToAdd
       When testing custom authorization, the policies specified here are treated as if they are attached to the
       principal being authorized.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/TestAuthorizationRequest.java