<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CheckCustomerLoginOutput StructType
 * @subpackage Structs
 */
class CheckCustomerLoginOutput extends AbstractStructBase
{
    /**
     * The IsAvailable
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $IsAvailable;
    /**
     * The Success
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $Success;
    /**
     * The LoginId
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var int
     */
    public $LoginId;
    /**
     * The SuggestedLoginName
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $SuggestedLoginName;
    /**
     * The ErrorMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $ErrorMessage;
    /**
     * The AssociatedCustomers
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \CustomerManagement\ArrayType\ArrayOfInt
     */
    public $AssociatedCustomers;
    /**
     * Constructor method for CheckCustomerLoginOutput
     * @uses CheckCustomerLoginOutput::setIsAvailable()
     * @uses CheckCustomerLoginOutput::setSuccess()
     * @uses CheckCustomerLoginOutput::setLoginId()
     * @uses CheckCustomerLoginOutput::setSuggestedLoginName()
     * @uses CheckCustomerLoginOutput::setErrorMessage()
     * @uses CheckCustomerLoginOutput::setAssociatedCustomers()
     * @param bool $isAvailable
     * @param bool $success
     * @param int $loginId
     * @param string $suggestedLoginName
     * @param string $errorMessage
     * @param \CustomerManagement\ArrayType\ArrayOfInt $associatedCustomers
     */
    public function __construct($isAvailable = null, $success = null, $loginId = null, $suggestedLoginName = null, $errorMessage = null, \CustomerManagement\ArrayType\ArrayOfInt $associatedCustomers = null)
    {
        $this
            ->setIsAvailable($isAvailable)
            ->setSuccess($success)
            ->setLoginId($loginId)
            ->setSuggestedLoginName($suggestedLoginName)
            ->setErrorMessage($errorMessage)
            ->setAssociatedCustomers($associatedCustomers);
    }
    /**
     * Get IsAvailable value
     * @return bool
     */
    public function getIsAvailable()
    {
        return $this->IsAvailable;
    }
    /**
     * Set IsAvailable value
     * @param bool $isAvailable
     * @return \CustomerManagement\StructType\CheckCustomerLoginOutput
     */
    public function setIsAvailable($isAvailable = null)
    {
        // validation for constraint: boolean
        if (!is_null($isAvailable) && !is_bool($isAvailable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isAvailable, true), gettype($isAvailable)), __LINE__);
        }
        $this->IsAvailable = $isAvailable;
        return $this;
    }
    /**
     * Get Success value
     * @return bool
     */
    public function getSuccess()
    {
        return $this->Success;
    }
    /**
     * Set Success value
     * @param bool $success
     * @return \CustomerManagement\StructType\CheckCustomerLoginOutput
     */
    public function setSuccess($success = null)
    {
        // validation for constraint: boolean
        if (!is_null($success) && !is_bool($success)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($success, true), gettype($success)), __LINE__);
        }
        $this->Success = $success;
        return $this;
    }
    /**
     * Get LoginId value
     * @return int
     */
    public function getLoginId()
    {
        return $this->LoginId;
    }
    /**
     * Set LoginId value
     * @param int $loginId
     * @return \CustomerManagement\StructType\CheckCustomerLoginOutput
     */
    public function setLoginId($loginId = null)
    {
        // validation for constraint: int
        if (!is_null($loginId) && !(is_int($loginId) || ctype_digit($loginId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($loginId, true), gettype($loginId)), __LINE__);
        }
        $this->LoginId = $loginId;
        return $this;
    }
    /**
     * Get SuggestedLoginName value
     * @return string|null
     */
    public function getSuggestedLoginName()
    {
        return $this->SuggestedLoginName;
    }
    /**
     * Set SuggestedLoginName value
     * @param string $suggestedLoginName
     * @return \CustomerManagement\StructType\CheckCustomerLoginOutput
     */
    public function setSuggestedLoginName($suggestedLoginName = null)
    {
        // validation for constraint: string
        if (!is_null($suggestedLoginName) && !is_string($suggestedLoginName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($suggestedLoginName, true), gettype($suggestedLoginName)), __LINE__);
        }
        $this->SuggestedLoginName = $suggestedLoginName;
        return $this;
    }
    /**
     * Get ErrorMessage value
     * @return string|null
     */
    public function getErrorMessage()
    {
        return $this->ErrorMessage;
    }
    /**
     * Set ErrorMessage value
     * @param string $errorMessage
     * @return \CustomerManagement\StructType\CheckCustomerLoginOutput
     */
    public function setErrorMessage($errorMessage = null)
    {
        // validation for constraint: string
        if (!is_null($errorMessage) && !is_string($errorMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorMessage, true), gettype($errorMessage)), __LINE__);
        }
        $this->ErrorMessage = $errorMessage;
        return $this;
    }
    /**
     * Get AssociatedCustomers value
     * @return \CustomerManagement\ArrayType\ArrayOfInt|null
     */
    public function getAssociatedCustomers()
    {
        return $this->AssociatedCustomers;
    }
    /**
     * Set AssociatedCustomers value
     * @param \CustomerManagement\ArrayType\ArrayOfInt $associatedCustomers
     * @return \CustomerManagement\StructType\CheckCustomerLoginOutput
     */
    public function setAssociatedCustomers(\CustomerManagement\ArrayType\ArrayOfInt $associatedCustomers = null)
    {
        $this->AssociatedCustomers = $associatedCustomers;
        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 \CustomerManagement\StructType\CheckCustomerLoginOutput
     */
    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__;
    }
}
