public BatchWriteOperation withDetachPolicy(BatchDetachPolicy detachPolicy) {
        setDetachPolicy(detachPolicy);
        return this;
    }
<p>
Detaches a policy from a <a>Directory</a>.
</p>

@param detachPolicy
       Detaches a policy from a <a>Directory</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-clouddirectory/src/main/java/com/amazonaws/services/clouddirectory/model/BatchWriteOperation.java