<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ValidateLoginPassword StructType
 * @subpackage Structs
 */
class ValidateLoginPassword extends AbstractStructBase
{
    /**
     * The loginName
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $loginName;
    /**
     * The password
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $password;
    /**
     * Constructor method for ValidateLoginPassword
     * @uses ValidateLoginPassword::setLoginName()
     * @uses ValidateLoginPassword::setPassword()
     * @param string $loginName
     * @param string $password
     */
    public function __construct($loginName = null, $password = null)
    {
        $this
            ->setLoginName($loginName)
            ->setPassword($password);
    }
    /**
     * Get loginName value
     * @return string|null
     */
    public function getLoginName()
    {
        return $this->loginName;
    }
    /**
     * Set loginName value
     * @param string $loginName
     * @return \CustomerManagement\StructType\ValidateLoginPassword
     */
    public function setLoginName($loginName = null)
    {
        // validation for constraint: string
        if (!is_null($loginName) && !is_string($loginName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($loginName, true), gettype($loginName)), __LINE__);
        }
        $this->loginName = $loginName;
        return $this;
    }
    /**
     * Get password value
     * @return string|null
     */
    public function getPassword()
    {
        return $this->password;
    }
    /**
     * Set password value
     * @param string $password
     * @return \CustomerManagement\StructType\ValidateLoginPassword
     */
    public function setPassword($password = null)
    {
        // validation for constraint: string
        if (!is_null($password) && !is_string($password)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($password, true), gettype($password)), __LINE__);
        }
        $this->password = $password;
        return $this;
    }
}
