<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for NoteSearchRow StructType
 * @subpackage Structs
 */
class NoteSearchRow extends SearchRow
{
    /**
     * The basic
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\NoteSearchRowBasic
     */
    public $basic;
    /**
     * The authorJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchRowBasic
     */
    public $authorJoin;
    /**
     * The callJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PhoneCallSearchRowBasic
     */
    public $callJoin;
    /**
     * The campaignJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CampaignSearchRowBasic
     */
    public $campaignJoin;
    /**
     * The caseJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SupportCaseSearchRowBasic
     */
    public $caseJoin;
    /**
     * The contactJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ContactSearchRowBasic
     */
    public $contactJoin;
    /**
     * The customerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomerSearchRowBasic
     */
    public $customerJoin;
    /**
     * The employeeJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchRowBasic
     */
    public $employeeJoin;
    /**
     * The entityJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EntitySearchRowBasic
     */
    public $entityJoin;
    /**
     * The eventJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CalendarEventSearchRowBasic
     */
    public $eventJoin;
    /**
     * The issueJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\IssueSearchRowBasic
     */
    public $issueJoin;
    /**
     * The itemJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ItemSearchRowBasic
     */
    public $itemJoin;
    /**
     * The opportunityJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\OpportunitySearchRowBasic
     */
    public $opportunityJoin;
    /**
     * The originatingLeadJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\OriginatingLeadSearchRowBasic
     */
    public $originatingLeadJoin;
    /**
     * The partnerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PartnerSearchRowBasic
     */
    public $partnerJoin;
    /**
     * The solutionJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SolutionSearchRowBasic
     */
    public $solutionJoin;
    /**
     * The taskJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TaskSearchRowBasic
     */
    public $taskJoin;
    /**
     * The transactionJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchRowBasic
     */
    public $transactionJoin;
    /**
     * 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 NoteSearchRow
     * @uses NoteSearchRow::setBasic()
     * @uses NoteSearchRow::setAuthorJoin()
     * @uses NoteSearchRow::setCallJoin()
     * @uses NoteSearchRow::setCampaignJoin()
     * @uses NoteSearchRow::setCaseJoin()
     * @uses NoteSearchRow::setContactJoin()
     * @uses NoteSearchRow::setCustomerJoin()
     * @uses NoteSearchRow::setEmployeeJoin()
     * @uses NoteSearchRow::setEntityJoin()
     * @uses NoteSearchRow::setEventJoin()
     * @uses NoteSearchRow::setIssueJoin()
     * @uses NoteSearchRow::setItemJoin()
     * @uses NoteSearchRow::setOpportunityJoin()
     * @uses NoteSearchRow::setOriginatingLeadJoin()
     * @uses NoteSearchRow::setPartnerJoin()
     * @uses NoteSearchRow::setSolutionJoin()
     * @uses NoteSearchRow::setTaskJoin()
     * @uses NoteSearchRow::setTransactionJoin()
     * @uses NoteSearchRow::setUserJoin()
     * @uses NoteSearchRow::setVendorJoin()
     * @uses NoteSearchRow::setCustomSearchJoin()
     * @param \StructType\NoteSearchRowBasic $basic
     * @param \StructType\EmployeeSearchRowBasic $authorJoin
     * @param \StructType\PhoneCallSearchRowBasic $callJoin
     * @param \StructType\CampaignSearchRowBasic $campaignJoin
     * @param \StructType\SupportCaseSearchRowBasic $caseJoin
     * @param \StructType\ContactSearchRowBasic $contactJoin
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @param \StructType\EmployeeSearchRowBasic $employeeJoin
     * @param \StructType\EntitySearchRowBasic $entityJoin
     * @param \StructType\CalendarEventSearchRowBasic $eventJoin
     * @param \StructType\IssueSearchRowBasic $issueJoin
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @param \StructType\OpportunitySearchRowBasic $opportunityJoin
     * @param \StructType\OriginatingLeadSearchRowBasic $originatingLeadJoin
     * @param \StructType\PartnerSearchRowBasic $partnerJoin
     * @param \StructType\SolutionSearchRowBasic $solutionJoin
     * @param \StructType\TaskSearchRowBasic $taskJoin
     * @param \StructType\TransactionSearchRowBasic $transactionJoin
     * @param \StructType\EmployeeSearchRowBasic $userJoin
     * @param \StructType\VendorSearchRowBasic $vendorJoin
     * @param \StructType\CustomSearchRowBasic[] $customSearchJoin
     */
    public function __construct(\StructType\NoteSearchRowBasic $basic = null, \StructType\EmployeeSearchRowBasic $authorJoin = null, \StructType\PhoneCallSearchRowBasic $callJoin = null, \StructType\CampaignSearchRowBasic $campaignJoin = null, \StructType\SupportCaseSearchRowBasic $caseJoin = null, \StructType\ContactSearchRowBasic $contactJoin = null, \StructType\CustomerSearchRowBasic $customerJoin = null, \StructType\EmployeeSearchRowBasic $employeeJoin = null, \StructType\EntitySearchRowBasic $entityJoin = null, \StructType\CalendarEventSearchRowBasic $eventJoin = null, \StructType\IssueSearchRowBasic $issueJoin = null, \StructType\ItemSearchRowBasic $itemJoin = null, \StructType\OpportunitySearchRowBasic $opportunityJoin = null, \StructType\OriginatingLeadSearchRowBasic $originatingLeadJoin = null, \StructType\PartnerSearchRowBasic $partnerJoin = null, \StructType\SolutionSearchRowBasic $solutionJoin = null, \StructType\TaskSearchRowBasic $taskJoin = null, \StructType\TransactionSearchRowBasic $transactionJoin = null, \StructType\EmployeeSearchRowBasic $userJoin = null, \StructType\VendorSearchRowBasic $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\NoteSearchRowBasic|null
     */
    public function getBasic()
    {
        return $this->basic;
    }
    /**
     * Set basic value
     * @param \StructType\NoteSearchRowBasic $basic
     * @return \StructType\NoteSearchRow
     */
    public function setBasic(\StructType\NoteSearchRowBasic $basic = null)
    {
        $this->basic = $basic;
        return $this;
    }
    /**
     * Get authorJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getAuthorJoin()
    {
        return $this->authorJoin;
    }
    /**
     * Set authorJoin value
     * @param \StructType\EmployeeSearchRowBasic $authorJoin
     * @return \StructType\NoteSearchRow
     */
    public function setAuthorJoin(\StructType\EmployeeSearchRowBasic $authorJoin = null)
    {
        $this->authorJoin = $authorJoin;
        return $this;
    }
    /**
     * Get callJoin value
     * @return \StructType\PhoneCallSearchRowBasic|null
     */
    public function getCallJoin()
    {
        return $this->callJoin;
    }
    /**
     * Set callJoin value
     * @param \StructType\PhoneCallSearchRowBasic $callJoin
     * @return \StructType\NoteSearchRow
     */
    public function setCallJoin(\StructType\PhoneCallSearchRowBasic $callJoin = null)
    {
        $this->callJoin = $callJoin;
        return $this;
    }
    /**
     * Get campaignJoin value
     * @return \StructType\CampaignSearchRowBasic|null
     */
    public function getCampaignJoin()
    {
        return $this->campaignJoin;
    }
    /**
     * Set campaignJoin value
     * @param \StructType\CampaignSearchRowBasic $campaignJoin
     * @return \StructType\NoteSearchRow
     */
    public function setCampaignJoin(\StructType\CampaignSearchRowBasic $campaignJoin = null)
    {
        $this->campaignJoin = $campaignJoin;
        return $this;
    }
    /**
     * Get caseJoin value
     * @return \StructType\SupportCaseSearchRowBasic|null
     */
    public function getCaseJoin()
    {
        return $this->caseJoin;
    }
    /**
     * Set caseJoin value
     * @param \StructType\SupportCaseSearchRowBasic $caseJoin
     * @return \StructType\NoteSearchRow
     */
    public function setCaseJoin(\StructType\SupportCaseSearchRowBasic $caseJoin = null)
    {
        $this->caseJoin = $caseJoin;
        return $this;
    }
    /**
     * Get contactJoin value
     * @return \StructType\ContactSearchRowBasic|null
     */
    public function getContactJoin()
    {
        return $this->contactJoin;
    }
    /**
     * Set contactJoin value
     * @param \StructType\ContactSearchRowBasic $contactJoin
     * @return \StructType\NoteSearchRow
     */
    public function setContactJoin(\StructType\ContactSearchRowBasic $contactJoin = null)
    {
        $this->contactJoin = $contactJoin;
        return $this;
    }
    /**
     * Get customerJoin value
     * @return \StructType\CustomerSearchRowBasic|null
     */
    public function getCustomerJoin()
    {
        return $this->customerJoin;
    }
    /**
     * Set customerJoin value
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @return \StructType\NoteSearchRow
     */
    public function setCustomerJoin(\StructType\CustomerSearchRowBasic $customerJoin = null)
    {
        $this->customerJoin = $customerJoin;
        return $this;
    }
    /**
     * Get employeeJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getEmployeeJoin()
    {
        return $this->employeeJoin;
    }
    /**
     * Set employeeJoin value
     * @param \StructType\EmployeeSearchRowBasic $employeeJoin
     * @return \StructType\NoteSearchRow
     */
    public function setEmployeeJoin(\StructType\EmployeeSearchRowBasic $employeeJoin = null)
    {
        $this->employeeJoin = $employeeJoin;
        return $this;
    }
    /**
     * Get entityJoin value
     * @return \StructType\EntitySearchRowBasic|null
     */
    public function getEntityJoin()
    {
        return $this->entityJoin;
    }
    /**
     * Set entityJoin value
     * @param \StructType\EntitySearchRowBasic $entityJoin
     * @return \StructType\NoteSearchRow
     */
    public function setEntityJoin(\StructType\EntitySearchRowBasic $entityJoin = null)
    {
        $this->entityJoin = $entityJoin;
        return $this;
    }
    /**
     * Get eventJoin value
     * @return \StructType\CalendarEventSearchRowBasic|null
     */
    public function getEventJoin()
    {
        return $this->eventJoin;
    }
    /**
     * Set eventJoin value
     * @param \StructType\CalendarEventSearchRowBasic $eventJoin
     * @return \StructType\NoteSearchRow
     */
    public function setEventJoin(\StructType\CalendarEventSearchRowBasic $eventJoin = null)
    {
        $this->eventJoin = $eventJoin;
        return $this;
    }
    /**
     * Get issueJoin value
     * @return \StructType\IssueSearchRowBasic|null
     */
    public function getIssueJoin()
    {
        return $this->issueJoin;
    }
    /**
     * Set issueJoin value
     * @param \StructType\IssueSearchRowBasic $issueJoin
     * @return \StructType\NoteSearchRow
     */
    public function setIssueJoin(\StructType\IssueSearchRowBasic $issueJoin = null)
    {
        $this->issueJoin = $issueJoin;
        return $this;
    }
    /**
     * Get itemJoin value
     * @return \StructType\ItemSearchRowBasic|null
     */
    public function getItemJoin()
    {
        return $this->itemJoin;
    }
    /**
     * Set itemJoin value
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @return \StructType\NoteSearchRow
     */
    public function setItemJoin(\StructType\ItemSearchRowBasic $itemJoin = null)
    {
        $this->itemJoin = $itemJoin;
        return $this;
    }
    /**
     * Get opportunityJoin value
     * @return \StructType\OpportunitySearchRowBasic|null
     */
    public function getOpportunityJoin()
    {
        return $this->opportunityJoin;
    }
    /**
     * Set opportunityJoin value
     * @param \StructType\OpportunitySearchRowBasic $opportunityJoin
     * @return \StructType\NoteSearchRow
     */
    public function setOpportunityJoin(\StructType\OpportunitySearchRowBasic $opportunityJoin = null)
    {
        $this->opportunityJoin = $opportunityJoin;
        return $this;
    }
    /**
     * Get originatingLeadJoin value
     * @return \StructType\OriginatingLeadSearchRowBasic|null
     */
    public function getOriginatingLeadJoin()
    {
        return $this->originatingLeadJoin;
    }
    /**
     * Set originatingLeadJoin value
     * @param \StructType\OriginatingLeadSearchRowBasic $originatingLeadJoin
     * @return \StructType\NoteSearchRow
     */
    public function setOriginatingLeadJoin(\StructType\OriginatingLeadSearchRowBasic $originatingLeadJoin = null)
    {
        $this->originatingLeadJoin = $originatingLeadJoin;
        return $this;
    }
    /**
     * Get partnerJoin value
     * @return \StructType\PartnerSearchRowBasic|null
     */
    public function getPartnerJoin()
    {
        return $this->partnerJoin;
    }
    /**
     * Set partnerJoin value
     * @param \StructType\PartnerSearchRowBasic $partnerJoin
     * @return \StructType\NoteSearchRow
     */
    public function setPartnerJoin(\StructType\PartnerSearchRowBasic $partnerJoin = null)
    {
        $this->partnerJoin = $partnerJoin;
        return $this;
    }
    /**
     * Get solutionJoin value
     * @return \StructType\SolutionSearchRowBasic|null
     */
    public function getSolutionJoin()
    {
        return $this->solutionJoin;
    }
    /**
     * Set solutionJoin value
     * @param \StructType\SolutionSearchRowBasic $solutionJoin
     * @return \StructType\NoteSearchRow
     */
    public function setSolutionJoin(\StructType\SolutionSearchRowBasic $solutionJoin = null)
    {
        $this->solutionJoin = $solutionJoin;
        return $this;
    }
    /**
     * Get taskJoin value
     * @return \StructType\TaskSearchRowBasic|null
     */
    public function getTaskJoin()
    {
        return $this->taskJoin;
    }
    /**
     * Set taskJoin value
     * @param \StructType\TaskSearchRowBasic $taskJoin
     * @return \StructType\NoteSearchRow
     */
    public function setTaskJoin(\StructType\TaskSearchRowBasic $taskJoin = null)
    {
        $this->taskJoin = $taskJoin;
        return $this;
    }
    /**
     * Get transactionJoin value
     * @return \StructType\TransactionSearchRowBasic|null
     */
    public function getTransactionJoin()
    {
        return $this->transactionJoin;
    }
    /**
     * Set transactionJoin value
     * @param \StructType\TransactionSearchRowBasic $transactionJoin
     * @return \StructType\NoteSearchRow
     */
    public function setTransactionJoin(\StructType\TransactionSearchRowBasic $transactionJoin = null)
    {
        $this->transactionJoin = $transactionJoin;
        return $this;
    }
    /**
     * Get userJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getUserJoin()
    {
        return $this->userJoin;
    }
    /**
     * Set userJoin value
     * @param \StructType\EmployeeSearchRowBasic $userJoin
     * @return \StructType\NoteSearchRow
     */
    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\NoteSearchRow
     */
    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 $noteSearchRowCustomSearchJoinItem) {
            // validation for constraint: itemType
            if (!$noteSearchRowCustomSearchJoinItem instanceof \StructType\CustomSearchRowBasic) {
                $invalidValues[] = is_object($noteSearchRowCustomSearchJoinItem) ? get_class($noteSearchRowCustomSearchJoinItem) : sprintf('%s(%s)', gettype($noteSearchRowCustomSearchJoinItem), var_export($noteSearchRowCustomSearchJoinItem, 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\NoteSearchRow
     */
    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\NoteSearchRow
     */
    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;
    }
}
