/**
  * @param Resource $obj
  * @return $this
  */
 public static function fromObject(WarehouseResource $obj)
 {
     $class = get_called_class();
     return new $class($obj->getId(), SubjectClass::fromResource($obj));
 }
 /**
  * @param Resource $resource
  * @return array
  */
 public function addChildParameters(WarehouseResource $resource, $doNotNotify = false)
 {
     return ['parentCollectionId' => $this->getId(), 'childId' => $resource->getId(), 'childClass' => SubjectClass::fromResource($resource), 'doNotNotify' => $doNotNotify];
 }