<?php /** * DepotCommand * * 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; /** * DepotCommand Class Doc Comment * * @category Class * @description The depot specification, which is the shared repository Perforce stores files in. * @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 DepotCommand implements ArrayAccess { /** * Array of property to type mappings. Used for (de)serialization * @var string[] */ static $swaggerTypes = array( 'depot' => 'string', 'owner' => 'string', 'description' => 'string', 'type' => 'string', 'address' => 'string', 'suffix' => 'string', 'stream_depth' => 'string', 'map' => 'string', 'spec_map' => 'string[]' ); /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ static $attributeMap = array( 'depot' => 'depot', 'owner' => 'owner', 'description' => 'description', 'type' => 'type', 'address' => 'address', 'suffix' => 'suffix', 'stream_depth' => 'streamDepth', 'map' => 'map', 'spec_map' => 'specMap' ); /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] */ static $setters = array( 'depot' => 'setDepot', 'owner' => 'setOwner', 'description' => 'setDescription', 'type' => 'setType', 'address' => 'setAddress', 'suffix' => 'setSuffix', 'stream_depth' => 'setStreamDepth', 'map' => 'setMap', 'spec_map' => 'setSpecMap' ); /** * Array of attributes to getter functions (for serialization of requests) * @var string[] */ static $getters = array( 'depot' => 'getDepot', 'owner' => 'getOwner', 'description' => 'getDescription', 'type' => 'getType', 'address' => 'getAddress', 'suffix' => 'getSuffix', 'stream_depth' => 'getStreamDepth', 'map' => 'getMap', 'spec_map' => 'getSpecMap' ); /** * $depot The depot name. * @var string */ protected $depot; /** * $owner The user who owns the depot.\nBy default, this is the user who created the depot.\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; /** * $description A short description of the depot’s purpose. Optional. * @var string */ protected $description; /** * $type `local`, `remote`, `spec`, `stream`, `unload`, `archive` or `tangent`.\n\nA local depot is writable, and is the default depot type.\nFiles reside in the server's root directory and are managed directly by the server.\n\nA stream depot is also writable, but contains streams, a type of branch that includes hierarchy and policy.\n\nA remote depot references files that reside on other servers, and cannot be written to.\n\nThe spec depot, if present, automatically archives edited forms.\n\nThe unload depot, if present, holds infrequently-used metadata (about old client workspaces and labels) that has been unloaded with the p4 unload command.\n\nAn archive depot is used in conjunction with the p4 archive and p4 restore commands to facilitate offline (or near-line) storage of infrequently-accessed revisions, typically large binaries.\n\nA tangent depot defines a read-only location that holds tangents created by the p4 fetch -t command.\nThe tangent depot named tangent is automatically created by p4 fetch -t if one does not already exist. * @var string */ protected $type; /** * $address If the `Type:` is `remote`, the address should be the P4PORT address of the remote server.\nIf the `Type:` is local or spec, this field is ignored. * @var string */ protected $address; /** * $suffix If the Type: is spec, this field holds an optional suffix for generated paths to objects in the spec depot.\n\nThe default suffix is .p4s.\nYou do not need a suffix to use the spec depot, but supplying a file extension to your Perforce server’s versioned specs enables users of GUI client software to associate Perforce specifications with a preferred text editor.\nIf the Type: is local or remote, this field is ignored. * @var string */ protected $suffix; /** * $stream_depth For stream depots, the optional depth to be used for stream paths in the depot, where depth specifies the number of slashes following the depot name of a stream. ]\n\nThis field is used when streams are being created.\nThe default is 1, matching the traditional stream name.\nYou cannot update this value once streams or archive data exist in a depot. * @var string */ protected $stream_depth; /** * $map If the Type: is local, spec, or archive, set the map to point to the relative location of the depot subdirectory.\nThe map must contain the `...` wildcard; for example, a local depot new might have a Map: of `new/...`.\n\nIf the Type: is remote, set the map to point to a location in the remote depot's physical namespace, for example, `//depot/new/rel2/...`.\nThis directory will be the root of the local representation of the remote depot. * @var string */ protected $map; /** * $spec_map For spec depots, an optional description of which specs should be saved, expressed as a view. * @var string[] */ protected $spec_map; /** * Constructor * @param mixed[] $data Associated array of property value initalizing the model */ public function __construct(array $data = null) { if ($data != null) { if (isset($data["depot"])) { $this->depot = $data["depot"]; } if (isset($data["owner"])) { $this->owner = $data["owner"]; } if (isset($data["description"])) { $this->description = $data["description"]; } if (isset($data["type"])) { $this->type = $data["type"]; } if (isset($data["address"])) { $this->address = $data["address"]; } if (isset($data["suffix"])) { $this->suffix = $data["suffix"]; } if (isset($data["stream_depth"])) { $this->stream_depth = $data["stream_depth"]; } if (isset($data["map"])) { $this->map = $data["map"]; } if (isset($data["spec_map"])) { $this->spec_map = $data["spec_map"]; } } } /** * Gets depot * @return string */ public function getDepot() { return $this->depot; } /** * Sets depot * @param string $depot The depot name. * @return $this */ public function setDepot($depot) { $this->depot = $depot; return $this; } /** * Gets owner * @return string */ public function getOwner() { return $this->owner; } /** * Sets owner * @param string $owner The user who owns the depot.\nBy default, this is the user who created the depot.\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 description * @return string */ public function getDescription() { return $this->description; } /** * Sets description * @param string $description A short description of the depot’s purpose. Optional. * @return $this */ public function setDescription($description) { $this->description = $description; return $this; } /** * Gets type * @return string */ public function getType() { return $this->type; } /** * Sets type * @param string $type `local`, `remote`, `spec`, `stream`, `unload`, `archive` or `tangent`.\n\nA local depot is writable, and is the default depot type.\nFiles reside in the server's root directory and are managed directly by the server.\n\nA stream depot is also writable, but contains streams, a type of branch that includes hierarchy and policy.\n\nA remote depot references files that reside on other servers, and cannot be written to.\n\nThe spec depot, if present, automatically archives edited forms.\n\nThe unload depot, if present, holds infrequently-used metadata (about old client workspaces and labels) that has been unloaded with the p4 unload command.\n\nAn archive depot is used in conjunction with the p4 archive and p4 restore commands to facilitate offline (or near-line) storage of infrequently-accessed revisions, typically large binaries.\n\nA tangent depot defines a read-only location that holds tangents created by the p4 fetch -t command.\nThe tangent depot named tangent is automatically created by p4 fetch -t if one does not already exist. * @return $this */ public function setType($type) { $this->type = $type; return $this; } /** * Gets address * @return string */ public function getAddress() { return $this->address; } /** * Sets address * @param string $address If the `Type:` is `remote`, the address should be the P4PORT address of the remote server.\nIf the `Type:` is local or spec, this field is ignored. * @return $this */ public function setAddress($address) { $this->address = $address; return $this; } /** * Gets suffix * @return string */ public function getSuffix() { return $this->suffix; } /** * Sets suffix * @param string $suffix If the Type: is spec, this field holds an optional suffix for generated paths to objects in the spec depot.\n\nThe default suffix is .p4s.\nYou do not need a suffix to use the spec depot, but supplying a file extension to your Perforce server’s versioned specs enables users of GUI client software to associate Perforce specifications with a preferred text editor.\nIf the Type: is local or remote, this field is ignored. * @return $this */ public function setSuffix($suffix) { $this->suffix = $suffix; return $this; } /** * Gets stream_depth * @return string */ public function getStreamDepth() { return $this->stream_depth; } /** * Sets stream_depth * @param string $stream_depth For stream depots, the optional depth to be used for stream paths in the depot, where depth specifies the number of slashes following the depot name of a stream. ]\n\nThis field is used when streams are being created.\nThe default is 1, matching the traditional stream name.\nYou cannot update this value once streams or archive data exist in a depot. * @return $this */ public function setStreamDepth($stream_depth) { $this->stream_depth = $stream_depth; return $this; } /** * Gets map * @return string */ public function getMap() { return $this->map; } /** * Sets map * @param string $map If the Type: is local, spec, or archive, set the map to point to the relative location of the depot subdirectory.\nThe map must contain the `...` wildcard; for example, a local depot new might have a Map: of `new/...`.\n\nIf the Type: is remote, set the map to point to a location in the remote depot's physical namespace, for example, `//depot/new/rel2/...`.\nThis directory will be the root of the local representation of the remote depot. * @return $this */ public function setMap($map) { $this->map = $map; return $this; } /** * Gets spec_map * @return string[] */ public function getSpecMap() { return $this->spec_map; } /** * Sets spec_map * @param string[] $spec_map For spec depots, an optional description of which specs should be saved, expressed as a view. * @return $this */ public function setSpecMap($spec_map) { $this->spec_map = $spec_map; 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/DepotCommand.php | |||||
#2 | 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. |
||
#1 | 18811 | tjuricek | Initial PHP client SDK for Helix Web Services. |