<?php /** * UserCommand * * 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; /** * UserCommand Class Doc Comment * * @category Class * @description Create or edit Perforce user specifications and preferences.\n\nThere are three types of Perforce users: standard users, operator users, and service users.\nStandard users are the default, and each standard user consumes one Perforce license.\nThe operator user type is intended for system administrators; they are subject to the same restrictions on permissions as any other user, but are further restricted in that they can run only a limited subset of Perforce commands.\nService users are intended for inter-server communication in replicated and multi-server environments, and are restricted to an even smaller subset of Perforce commands.\nNeither operators nor service users consume Perforce licenses. * @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 UserCommand implements ArrayAccess { /** * Array of property to type mappings. Used for (de)serialization * @var string[] */ static $swaggerTypes = array( 'user' => 'string', 'type' => 'string', 'auth_method' => 'string', 'email' => 'string', 'update' => '\DateTime', 'access' => '\DateTime', 'full_name' => 'string', 'job_view' => 'string', 'password' => 'string', 'password_change' => '\DateTime', 'reviews' => 'string[]' ); /** * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ static $attributeMap = array( 'user' => 'user', 'type' => 'type', 'auth_method' => 'authMethod', 'email' => 'email', 'update' => 'update', 'access' => 'access', 'full_name' => 'fullName', 'job_view' => 'jobView', 'password' => 'password', 'password_change' => 'passwordChange', 'reviews' => 'reviews' ); /** * Array of attributes to setter functions (for deserialization of responses) * @var string[] */ static $setters = array( 'user' => 'setUser', 'type' => 'setType', 'auth_method' => 'setAuthMethod', 'email' => 'setEmail', 'update' => 'setUpdate', 'access' => 'setAccess', 'full_name' => 'setFullName', 'job_view' => 'setJobView', 'password' => 'setPassword', 'password_change' => 'setPasswordChange', 'reviews' => 'setReviews' ); /** * Array of attributes to getter functions (for serialization of requests) * @var string[] */ static $getters = array( 'user' => 'getUser', 'type' => 'getType', 'auth_method' => 'getAuthMethod', 'email' => 'getEmail', 'update' => 'getUpdate', 'access' => 'getAccess', 'full_name' => 'getFullName', 'job_view' => 'getJobView', 'password' => 'getPassword', 'password_change' => 'getPasswordChange', 'reviews' => 'getReviews' ); /** * $user The Perforce username. * @var string */ protected $user; /** * $type Type of user: standard, operator, or service.\n\nOnce you set the type, you cannot change it. * @var string */ protected $type; /** * $auth_method One of the following: perforce or ldap.\n\nSpecifying perforce enables authentication using Perforce’s internal db.user table or by way of an authentication trigger.\nThis is the default unless it is overridden with the auth.default.method configurable.\n\nSpecifying ldap enables authentication against AD/LDAP servers specified by the currently active LDAP configurations. * @var string */ protected $auth_method; /** * $email The user’s email address. By default, this is user@client. * @var string */ protected $email; /** * $update The date and time this specification was last updated. * @var \DateTime */ protected $update; /** * $access The date and time this user last ran a Perforce command. * @var \DateTime */ protected $access; /** * $full_name The user's full name. * @var string */ protected $full_name; /** * $job_view Jobs matching this jobview appear on any changelists created by this user.\nJobs that are fixed by the changelist should be left in the changelist when it's submitted with p4 submit; other jobs should be deleted from the form before submission. * @var string */ protected $job_view; /** * $password The user's password. * @var string */ protected $password; /** * $password_change The date and time of the user’s last password change.\nIf the user has no password, this field is blank. * @var \DateTime */ protected $password_change; /** * $reviews A list of files the user would like to review.\nThis field can include exclusionary mappings. * @var string[] */ protected $reviews; /** * Constructor * @param mixed[] $data Associated array of property value initalizing the model */ public function __construct(array $data = null) { if ($data != null) { if (isset($data["user"])) { $this->user = $data["user"]; } if (isset($data["type"])) { $this->type = $data["type"]; } if (isset($data["auth_method"])) { $this->auth_method = $data["auth_method"]; } if (isset($data["email"])) { $this->email = $data["email"]; } if (isset($data["update"])) { $this->update = $data["update"]; } if (isset($data["access"])) { $this->access = $data["access"]; } if (isset($data["full_name"])) { $this->full_name = $data["full_name"]; } if (isset($data["job_view"])) { $this->job_view = $data["job_view"]; } if (isset($data["password"])) { $this->password = $data["password"]; } if (isset($data["password_change"])) { $this->password_change = $data["password_change"]; } if (isset($data["reviews"])) { $this->reviews = $data["reviews"]; } } } /** * Gets user * @return string */ public function getUser() { return $this->user; } /** * Sets user * @param string $user The Perforce username. * @return $this */ public function setUser($user) { $this->user = $user; return $this; } /** * Gets type * @return string */ public function getType() { return $this->type; } /** * Sets type * @param string $type Type of user: standard, operator, or service.\n\nOnce you set the type, you cannot change it. * @return $this */ public function setType($type) { $this->type = $type; return $this; } /** * Gets auth_method * @return string */ public function getAuthMethod() { return $this->auth_method; } /** * Sets auth_method * @param string $auth_method One of the following: perforce or ldap.\n\nSpecifying perforce enables authentication using Perforce’s internal db.user table or by way of an authentication trigger.\nThis is the default unless it is overridden with the auth.default.method configurable.\n\nSpecifying ldap enables authentication against AD/LDAP servers specified by the currently active LDAP configurations. * @return $this */ public function setAuthMethod($auth_method) { $this->auth_method = $auth_method; return $this; } /** * Gets email * @return string */ public function getEmail() { return $this->email; } /** * Sets email * @param string $email The user’s email address. By default, this is user@client. * @return $this */ public function setEmail($email) { $this->email = $email; return $this; } /** * Gets update * @return \DateTime */ public function getUpdate() { return $this->update; } /** * Sets update * @param \DateTime $update The date and time this specification was last updated. * @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 this user last ran a Perforce command. * @return $this */ public function setAccess($access) { $this->access = $access; return $this; } /** * Gets full_name * @return string */ public function getFullName() { return $this->full_name; } /** * Sets full_name * @param string $full_name The user's full name. * @return $this */ public function setFullName($full_name) { $this->full_name = $full_name; return $this; } /** * Gets job_view * @return string */ public function getJobView() { return $this->job_view; } /** * Sets job_view * @param string $job_view Jobs matching this jobview appear on any changelists created by this user.\nJobs that are fixed by the changelist should be left in the changelist when it's submitted with p4 submit; other jobs should be deleted from the form before submission. * @return $this */ public function setJobView($job_view) { $this->job_view = $job_view; return $this; } /** * Gets password * @return string */ public function getPassword() { return $this->password; } /** * Sets password * @param string $password The user's password. * @return $this */ public function setPassword($password) { $this->password = $password; return $this; } /** * Gets password_change * @return \DateTime */ public function getPasswordChange() { return $this->password_change; } /** * Sets password_change * @param \DateTime $password_change The date and time of the user’s last password change.\nIf the user has no password, this field is blank. * @return $this */ public function setPasswordChange($password_change) { $this->password_change = $password_change; return $this; } /** * Gets reviews * @return string[] */ public function getReviews() { return $this->reviews; } /** * Sets reviews * @param string[] $reviews A list of files the user would like to review.\nThis field can include exclusionary mappings. * @return $this */ public function setReviews($reviews) { $this->reviews = $reviews; 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/UserCommand.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 | 18877 | tjuricek | Revise the 'Jobview' field of user specs to just be a string instead of an array, add basic testing. | ||
#1 | 18811 | tjuricek | Initial PHP client SDK for Helix Web Services. |