<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ChangeEmail StructType
 * @subpackage Structs
 */
class ChangeEmail extends AbstractStructBase
{
    /**
     * The currentPassword
     * @var string
     */
    public $currentPassword;
    /**
     * The newEmail
     * @var string
     */
    public $newEmail;
    /**
     * The newEmail2
     * @var string
     */
    public $newEmail2;
    /**
     * The justThisAccount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $justThisAccount;
    /**
     * Constructor method for ChangeEmail
     * @uses ChangeEmail::setCurrentPassword()
     * @uses ChangeEmail::setNewEmail()
     * @uses ChangeEmail::setNewEmail2()
     * @uses ChangeEmail::setJustThisAccount()
     * @param string $currentPassword
     * @param string $newEmail
     * @param string $newEmail2
     * @param bool $justThisAccount
     */
    public function __construct($currentPassword = null, $newEmail = null, $newEmail2 = null, $justThisAccount = null)
    {
        $this
            ->setCurrentPassword($currentPassword)
            ->setNewEmail($newEmail)
            ->setNewEmail2($newEmail2)
            ->setJustThisAccount($justThisAccount);
    }
    /**
     * Get currentPassword value
     * @return string|null
     */
    public function getCurrentPassword()
    {
        return $this->currentPassword;
    }
    /**
     * Set currentPassword value
     * @param string $currentPassword
     * @return \StructType\ChangeEmail
     */
    public function setCurrentPassword($currentPassword = null)
    {
        // validation for constraint: string
        if (!is_null($currentPassword) && !is_string($currentPassword)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($currentPassword, true), gettype($currentPassword)), __LINE__);
        }
        $this->currentPassword = $currentPassword;
        return $this;
    }
    /**
     * Get newEmail value
     * @return string|null
     */
    public function getNewEmail()
    {
        return $this->newEmail;
    }
    /**
     * Set newEmail value
     * @param string $newEmail
     * @return \StructType\ChangeEmail
     */
    public function setNewEmail($newEmail = null)
    {
        // validation for constraint: string
        if (!is_null($newEmail) && !is_string($newEmail)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($newEmail, true), gettype($newEmail)), __LINE__);
        }
        $this->newEmail = $newEmail;
        return $this;
    }
    /**
     * Get newEmail2 value
     * @return string|null
     */
    public function getNewEmail2()
    {
        return $this->newEmail2;
    }
    /**
     * Set newEmail2 value
     * @param string $newEmail2
     * @return \StructType\ChangeEmail
     */
    public function setNewEmail2($newEmail2 = null)
    {
        // validation for constraint: string
        if (!is_null($newEmail2) && !is_string($newEmail2)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($newEmail2, true), gettype($newEmail2)), __LINE__);
        }
        $this->newEmail2 = $newEmail2;
        return $this;
    }
    /**
     * Get justThisAccount value
     * @return bool|null
     */
    public function getJustThisAccount()
    {
        return $this->justThisAccount;
    }
    /**
     * Set justThisAccount value
     * @param bool $justThisAccount
     * @return \StructType\ChangeEmail
     */
    public function setJustThisAccount($justThisAccount = null)
    {
        // validation for constraint: boolean
        if (!is_null($justThisAccount) && !is_bool($justThisAccount)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($justThisAccount, true), gettype($justThisAccount)), __LINE__);
        }
        $this->justThisAccount = $justThisAccount;
        return $this;
    }
}
