public GetPolicyResult withPolicy(String policy) {
        setPolicy(policy);
        return this;
    }
<p>
The JSON-formatted resource-based policy attached to the <code>ProfilingGroup</code>.
</p>

@param policy
       The JSON-formatted resource-based policy attached to the <code>ProfilingGroup</code>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-codeguruprofiler/src/main/java/com/amazonaws/services/codeguruprofiler/model/GetPolicyResult.java