<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TimeBillSearch StructType
 * @subpackage Structs
 */
class TimeBillSearch extends SearchRecord
{
    /**
     * The basic
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TimeBillSearchBasic
     */
    public $basic;
    /**
     * The callJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PhoneCallSearchBasic
     */
    public $callJoin;
    /**
     * The caseJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SupportCaseSearchBasic
     */
    public $caseJoin;
    /**
     * The chargeJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ChargeSearchBasic
     */
    public $chargeJoin;
    /**
     * The classJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ClassificationSearchBasic
     */
    public $classJoin;
    /**
     * The customerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomerSearchBasic
     */
    public $customerJoin;
    /**
     * The departmentJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\DepartmentSearchBasic
     */
    public $departmentJoin;
    /**
     * The employeeJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchBasic
     */
    public $employeeJoin;
    /**
     * The eventJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CalendarEventSearchBasic
     */
    public $eventJoin;
    /**
     * The itemJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ItemSearchBasic
     */
    public $itemJoin;
    /**
     * The jobJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\JobSearchBasic
     */
    public $jobJoin;
    /**
     * The locationJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\LocationSearchBasic
     */
    public $locationJoin;
    /**
     * The projectTaskJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ProjectTaskSearchBasic
     */
    public $projectTaskJoin;
    /**
     * The projectTaskAssignmentJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ProjectTaskAssignmentSearchBasic
     */
    public $projectTaskAssignmentJoin;
    /**
     * The resourceAllocationJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ResourceAllocationSearchBasic
     */
    public $resourceAllocationJoin;
    /**
     * The taskJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TaskSearchBasic
     */
    public $taskJoin;
    /**
     * The userJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchBasic
     */
    public $userJoin;
    /**
     * The vendorJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\VendorSearchBasic
     */
    public $vendorJoin;
    /**
     * The timeSheetJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TimeSheetSearchBasic
     */
    public $timeSheetJoin;
    /**
     * The customSearchJoin
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\CustomSearchJoin[]
     */
    public $customSearchJoin;
    /**
     * Constructor method for TimeBillSearch
     * @uses TimeBillSearch::setBasic()
     * @uses TimeBillSearch::setCallJoin()
     * @uses TimeBillSearch::setCaseJoin()
     * @uses TimeBillSearch::setChargeJoin()
     * @uses TimeBillSearch::setClassJoin()
     * @uses TimeBillSearch::setCustomerJoin()
     * @uses TimeBillSearch::setDepartmentJoin()
     * @uses TimeBillSearch::setEmployeeJoin()
     * @uses TimeBillSearch::setEventJoin()
     * @uses TimeBillSearch::setItemJoin()
     * @uses TimeBillSearch::setJobJoin()
     * @uses TimeBillSearch::setLocationJoin()
     * @uses TimeBillSearch::setProjectTaskJoin()
     * @uses TimeBillSearch::setProjectTaskAssignmentJoin()
     * @uses TimeBillSearch::setResourceAllocationJoin()
     * @uses TimeBillSearch::setTaskJoin()
     * @uses TimeBillSearch::setUserJoin()
     * @uses TimeBillSearch::setVendorJoin()
     * @uses TimeBillSearch::setTimeSheetJoin()
     * @uses TimeBillSearch::setCustomSearchJoin()
     * @param \StructType\TimeBillSearchBasic $basic
     * @param \StructType\PhoneCallSearchBasic $callJoin
     * @param \StructType\SupportCaseSearchBasic $caseJoin
     * @param \StructType\ChargeSearchBasic $chargeJoin
     * @param \StructType\ClassificationSearchBasic $classJoin
     * @param \StructType\CustomerSearchBasic $customerJoin
     * @param \StructType\DepartmentSearchBasic $departmentJoin
     * @param \StructType\EmployeeSearchBasic $employeeJoin
     * @param \StructType\CalendarEventSearchBasic $eventJoin
     * @param \StructType\ItemSearchBasic $itemJoin
     * @param \StructType\JobSearchBasic $jobJoin
     * @param \StructType\LocationSearchBasic $locationJoin
     * @param \StructType\ProjectTaskSearchBasic $projectTaskJoin
     * @param \StructType\ProjectTaskAssignmentSearchBasic $projectTaskAssignmentJoin
     * @param \StructType\ResourceAllocationSearchBasic $resourceAllocationJoin
     * @param \StructType\TaskSearchBasic $taskJoin
     * @param \StructType\EmployeeSearchBasic $userJoin
     * @param \StructType\VendorSearchBasic $vendorJoin
     * @param \StructType\TimeSheetSearchBasic $timeSheetJoin
     * @param \StructType\CustomSearchJoin[] $customSearchJoin
     */
    public function __construct(\StructType\TimeBillSearchBasic $basic = null, \StructType\PhoneCallSearchBasic $callJoin = null, \StructType\SupportCaseSearchBasic $caseJoin = null, \StructType\ChargeSearchBasic $chargeJoin = null, \StructType\ClassificationSearchBasic $classJoin = null, \StructType\CustomerSearchBasic $customerJoin = null, \StructType\DepartmentSearchBasic $departmentJoin = null, \StructType\EmployeeSearchBasic $employeeJoin = null, \StructType\CalendarEventSearchBasic $eventJoin = null, \StructType\ItemSearchBasic $itemJoin = null, \StructType\JobSearchBasic $jobJoin = null, \StructType\LocationSearchBasic $locationJoin = null, \StructType\ProjectTaskSearchBasic $projectTaskJoin = null, \StructType\ProjectTaskAssignmentSearchBasic $projectTaskAssignmentJoin = null, \StructType\ResourceAllocationSearchBasic $resourceAllocationJoin = null, \StructType\TaskSearchBasic $taskJoin = null, \StructType\EmployeeSearchBasic $userJoin = null, \StructType\VendorSearchBasic $vendorJoin = null, \StructType\TimeSheetSearchBasic $timeSheetJoin = null, array $customSearchJoin = array())
    {
        $this
            ->setBasic($basic)
            ->setCallJoin($callJoin)
            ->setCaseJoin($caseJoin)
            ->setChargeJoin($chargeJoin)
            ->setClassJoin($classJoin)
            ->setCustomerJoin($customerJoin)
            ->setDepartmentJoin($departmentJoin)
            ->setEmployeeJoin($employeeJoin)
            ->setEventJoin($eventJoin)
            ->setItemJoin($itemJoin)
            ->setJobJoin($jobJoin)
            ->setLocationJoin($locationJoin)
            ->setProjectTaskJoin($projectTaskJoin)
            ->setProjectTaskAssignmentJoin($projectTaskAssignmentJoin)
            ->setResourceAllocationJoin($resourceAllocationJoin)
            ->setTaskJoin($taskJoin)
            ->setUserJoin($userJoin)
            ->setVendorJoin($vendorJoin)
            ->setTimeSheetJoin($timeSheetJoin)
            ->setCustomSearchJoin($customSearchJoin);
    }
    /**
     * Get basic value
     * @return \StructType\TimeBillSearchBasic|null
     */
    public function getBasic()
    {
        return $this->basic;
    }
    /**
     * Set basic value
     * @param \StructType\TimeBillSearchBasic $basic
     * @return \StructType\TimeBillSearch
     */
    public function setBasic(\StructType\TimeBillSearchBasic $basic = null)
    {
        $this->basic = $basic;
        return $this;
    }
    /**
     * Get callJoin value
     * @return \StructType\PhoneCallSearchBasic|null
     */
    public function getCallJoin()
    {
        return $this->callJoin;
    }
    /**
     * Set callJoin value
     * @param \StructType\PhoneCallSearchBasic $callJoin
     * @return \StructType\TimeBillSearch
     */
    public function setCallJoin(\StructType\PhoneCallSearchBasic $callJoin = null)
    {
        $this->callJoin = $callJoin;
        return $this;
    }
    /**
     * Get caseJoin value
     * @return \StructType\SupportCaseSearchBasic|null
     */
    public function getCaseJoin()
    {
        return $this->caseJoin;
    }
    /**
     * Set caseJoin value
     * @param \StructType\SupportCaseSearchBasic $caseJoin
     * @return \StructType\TimeBillSearch
     */
    public function setCaseJoin(\StructType\SupportCaseSearchBasic $caseJoin = null)
    {
        $this->caseJoin = $caseJoin;
        return $this;
    }
    /**
     * Get chargeJoin value
     * @return \StructType\ChargeSearchBasic|null
     */
    public function getChargeJoin()
    {
        return $this->chargeJoin;
    }
    /**
     * Set chargeJoin value
     * @param \StructType\ChargeSearchBasic $chargeJoin
     * @return \StructType\TimeBillSearch
     */
    public function setChargeJoin(\StructType\ChargeSearchBasic $chargeJoin = null)
    {
        $this->chargeJoin = $chargeJoin;
        return $this;
    }
    /**
     * Get classJoin value
     * @return \StructType\ClassificationSearchBasic|null
     */
    public function getClassJoin()
    {
        return $this->classJoin;
    }
    /**
     * Set classJoin value
     * @param \StructType\ClassificationSearchBasic $classJoin
     * @return \StructType\TimeBillSearch
     */
    public function setClassJoin(\StructType\ClassificationSearchBasic $classJoin = null)
    {
        $this->classJoin = $classJoin;
        return $this;
    }
    /**
     * Get customerJoin value
     * @return \StructType\CustomerSearchBasic|null
     */
    public function getCustomerJoin()
    {
        return $this->customerJoin;
    }
    /**
     * Set customerJoin value
     * @param \StructType\CustomerSearchBasic $customerJoin
     * @return \StructType\TimeBillSearch
     */
    public function setCustomerJoin(\StructType\CustomerSearchBasic $customerJoin = null)
    {
        $this->customerJoin = $customerJoin;
        return $this;
    }
    /**
     * Get departmentJoin value
     * @return \StructType\DepartmentSearchBasic|null
     */
    public function getDepartmentJoin()
    {
        return $this->departmentJoin;
    }
    /**
     * Set departmentJoin value
     * @param \StructType\DepartmentSearchBasic $departmentJoin
     * @return \StructType\TimeBillSearch
     */
    public function setDepartmentJoin(\StructType\DepartmentSearchBasic $departmentJoin = null)
    {
        $this->departmentJoin = $departmentJoin;
        return $this;
    }
    /**
     * Get employeeJoin value
     * @return \StructType\EmployeeSearchBasic|null
     */
    public function getEmployeeJoin()
    {
        return $this->employeeJoin;
    }
    /**
     * Set employeeJoin value
     * @param \StructType\EmployeeSearchBasic $employeeJoin
     * @return \StructType\TimeBillSearch
     */
    public function setEmployeeJoin(\StructType\EmployeeSearchBasic $employeeJoin = null)
    {
        $this->employeeJoin = $employeeJoin;
        return $this;
    }
    /**
     * Get eventJoin value
     * @return \StructType\CalendarEventSearchBasic|null
     */
    public function getEventJoin()
    {
        return $this->eventJoin;
    }
    /**
     * Set eventJoin value
     * @param \StructType\CalendarEventSearchBasic $eventJoin
     * @return \StructType\TimeBillSearch
     */
    public function setEventJoin(\StructType\CalendarEventSearchBasic $eventJoin = null)
    {
        $this->eventJoin = $eventJoin;
        return $this;
    }
    /**
     * Get itemJoin value
     * @return \StructType\ItemSearchBasic|null
     */
    public function getItemJoin()
    {
        return $this->itemJoin;
    }
    /**
     * Set itemJoin value
     * @param \StructType\ItemSearchBasic $itemJoin
     * @return \StructType\TimeBillSearch
     */
    public function setItemJoin(\StructType\ItemSearchBasic $itemJoin = null)
    {
        $this->itemJoin = $itemJoin;
        return $this;
    }
    /**
     * Get jobJoin value
     * @return \StructType\JobSearchBasic|null
     */
    public function getJobJoin()
    {
        return $this->jobJoin;
    }
    /**
     * Set jobJoin value
     * @param \StructType\JobSearchBasic $jobJoin
     * @return \StructType\TimeBillSearch
     */
    public function setJobJoin(\StructType\JobSearchBasic $jobJoin = null)
    {
        $this->jobJoin = $jobJoin;
        return $this;
    }
    /**
     * Get locationJoin value
     * @return \StructType\LocationSearchBasic|null
     */
    public function getLocationJoin()
    {
        return $this->locationJoin;
    }
    /**
     * Set locationJoin value
     * @param \StructType\LocationSearchBasic $locationJoin
     * @return \StructType\TimeBillSearch
     */
    public function setLocationJoin(\StructType\LocationSearchBasic $locationJoin = null)
    {
        $this->locationJoin = $locationJoin;
        return $this;
    }
    /**
     * Get projectTaskJoin value
     * @return \StructType\ProjectTaskSearchBasic|null
     */
    public function getProjectTaskJoin()
    {
        return $this->projectTaskJoin;
    }
    /**
     * Set projectTaskJoin value
     * @param \StructType\ProjectTaskSearchBasic $projectTaskJoin
     * @return \StructType\TimeBillSearch
     */
    public function setProjectTaskJoin(\StructType\ProjectTaskSearchBasic $projectTaskJoin = null)
    {
        $this->projectTaskJoin = $projectTaskJoin;
        return $this;
    }
    /**
     * Get projectTaskAssignmentJoin value
     * @return \StructType\ProjectTaskAssignmentSearchBasic|null
     */
    public function getProjectTaskAssignmentJoin()
    {
        return $this->projectTaskAssignmentJoin;
    }
    /**
     * Set projectTaskAssignmentJoin value
     * @param \StructType\ProjectTaskAssignmentSearchBasic $projectTaskAssignmentJoin
     * @return \StructType\TimeBillSearch
     */
    public function setProjectTaskAssignmentJoin(\StructType\ProjectTaskAssignmentSearchBasic $projectTaskAssignmentJoin = null)
    {
        $this->projectTaskAssignmentJoin = $projectTaskAssignmentJoin;
        return $this;
    }
    /**
     * Get resourceAllocationJoin value
     * @return \StructType\ResourceAllocationSearchBasic|null
     */
    public function getResourceAllocationJoin()
    {
        return $this->resourceAllocationJoin;
    }
    /**
     * Set resourceAllocationJoin value
     * @param \StructType\ResourceAllocationSearchBasic $resourceAllocationJoin
     * @return \StructType\TimeBillSearch
     */
    public function setResourceAllocationJoin(\StructType\ResourceAllocationSearchBasic $resourceAllocationJoin = null)
    {
        $this->resourceAllocationJoin = $resourceAllocationJoin;
        return $this;
    }
    /**
     * Get taskJoin value
     * @return \StructType\TaskSearchBasic|null
     */
    public function getTaskJoin()
    {
        return $this->taskJoin;
    }
    /**
     * Set taskJoin value
     * @param \StructType\TaskSearchBasic $taskJoin
     * @return \StructType\TimeBillSearch
     */
    public function setTaskJoin(\StructType\TaskSearchBasic $taskJoin = null)
    {
        $this->taskJoin = $taskJoin;
        return $this;
    }
    /**
     * Get userJoin value
     * @return \StructType\EmployeeSearchBasic|null
     */
    public function getUserJoin()
    {
        return $this->userJoin;
    }
    /**
     * Set userJoin value
     * @param \StructType\EmployeeSearchBasic $userJoin
     * @return \StructType\TimeBillSearch
     */
    public function setUserJoin(\StructType\EmployeeSearchBasic $userJoin = null)
    {
        $this->userJoin = $userJoin;
        return $this;
    }
    /**
     * Get vendorJoin value
     * @return \StructType\VendorSearchBasic|null
     */
    public function getVendorJoin()
    {
        return $this->vendorJoin;
    }
    /**
     * Set vendorJoin value
     * @param \StructType\VendorSearchBasic $vendorJoin
     * @return \StructType\TimeBillSearch
     */
    public function setVendorJoin(\StructType\VendorSearchBasic $vendorJoin = null)
    {
        $this->vendorJoin = $vendorJoin;
        return $this;
    }
    /**
     * Get timeSheetJoin value
     * @return \StructType\TimeSheetSearchBasic|null
     */
    public function getTimeSheetJoin()
    {
        return $this->timeSheetJoin;
    }
    /**
     * Set timeSheetJoin value
     * @param \StructType\TimeSheetSearchBasic $timeSheetJoin
     * @return \StructType\TimeBillSearch
     */
    public function setTimeSheetJoin(\StructType\TimeSheetSearchBasic $timeSheetJoin = null)
    {
        $this->timeSheetJoin = $timeSheetJoin;
        return $this;
    }
    /**
     * Get customSearchJoin value
     * @return \StructType\CustomSearchJoin[]|null
     */
    public function getCustomSearchJoin()
    {
        return $this->customSearchJoin;
    }
    /**
     * This method is responsible for validating the values passed to the setCustomSearchJoin method
     * This method is willingly generated in order to preserve the one-line inline validation within the setCustomSearchJoin method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateCustomSearchJoinForArrayConstraintsFromSetCustomSearchJoin(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $timeBillSearchCustomSearchJoinItem) {
            // validation for constraint: itemType
            if (!$timeBillSearchCustomSearchJoinItem instanceof \StructType\CustomSearchJoin) {
                $invalidValues[] = is_object($timeBillSearchCustomSearchJoinItem) ? get_class($timeBillSearchCustomSearchJoinItem) : sprintf('%s(%s)', gettype($timeBillSearchCustomSearchJoinItem), var_export($timeBillSearchCustomSearchJoinItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The customSearchJoin property can only contain items of type \StructType\CustomSearchJoin, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set customSearchJoin value
     * @throws \InvalidArgumentException
     * @param \StructType\CustomSearchJoin[] $customSearchJoin
     * @return \StructType\TimeBillSearch
     */
    public function setCustomSearchJoin(array $customSearchJoin = array())
    {
        // validation for constraint: array
        if ('' !== ($customSearchJoinArrayErrorMessage = self::validateCustomSearchJoinForArrayConstraintsFromSetCustomSearchJoin($customSearchJoin))) {
            throw new \InvalidArgumentException($customSearchJoinArrayErrorMessage, __LINE__);
        }
        $this->customSearchJoin = $customSearchJoin;
        return $this;
    }
    /**
     * Add item to customSearchJoin value
     * @throws \InvalidArgumentException
     * @param \StructType\CustomSearchJoin $item
     * @return \StructType\TimeBillSearch
     */
    public function addToCustomSearchJoin(\StructType\CustomSearchJoin $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\CustomSearchJoin) {
            throw new \InvalidArgumentException(sprintf('The customSearchJoin property can only contain items of type \StructType\CustomSearchJoin, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->customSearchJoin[] = $item;
        return $this;
    }
}
