<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Sales.FinancialJournalTargetSummaryFilter StructType
 * @subpackage Structs
 */
class Sales_FinancialJournalTargetSummaryFilter extends FilterEntity
{
    /**
     * The FromDateTime
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $FromDateTime;
    /**
     * The FromSequentialNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $FromSequentialNumber;
    /**
     * The FromTransactionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $FromTransactionNumber;
    /**
     * The ToDateTime
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ToDateTime;
    /**
     * The ToSequentialNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $ToSequentialNumber;
    /**
     * The ToTransactionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $ToTransactionNumber;
    /**
     * Constructor method for Sales.FinancialJournalTargetSummaryFilter
     * @uses Sales_FinancialJournalTargetSummaryFilter::setFromDateTime()
     * @uses Sales_FinancialJournalTargetSummaryFilter::setFromSequentialNumber()
     * @uses Sales_FinancialJournalTargetSummaryFilter::setFromTransactionNumber()
     * @uses Sales_FinancialJournalTargetSummaryFilter::setToDateTime()
     * @uses Sales_FinancialJournalTargetSummaryFilter::setToSequentialNumber()
     * @uses Sales_FinancialJournalTargetSummaryFilter::setToTransactionNumber()
     * @param string $fromDateTime
     * @param int $fromSequentialNumber
     * @param int $fromTransactionNumber
     * @param string $toDateTime
     * @param int $toSequentialNumber
     * @param int $toTransactionNumber
     */
    public function __construct($fromDateTime = null, $fromSequentialNumber = null, $fromTransactionNumber = null, $toDateTime = null, $toSequentialNumber = null, $toTransactionNumber = null)
    {
        $this
            ->setFromDateTime($fromDateTime)
            ->setFromSequentialNumber($fromSequentialNumber)
            ->setFromTransactionNumber($fromTransactionNumber)
            ->setToDateTime($toDateTime)
            ->setToSequentialNumber($toSequentialNumber)
            ->setToTransactionNumber($toTransactionNumber);
    }
    /**
     * Get FromDateTime value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getFromDateTime()
    {
        return isset($this->FromDateTime) ? $this->FromDateTime : null;
    }
    /**
     * Set FromDateTime value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $fromDateTime
     * @return \patest\StructType\Sales_FinancialJournalTargetSummaryFilter
     */
    public function setFromDateTime($fromDateTime = null)
    {
        // validation for constraint: string
        if (!is_null($fromDateTime) && !is_string($fromDateTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fromDateTime, true), gettype($fromDateTime)), __LINE__);
        }
        if (is_null($fromDateTime) || (is_array($fromDateTime) && empty($fromDateTime))) {
            unset($this->FromDateTime);
        } else {
            $this->FromDateTime = $fromDateTime;
        }
        return $this;
    }
    /**
     * Get FromSequentialNumber value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return int|null
     */
    public function getFromSequentialNumber()
    {
        return isset($this->FromSequentialNumber) ? $this->FromSequentialNumber : null;
    }
    /**
     * Set FromSequentialNumber value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param int $fromSequentialNumber
     * @return \patest\StructType\Sales_FinancialJournalTargetSummaryFilter
     */
    public function setFromSequentialNumber($fromSequentialNumber = null)
    {
        // validation for constraint: int
        if (!is_null($fromSequentialNumber) && !(is_int($fromSequentialNumber) || ctype_digit($fromSequentialNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($fromSequentialNumber, true), gettype($fromSequentialNumber)), __LINE__);
        }
        if (is_null($fromSequentialNumber) || (is_array($fromSequentialNumber) && empty($fromSequentialNumber))) {
            unset($this->FromSequentialNumber);
        } else {
            $this->FromSequentialNumber = $fromSequentialNumber;
        }
        return $this;
    }
    /**
     * Get FromTransactionNumber value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return int|null
     */
    public function getFromTransactionNumber()
    {
        return isset($this->FromTransactionNumber) ? $this->FromTransactionNumber : null;
    }
    /**
     * Set FromTransactionNumber value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param int $fromTransactionNumber
     * @return \patest\StructType\Sales_FinancialJournalTargetSummaryFilter
     */
    public function setFromTransactionNumber($fromTransactionNumber = null)
    {
        // validation for constraint: int
        if (!is_null($fromTransactionNumber) && !(is_int($fromTransactionNumber) || ctype_digit($fromTransactionNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($fromTransactionNumber, true), gettype($fromTransactionNumber)), __LINE__);
        }
        if (is_null($fromTransactionNumber) || (is_array($fromTransactionNumber) && empty($fromTransactionNumber))) {
            unset($this->FromTransactionNumber);
        } else {
            $this->FromTransactionNumber = $fromTransactionNumber;
        }
        return $this;
    }
    /**
     * Get ToDateTime value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getToDateTime()
    {
        return isset($this->ToDateTime) ? $this->ToDateTime : null;
    }
    /**
     * Set ToDateTime value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $toDateTime
     * @return \patest\StructType\Sales_FinancialJournalTargetSummaryFilter
     */
    public function setToDateTime($toDateTime = null)
    {
        // validation for constraint: string
        if (!is_null($toDateTime) && !is_string($toDateTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($toDateTime, true), gettype($toDateTime)), __LINE__);
        }
        if (is_null($toDateTime) || (is_array($toDateTime) && empty($toDateTime))) {
            unset($this->ToDateTime);
        } else {
            $this->ToDateTime = $toDateTime;
        }
        return $this;
    }
    /**
     * Get ToSequentialNumber value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return int|null
     */
    public function getToSequentialNumber()
    {
        return isset($this->ToSequentialNumber) ? $this->ToSequentialNumber : null;
    }
    /**
     * Set ToSequentialNumber value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param int $toSequentialNumber
     * @return \patest\StructType\Sales_FinancialJournalTargetSummaryFilter
     */
    public function setToSequentialNumber($toSequentialNumber = null)
    {
        // validation for constraint: int
        if (!is_null($toSequentialNumber) && !(is_int($toSequentialNumber) || ctype_digit($toSequentialNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($toSequentialNumber, true), gettype($toSequentialNumber)), __LINE__);
        }
        if (is_null($toSequentialNumber) || (is_array($toSequentialNumber) && empty($toSequentialNumber))) {
            unset($this->ToSequentialNumber);
        } else {
            $this->ToSequentialNumber = $toSequentialNumber;
        }
        return $this;
    }
    /**
     * Get ToTransactionNumber value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return int|null
     */
    public function getToTransactionNumber()
    {
        return isset($this->ToTransactionNumber) ? $this->ToTransactionNumber : null;
    }
    /**
     * Set ToTransactionNumber value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param int $toTransactionNumber
     * @return \patest\StructType\Sales_FinancialJournalTargetSummaryFilter
     */
    public function setToTransactionNumber($toTransactionNumber = null)
    {
        // validation for constraint: int
        if (!is_null($toTransactionNumber) && !(is_int($toTransactionNumber) || ctype_digit($toTransactionNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($toTransactionNumber, true), gettype($toTransactionNumber)), __LINE__);
        }
        if (is_null($toTransactionNumber) || (is_array($toTransactionNumber) && empty($toTransactionNumber))) {
            unset($this->ToTransactionNumber);
        } else {
            $this->ToTransactionNumber = $toTransactionNumber;
        }
        return $this;
    }
}
