label = $label; } /** * Gets the keys for all the properties of this object. * * @return string[] */ public function getPropertyKeys() { return ['externalId', 'label', 'mandatory', 'defaultValue', 'type', 'validation', 'restrictions']; } /** * Returns the type of this field. * * @return string The type name. */ public function getType() { return $this->type; } /** * Gets the default value of this field. * * @return mixed */ public function getDefaultValue() { return $this->defaultValue; } /** * Sets the default value of this field. * * @param mixed $defaultValue */ public function setDefaultValue($defaultValue) { $this->defaultValue = $defaultValue; } /** * Gets the ID of this field. * * @return string The field ID. */ public function getExternalId() { return $this->externalId; } /** * Sets the ID of the string (auto-generated if this is left blank). * * @param string $externalId The ID to set. */ public function setExternalId($externalId) { $this->externalId = $externalId; } /** * Gets the label of this field. * * @return string The label of the field. */ public function getLabel() { return $this->label; } /** * Sets the label of this field. * * @param string $label The label to set. */ public function setLabel($label) { $this->label = $label; } /** * Gets a boolean indicating whether this fields is currently mandatory. * * @return bool A boolean indicating whether the field is mandatory. */ public function getMandatory() { return $this->mandatory; } /** * Sets whether this field needs to be mandatory. * * @param bool $mandatory A boolean indicating whether the field should be mandatory. */ public function setMandatory($mandatory) { $this->mandatory = $mandatory; } /** * Gets the validation rules of this field. * * @return MetadataValidation The validation rules. */ public function getValidation() { return $this->validation; } /** * Sets the validation rules of this field. * * @param MetadataValidation $validation The rules to set. */ public function setValidation(MetadataValidation $validation) { $this->validation = $validation; } /** * Gets the restrictions of this field. * * @return array */ public function getRestrictions() { return $this->restrictions; } /** * Sets the restrictions of this field. * * @param array $restrictions */ public function setRestrictions($restrictions) { $this->restrictions = $restrictions; } }