'string', 'owner' => 'string', 'update' => '\DateTime', 'access' => '\DateTime', 'description' => 'string', 'options' => 'string', 'revision' => 'string', 'view' => 'string[]', 'server_id' => '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', 'owner' => 'owner', 'update' => 'update', 'access' => 'access', 'description' => 'description', 'options' => 'options', 'revision' => 'revision', 'view' => 'view', 'server_id' => 'serverID' ); /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] */ static $setters = array( 'label' => 'setLabel', 'owner' => 'setOwner', 'update' => 'setUpdate', 'access' => 'setAccess', 'description' => 'setDescription', 'options' => 'setOptions', 'revision' => 'setRevision', 'view' => 'setView', 'server_id' => 'setServerId' ); /** * Array of attributes to getter functions (for serialization of requests) * @var string[] */ static $getters = array( 'label' => 'getLabel', 'owner' => 'getOwner', 'update' => 'getUpdate', 'access' => 'getAccess', 'description' => 'getDescription', 'options' => 'getOptions', 'revision' => 'getRevision', 'view' => 'getView', 'server_id' => 'getServerId' ); /** * $label The label name. * @var string */ protected $label; /** * $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; /** * $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; /** * $description An optional description of the label’s purpose. * @var string */ protected $description; /** * $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; /** * $revision An optional revision specification for an automatic label.\n\nIf you use the # character to specify a revision number, you must use quotes around it in order to ensure that the # is parsed as a revision specifier, and not as a comment field in the form. * @var string */ protected $revision; /** * $view A list of depot files that can be tagged with this label.\nNo files are actually tagged until `p4 labelsync` is invoked.\n\nUnlike client views or branch views, which map one set of files to another, label views consist of a simple list of depot files. * @var string[] */ protected $view; /** * $server_id If set, restricts usage of the label to the named server.\nIf unset, this label may be used on any server. * @var string */ protected $server_id; /** * 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["owner"])) { $this->owner = $data["owner"]; } if (isset($data["update"])) { $this->update = $data["update"]; } if (isset($data["access"])) { $this->access = $data["access"]; } if (isset($data["description"])) { $this->description = $data["description"]; } if (isset($data["options"])) { $this->options = $data["options"]; } if (isset($data["revision"])) { $this->revision = $data["revision"]; } if (isset($data["view"])) { $this->view = $data["view"]; } if (isset($data["server_id"])) { $this->server_id = $data["server_id"]; } } } /** * 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 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 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 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; } /** * 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 revision * @return string */ public function getRevision() { return $this->revision; } /** * Sets revision * @param string $revision An optional revision specification for an automatic label.\n\nIf you use the # character to specify a revision number, you must use quotes around it in order to ensure that the # is parsed as a revision specifier, and not as a comment field in the form. * @return $this */ public function setRevision($revision) { $this->revision = $revision; return $this; } /** * Gets view * @return string[] */ public function getView() { return $this->view; } /** * Sets view * @param string[] $view A list of depot files that can be tagged with this label.\nNo files are actually tagged until `p4 labelsync` is invoked.\n\nUnlike client views or branch views, which map one set of files to another, label views consist of a simple list of depot files. * @return $this */ public function setView($view) { $this->view = $view; return $this; } /** * Gets server_id * @return string */ public function getServerId() { return $this->server_id; } /** * Sets server_id * @param string $server_id If set, restricts usage of the label to the named server.\nIf unset, this label may be used on any server. * @return $this */ public function setServerId($server_id) { $this->server_id = $server_id; 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)); } } }