public DeregisterWorkspaceDirectoryRequest withDirectoryId(String directoryId) {
        setDirectoryId(directoryId);
        return this;
    }
<p>
The identifier of the directory. If any WorkSpaces are registered to this directory, you must remove them before
you deregister the directory, or you will receive an OperationNotSupportedException error.
</p>

@param directoryId
       The identifier of the directory. If any WorkSpaces are registered to this directory, you must remove them
       before you deregister the directory, or you will receive an OperationNotSupportedException error.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-workspaces/src/main/java/com/amazonaws/services/workspaces/model/DeregisterWorkspaceDirectoryRequest.java