<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PartnerSearch StructType
 * @subpackage Structs
 */
class PartnerSearch extends SearchRecord
{
    /**
     * The basic
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PartnerSearchBasic
     */
    public $basic;
    /**
     * The campaignResponseJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CampaignSearchBasic
     */
    public $campaignResponseJoin;
    /**
     * The contactJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ContactSearchBasic
     */
    public $contactJoin;
    /**
     * The contactPrimaryJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ContactSearchBasic
     */
    public $contactPrimaryJoin;
    /**
     * The customerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomerSearchBasic
     */
    public $customerJoin;
    /**
     * The fileJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\FileSearchBasic
     */
    public $fileJoin;
    /**
     * The messagesJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\MessageSearchBasic
     */
    public $messagesJoin;
    /**
     * The messagesFromJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\MessageSearchBasic
     */
    public $messagesFromJoin;
    /**
     * The messagesToJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\MessageSearchBasic
     */
    public $messagesToJoin;
    /**
     * The opportunityJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\OpportunitySearchBasic
     */
    public $opportunityJoin;
    /**
     * The taxRegistrationJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EntityTaxRegistrationSearchBasic
     */
    public $taxRegistrationJoin;
    /**
     * 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 userNotesJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\NoteSearchBasic
     */
    public $userNotesJoin;
    /**
     * The customSearchJoin
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\CustomSearchJoin[]
     */
    public $customSearchJoin;
    /**
     * Constructor method for PartnerSearch
     * @uses PartnerSearch::setBasic()
     * @uses PartnerSearch::setCampaignResponseJoin()
     * @uses PartnerSearch::setContactJoin()
     * @uses PartnerSearch::setContactPrimaryJoin()
     * @uses PartnerSearch::setCustomerJoin()
     * @uses PartnerSearch::setFileJoin()
     * @uses PartnerSearch::setMessagesJoin()
     * @uses PartnerSearch::setMessagesFromJoin()
     * @uses PartnerSearch::setMessagesToJoin()
     * @uses PartnerSearch::setOpportunityJoin()
     * @uses PartnerSearch::setTaxRegistrationJoin()
     * @uses PartnerSearch::setTransactionJoin()
     * @uses PartnerSearch::setUserJoin()
     * @uses PartnerSearch::setUserNotesJoin()
     * @uses PartnerSearch::setCustomSearchJoin()
     * @param \StructType\PartnerSearchBasic $basic
     * @param \StructType\CampaignSearchBasic $campaignResponseJoin
     * @param \StructType\ContactSearchBasic $contactJoin
     * @param \StructType\ContactSearchBasic $contactPrimaryJoin
     * @param \StructType\CustomerSearchBasic $customerJoin
     * @param \StructType\FileSearchBasic $fileJoin
     * @param \StructType\MessageSearchBasic $messagesJoin
     * @param \StructType\MessageSearchBasic $messagesFromJoin
     * @param \StructType\MessageSearchBasic $messagesToJoin
     * @param \StructType\OpportunitySearchBasic $opportunityJoin
     * @param \StructType\EntityTaxRegistrationSearchBasic $taxRegistrationJoin
     * @param \StructType\TransactionSearchBasic $transactionJoin
     * @param \StructType\EmployeeSearchBasic $userJoin
     * @param \StructType\NoteSearchBasic $userNotesJoin
     * @param \StructType\CustomSearchJoin[] $customSearchJoin
     */
    public function __construct(\StructType\PartnerSearchBasic $basic = null, \StructType\CampaignSearchBasic $campaignResponseJoin = null, \StructType\ContactSearchBasic $contactJoin = null, \StructType\ContactSearchBasic $contactPrimaryJoin = null, \StructType\CustomerSearchBasic $customerJoin = null, \StructType\FileSearchBasic $fileJoin = null, \StructType\MessageSearchBasic $messagesJoin = null, \StructType\MessageSearchBasic $messagesFromJoin = null, \StructType\MessageSearchBasic $messagesToJoin = null, \StructType\OpportunitySearchBasic $opportunityJoin = null, \StructType\EntityTaxRegistrationSearchBasic $taxRegistrationJoin = null, \StructType\TransactionSearchBasic $transactionJoin = null, \StructType\EmployeeSearchBasic $userJoin = null, \StructType\NoteSearchBasic $userNotesJoin = null, array $customSearchJoin = array())
    {
        $this
            ->setBasic($basic)
            ->setCampaignResponseJoin($campaignResponseJoin)
            ->setContactJoin($contactJoin)
            ->setContactPrimaryJoin($contactPrimaryJoin)
            ->setCustomerJoin($customerJoin)
            ->setFileJoin($fileJoin)
            ->setMessagesJoin($messagesJoin)
            ->setMessagesFromJoin($messagesFromJoin)
            ->setMessagesToJoin($messagesToJoin)
            ->setOpportunityJoin($opportunityJoin)
            ->setTaxRegistrationJoin($taxRegistrationJoin)
            ->setTransactionJoin($transactionJoin)
            ->setUserJoin($userJoin)
            ->setUserNotesJoin($userNotesJoin)
            ->setCustomSearchJoin($customSearchJoin);
    }
    /**
     * Get basic value
     * @return \StructType\PartnerSearchBasic|null
     */
    public function getBasic()
    {
        return $this->basic;
    }
    /**
     * Set basic value
     * @param \StructType\PartnerSearchBasic $basic
     * @return \StructType\PartnerSearch
     */
    public function setBasic(\StructType\PartnerSearchBasic $basic = null)
    {
        $this->basic = $basic;
        return $this;
    }
    /**
     * Get campaignResponseJoin value
     * @return \StructType\CampaignSearchBasic|null
     */
    public function getCampaignResponseJoin()
    {
        return $this->campaignResponseJoin;
    }
    /**
     * Set campaignResponseJoin value
     * @param \StructType\CampaignSearchBasic $campaignResponseJoin
     * @return \StructType\PartnerSearch
     */
    public function setCampaignResponseJoin(\StructType\CampaignSearchBasic $campaignResponseJoin = null)
    {
        $this->campaignResponseJoin = $campaignResponseJoin;
        return $this;
    }
    /**
     * Get contactJoin value
     * @return \StructType\ContactSearchBasic|null
     */
    public function getContactJoin()
    {
        return $this->contactJoin;
    }
    /**
     * Set contactJoin value
     * @param \StructType\ContactSearchBasic $contactJoin
     * @return \StructType\PartnerSearch
     */
    public function setContactJoin(\StructType\ContactSearchBasic $contactJoin = null)
    {
        $this->contactJoin = $contactJoin;
        return $this;
    }
    /**
     * Get contactPrimaryJoin value
     * @return \StructType\ContactSearchBasic|null
     */
    public function getContactPrimaryJoin()
    {
        return $this->contactPrimaryJoin;
    }
    /**
     * Set contactPrimaryJoin value
     * @param \StructType\ContactSearchBasic $contactPrimaryJoin
     * @return \StructType\PartnerSearch
     */
    public function setContactPrimaryJoin(\StructType\ContactSearchBasic $contactPrimaryJoin = null)
    {
        $this->contactPrimaryJoin = $contactPrimaryJoin;
        return $this;
    }
    /**
     * Get customerJoin value
     * @return \StructType\CustomerSearchBasic|null
     */
    public function getCustomerJoin()
    {
        return $this->customerJoin;
    }
    /**
     * Set customerJoin value
     * @param \StructType\CustomerSearchBasic $customerJoin
     * @return \StructType\PartnerSearch
     */
    public function setCustomerJoin(\StructType\CustomerSearchBasic $customerJoin = null)
    {
        $this->customerJoin = $customerJoin;
        return $this;
    }
    /**
     * Get fileJoin value
     * @return \StructType\FileSearchBasic|null
     */
    public function getFileJoin()
    {
        return $this->fileJoin;
    }
    /**
     * Set fileJoin value
     * @param \StructType\FileSearchBasic $fileJoin
     * @return \StructType\PartnerSearch
     */
    public function setFileJoin(\StructType\FileSearchBasic $fileJoin = null)
    {
        $this->fileJoin = $fileJoin;
        return $this;
    }
    /**
     * Get messagesJoin value
     * @return \StructType\MessageSearchBasic|null
     */
    public function getMessagesJoin()
    {
        return $this->messagesJoin;
    }
    /**
     * Set messagesJoin value
     * @param \StructType\MessageSearchBasic $messagesJoin
     * @return \StructType\PartnerSearch
     */
    public function setMessagesJoin(\StructType\MessageSearchBasic $messagesJoin = null)
    {
        $this->messagesJoin = $messagesJoin;
        return $this;
    }
    /**
     * Get messagesFromJoin value
     * @return \StructType\MessageSearchBasic|null
     */
    public function getMessagesFromJoin()
    {
        return $this->messagesFromJoin;
    }
    /**
     * Set messagesFromJoin value
     * @param \StructType\MessageSearchBasic $messagesFromJoin
     * @return \StructType\PartnerSearch
     */
    public function setMessagesFromJoin(\StructType\MessageSearchBasic $messagesFromJoin = null)
    {
        $this->messagesFromJoin = $messagesFromJoin;
        return $this;
    }
    /**
     * Get messagesToJoin value
     * @return \StructType\MessageSearchBasic|null
     */
    public function getMessagesToJoin()
    {
        return $this->messagesToJoin;
    }
    /**
     * Set messagesToJoin value
     * @param \StructType\MessageSearchBasic $messagesToJoin
     * @return \StructType\PartnerSearch
     */
    public function setMessagesToJoin(\StructType\MessageSearchBasic $messagesToJoin = null)
    {
        $this->messagesToJoin = $messagesToJoin;
        return $this;
    }
    /**
     * Get opportunityJoin value
     * @return \StructType\OpportunitySearchBasic|null
     */
    public function getOpportunityJoin()
    {
        return $this->opportunityJoin;
    }
    /**
     * Set opportunityJoin value
     * @param \StructType\OpportunitySearchBasic $opportunityJoin
     * @return \StructType\PartnerSearch
     */
    public function setOpportunityJoin(\StructType\OpportunitySearchBasic $opportunityJoin = null)
    {
        $this->opportunityJoin = $opportunityJoin;
        return $this;
    }
    /**
     * Get taxRegistrationJoin value
     * @return \StructType\EntityTaxRegistrationSearchBasic|null
     */
    public function getTaxRegistrationJoin()
    {
        return $this->taxRegistrationJoin;
    }
    /**
     * Set taxRegistrationJoin value
     * @param \StructType\EntityTaxRegistrationSearchBasic $taxRegistrationJoin
     * @return \StructType\PartnerSearch
     */
    public function setTaxRegistrationJoin(\StructType\EntityTaxRegistrationSearchBasic $taxRegistrationJoin = null)
    {
        $this->taxRegistrationJoin = $taxRegistrationJoin;
        return $this;
    }
    /**
     * Get transactionJoin value
     * @return \StructType\TransactionSearchBasic|null
     */
    public function getTransactionJoin()
    {
        return $this->transactionJoin;
    }
    /**
     * Set transactionJoin value
     * @param \StructType\TransactionSearchBasic $transactionJoin
     * @return \StructType\PartnerSearch
     */
    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\PartnerSearch
     */
    public function setUserJoin(\StructType\EmployeeSearchBasic $userJoin = null)
    {
        $this->userJoin = $userJoin;
        return $this;
    }
    /**
     * Get userNotesJoin value
     * @return \StructType\NoteSearchBasic|null
     */
    public function getUserNotesJoin()
    {
        return $this->userNotesJoin;
    }
    /**
     * Set userNotesJoin value
     * @param \StructType\NoteSearchBasic $userNotesJoin
     * @return \StructType\PartnerSearch
     */
    public function setUserNotesJoin(\StructType\NoteSearchBasic $userNotesJoin = null)
    {
        $this->userNotesJoin = $userNotesJoin;
        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 $partnerSearchCustomSearchJoinItem) {
            // validation for constraint: itemType
            if (!$partnerSearchCustomSearchJoinItem instanceof \StructType\CustomSearchJoin) {
                $invalidValues[] = is_object($partnerSearchCustomSearchJoinItem) ? get_class($partnerSearchCustomSearchJoinItem) : sprintf('%s(%s)', gettype($partnerSearchCustomSearchJoinItem), var_export($partnerSearchCustomSearchJoinItem, 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\PartnerSearch
     */
    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\PartnerSearch
     */
    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;
    }
}
