<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for NoteSearch StructType
 * @subpackage Structs
 */
class NoteSearch extends SearchRecord
{
    /**
     * The basic
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\NoteSearchBasic
     */
    public $basic;
    /**
     * The authorJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchBasic
     */
    public $authorJoin;
    /**
     * The callJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PhoneCallSearchBasic
     */
    public $callJoin;
    /**
     * The campaignJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CampaignSearchBasic
     */
    public $campaignJoin;
    /**
     * The caseJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SupportCaseSearchBasic
     */
    public $caseJoin;
    /**
     * The contactJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ContactSearchBasic
     */
    public $contactJoin;
    /**
     * The customerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomerSearchBasic
     */
    public $customerJoin;
    /**
     * The employeeJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchBasic
     */
    public $employeeJoin;
    /**
     * The entityJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EntitySearchBasic
     */
    public $entityJoin;
    /**
     * The eventJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CalendarEventSearchBasic
     */
    public $eventJoin;
    /**
     * The issueJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\IssueSearchBasic
     */
    public $issueJoin;
    /**
     * The itemJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ItemSearchBasic
     */
    public $itemJoin;
    /**
     * The opportunityJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\OpportunitySearchBasic
     */
    public $opportunityJoin;
    /**
     * The originatingLeadJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\OriginatingLeadSearchBasic
     */
    public $originatingLeadJoin;
    /**
     * The partnerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PartnerSearchBasic
     */
    public $partnerJoin;
    /**
     * The solutionJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SolutionSearchBasic
     */
    public $solutionJoin;
    /**
     * The taskJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TaskSearchBasic
     */
    public $taskJoin;
    /**
     * The transactionJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchBasic
     */
    public $transactionJoin;
    /**
     * 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 customSearchJoin
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\CustomSearchJoin[]
     */
    public $customSearchJoin;
    /**
     * Constructor method for NoteSearch
     * @uses NoteSearch::setBasic()
     * @uses NoteSearch::setAuthorJoin()
     * @uses NoteSearch::setCallJoin()
     * @uses NoteSearch::setCampaignJoin()
     * @uses NoteSearch::setCaseJoin()
     * @uses NoteSearch::setContactJoin()
     * @uses NoteSearch::setCustomerJoin()
     * @uses NoteSearch::setEmployeeJoin()
     * @uses NoteSearch::setEntityJoin()
     * @uses NoteSearch::setEventJoin()
     * @uses NoteSearch::setIssueJoin()
     * @uses NoteSearch::setItemJoin()
     * @uses NoteSearch::setOpportunityJoin()
     * @uses NoteSearch::setOriginatingLeadJoin()
     * @uses NoteSearch::setPartnerJoin()
     * @uses NoteSearch::setSolutionJoin()
     * @uses NoteSearch::setTaskJoin()
     * @uses NoteSearch::setTransactionJoin()
     * @uses NoteSearch::setUserJoin()
     * @uses NoteSearch::setVendorJoin()
     * @uses NoteSearch::setCustomSearchJoin()
     * @param \StructType\NoteSearchBasic $basic
     * @param \StructType\EmployeeSearchBasic $authorJoin
     * @param \StructType\PhoneCallSearchBasic $callJoin
     * @param \StructType\CampaignSearchBasic $campaignJoin
     * @param \StructType\SupportCaseSearchBasic $caseJoin
     * @param \StructType\ContactSearchBasic $contactJoin
     * @param \StructType\CustomerSearchBasic $customerJoin
     * @param \StructType\EmployeeSearchBasic $employeeJoin
     * @param \StructType\EntitySearchBasic $entityJoin
     * @param \StructType\CalendarEventSearchBasic $eventJoin
     * @param \StructType\IssueSearchBasic $issueJoin
     * @param \StructType\ItemSearchBasic $itemJoin
     * @param \StructType\OpportunitySearchBasic $opportunityJoin
     * @param \StructType\OriginatingLeadSearchBasic $originatingLeadJoin
     * @param \StructType\PartnerSearchBasic $partnerJoin
     * @param \StructType\SolutionSearchBasic $solutionJoin
     * @param \StructType\TaskSearchBasic $taskJoin
     * @param \StructType\TransactionSearchBasic $transactionJoin
     * @param \StructType\EmployeeSearchBasic $userJoin
     * @param \StructType\VendorSearchBasic $vendorJoin
     * @param \StructType\CustomSearchJoin[] $customSearchJoin
     */
    public function __construct(\StructType\NoteSearchBasic $basic = null, \StructType\EmployeeSearchBasic $authorJoin = null, \StructType\PhoneCallSearchBasic $callJoin = null, \StructType\CampaignSearchBasic $campaignJoin = null, \StructType\SupportCaseSearchBasic $caseJoin = null, \StructType\ContactSearchBasic $contactJoin = null, \StructType\CustomerSearchBasic $customerJoin = null, \StructType\EmployeeSearchBasic $employeeJoin = null, \StructType\EntitySearchBasic $entityJoin = null, \StructType\CalendarEventSearchBasic $eventJoin = null, \StructType\IssueSearchBasic $issueJoin = null, \StructType\ItemSearchBasic $itemJoin = null, \StructType\OpportunitySearchBasic $opportunityJoin = null, \StructType\OriginatingLeadSearchBasic $originatingLeadJoin = null, \StructType\PartnerSearchBasic $partnerJoin = null, \StructType\SolutionSearchBasic $solutionJoin = null, \StructType\TaskSearchBasic $taskJoin = null, \StructType\TransactionSearchBasic $transactionJoin = null, \StructType\EmployeeSearchBasic $userJoin = null, \StructType\VendorSearchBasic $vendorJoin = null, array $customSearchJoin = array())
    {
        $this
            ->setBasic($basic)
            ->setAuthorJoin($authorJoin)
            ->setCallJoin($callJoin)
            ->setCampaignJoin($campaignJoin)
            ->setCaseJoin($caseJoin)
            ->setContactJoin($contactJoin)
            ->setCustomerJoin($customerJoin)
            ->setEmployeeJoin($employeeJoin)
            ->setEntityJoin($entityJoin)
            ->setEventJoin($eventJoin)
            ->setIssueJoin($issueJoin)
            ->setItemJoin($itemJoin)
            ->setOpportunityJoin($opportunityJoin)
            ->setOriginatingLeadJoin($originatingLeadJoin)
            ->setPartnerJoin($partnerJoin)
            ->setSolutionJoin($solutionJoin)
            ->setTaskJoin($taskJoin)
            ->setTransactionJoin($transactionJoin)
            ->setUserJoin($userJoin)
            ->setVendorJoin($vendorJoin)
            ->setCustomSearchJoin($customSearchJoin);
    }
    /**
     * Get basic value
     * @return \StructType\NoteSearchBasic|null
     */
    public function getBasic()
    {
        return $this->basic;
    }
    /**
     * Set basic value
     * @param \StructType\NoteSearchBasic $basic
     * @return \StructType\NoteSearch
     */
    public function setBasic(\StructType\NoteSearchBasic $basic = null)
    {
        $this->basic = $basic;
        return $this;
    }
    /**
     * Get authorJoin value
     * @return \StructType\EmployeeSearchBasic|null
     */
    public function getAuthorJoin()
    {
        return $this->authorJoin;
    }
    /**
     * Set authorJoin value
     * @param \StructType\EmployeeSearchBasic $authorJoin
     * @return \StructType\NoteSearch
     */
    public function setAuthorJoin(\StructType\EmployeeSearchBasic $authorJoin = null)
    {
        $this->authorJoin = $authorJoin;
        return $this;
    }
    /**
     * Get callJoin value
     * @return \StructType\PhoneCallSearchBasic|null
     */
    public function getCallJoin()
    {
        return $this->callJoin;
    }
    /**
     * Set callJoin value
     * @param \StructType\PhoneCallSearchBasic $callJoin
     * @return \StructType\NoteSearch
     */
    public function setCallJoin(\StructType\PhoneCallSearchBasic $callJoin = null)
    {
        $this->callJoin = $callJoin;
        return $this;
    }
    /**
     * Get campaignJoin value
     * @return \StructType\CampaignSearchBasic|null
     */
    public function getCampaignJoin()
    {
        return $this->campaignJoin;
    }
    /**
     * Set campaignJoin value
     * @param \StructType\CampaignSearchBasic $campaignJoin
     * @return \StructType\NoteSearch
     */
    public function setCampaignJoin(\StructType\CampaignSearchBasic $campaignJoin = null)
    {
        $this->campaignJoin = $campaignJoin;
        return $this;
    }
    /**
     * Get caseJoin value
     * @return \StructType\SupportCaseSearchBasic|null
     */
    public function getCaseJoin()
    {
        return $this->caseJoin;
    }
    /**
     * Set caseJoin value
     * @param \StructType\SupportCaseSearchBasic $caseJoin
     * @return \StructType\NoteSearch
     */
    public function setCaseJoin(\StructType\SupportCaseSearchBasic $caseJoin = null)
    {
        $this->caseJoin = $caseJoin;
        return $this;
    }
    /**
     * Get contactJoin value
     * @return \StructType\ContactSearchBasic|null
     */
    public function getContactJoin()
    {
        return $this->contactJoin;
    }
    /**
     * Set contactJoin value
     * @param \StructType\ContactSearchBasic $contactJoin
     * @return \StructType\NoteSearch
     */
    public function setContactJoin(\StructType\ContactSearchBasic $contactJoin = null)
    {
        $this->contactJoin = $contactJoin;
        return $this;
    }
    /**
     * Get customerJoin value
     * @return \StructType\CustomerSearchBasic|null
     */
    public function getCustomerJoin()
    {
        return $this->customerJoin;
    }
    /**
     * Set customerJoin value
     * @param \StructType\CustomerSearchBasic $customerJoin
     * @return \StructType\NoteSearch
     */
    public function setCustomerJoin(\StructType\CustomerSearchBasic $customerJoin = null)
    {
        $this->customerJoin = $customerJoin;
        return $this;
    }
    /**
     * Get employeeJoin value
     * @return \StructType\EmployeeSearchBasic|null
     */
    public function getEmployeeJoin()
    {
        return $this->employeeJoin;
    }
    /**
     * Set employeeJoin value
     * @param \StructType\EmployeeSearchBasic $employeeJoin
     * @return \StructType\NoteSearch
     */
    public function setEmployeeJoin(\StructType\EmployeeSearchBasic $employeeJoin = null)
    {
        $this->employeeJoin = $employeeJoin;
        return $this;
    }
    /**
     * Get entityJoin value
     * @return \StructType\EntitySearchBasic|null
     */
    public function getEntityJoin()
    {
        return $this->entityJoin;
    }
    /**
     * Set entityJoin value
     * @param \StructType\EntitySearchBasic $entityJoin
     * @return \StructType\NoteSearch
     */
    public function setEntityJoin(\StructType\EntitySearchBasic $entityJoin = null)
    {
        $this->entityJoin = $entityJoin;
        return $this;
    }
    /**
     * Get eventJoin value
     * @return \StructType\CalendarEventSearchBasic|null
     */
    public function getEventJoin()
    {
        return $this->eventJoin;
    }
    /**
     * Set eventJoin value
     * @param \StructType\CalendarEventSearchBasic $eventJoin
     * @return \StructType\NoteSearch
     */
    public function setEventJoin(\StructType\CalendarEventSearchBasic $eventJoin = null)
    {
        $this->eventJoin = $eventJoin;
        return $this;
    }
    /**
     * Get issueJoin value
     * @return \StructType\IssueSearchBasic|null
     */
    public function getIssueJoin()
    {
        return $this->issueJoin;
    }
    /**
     * Set issueJoin value
     * @param \StructType\IssueSearchBasic $issueJoin
     * @return \StructType\NoteSearch
     */
    public function setIssueJoin(\StructType\IssueSearchBasic $issueJoin = null)
    {
        $this->issueJoin = $issueJoin;
        return $this;
    }
    /**
     * Get itemJoin value
     * @return \StructType\ItemSearchBasic|null
     */
    public function getItemJoin()
    {
        return $this->itemJoin;
    }
    /**
     * Set itemJoin value
     * @param \StructType\ItemSearchBasic $itemJoin
     * @return \StructType\NoteSearch
     */
    public function setItemJoin(\StructType\ItemSearchBasic $itemJoin = null)
    {
        $this->itemJoin = $itemJoin;
        return $this;
    }
    /**
     * Get opportunityJoin value
     * @return \StructType\OpportunitySearchBasic|null
     */
    public function getOpportunityJoin()
    {
        return $this->opportunityJoin;
    }
    /**
     * Set opportunityJoin value
     * @param \StructType\OpportunitySearchBasic $opportunityJoin
     * @return \StructType\NoteSearch
     */
    public function setOpportunityJoin(\StructType\OpportunitySearchBasic $opportunityJoin = null)
    {
        $this->opportunityJoin = $opportunityJoin;
        return $this;
    }
    /**
     * Get originatingLeadJoin value
     * @return \StructType\OriginatingLeadSearchBasic|null
     */
    public function getOriginatingLeadJoin()
    {
        return $this->originatingLeadJoin;
    }
    /**
     * Set originatingLeadJoin value
     * @param \StructType\OriginatingLeadSearchBasic $originatingLeadJoin
     * @return \StructType\NoteSearch
     */
    public function setOriginatingLeadJoin(\StructType\OriginatingLeadSearchBasic $originatingLeadJoin = null)
    {
        $this->originatingLeadJoin = $originatingLeadJoin;
        return $this;
    }
    /**
     * Get partnerJoin value
     * @return \StructType\PartnerSearchBasic|null
     */
    public function getPartnerJoin()
    {
        return $this->partnerJoin;
    }
    /**
     * Set partnerJoin value
     * @param \StructType\PartnerSearchBasic $partnerJoin
     * @return \StructType\NoteSearch
     */
    public function setPartnerJoin(\StructType\PartnerSearchBasic $partnerJoin = null)
    {
        $this->partnerJoin = $partnerJoin;
        return $this;
    }
    /**
     * Get solutionJoin value
     * @return \StructType\SolutionSearchBasic|null
     */
    public function getSolutionJoin()
    {
        return $this->solutionJoin;
    }
    /**
     * Set solutionJoin value
     * @param \StructType\SolutionSearchBasic $solutionJoin
     * @return \StructType\NoteSearch
     */
    public function setSolutionJoin(\StructType\SolutionSearchBasic $solutionJoin = null)
    {
        $this->solutionJoin = $solutionJoin;
        return $this;
    }
    /**
     * Get taskJoin value
     * @return \StructType\TaskSearchBasic|null
     */
    public function getTaskJoin()
    {
        return $this->taskJoin;
    }
    /**
     * Set taskJoin value
     * @param \StructType\TaskSearchBasic $taskJoin
     * @return \StructType\NoteSearch
     */
    public function setTaskJoin(\StructType\TaskSearchBasic $taskJoin = null)
    {
        $this->taskJoin = $taskJoin;
        return $this;
    }
    /**
     * Get transactionJoin value
     * @return \StructType\TransactionSearchBasic|null
     */
    public function getTransactionJoin()
    {
        return $this->transactionJoin;
    }
    /**
     * Set transactionJoin value
     * @param \StructType\TransactionSearchBasic $transactionJoin
     * @return \StructType\NoteSearch
     */
    public function setTransactionJoin(\StructType\TransactionSearchBasic $transactionJoin = null)
    {
        $this->transactionJoin = $transactionJoin;
        return $this;
    }
    /**
     * Get userJoin value
     * @return \StructType\EmployeeSearchBasic|null
     */
    public function getUserJoin()
    {
        return $this->userJoin;
    }
    /**
     * Set userJoin value
     * @param \StructType\EmployeeSearchBasic $userJoin
     * @return \StructType\NoteSearch
     */
    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\NoteSearch
     */
    public function setVendorJoin(\StructType\VendorSearchBasic $vendorJoin = null)
    {
        $this->vendorJoin = $vendorJoin;
        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 $noteSearchCustomSearchJoinItem) {
            // validation for constraint: itemType
            if (!$noteSearchCustomSearchJoinItem instanceof \StructType\CustomSearchJoin) {
                $invalidValues[] = is_object($noteSearchCustomSearchJoinItem) ? get_class($noteSearchCustomSearchJoinItem) : sprintf('%s(%s)', gettype($noteSearchCustomSearchJoinItem), var_export($noteSearchCustomSearchJoinItem, 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\NoteSearch
     */
    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\NoteSearch
     */
    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;
    }
}
