<?php
/**
 * UsersCommand
 *
 * 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;
/**
 * UsersCommand Class Doc Comment
 *
 * @category    Class
 * @description 
 * @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 UsersCommand implements ArrayAccess
{
    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    static $swaggerTypes = array(
        'user' => 'string',
        'type' => 'string',
        'email' => 'string',
        'update' => '\DateTime',
        'access' => '\DateTime',
        'full_name' => 'string',
        'has_password' => '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',
        'email' => 'email',
        'update' => 'update',
        'access' => 'access',
        'full_name' => 'fullName',
        'has_password' => 'hasPassword'
    );

    /**
      * Array of attributes to setter functions (for deserialization of responses)
      * @var string[]
      */
    static $setters = array(
        'user' => 'setUser',
        'type' => 'setType',
        'email' => 'setEmail',
        'update' => 'setUpdate',
        'access' => 'setAccess',
        'full_name' => 'setFullName',
        'has_password' => 'setHasPassword'
    );

    /**
      * Array of attributes to getter functions (for serialization of requests)
      * @var string[]
      */
    static $getters = array(
        'user' => 'getUser',
        'type' => 'getType',
        'email' => 'getEmail',
        'update' => 'getUpdate',
        'access' => 'getAccess',
        'full_name' => 'getFullName',
        'has_password' => 'getHasPassword'
    );

    
    /**
      * $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;
    
    /**
      * $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;
    
    /**
      * $has_password If 'enabled', the password has been set on the user.
      * @var string
      */
    protected $has_password;
    

    /**
     * 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["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["has_password"])) {
              $this->has_password = $data["has_password"];
            }
        }
    }
    
    /**
     * 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 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 has_password
     * @return string
     */
    public function getHasPassword()
    {
        return $this->has_password;
    }

    /**
     * Sets has_password
     * @param string $has_password If 'enabled', the password has been set on the user.
     * @return $this
     */
    public function setHasPassword($has_password)
    {
        
        $this->has_password = $has_password;
        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));
        }
    }
}