<?php /** * StreamCommand * * PHP version 5 * * @category Class * @package HelixWebServices * @author http://github.com/swagger-api/swagger-codegen * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ /** * Copyright 2015 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ namespace HelixWebServices\Model; use \ArrayAccess; /** * StreamCommand Class Doc Comment * * @category Class * @description The Perforce stream specification defines a single stream.\n\nStreams are hierarchical branches with policies that control the structure and the flow of change.\nStream hierarchies are based on the stability of the streams, specified by the type you assign to the stream.\nDevelopment streams are least stable (most subject to change), mainline streams are somewhat stable, and release streams are highly stable.\nVirtual streams can be used to copy and merge between parent and child streams without storing local data.\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.\n\nStream contents are defined by the paths that you map.\nBy default, a stream has the same structure as its parent (the stream from which it was branched), but you can override the structure, for example to ensure that specified files cannot be submitted or integrated to other streams. * @package HelixWebServices * @author http://github.com/swagger-api/swagger-codegen * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ class StreamCommand implements ArrayAccess { /** * Array of property to type mappings. Used for (de)serialization * @var string[] */ static $swaggerTypes = array( 'stream' => 'string', 'update' => '\DateTime', 'access' => '\DateTime', 'owner' => 'string', 'name' => 'string', 'parent' => 'string', 'type' => 'string', 'description' => 'string', 'options' => 'string', 'paths' => 'string[]', 'remapped' => 'string[]', 'ignored' => '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', 'paths' => 'paths', 'remapped' => 'remapped', 'ignored' => 'ignored' ); /** * 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', 'paths' => 'setPaths', 'remapped' => 'setRemapped', 'ignored' => 'setIgnored' ); /** * 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', 'paths' => 'getPaths', 'remapped' => 'getRemapped', 'ignored' => 'getIgnored' ); /** * $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; /** * $paths Paths define how files are incorporated into the stream structure.\nSpecify paths using the following format:\n`path_type view_path [depot_path]`\nwhere `path_type` is a single keyword, `view_path` is a file path with no leading slashes, and the optional `depot_path` is a file path beginning with //.\n\nThe default path is `share ...`\n\nValid path types are:\n\n- `share view_path`: Specified files can be synced, submitted, and integrated to and from the parent stream.\n\n- `isolate view_path`: Specified files can be synced and submitted, but cannot be integrated to and from the parent stream.\n\n- `import view_path [depot_path]`: Specified files can be synced, but cannot be submitted or integrated to and from the parent stream.\nThe `view_path` is mapped as in the parent stream's view, or to an (optional) `depot_path`.\nThe `depot_path` may include a changelist specifier.\nThat stream's client workspaces will be limited to seeing revisions at that change or lower within that depot path.\nFor example, you can specify a depot path like this: `//depot/import/...@1000`.\nRevisions from changelists greater than 1000 will be automatically hidden from most commands.\nThe changelist limits in effect for a given stream workspace are displayed in a read-only client workspace specification field called ChangeView.\n\n- `import+ view_path [depot_path]`:\nFunctions like a standard import path, enabling you to map a path from outside the stream depot to your stream, but unlike a standard import path, you can submit changes to the files in an import+ path.\n\n- `exclude view_path`:\nSpecified files cannot be synced, submitted or integrated to and from the parent stream.\nBy default, streams inherit their structure from the parent stream (except mainlines, which have no parent).\nPaths are inherited by child stream views; a child stream’s path can downgrade the inherited view, but not upgrade it.\n(For example, a child stream can downgrade a shared path to an isolated path, but if the parent stream defines a path as isolated, its child cannot restore full access by specifying the path as shared.)\nNote that the `depot_path` is relevant only when the path_type is `import` or `import+`. * @var string[] */ protected $paths; /** * $remapped Reassigns the location of workspace files.\nTo specify the source path and its location in the workspace, use the following syntax:\n`view_path_1 view_path_2`\nwhere `view_path_1` and `view_path_2` are Perforce view paths (omit leading slashes and leading or embedded wildcards; terminal wildcards are fine).\nFor example, to ensure that files are synced to the local ProjectX folder, remap as follows:\n`... projectX/...`\nLine ordering in the Remapped: field is significant: if more than one line remaps the same files, the later line takes precedence.\nRemappings are inherited by child streams and the workspaces associated with them. * @var string[] */ protected $remapped; /** * $ignored A list of file or directory names to be ignored in client views. For example:\n\n```\n/tmp # ignores files named \"tmp\"\n/tmp/... # ignores directories named \"tmp\"\n.tmp # ignores file names ending in .tmp\n```\n\nLines in the `Ignored:` field can appear in any order.\nIgnored files and directories are inherited by child stream client views. * @var string[] */ protected $ignored; /** * 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"]; } if (isset($data["paths"])) { $this->paths = $data["paths"]; } if (isset($data["remapped"])) { $this->remapped = $data["remapped"]; } if (isset($data["ignored"])) { $this->ignored = $data["ignored"]; } } } /** * 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; } /** * Gets paths * @return string[] */ public function getPaths() { return $this->paths; } /** * Sets paths * @param string[] $paths Paths define how files are incorporated into the stream structure.\nSpecify paths using the following format:\n`path_type view_path [depot_path]`\nwhere `path_type` is a single keyword, `view_path` is a file path with no leading slashes, and the optional `depot_path` is a file path beginning with //.\n\nThe default path is `share ...`\n\nValid path types are:\n\n- `share view_path`: Specified files can be synced, submitted, and integrated to and from the parent stream.\n\n- `isolate view_path`: Specified files can be synced and submitted, but cannot be integrated to and from the parent stream.\n\n- `import view_path [depot_path]`: Specified files can be synced, but cannot be submitted or integrated to and from the parent stream.\nThe `view_path` is mapped as in the parent stream's view, or to an (optional) `depot_path`.\nThe `depot_path` may include a changelist specifier.\nThat stream's client workspaces will be limited to seeing revisions at that change or lower within that depot path.\nFor example, you can specify a depot path like this: `//depot/import/...@1000`.\nRevisions from changelists greater than 1000 will be automatically hidden from most commands.\nThe changelist limits in effect for a given stream workspace are displayed in a read-only client workspace specification field called ChangeView.\n\n- `import+ view_path [depot_path]`:\nFunctions like a standard import path, enabling you to map a path from outside the stream depot to your stream, but unlike a standard import path, you can submit changes to the files in an import+ path.\n\n- `exclude view_path`:\nSpecified files cannot be synced, submitted or integrated to and from the parent stream.\nBy default, streams inherit their structure from the parent stream (except mainlines, which have no parent).\nPaths are inherited by child stream views; a child stream’s path can downgrade the inherited view, but not upgrade it.\n(For example, a child stream can downgrade a shared path to an isolated path, but if the parent stream defines a path as isolated, its child cannot restore full access by specifying the path as shared.)\nNote that the `depot_path` is relevant only when the path_type is `import` or `import+`. * @return $this */ public function setPaths($paths) { $this->paths = $paths; return $this; } /** * Gets remapped * @return string[] */ public function getRemapped() { return $this->remapped; } /** * Sets remapped * @param string[] $remapped Reassigns the location of workspace files.\nTo specify the source path and its location in the workspace, use the following syntax:\n`view_path_1 view_path_2`\nwhere `view_path_1` and `view_path_2` are Perforce view paths (omit leading slashes and leading or embedded wildcards; terminal wildcards are fine).\nFor example, to ensure that files are synced to the local ProjectX folder, remap as follows:\n`... projectX/...`\nLine ordering in the Remapped: field is significant: if more than one line remaps the same files, the later line takes precedence.\nRemappings are inherited by child streams and the workspaces associated with them. * @return $this */ public function setRemapped($remapped) { $this->remapped = $remapped; return $this; } /** * Gets ignored * @return string[] */ public function getIgnored() { return $this->ignored; } /** * Sets ignored * @param string[] $ignored A list of file or directory names to be ignored in client views. For example:\n\n```\n/tmp # ignores files named \"tmp\"\n/tmp/... # ignores directories named \"tmp\"\n.tmp # ignores file names ending in .tmp\n```\n\nLines in the `Ignored:` field can appear in any order.\nIgnored files and directories are inherited by child stream client views. * @return $this */ public function setIgnored($ignored) { $this->ignored = $ignored; 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)); } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19553 | swellard | Move and rename clients | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/php/HelixWebServices/lib/Model/StreamCommand.php | |||||
#3 | 19237 | tjuricek |
Branch specs test for PHP Client SDK The default template didn't check isset(), so added that to the constructor initialization on models. |
||
#2 | 19098 | tjuricek |
JavaScript Client SDK labels spec CRUD tests. Identified another parameter naming conflict, which only pops up in the javaScript client because I didn't choose to automatically rename parameters for people. (I don't think it's a good idea to just say "label0", "label1", etc., especially when they're different types.) |
||
#1 | 18811 | tjuricek | Initial PHP client SDK for Helix Web Services. |