<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for agent StructType
 * @subpackage Structs
 */
class Agent extends AbstractStructBase
{
    /**
     * The user
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $user;
    /**
     * Constructor method for agent
     * @uses Agent::setUser()
     * @param string $user
     */
    public function __construct($user = null)
    {
        $this
            ->setUser($user);
    }
    /**
     * Get user value
     * @return string
     */
    public function getUser()
    {
        return $this->user;
    }
    /**
     * Set user value
     * @param string $user
     * @return \StructType\Agent
     */
    public function setUser($user = null)
    {
        // validation for constraint: string
        if (!is_null($user) && !is_string($user)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($user, true), gettype($user)), __LINE__);
        }
        $this->user = $user;
        return $this;
    }
}
