<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PostingTransactionSummaryField StructType
 * @subpackage Structs
 */
class PostingTransactionSummaryField extends AbstractStructBase
{
    /**
     * The period
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $period;
    /**
     * The account
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $account;
    /**
     * The parentItem
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $parentItem;
    /**
     * The item
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $item;
    /**
     * The entity
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $entity;
    /**
     * The department
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $department;
    /**
     * The class
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $class;
    /**
     * The location
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $location;
    /**
     * The subsidiary
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $subsidiary;
    /**
     * The book
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $book;
    /**
     * Constructor method for PostingTransactionSummaryField
     * @uses PostingTransactionSummaryField::setPeriod()
     * @uses PostingTransactionSummaryField::setAccount()
     * @uses PostingTransactionSummaryField::setParentItem()
     * @uses PostingTransactionSummaryField::setItem()
     * @uses PostingTransactionSummaryField::setEntity()
     * @uses PostingTransactionSummaryField::setDepartment()
     * @uses PostingTransactionSummaryField::setClass()
     * @uses PostingTransactionSummaryField::setLocation()
     * @uses PostingTransactionSummaryField::setSubsidiary()
     * @uses PostingTransactionSummaryField::setBook()
     * @param bool $period
     * @param bool $account
     * @param bool $parentItem
     * @param bool $item
     * @param bool $entity
     * @param bool $department
     * @param bool $class
     * @param bool $location
     * @param bool $subsidiary
     * @param bool $book
     */
    public function __construct($period = null, $account = null, $parentItem = null, $item = null, $entity = null, $department = null, $class = null, $location = null, $subsidiary = null, $book = null)
    {
        $this
            ->setPeriod($period)
            ->setAccount($account)
            ->setParentItem($parentItem)
            ->setItem($item)
            ->setEntity($entity)
            ->setDepartment($department)
            ->setClass($class)
            ->setLocation($location)
            ->setSubsidiary($subsidiary)
            ->setBook($book);
    }
    /**
     * Get period value
     * @return bool|null
     */
    public function getPeriod()
    {
        return $this->period;
    }
    /**
     * Set period value
     * @param bool $period
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setPeriod($period = null)
    {
        // validation for constraint: boolean
        if (!is_null($period) && !is_bool($period)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($period, true), gettype($period)), __LINE__);
        }
        $this->period = $period;
        return $this;
    }
    /**
     * Get account value
     * @return bool|null
     */
    public function getAccount()
    {
        return $this->account;
    }
    /**
     * Set account value
     * @param bool $account
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setAccount($account = null)
    {
        // validation for constraint: boolean
        if (!is_null($account) && !is_bool($account)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($account, true), gettype($account)), __LINE__);
        }
        $this->account = $account;
        return $this;
    }
    /**
     * Get parentItem value
     * @return bool|null
     */
    public function getParentItem()
    {
        return $this->parentItem;
    }
    /**
     * Set parentItem value
     * @param bool $parentItem
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setParentItem($parentItem = null)
    {
        // validation for constraint: boolean
        if (!is_null($parentItem) && !is_bool($parentItem)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($parentItem, true), gettype($parentItem)), __LINE__);
        }
        $this->parentItem = $parentItem;
        return $this;
    }
    /**
     * Get item value
     * @return bool|null
     */
    public function getItem()
    {
        return $this->item;
    }
    /**
     * Set item value
     * @param bool $item
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setItem($item = null)
    {
        // validation for constraint: boolean
        if (!is_null($item) && !is_bool($item)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($item, true), gettype($item)), __LINE__);
        }
        $this->item = $item;
        return $this;
    }
    /**
     * Get entity value
     * @return bool|null
     */
    public function getEntity()
    {
        return $this->entity;
    }
    /**
     * Set entity value
     * @param bool $entity
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setEntity($entity = null)
    {
        // validation for constraint: boolean
        if (!is_null($entity) && !is_bool($entity)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($entity, true), gettype($entity)), __LINE__);
        }
        $this->entity = $entity;
        return $this;
    }
    /**
     * Get department value
     * @return bool|null
     */
    public function getDepartment()
    {
        return $this->department;
    }
    /**
     * Set department value
     * @param bool $department
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setDepartment($department = null)
    {
        // validation for constraint: boolean
        if (!is_null($department) && !is_bool($department)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($department, true), gettype($department)), __LINE__);
        }
        $this->department = $department;
        return $this;
    }
    /**
     * Get class value
     * @return bool|null
     */
    public function getClass()
    {
        return $this->class;
    }
    /**
     * Set class value
     * @param bool $class
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setClass($class = null)
    {
        // validation for constraint: boolean
        if (!is_null($class) && !is_bool($class)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($class, true), gettype($class)), __LINE__);
        }
        $this->class = $class;
        return $this;
    }
    /**
     * Get location value
     * @return bool|null
     */
    public function getLocation()
    {
        return $this->location;
    }
    /**
     * Set location value
     * @param bool $location
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setLocation($location = null)
    {
        // validation for constraint: boolean
        if (!is_null($location) && !is_bool($location)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($location, true), gettype($location)), __LINE__);
        }
        $this->location = $location;
        return $this;
    }
    /**
     * Get subsidiary value
     * @return bool|null
     */
    public function getSubsidiary()
    {
        return $this->subsidiary;
    }
    /**
     * Set subsidiary value
     * @param bool $subsidiary
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setSubsidiary($subsidiary = null)
    {
        // validation for constraint: boolean
        if (!is_null($subsidiary) && !is_bool($subsidiary)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($subsidiary, true), gettype($subsidiary)), __LINE__);
        }
        $this->subsidiary = $subsidiary;
        return $this;
    }
    /**
     * Get book value
     * @return bool|null
     */
    public function getBook()
    {
        return $this->book;
    }
    /**
     * Set book value
     * @param bool $book
     * @return \StructType\PostingTransactionSummaryField
     */
    public function setBook($book = null)
    {
        // validation for constraint: boolean
        if (!is_null($book) && !is_bool($book)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($book, true), gettype($book)), __LINE__);
        }
        $this->book = $book;
        return $this;
    }
}
