<?php /** * ChangeCommand * * 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; /** * ChangeCommand Class Doc Comment * * @category Class * @description A changelist specification.\n\nFor more information see the [command reference](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_change.html). * @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 ChangeCommand implements ArrayAccess { /** * Array of property to type mappings. Used for (de)serialization * @var string[] */ static $swaggerTypes = array( 'change' => 'string', 'client' => 'string', 'date' => '\DateTime', 'user' => 'string', 'status' => 'string', 'description' => 'string', 'jobs' => 'string[]', 'type' => 'string', 'files' => 'string[]', 'imported_by' => 'string', 'identify' => 'string' ); /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ static $attributeMap = array( 'change' => 'change', 'client' => 'client', 'date' => 'date', 'user' => 'user', 'status' => 'status', 'description' => 'description', 'jobs' => 'jobs', 'type' => 'type', 'files' => 'files', 'imported_by' => 'importedBy', 'identify' => 'identify' ); /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] */ static $setters = array( 'change' => 'setChange', 'client' => 'setClient', 'date' => 'setDate', 'user' => 'setUser', 'status' => 'setStatus', 'description' => 'setDescription', 'jobs' => 'setJobs', 'type' => 'setType', 'files' => 'setFiles', 'imported_by' => 'setImportedBy', 'identify' => 'setIdentify' ); /** * Array of attributes to getter functions (for serialization of requests) * @var string[] */ static $getters = array( 'change' => 'getChange', 'client' => 'getClient', 'date' => 'getDate', 'user' => 'getUser', 'status' => 'getStatus', 'description' => 'getDescription', 'jobs' => 'getJobs', 'type' => 'getType', 'files' => 'getFiles', 'imported_by' => 'getImportedBy', 'identify' => 'getIdentify' ); /** * $change Contains the changelist number if editing an existing changelist, or `new` if creating a new changelist. * @var string */ protected $change; /** * $client Name of current client workspace * @var string */ protected $client; /** * $date Date the changelist was last modified. * @var \DateTime */ protected $date; /** * $user Name of the change owner.\n\nThe owner of an empty pending changelist (that is, a pending changelist without any files in it) can transfer ownership of the changelist to another existing user either by editing this field, or by using the -U user option.\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 $user; /** * $status `pending`, `shelved`, `submitted`, or `new`.\nNot editable by the user.\n\nThe status is `new` when the changelist is created, `pending` when it has been created but has not yet been submitted to the depot, `shelved` when its contents are shelved, and `submitted` when its contents have been stored in the depot. * @var string */ protected $status; /** * $description Textual description of changelist.\n\nIf you do not have access to a restricted changelist, the description is replaced with a \"no permission\" message. * @var string */ protected $description; /** * $jobs A list of jobs that are fixed by this changelist. * @var string[] */ protected $jobs; /** * $type Type of change: `restricted` or `public`.\n\nThe Type: field can be used to hide the change or its description from users.\nA shelved or committed change (as denoted in the Status: field) that is restricted is accessible only to users who own the change or have list permission to at least one file in the change.\n\nPublic changes are displayed without restrictions.\n\nBy default, changelists are public.\nA Perforce superuser can set the default changelist type (for changelists created after the configurable is set) by setting the defaultChangeType configurable. * @var string */ protected $type; /** * $files The list of files submitted in this changelist. * @var string[] */ protected $files; /** * $imported_by Displays the name of the user who ran the p4 fetch, p4 push, or p4 unzip command that imported this change into the server.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. * @var string */ protected $imported_by; /** * $identify Contains a label which uniquely identifies this changelist across all servers where it has been fetched, pushed, or unzipped.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. * @var string */ protected $identify; /** * Constructor * @param mixed[] $data Associated array of property value initalizing the model */ public function __construct(array $data = null) { if ($data != null) { if (isset($data["change"])) { $this->change = $data["change"]; } if (isset($data["client"])) { $this->client = $data["client"]; } if (isset($data["date"])) { $this->date = $data["date"]; } if (isset($data["user"])) { $this->user = $data["user"]; } if (isset($data["status"])) { $this->status = $data["status"]; } if (isset($data["description"])) { $this->description = $data["description"]; } if (isset($data["jobs"])) { $this->jobs = $data["jobs"]; } if (isset($data["type"])) { $this->type = $data["type"]; } if (isset($data["files"])) { $this->files = $data["files"]; } if (isset($data["imported_by"])) { $this->imported_by = $data["imported_by"]; } if (isset($data["identify"])) { $this->identify = $data["identify"]; } } } /** * Gets change * @return string */ public function getChange() { return $this->change; } /** * Sets change * @param string $change Contains the changelist number if editing an existing changelist, or `new` if creating a new changelist. * @return $this */ public function setChange($change) { $this->change = $change; return $this; } /** * Gets client * @return string */ public function getClient() { return $this->client; } /** * Sets client * @param string $client Name of current client workspace * @return $this */ public function setClient($client) { $this->client = $client; return $this; } /** * Gets date * @return \DateTime */ public function getDate() { return $this->date; } /** * Sets date * @param \DateTime $date Date the changelist was last modified. * @return $this */ public function setDate($date) { $this->date = $date; return $this; } /** * Gets user * @return string */ public function getUser() { return $this->user; } /** * Sets user * @param string $user Name of the change owner.\n\nThe owner of an empty pending changelist (that is, a pending changelist without any files in it) can transfer ownership of the changelist to another existing user either by editing this field, or by using the -U user option.\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 setUser($user) { $this->user = $user; return $this; } /** * Gets status * @return string */ public function getStatus() { return $this->status; } /** * Sets status * @param string $status `pending`, `shelved`, `submitted`, or `new`.\nNot editable by the user.\n\nThe status is `new` when the changelist is created, `pending` when it has been created but has not yet been submitted to the depot, `shelved` when its contents are shelved, and `submitted` when its contents have been stored in the depot. * @return $this */ public function setStatus($status) { $this->status = $status; return $this; } /** * Gets description * @return string */ public function getDescription() { return $this->description; } /** * Sets description * @param string $description Textual description of changelist.\n\nIf you do not have access to a restricted changelist, the description is replaced with a \"no permission\" message. * @return $this */ public function setDescription($description) { $this->description = $description; return $this; } /** * Gets jobs * @return string[] */ public function getJobs() { return $this->jobs; } /** * Sets jobs * @param string[] $jobs A list of jobs that are fixed by this changelist. * @return $this */ public function setJobs($jobs) { $this->jobs = $jobs; return $this; } /** * Gets type * @return string */ public function getType() { return $this->type; } /** * Sets type * @param string $type Type of change: `restricted` or `public`.\n\nThe Type: field can be used to hide the change or its description from users.\nA shelved or committed change (as denoted in the Status: field) that is restricted is accessible only to users who own the change or have list permission to at least one file in the change.\n\nPublic changes are displayed without restrictions.\n\nBy default, changelists are public.\nA Perforce superuser can set the default changelist type (for changelists created after the configurable is set) by setting the defaultChangeType configurable. * @return $this */ public function setType($type) { $this->type = $type; return $this; } /** * Gets files * @return string[] */ public function getFiles() { return $this->files; } /** * Sets files * @param string[] $files The list of files submitted in this changelist. * @return $this */ public function setFiles($files) { $this->files = $files; return $this; } /** * Gets imported_by * @return string */ public function getImportedBy() { return $this->imported_by; } /** * Sets imported_by * @param string $imported_by Displays the name of the user who ran the p4 fetch, p4 push, or p4 unzip command that imported this change into the server.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. * @return $this */ public function setImportedBy($imported_by) { $this->imported_by = $imported_by; return $this; } /** * Gets identify * @return string */ public function getIdentify() { return $this->identify; } /** * Sets identify * @param string $identify Contains a label which uniquely identifies this changelist across all servers where it has been fetched, pushed, or unzipped.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. * @return $this */ public function setIdentify($identify) { $this->identify = $identify; 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/ChangeCommand.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. |