'string', 'update' => '\DateTime', 'access' => '\DateTime', 'owner' => 'string', 'name' => 'string', 'parent' => 'string', 'type' => 'string', 'description' => 'string', 'options' => 'string' ); /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ static $attributeMap = array( 'stream' => 'stream', 'update' => 'update', 'access' => 'access', 'owner' => 'owner', 'name' => 'name', 'parent' => 'parent', 'type' => 'type', 'description' => 'description', 'options' => 'options' ); /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] */ static $setters = array( 'stream' => 'setStream', 'update' => 'setUpdate', 'access' => 'setAccess', 'owner' => 'setOwner', 'name' => 'setName', 'parent' => 'setParent', 'type' => 'setType', 'description' => 'setDescription', 'options' => 'setOptions' ); /** * Array of attributes to getter functions (for serialization of requests) * @var string[] */ static $getters = array( 'stream' => 'getStream', 'update' => 'getUpdate', 'access' => 'getAccess', 'owner' => 'getOwner', 'name' => 'getName', 'parent' => 'getParent', 'type' => 'getType', 'description' => 'getDescription', 'options' => 'getOptions' ); /** * $stream Specifies the stream's name (permanent identifier) and its path in the stream depot, in the form `//depotname/streamname`. * @var string */ protected $stream; /** * $update The date the stream specification was last modified. * @var \DateTime */ protected $update; /** * $access The date and time that the stream specification was last accessed by any Perforce command. * @var \DateTime */ protected $access; /** * $owner The Perforce user or group who owns the stream.\nThe default is the user who created the stream. * @var string */ protected $owner; /** * $name Display name of the stream.\nUnlike the Stream: field, this field can be modified.\nDefaults to the streamname portion of the stream path. * @var string */ protected $name; /** * $parent The parent of this stream.\nMust be none if the stream's `Type:` is mainline, otherwise must be set to an existing stream identifier of the form `//depotname/streamname`. * @var string */ protected $parent; /** * $type The stream’s type determines the expected flow of change.\nValid stream types are `mainline`, `virtual`, `development`, and `release`.\n\n- `mainline`:\nThe mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream.\n\n- `virtual`:\nVirtual streams allow merging and copying between parent and child streams without storing local data.\nData is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view.\nBecause virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream.\n\n- `release`:\nMore stable than the mainline.\nRelease streams copy from the parent and merge to the parent.\n\n- `development`:\nLess stable than the mainline.\nDevelopment streams expect to merge from parent streams and copy to the parent.\n\n- `task`:\nTask streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data.\nBecause branched (copied) files are tracked in a set of shadow tables which are later removed, repository metadata is kept to a minimum when using this type of stream.\nWorkspaces associated with task streams see all branched data, but only modified and promoted data is visible to users with access to the stream’s namespace.\nThe default is stream type is development. * @var string */ protected $type; /** * $description Description of the stream. * @var string */ protected $description; /** * $options Settings that configure stream behavior as follows:\n\n- `[un]locked`:\nEnable/disable other users' ability to edit or delete the stream.\nIf locked, the stream specification cannot be deleted, and only its owner can modify it.\nThe default is unlocked.\n\n- `[all|owner]submit`:\nSpecifies whether all users or only the owner of the stream can submit changes to the stream.\nThe default is allsubmit.\nIf the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream.\n\n- `[no]toparent`:\nSpecifies whether integrations from the stream to its parent are expected.\nThe default is toparent.\n\n- `[no]fromparent`:\nSpecifies whether integrations to the stream from its parent are expected.\nThe default is fromparent for mainline and development streams, and nofromparent for release streams.\n\n- `mergeany | mergedown`:\nSpecifies whether the merge flow is restricted or whether merge is permitted from any other stream.\nFor example, the mergeany option would allow a merge from a child to a parent with no warnings.\nA virtual stream must have its flow options set to notoparent and nofromparent.\nFlow options are ignored for mainline streams. * @var string */ protected $options; /** * Constructor * @param mixed[] $data Associated array of property value initalizing the model */ public function __construct(array $data = null) { if ($data != null) { if (isset($data["stream"])) { $this->stream = $data["stream"]; } 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["name"])) { $this->name = $data["name"]; } if (isset($data["parent"])) { $this->parent = $data["parent"]; } if (isset($data["type"])) { $this->type = $data["type"]; } if (isset($data["description"])) { $this->description = $data["description"]; } if (isset($data["options"])) { $this->options = $data["options"]; } } } /** * Gets stream * @return string */ public function getStream() { return $this->stream; } /** * Sets stream * @param string $stream Specifies the stream's name (permanent identifier) and its path in the stream depot, in the form `//depotname/streamname`. * @return $this */ public function setStream($stream) { $this->stream = $stream; return $this; } /** * Gets update * @return \DateTime */ public function getUpdate() { return $this->update; } /** * Sets update * @param \DateTime $update The date the stream 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 that the stream specification was last accessed by any Perforce command. * @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 Perforce user or group who owns the stream.\nThe default is the user who created the stream. * @return $this */ public function setOwner($owner) { $this->owner = $owner; return $this; } /** * Gets name * @return string */ public function getName() { return $this->name; } /** * Sets name * @param string $name Display name of the stream.\nUnlike the Stream: field, this field can be modified.\nDefaults to the streamname portion of the stream path. * @return $this */ public function setName($name) { $this->name = $name; return $this; } /** * Gets parent * @return string */ public function getParent() { return $this->parent; } /** * Sets parent * @param string $parent The parent of this stream.\nMust be none if the stream's `Type:` is mainline, otherwise must be set to an existing stream identifier of the form `//depotname/streamname`. * @return $this */ public function setParent($parent) { $this->parent = $parent; return $this; } /** * Gets type * @return string */ public function getType() { return $this->type; } /** * Sets type * @param string $type The stream’s type determines the expected flow of change.\nValid stream types are `mainline`, `virtual`, `development`, and `release`.\n\n- `mainline`:\nThe mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream.\n\n- `virtual`:\nVirtual streams allow merging and copying between parent and child streams without storing local data.\nData is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view.\nBecause virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream.\n\n- `release`:\nMore stable than the mainline.\nRelease streams copy from the parent and merge to the parent.\n\n- `development`:\nLess stable than the mainline.\nDevelopment streams expect to merge from parent streams and copy to the parent.\n\n- `task`:\nTask streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data.\nBecause branched (copied) files are tracked in a set of shadow tables which are later removed, repository metadata is kept to a minimum when using this type of stream.\nWorkspaces associated with task streams see all branched data, but only modified and promoted data is visible to users with access to the stream’s namespace.\nThe default is stream type is development. * @return $this */ public function setType($type) { $this->type = $type; return $this; } /** * Gets description * @return string */ public function getDescription() { return $this->description; } /** * Sets description * @param string $description Description of the stream. * @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 Settings that configure stream behavior as follows:\n\n- `[un]locked`:\nEnable/disable other users' ability to edit or delete the stream.\nIf locked, the stream specification cannot be deleted, and only its owner can modify it.\nThe default is unlocked.\n\n- `[all|owner]submit`:\nSpecifies whether all users or only the owner of the stream can submit changes to the stream.\nThe default is allsubmit.\nIf the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream.\n\n- `[no]toparent`:\nSpecifies whether integrations from the stream to its parent are expected.\nThe default is toparent.\n\n- `[no]fromparent`:\nSpecifies whether integrations to the stream from its parent are expected.\nThe default is fromparent for mainline and development streams, and nofromparent for release streams.\n\n- `mergeany | mergedown`:\nSpecifies whether the merge flow is restricted or whether merge is permitted from any other stream.\nFor example, the mergeany option would allow a merge from a child to a parent with no warnings.\nA virtual stream must have its flow options set to notoparent and nofromparent.\nFlow options are ignored for mainline streams. * @return $this */ public function setOptions($options) { $this->options = $options; 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)); } } }