<?php

namespace SGCIS\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for AccountValidPhoneResponse Struct
 * @subpackage Structs
 */
class AccountValidPhoneResponse extends ServiceResponseBase
{
    /**
     * The Valid
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $Valid;
    /**
     * Constructor method for AccountValidPhoneResponse
     * @uses AccountValidPhoneResponse::setValid()
     * @param bool $valid
     */
    public function __construct($valid = null)
    {
        $this
            ->setValid($valid);
    }
    /**
     * Get Valid value
     * @return bool
     */
    public function getValid()
    {
        return $this->Valid;
    }
    /**
     * Set Valid value
     * @param bool $valid
     * @return \SGCIS\Struct\AccountValidPhoneResponse
     */
    public function setValid($valid = null)
    {
        // validation for constraint: boolean
        if (!is_null($valid) && !is_bool($valid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($valid)), __LINE__);
        }
        $this->Valid = $valid;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \SGCIS\Struct\AccountValidPhoneResponse
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
