/** * API Fields description * * @param string|float $version OnApp API version * @param string $className current class' name * * @return array */ public function initFields($version = null, $className = '') { parent::initFields($version, __CLASS__); $this->fields['resource_class'] = array(ONAPP_FIELD_MAP => '_resource_class', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_READ_ONLY => true, ONAPP_FIELD_DEFAULT_VALUE => 'Resource::EdgeGroup'); $this->fields['target_type'] = array(ONAPP_FIELD_MAP => '_target_type', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_READ_ONLY => true, ONAPP_FIELD_DEFAULT_VALUE => 'EdgeGroup'); $this->fields['id'][ONAPP_FIELD_REQUIRED] = false; foreach (array('unit', 'limit', 'limit_type', 'limit_free', 'price_on', 'price_off') as $field) { unset($this->fields[$field]); } return $this->fields; }
/** * API Fields description * * @param string|float $version OnApp API version * @param string $className current class' name * * @return array */ public function initFields($version = null, $className = '') { parent::initFields($version, __CLASS__); $this->fields['resource_class'] = array(ONAPP_FIELD_MAP => '_resource_class', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_READ_ONLY => true, ONAPP_FIELD_DEFAULT_VALUE => 'Resource::Cpu'); return $this->fields; }