<?php /** * ClientCommand * * 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; /** * ClientCommand Class Doc Comment * * @category Class * @description The client workspace specification and its view.\n\nFor more information see the [command reference](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.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 ClientCommand implements ArrayAccess { /** * Array of property to type mappings. Used for (de)serialization * @var string[] */ static $swaggerTypes = array( 'client' => 'string', 'owner' => 'string', 'update' => '\DateTime', 'access' => '\DateTime', 'host' => 'string', 'description' => 'string', 'root' => 'string', 'alt_roots' => 'string[]', 'options' => 'string', 'submit_options' => 'string', 'line_end' => 'string', 'stream' => 'string', 'stream_at_change' => 'string', 'server_id' => 'string', 'view' => 'string[]', 'change_view' => 'string[]', 'type' => 'string' ); /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ static $attributeMap = array( 'client' => 'client', 'owner' => 'owner', 'update' => 'update', 'access' => 'access', 'host' => 'host', 'description' => 'description', 'root' => 'root', 'alt_roots' => 'altRoots', 'options' => 'options', 'submit_options' => 'submitOptions', 'line_end' => 'lineEnd', 'stream' => 'stream', 'stream_at_change' => 'streamAtChange', 'server_id' => 'serverID', 'view' => 'view', 'change_view' => 'changeView', 'type' => 'type' ); /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] */ static $setters = array( 'client' => 'setClient', 'owner' => 'setOwner', 'update' => 'setUpdate', 'access' => 'setAccess', 'host' => 'setHost', 'description' => 'setDescription', 'root' => 'setRoot', 'alt_roots' => 'setAltRoots', 'options' => 'setOptions', 'submit_options' => 'setSubmitOptions', 'line_end' => 'setLineEnd', 'stream' => 'setStream', 'stream_at_change' => 'setStreamAtChange', 'server_id' => 'setServerId', 'view' => 'setView', 'change_view' => 'setChangeView', 'type' => 'setType' ); /** * Array of attributes to getter functions (for serialization of requests) * @var string[] */ static $getters = array( 'client' => 'getClient', 'owner' => 'getOwner', 'update' => 'getUpdate', 'access' => 'getAccess', 'host' => 'getHost', 'description' => 'getDescription', 'root' => 'getRoot', 'alt_roots' => 'getAltRoots', 'options' => 'getOptions', 'submit_options' => 'getSubmitOptions', 'line_end' => 'getLineEnd', 'stream' => 'getStream', 'stream_at_change' => 'getStreamAtChange', 'server_id' => 'getServerId', 'view' => 'getView', 'change_view' => 'getChangeView', 'type' => 'getType' ); /** * $client The client workspace name, as specified in the `P4CLIENT` environment variable or its equivalents. * @var string */ protected $client; /** * $owner The name of the user who owns the workspace.\nThe default is the user who created the workspace.\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 time the workspace specification was last modified. * @var \DateTime */ protected $update; /** * $access The date and time that the workspace was last used in any way.\n(Note: Reloading a workspace with p4 reload does not affect the access time.) * @var \DateTime */ protected $access; /** * $host The name of the workstation on which this workspace resides.\nIf included, operations on this client workspace can be run only from this host.\nIf not set, access is allowed from any host.\n\nThe hostname must be provided exactly as it appears in the output of p4 info when run from that host.\n\nThis field is meant to prevent accidental misuse of client workspaces on the wrong machine.\nProviding a host name does not guarantee security, because the actual value of the host name can be overridden with the -H option to any p4 command, or with the P4HOST environment variable.\nFor a similar mechanism that does provide security, use the IP address restriction feature of p4 protect. * @var string */ protected $host; /** * $description A textual description of the workspace. The default text is Created by owner. * @var string */ protected $description; /** * $root The directory (on the local host) relative to which all the files in the `View:` are specified.\nThe default is the current working directory.\nThe path must be specified in local file system syntax.\n\nIf you change this setting, you must physically relocate any files that currently reside there.\nOn Windows client machines, you can specify the root as null to enable you to map files to multiple drives. * @var string */ protected $root; /** * $alt_roots Up to two optional alternate client workspace roots.\n\nPerforce applications use the first of the main and alternate roots that match the application’s current working directory.\nUse the p4 info command to display the root being used.\n\nThis enables users to use the same Perforce client workspace specification on multiple platforms, even those with different directory naming conventions.\n\nIf you are using multiple or alternate workspace roots (the AltRoots: field), you can always tell which root is in effect by looking at the Client root: reported by p4 info.\n\nIf you are using a Windows directory in any of your workspace roots, you must specify the Windows directory as your main workspace root and specify your other workspace roots in the AltRoots: field. * @var string[] */ protected $alt_roots; /** * $options A set of seven switches that control particular workspace options.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. * @var string */ protected $options; /** * $submit_options Options to govern the default behavior of p4 submit.\n\n* submitunchanged\n+\nAll open files (with or without changes) are submitted to the depot. This is the default behavior of Perforce.\n\n* submitunchanged+reopen\n+\nAll open files (with or without changes) are submitted to the depot, and all files are automatically reopened in the default changelist.\n\n* revertunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are reverted.\n\n* revertunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot and reopened in the default changelist. Unchanged files are reverted and not reopened in the default changelist.\n\n* leaveunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Any unchanged files are moved to the default changelist.\n\n* leaveunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are moved to the default changelist, and changed files are reopened in the default changelist. This option is similar to submitunchanged+reopen, except that no unchanged files are submitted to the depot. * @var string */ protected $submit_options; /** * $line_end Configure carriage-return/linefeed (CR/LF) conversion.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. * @var string */ protected $line_end; /** * $stream Associates the workspace with the specified stream.\n\nPerforce generates the view for stream-associated workspaces: you cannot modify it manually. * @var string */ protected $stream; /** * $stream_at_change A changelist number that sets a back-in-time view of a stream.\n\nWhen StreamAtChange is set, running p4 sync (when called with no arguments) updates the workspace to files at this changelist revision, instead of the head revision.\nYou cannot submit changes (p4 submit returns an error) when StreamAtChange is set, because the workspace view no longer reflects the current stream inheritance.\n\nThis field is ignored unless the Stream field is also set to a valid stream. * @var string */ protected $stream_at_change; /** * $server_id If set, restricts usage of the workspace to the named server.\nIf unset, use is allowed on master server and on any replicas of the master other than Edge servers. * @var string */ protected $server_id; /** * $view Specifies the mappings between files in the depot and files in the workspace.\nA new view takes effect on the next p4 sync operation. * @var string[] */ protected $view; /** * $change_view Restricts access to depot paths to a particular point in time.\nFiles specified for the ChangeView field are read-only: they may be opened but not submitted.\nFor example: `//depot/path/...@1000`\n\nRevisions of the files in the specified path will not be visible if they were submitted after the specified changelist number.\nFiles matching a ChangeView path may not be submitted. * @var string[] */ protected $change_view; /** * $type By default clients are writeable.\nSpecify readonly for short lived clients used in build automation scripts.\nSuch clients cannot edit or submit files, but this should not be an issue in build scripts.\n\nUsing writeable clients in build automation scripts can lead to db.have table fragmentation, which is used to track what files a client has synced.\nIf you are experiencing such issues, use a read-only client instead.\nA readonly client is assigned its own personal db.have database table.\nThe location of this table must first be specified by an administrator with the client.readonly.dir configurable. * @var string */ protected $type; /** * Constructor * @param mixed[] $data Associated array of property value initalizing the model */ public function __construct(array $data = null) { if ($data != null) { if (isset($data["client"])) { $this->client = $data["client"]; } 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["host"])) { $this->host = $data["host"]; } if (isset($data["description"])) { $this->description = $data["description"]; } if (isset($data["root"])) { $this->root = $data["root"]; } if (isset($data["alt_roots"])) { $this->alt_roots = $data["alt_roots"]; } if (isset($data["options"])) { $this->options = $data["options"]; } if (isset($data["submit_options"])) { $this->submit_options = $data["submit_options"]; } if (isset($data["line_end"])) { $this->line_end = $data["line_end"]; } if (isset($data["stream"])) { $this->stream = $data["stream"]; } if (isset($data["stream_at_change"])) { $this->stream_at_change = $data["stream_at_change"]; } if (isset($data["server_id"])) { $this->server_id = $data["server_id"]; } if (isset($data["view"])) { $this->view = $data["view"]; } if (isset($data["change_view"])) { $this->change_view = $data["change_view"]; } if (isset($data["type"])) { $this->type = $data["type"]; } } } /** * Gets client * @return string */ public function getClient() { return $this->client; } /** * Sets client * @param string $client The client workspace name, as specified in the `P4CLIENT` environment variable or its equivalents. * @return $this */ public function setClient($client) { $this->client = $client; return $this; } /** * Gets owner * @return string */ public function getOwner() { return $this->owner; } /** * Sets owner * @param string $owner The name of the user who owns the workspace.\nThe default is the user who created the workspace.\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 time the workspace 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 workspace was last used in any way.\n(Note: Reloading a workspace with p4 reload does not affect the access time.) * @return $this */ public function setAccess($access) { $this->access = $access; return $this; } /** * Gets host * @return string */ public function getHost() { return $this->host; } /** * Sets host * @param string $host The name of the workstation on which this workspace resides.\nIf included, operations on this client workspace can be run only from this host.\nIf not set, access is allowed from any host.\n\nThe hostname must be provided exactly as it appears in the output of p4 info when run from that host.\n\nThis field is meant to prevent accidental misuse of client workspaces on the wrong machine.\nProviding a host name does not guarantee security, because the actual value of the host name can be overridden with the -H option to any p4 command, or with the P4HOST environment variable.\nFor a similar mechanism that does provide security, use the IP address restriction feature of p4 protect. * @return $this */ public function setHost($host) { $this->host = $host; return $this; } /** * Gets description * @return string */ public function getDescription() { return $this->description; } /** * Sets description * @param string $description A textual description of the workspace. The default text is Created by owner. * @return $this */ public function setDescription($description) { $this->description = $description; return $this; } /** * Gets root * @return string */ public function getRoot() { return $this->root; } /** * Sets root * @param string $root The directory (on the local host) relative to which all the files in the `View:` are specified.\nThe default is the current working directory.\nThe path must be specified in local file system syntax.\n\nIf you change this setting, you must physically relocate any files that currently reside there.\nOn Windows client machines, you can specify the root as null to enable you to map files to multiple drives. * @return $this */ public function setRoot($root) { $this->root = $root; return $this; } /** * Gets alt_roots * @return string[] */ public function getAltRoots() { return $this->alt_roots; } /** * Sets alt_roots * @param string[] $alt_roots Up to two optional alternate client workspace roots.\n\nPerforce applications use the first of the main and alternate roots that match the application’s current working directory.\nUse the p4 info command to display the root being used.\n\nThis enables users to use the same Perforce client workspace specification on multiple platforms, even those with different directory naming conventions.\n\nIf you are using multiple or alternate workspace roots (the AltRoots: field), you can always tell which root is in effect by looking at the Client root: reported by p4 info.\n\nIf you are using a Windows directory in any of your workspace roots, you must specify the Windows directory as your main workspace root and specify your other workspace roots in the AltRoots: field. * @return $this */ public function setAltRoots($alt_roots) { $this->alt_roots = $alt_roots; return $this; } /** * Gets options * @return string */ public function getOptions() { return $this->options; } /** * Sets options * @param string $options A set of seven switches that control particular workspace options.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. * @return $this */ public function setOptions($options) { $this->options = $options; return $this; } /** * Gets submit_options * @return string */ public function getSubmitOptions() { return $this->submit_options; } /** * Sets submit_options * @param string $submit_options Options to govern the default behavior of p4 submit.\n\n* submitunchanged\n+\nAll open files (with or without changes) are submitted to the depot. This is the default behavior of Perforce.\n\n* submitunchanged+reopen\n+\nAll open files (with or without changes) are submitted to the depot, and all files are automatically reopened in the default changelist.\n\n* revertunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are reverted.\n\n* revertunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot and reopened in the default changelist. Unchanged files are reverted and not reopened in the default changelist.\n\n* leaveunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Any unchanged files are moved to the default changelist.\n\n* leaveunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are moved to the default changelist, and changed files are reopened in the default changelist. This option is similar to submitunchanged+reopen, except that no unchanged files are submitted to the depot. * @return $this */ public function setSubmitOptions($submit_options) { $this->submit_options = $submit_options; return $this; } /** * Gets line_end * @return string */ public function getLineEnd() { return $this->line_end; } /** * Sets line_end * @param string $line_end Configure carriage-return/linefeed (CR/LF) conversion.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. * @return $this */ public function setLineEnd($line_end) { $this->line_end = $line_end; return $this; } /** * Gets stream * @return string */ public function getStream() { return $this->stream; } /** * Sets stream * @param string $stream Associates the workspace with the specified stream.\n\nPerforce generates the view for stream-associated workspaces: you cannot modify it manually. * @return $this */ public function setStream($stream) { $this->stream = $stream; return $this; } /** * Gets stream_at_change * @return string */ public function getStreamAtChange() { return $this->stream_at_change; } /** * Sets stream_at_change * @param string $stream_at_change A changelist number that sets a back-in-time view of a stream.\n\nWhen StreamAtChange is set, running p4 sync (when called with no arguments) updates the workspace to files at this changelist revision, instead of the head revision.\nYou cannot submit changes (p4 submit returns an error) when StreamAtChange is set, because the workspace view no longer reflects the current stream inheritance.\n\nThis field is ignored unless the Stream field is also set to a valid stream. * @return $this */ public function setStreamAtChange($stream_at_change) { $this->stream_at_change = $stream_at_change; 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 workspace to the named server.\nIf unset, use is allowed on master server and on any replicas of the master other than Edge servers. * @return $this */ public function setServerId($server_id) { $this->server_id = $server_id; return $this; } /** * Gets view * @return string[] */ public function getView() { return $this->view; } /** * Sets view * @param string[] $view Specifies the mappings between files in the depot and files in the workspace.\nA new view takes effect on the next p4 sync operation. * @return $this */ public function setView($view) { $this->view = $view; return $this; } /** * Gets change_view * @return string[] */ public function getChangeView() { return $this->change_view; } /** * Sets change_view * @param string[] $change_view Restricts access to depot paths to a particular point in time.\nFiles specified for the ChangeView field are read-only: they may be opened but not submitted.\nFor example: `//depot/path/...@1000`\n\nRevisions of the files in the specified path will not be visible if they were submitted after the specified changelist number.\nFiles matching a ChangeView path may not be submitted. * @return $this */ public function setChangeView($change_view) { $this->change_view = $change_view; return $this; } /** * Gets type * @return string */ public function getType() { return $this->type; } /** * Sets type * @param string $type By default clients are writeable.\nSpecify readonly for short lived clients used in build automation scripts.\nSuch clients cannot edit or submit files, but this should not be an issue in build scripts.\n\nUsing writeable clients in build automation scripts can lead to db.have table fragmentation, which is used to track what files a client has synced.\nIf you are experiencing such issues, use a read-only client instead.\nA readonly client is assigned its own personal db.have database table.\nThe location of this table must first be specified by an administrator with the client.readonly.dir configurable. * @return $this */ public function setType($type) { $this->type = $type; 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/ClientCommand.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 | 19202 | tjuricek | Revised documentation for the Ruby Client SDK; removed obsolete methods and definitions, and restyled a lot of the tables. | ||
#1 | 18811 | tjuricek | Initial PHP client SDK for Helix Web Services. |