/**
  * BaseApiResource constructor.
  * @param array $data
  */
 public function __construct($data = [])
 {
     parent::__construct();
     $this->data[static::FIELD_ID] = array_key_exists('id', $data) ? $data['id'] : null;
     foreach ($data as $key => $value) {
         if (!in_array($key, $this->getReadOnlyFieldNames())) {
             $this->{$key} = $value;
         }
     }
 }
 /**
  * BaseApiOperation constructor.
  * @param $id
  */
 public function __construct($id)
 {
     parent::__construct();
     $this->id = $id;
 }