<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TimeEntrySearchRow StructType
 * @subpackage Structs
 */
class TimeEntrySearchRow extends SearchRow
{
    /**
     * The basic
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TimeEntrySearchRowBasic
     */
    public $basic;
    /**
     * The callJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PhoneCallSearchRowBasic
     */
    public $callJoin;
    /**
     * The caseJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SupportCaseSearchRowBasic
     */
    public $caseJoin;
    /**
     * The classJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ClassificationSearchRowBasic
     */
    public $classJoin;
    /**
     * The customerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomerSearchRowBasic
     */
    public $customerJoin;
    /**
     * The departmentJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\DepartmentSearchRowBasic
     */
    public $departmentJoin;
    /**
     * The employeeJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchRowBasic
     */
    public $employeeJoin;
    /**
     * The eventJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CalendarEventSearchRowBasic
     */
    public $eventJoin;
    /**
     * The itemJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ItemSearchRowBasic
     */
    public $itemJoin;
    /**
     * The jobJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\JobSearchRowBasic
     */
    public $jobJoin;
    /**
     * The locationJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\LocationSearchRowBasic
     */
    public $locationJoin;
    /**
     * The projectTaskJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ProjectTaskSearchRowBasic
     */
    public $projectTaskJoin;
    /**
     * The projectTaskAssignmentJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ProjectTaskAssignmentSearchRowBasic
     */
    public $projectTaskAssignmentJoin;
    /**
     * The resourceAllocationJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ResourceAllocationSearchRowBasic
     */
    public $resourceAllocationJoin;
    /**
     * The taskJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TaskSearchRowBasic
     */
    public $taskJoin;
    /**
     * The timeSheetJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TimeSheetSearchRowBasic
     */
    public $timeSheetJoin;
    /**
     * The userJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchRowBasic
     */
    public $userJoin;
    /**
     * The vendorJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\VendorSearchRowBasic
     */
    public $vendorJoin;
    /**
     * The customSearchJoin
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\CustomSearchRowBasic[]
     */
    public $customSearchJoin;
    /**
     * Constructor method for TimeEntrySearchRow
     * @uses TimeEntrySearchRow::setBasic()
     * @uses TimeEntrySearchRow::setCallJoin()
     * @uses TimeEntrySearchRow::setCaseJoin()
     * @uses TimeEntrySearchRow::setClassJoin()
     * @uses TimeEntrySearchRow::setCustomerJoin()
     * @uses TimeEntrySearchRow::setDepartmentJoin()
     * @uses TimeEntrySearchRow::setEmployeeJoin()
     * @uses TimeEntrySearchRow::setEventJoin()
     * @uses TimeEntrySearchRow::setItemJoin()
     * @uses TimeEntrySearchRow::setJobJoin()
     * @uses TimeEntrySearchRow::setLocationJoin()
     * @uses TimeEntrySearchRow::setProjectTaskJoin()
     * @uses TimeEntrySearchRow::setProjectTaskAssignmentJoin()
     * @uses TimeEntrySearchRow::setResourceAllocationJoin()
     * @uses TimeEntrySearchRow::setTaskJoin()
     * @uses TimeEntrySearchRow::setTimeSheetJoin()
     * @uses TimeEntrySearchRow::setUserJoin()
     * @uses TimeEntrySearchRow::setVendorJoin()
     * @uses TimeEntrySearchRow::setCustomSearchJoin()
     * @param \StructType\TimeEntrySearchRowBasic $basic
     * @param \StructType\PhoneCallSearchRowBasic $callJoin
     * @param \StructType\SupportCaseSearchRowBasic $caseJoin
     * @param \StructType\ClassificationSearchRowBasic $classJoin
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @param \StructType\DepartmentSearchRowBasic $departmentJoin
     * @param \StructType\EmployeeSearchRowBasic $employeeJoin
     * @param \StructType\CalendarEventSearchRowBasic $eventJoin
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @param \StructType\JobSearchRowBasic $jobJoin
     * @param \StructType\LocationSearchRowBasic $locationJoin
     * @param \StructType\ProjectTaskSearchRowBasic $projectTaskJoin
     * @param \StructType\ProjectTaskAssignmentSearchRowBasic $projectTaskAssignmentJoin
     * @param \StructType\ResourceAllocationSearchRowBasic $resourceAllocationJoin
     * @param \StructType\TaskSearchRowBasic $taskJoin
     * @param \StructType\TimeSheetSearchRowBasic $timeSheetJoin
     * @param \StructType\EmployeeSearchRowBasic $userJoin
     * @param \StructType\VendorSearchRowBasic $vendorJoin
     * @param \StructType\CustomSearchRowBasic[] $customSearchJoin
     */
    public function __construct(\StructType\TimeEntrySearchRowBasic $basic = null, \StructType\PhoneCallSearchRowBasic $callJoin = null, \StructType\SupportCaseSearchRowBasic $caseJoin = null, \StructType\ClassificationSearchRowBasic $classJoin = null, \StructType\CustomerSearchRowBasic $customerJoin = null, \StructType\DepartmentSearchRowBasic $departmentJoin = null, \StructType\EmployeeSearchRowBasic $employeeJoin = null, \StructType\CalendarEventSearchRowBasic $eventJoin = null, \StructType\ItemSearchRowBasic $itemJoin = null, \StructType\JobSearchRowBasic $jobJoin = null, \StructType\LocationSearchRowBasic $locationJoin = null, \StructType\ProjectTaskSearchRowBasic $projectTaskJoin = null, \StructType\ProjectTaskAssignmentSearchRowBasic $projectTaskAssignmentJoin = null, \StructType\ResourceAllocationSearchRowBasic $resourceAllocationJoin = null, \StructType\TaskSearchRowBasic $taskJoin = null, \StructType\TimeSheetSearchRowBasic $timeSheetJoin = null, \StructType\EmployeeSearchRowBasic $userJoin = null, \StructType\VendorSearchRowBasic $vendorJoin = null, array $customSearchJoin = array())
    {
        $this
            ->setBasic($basic)
            ->setCallJoin($callJoin)
            ->setCaseJoin($caseJoin)
            ->setClassJoin($classJoin)
            ->setCustomerJoin($customerJoin)
            ->setDepartmentJoin($departmentJoin)
            ->setEmployeeJoin($employeeJoin)
            ->setEventJoin($eventJoin)
            ->setItemJoin($itemJoin)
            ->setJobJoin($jobJoin)
            ->setLocationJoin($locationJoin)
            ->setProjectTaskJoin($projectTaskJoin)
            ->setProjectTaskAssignmentJoin($projectTaskAssignmentJoin)
            ->setResourceAllocationJoin($resourceAllocationJoin)
            ->setTaskJoin($taskJoin)
            ->setTimeSheetJoin($timeSheetJoin)
            ->setUserJoin($userJoin)
            ->setVendorJoin($vendorJoin)
            ->setCustomSearchJoin($customSearchJoin);
    }
    /**
     * Get basic value
     * @return \StructType\TimeEntrySearchRowBasic|null
     */
    public function getBasic()
    {
        return $this->basic;
    }
    /**
     * Set basic value
     * @param \StructType\TimeEntrySearchRowBasic $basic
     * @return \StructType\TimeEntrySearchRow
     */
    public function setBasic(\StructType\TimeEntrySearchRowBasic $basic = null)
    {
        $this->basic = $basic;
        return $this;
    }
    /**
     * Get callJoin value
     * @return \StructType\PhoneCallSearchRowBasic|null
     */
    public function getCallJoin()
    {
        return $this->callJoin;
    }
    /**
     * Set callJoin value
     * @param \StructType\PhoneCallSearchRowBasic $callJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setCallJoin(\StructType\PhoneCallSearchRowBasic $callJoin = null)
    {
        $this->callJoin = $callJoin;
        return $this;
    }
    /**
     * Get caseJoin value
     * @return \StructType\SupportCaseSearchRowBasic|null
     */
    public function getCaseJoin()
    {
        return $this->caseJoin;
    }
    /**
     * Set caseJoin value
     * @param \StructType\SupportCaseSearchRowBasic $caseJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setCaseJoin(\StructType\SupportCaseSearchRowBasic $caseJoin = null)
    {
        $this->caseJoin = $caseJoin;
        return $this;
    }
    /**
     * Get classJoin value
     * @return \StructType\ClassificationSearchRowBasic|null
     */
    public function getClassJoin()
    {
        return $this->classJoin;
    }
    /**
     * Set classJoin value
     * @param \StructType\ClassificationSearchRowBasic $classJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setClassJoin(\StructType\ClassificationSearchRowBasic $classJoin = null)
    {
        $this->classJoin = $classJoin;
        return $this;
    }
    /**
     * Get customerJoin value
     * @return \StructType\CustomerSearchRowBasic|null
     */
    public function getCustomerJoin()
    {
        return $this->customerJoin;
    }
    /**
     * Set customerJoin value
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setCustomerJoin(\StructType\CustomerSearchRowBasic $customerJoin = null)
    {
        $this->customerJoin = $customerJoin;
        return $this;
    }
    /**
     * Get departmentJoin value
     * @return \StructType\DepartmentSearchRowBasic|null
     */
    public function getDepartmentJoin()
    {
        return $this->departmentJoin;
    }
    /**
     * Set departmentJoin value
     * @param \StructType\DepartmentSearchRowBasic $departmentJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setDepartmentJoin(\StructType\DepartmentSearchRowBasic $departmentJoin = null)
    {
        $this->departmentJoin = $departmentJoin;
        return $this;
    }
    /**
     * Get employeeJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getEmployeeJoin()
    {
        return $this->employeeJoin;
    }
    /**
     * Set employeeJoin value
     * @param \StructType\EmployeeSearchRowBasic $employeeJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setEmployeeJoin(\StructType\EmployeeSearchRowBasic $employeeJoin = null)
    {
        $this->employeeJoin = $employeeJoin;
        return $this;
    }
    /**
     * Get eventJoin value
     * @return \StructType\CalendarEventSearchRowBasic|null
     */
    public function getEventJoin()
    {
        return $this->eventJoin;
    }
    /**
     * Set eventJoin value
     * @param \StructType\CalendarEventSearchRowBasic $eventJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setEventJoin(\StructType\CalendarEventSearchRowBasic $eventJoin = null)
    {
        $this->eventJoin = $eventJoin;
        return $this;
    }
    /**
     * Get itemJoin value
     * @return \StructType\ItemSearchRowBasic|null
     */
    public function getItemJoin()
    {
        return $this->itemJoin;
    }
    /**
     * Set itemJoin value
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setItemJoin(\StructType\ItemSearchRowBasic $itemJoin = null)
    {
        $this->itemJoin = $itemJoin;
        return $this;
    }
    /**
     * Get jobJoin value
     * @return \StructType\JobSearchRowBasic|null
     */
    public function getJobJoin()
    {
        return $this->jobJoin;
    }
    /**
     * Set jobJoin value
     * @param \StructType\JobSearchRowBasic $jobJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setJobJoin(\StructType\JobSearchRowBasic $jobJoin = null)
    {
        $this->jobJoin = $jobJoin;
        return $this;
    }
    /**
     * Get locationJoin value
     * @return \StructType\LocationSearchRowBasic|null
     */
    public function getLocationJoin()
    {
        return $this->locationJoin;
    }
    /**
     * Set locationJoin value
     * @param \StructType\LocationSearchRowBasic $locationJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setLocationJoin(\StructType\LocationSearchRowBasic $locationJoin = null)
    {
        $this->locationJoin = $locationJoin;
        return $this;
    }
    /**
     * Get projectTaskJoin value
     * @return \StructType\ProjectTaskSearchRowBasic|null
     */
    public function getProjectTaskJoin()
    {
        return $this->projectTaskJoin;
    }
    /**
     * Set projectTaskJoin value
     * @param \StructType\ProjectTaskSearchRowBasic $projectTaskJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setProjectTaskJoin(\StructType\ProjectTaskSearchRowBasic $projectTaskJoin = null)
    {
        $this->projectTaskJoin = $projectTaskJoin;
        return $this;
    }
    /**
     * Get projectTaskAssignmentJoin value
     * @return \StructType\ProjectTaskAssignmentSearchRowBasic|null
     */
    public function getProjectTaskAssignmentJoin()
    {
        return $this->projectTaskAssignmentJoin;
    }
    /**
     * Set projectTaskAssignmentJoin value
     * @param \StructType\ProjectTaskAssignmentSearchRowBasic $projectTaskAssignmentJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setProjectTaskAssignmentJoin(\StructType\ProjectTaskAssignmentSearchRowBasic $projectTaskAssignmentJoin = null)
    {
        $this->projectTaskAssignmentJoin = $projectTaskAssignmentJoin;
        return $this;
    }
    /**
     * Get resourceAllocationJoin value
     * @return \StructType\ResourceAllocationSearchRowBasic|null
     */
    public function getResourceAllocationJoin()
    {
        return $this->resourceAllocationJoin;
    }
    /**
     * Set resourceAllocationJoin value
     * @param \StructType\ResourceAllocationSearchRowBasic $resourceAllocationJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setResourceAllocationJoin(\StructType\ResourceAllocationSearchRowBasic $resourceAllocationJoin = null)
    {
        $this->resourceAllocationJoin = $resourceAllocationJoin;
        return $this;
    }
    /**
     * Get taskJoin value
     * @return \StructType\TaskSearchRowBasic|null
     */
    public function getTaskJoin()
    {
        return $this->taskJoin;
    }
    /**
     * Set taskJoin value
     * @param \StructType\TaskSearchRowBasic $taskJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setTaskJoin(\StructType\TaskSearchRowBasic $taskJoin = null)
    {
        $this->taskJoin = $taskJoin;
        return $this;
    }
    /**
     * Get timeSheetJoin value
     * @return \StructType\TimeSheetSearchRowBasic|null
     */
    public function getTimeSheetJoin()
    {
        return $this->timeSheetJoin;
    }
    /**
     * Set timeSheetJoin value
     * @param \StructType\TimeSheetSearchRowBasic $timeSheetJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setTimeSheetJoin(\StructType\TimeSheetSearchRowBasic $timeSheetJoin = null)
    {
        $this->timeSheetJoin = $timeSheetJoin;
        return $this;
    }
    /**
     * Get userJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getUserJoin()
    {
        return $this->userJoin;
    }
    /**
     * Set userJoin value
     * @param \StructType\EmployeeSearchRowBasic $userJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setUserJoin(\StructType\EmployeeSearchRowBasic $userJoin = null)
    {
        $this->userJoin = $userJoin;
        return $this;
    }
    /**
     * Get vendorJoin value
     * @return \StructType\VendorSearchRowBasic|null
     */
    public function getVendorJoin()
    {
        return $this->vendorJoin;
    }
    /**
     * Set vendorJoin value
     * @param \StructType\VendorSearchRowBasic $vendorJoin
     * @return \StructType\TimeEntrySearchRow
     */
    public function setVendorJoin(\StructType\VendorSearchRowBasic $vendorJoin = null)
    {
        $this->vendorJoin = $vendorJoin;
        return $this;
    }
    /**
     * Get customSearchJoin value
     * @return \StructType\CustomSearchRowBasic[]|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 $timeEntrySearchRowCustomSearchJoinItem) {
            // validation for constraint: itemType
            if (!$timeEntrySearchRowCustomSearchJoinItem instanceof \StructType\CustomSearchRowBasic) {
                $invalidValues[] = is_object($timeEntrySearchRowCustomSearchJoinItem) ? get_class($timeEntrySearchRowCustomSearchJoinItem) : sprintf('%s(%s)', gettype($timeEntrySearchRowCustomSearchJoinItem), var_export($timeEntrySearchRowCustomSearchJoinItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The customSearchJoin property can only contain items of type \StructType\CustomSearchRowBasic, %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\CustomSearchRowBasic[] $customSearchJoin
     * @return \StructType\TimeEntrySearchRow
     */
    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\CustomSearchRowBasic $item
     * @return \StructType\TimeEntrySearchRow
     */
    public function addToCustomSearchJoin(\StructType\CustomSearchRowBasic $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\CustomSearchRowBasic) {
            throw new \InvalidArgumentException(sprintf('The customSearchJoin property can only contain items of type \StructType\CustomSearchRowBasic, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->customSearchJoin[] = $item;
        return $this;
    }
}
