code: public BoxLegalHoldAssignment.Info assignTo(BoxResource resource) {
          return BoxLegalHoldAssignment.create(
                  this.getAPI(), this.getID(), BoxResource.getResourceType(resource.getClass()), resource.getID());
      }
docs: Assigns this legal holds policy to the given box resource.
  Currently only {@link BoxFile}, {@link BoxFileVersion}, {@link BoxFolder} and {@link BoxUser} are supported.
  @param resource the box resource to assign legal hold policy to.
  @return info about created legal hold policy assignment.