'string', 'update' => '\DateTime', 'access' => '\DateTime', 'owner' => 'string', 'options' => 'string', 'description' => 'string' ); /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ static $attributeMap = array( 'label' => 'label', 'update' => 'update', 'access' => 'access', 'owner' => 'owner', 'options' => 'options', 'description' => 'description' ); /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] */ static $setters = array( 'label' => 'setLabel', 'update' => 'setUpdate', 'access' => 'setAccess', 'owner' => 'setOwner', 'options' => 'setOptions', 'description' => 'setDescription' ); /** * Array of attributes to getter functions (for serialization of requests) * @var string[] */ static $getters = array( 'label' => 'getLabel', 'update' => 'getUpdate', 'access' => 'getAccess', 'owner' => 'getOwner', 'options' => 'getOptions', 'description' => 'getDescription' ); /** * $label The label name. * @var string */ protected $label; /** * $update The date the label specification was last modified. * @var \DateTime */ protected $update; /** * $access The date and time the label was last accessed, either by running p4 labelsync on the label, or by otherwise referring to a file with the label revision specifier @label.\n(Note: Reloading a label with p4 reload does not affect the access time.) * @var \DateTime */ protected $access; /** * $owner The label’s owner.\nBy default, the user who created the label.\nOnly the owner of a label can update which files are tagged with the label.\n\nThe specified owner does not have to be a Perforce user.\nYou might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user. * @var string */ protected $owner; /** * $options Options to control behavior and storage location of labels.\n\n- locked or unlocked: If the label is locked, the list of files tagged with the label cannot be changed with p4 labelsync.\n\n- autoreload or noautoreload. For static labels, if noautoreload is set, the label is stored in db.label, and if autoreload is set, it is stored in the unload depot. This option is ignored for automatic labels. Storing labels in the unload depot can improve performance on sites that make extremely heavy use of labels. * @var string */ protected $options; /** * $description An optional description of the label’s purpose. * @var string */ protected $description; /** * Constructor * @param mixed[] $data Associated array of property value initalizing the model */ public function __construct(array $data = null) { if ($data != null) { if (isset($data["label"])) { $this->label = $data["label"]; } if (isset($data["update"])) { $this->update = $data["update"]; } if (isset($data["access"])) { $this->access = $data["access"]; } if (isset($data["owner"])) { $this->owner = $data["owner"]; } if (isset($data["options"])) { $this->options = $data["options"]; } if (isset($data["description"])) { $this->description = $data["description"]; } } } /** * Gets label * @return string */ public function getLabel() { return $this->label; } /** * Sets label * @param string $label The label name. * @return $this */ public function setLabel($label) { $this->label = $label; return $this; } /** * Gets update * @return \DateTime */ public function getUpdate() { return $this->update; } /** * Sets update * @param \DateTime $update The date the label specification was last modified. * @return $this */ public function setUpdate($update) { $this->update = $update; return $this; } /** * Gets access * @return \DateTime */ public function getAccess() { return $this->access; } /** * Sets access * @param \DateTime $access The date and time the label was last accessed, either by running p4 labelsync on the label, or by otherwise referring to a file with the label revision specifier @label.\n(Note: Reloading a label with p4 reload does not affect the access time.) * @return $this */ public function setAccess($access) { $this->access = $access; return $this; } /** * Gets owner * @return string */ public function getOwner() { return $this->owner; } /** * Sets owner * @param string $owner The label’s owner.\nBy default, the user who created the label.\nOnly the owner of a label can update which files are tagged with the label.\n\nThe specified owner does not have to be a Perforce user.\nYou might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user. * @return $this */ public function setOwner($owner) { $this->owner = $owner; return $this; } /** * Gets options * @return string */ public function getOptions() { return $this->options; } /** * Sets options * @param string $options Options to control behavior and storage location of labels.\n\n- locked or unlocked: If the label is locked, the list of files tagged with the label cannot be changed with p4 labelsync.\n\n- autoreload or noautoreload. For static labels, if noautoreload is set, the label is stored in db.label, and if autoreload is set, it is stored in the unload depot. This option is ignored for automatic labels. Storing labels in the unload depot can improve performance on sites that make extremely heavy use of labels. * @return $this */ public function setOptions($options) { $this->options = $options; return $this; } /** * Gets description * @return string */ public function getDescription() { return $this->description; } /** * Sets description * @param string $description An optional description of the label’s purpose. * @return $this */ public function setDescription($description) { $this->description = $description; return $this; } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) { return isset($this->$offset); } /** * Gets offset. * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) { return $this->$offset; } /** * Sets value based on offset. * @param integer $offset Offset * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) { $this->$offset = $value; } /** * Unsets offset. * @param integer $offset Offset * @return void */ public function offsetUnset($offset) { unset($this->$offset); } /** * Gets the string presentation of the object * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { return json_encode(get_object_vars($this), JSON_PRETTY_PRINT); } else { return json_encode(get_object_vars($this)); } } }