<?php

namespace NineDotMedia\Viapost\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetCostCentres Struct
 * @subpackage Structs
 */
class GetCostCentres extends AbstractStructBase
{
    /**
     * The loginToken
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $loginToken;
    /**
     * The costCentres
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \NineDotMedia\Viapost\Array\ArrayOfAnyType
     */
    public $costCentres;
    /**
     * The returnMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $returnMessage;
    /**
     * Constructor method for GetCostCentres
     * @uses GetCostCentres::setLoginToken()
     * @uses GetCostCentres::setCostCentres()
     * @uses GetCostCentres::setReturnMessage()
     * @param string $loginToken
     * @param \NineDotMedia\Viapost\Array\ArrayOfAnyType $costCentres
     * @param string $returnMessage
     */
    public function __construct($loginToken = null, \NineDotMedia\Viapost\Array\ArrayOfAnyType $costCentres = null, $returnMessage = null)
    {
        $this
            ->setLoginToken($loginToken)
            ->setCostCentres($costCentres)
            ->setReturnMessage($returnMessage);
    }
    /**
     * Get loginToken value
     * @return string|null
     */
    public function getLoginToken()
    {
        return $this->loginToken;
    }
    /**
     * Set loginToken value
     * @param string $loginToken
     * @return \NineDotMedia\Viapost\Struct\GetCostCentres
     */
    public function setLoginToken($loginToken = null)
    {
        // validation for constraint: string
        if (!is_null($loginToken) && !is_string($loginToken)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($loginToken, true), gettype($loginToken)), __LINE__);
        }
        $this->loginToken = $loginToken;
        return $this;
    }
    /**
     * Get costCentres value
     * @return \NineDotMedia\Viapost\Array\ArrayOfAnyType|null
     */
    public function getCostCentres()
    {
        return $this->costCentres;
    }
    /**
     * Set costCentres value
     * @param \NineDotMedia\Viapost\Array\ArrayOfAnyType $costCentres
     * @return \NineDotMedia\Viapost\Struct\GetCostCentres
     */
    public function setCostCentres(\NineDotMedia\Viapost\Array\ArrayOfAnyType $costCentres = null)
    {
        $this->costCentres = $costCentres;
        return $this;
    }
    /**
     * Get returnMessage value
     * @return string|null
     */
    public function getReturnMessage()
    {
        return $this->returnMessage;
    }
    /**
     * Set returnMessage value
     * @param string $returnMessage
     * @return \NineDotMedia\Viapost\Struct\GetCostCentres
     */
    public function setReturnMessage($returnMessage = null)
    {
        // validation for constraint: string
        if (!is_null($returnMessage) && !is_string($returnMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($returnMessage, true), gettype($returnMessage)), __LINE__);
        }
        $this->returnMessage = $returnMessage;
        return $this;
    }
}
