<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OpportunitySearchRow StructType
 * @subpackage Structs
 */
class OpportunitySearchRow extends SearchRow
{
    /**
     * The basic
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\OpportunitySearchRowBasic
     */
    public $basic;
    /**
     * The actualJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchRowBasic
     */
    public $actualJoin;
    /**
     * The callJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PhoneCallSearchRowBasic
     */
    public $callJoin;
    /**
     * The customerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomerSearchRowBasic
     */
    public $customerJoin;
    /**
     * The decisionMakerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ContactSearchRowBasic
     */
    public $decisionMakerJoin;
    /**
     * The estimateJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchRowBasic
     */
    public $estimateJoin;
    /**
     * The eventJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CalendarEventSearchRowBasic
     */
    public $eventJoin;
    /**
     * The fileJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\FileSearchRowBasic
     */
    public $fileJoin;
    /**
     * The itemJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ItemSearchRowBasic
     */
    public $itemJoin;
    /**
     * The leadSourceJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CampaignSearchRowBasic
     */
    public $leadSourceJoin;
    /**
     * The messagesJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\MessageSearchRowBasic
     */
    public $messagesJoin;
    /**
     * The orderJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchRowBasic
     */
    public $orderJoin;
    /**
     * 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 salesRepJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchRowBasic
     */
    public $salesRepJoin;
    /**
     * The taskJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TaskSearchRowBasic
     */
    public $taskJoin;
    /**
     * The userNotesJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\NoteSearchRowBasic
     */
    public $userNotesJoin;
    /**
     * The customSearchJoin
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\CustomSearchRowBasic[]
     */
    public $customSearchJoin;
    /**
     * Constructor method for OpportunitySearchRow
     * @uses OpportunitySearchRow::setBasic()
     * @uses OpportunitySearchRow::setActualJoin()
     * @uses OpportunitySearchRow::setCallJoin()
     * @uses OpportunitySearchRow::setCustomerJoin()
     * @uses OpportunitySearchRow::setDecisionMakerJoin()
     * @uses OpportunitySearchRow::setEstimateJoin()
     * @uses OpportunitySearchRow::setEventJoin()
     * @uses OpportunitySearchRow::setFileJoin()
     * @uses OpportunitySearchRow::setItemJoin()
     * @uses OpportunitySearchRow::setLeadSourceJoin()
     * @uses OpportunitySearchRow::setMessagesJoin()
     * @uses OpportunitySearchRow::setOrderJoin()
     * @uses OpportunitySearchRow::setOriginatingLeadJoin()
     * @uses OpportunitySearchRow::setPartnerJoin()
     * @uses OpportunitySearchRow::setSalesRepJoin()
     * @uses OpportunitySearchRow::setTaskJoin()
     * @uses OpportunitySearchRow::setUserNotesJoin()
     * @uses OpportunitySearchRow::setCustomSearchJoin()
     * @param \StructType\OpportunitySearchRowBasic $basic
     * @param \StructType\TransactionSearchRowBasic $actualJoin
     * @param \StructType\PhoneCallSearchRowBasic $callJoin
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @param \StructType\ContactSearchRowBasic $decisionMakerJoin
     * @param \StructType\TransactionSearchRowBasic $estimateJoin
     * @param \StructType\CalendarEventSearchRowBasic $eventJoin
     * @param \StructType\FileSearchRowBasic $fileJoin
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @param \StructType\CampaignSearchRowBasic $leadSourceJoin
     * @param \StructType\MessageSearchRowBasic $messagesJoin
     * @param \StructType\TransactionSearchRowBasic $orderJoin
     * @param \StructType\OriginatingLeadSearchRowBasic $originatingLeadJoin
     * @param \StructType\PartnerSearchRowBasic $partnerJoin
     * @param \StructType\EmployeeSearchRowBasic $salesRepJoin
     * @param \StructType\TaskSearchRowBasic $taskJoin
     * @param \StructType\NoteSearchRowBasic $userNotesJoin
     * @param \StructType\CustomSearchRowBasic[] $customSearchJoin
     */
    public function __construct(\StructType\OpportunitySearchRowBasic $basic = null, \StructType\TransactionSearchRowBasic $actualJoin = null, \StructType\PhoneCallSearchRowBasic $callJoin = null, \StructType\CustomerSearchRowBasic $customerJoin = null, \StructType\ContactSearchRowBasic $decisionMakerJoin = null, \StructType\TransactionSearchRowBasic $estimateJoin = null, \StructType\CalendarEventSearchRowBasic $eventJoin = null, \StructType\FileSearchRowBasic $fileJoin = null, \StructType\ItemSearchRowBasic $itemJoin = null, \StructType\CampaignSearchRowBasic $leadSourceJoin = null, \StructType\MessageSearchRowBasic $messagesJoin = null, \StructType\TransactionSearchRowBasic $orderJoin = null, \StructType\OriginatingLeadSearchRowBasic $originatingLeadJoin = null, \StructType\PartnerSearchRowBasic $partnerJoin = null, \StructType\EmployeeSearchRowBasic $salesRepJoin = null, \StructType\TaskSearchRowBasic $taskJoin = null, \StructType\NoteSearchRowBasic $userNotesJoin = null, array $customSearchJoin = array())
    {
        $this
            ->setBasic($basic)
            ->setActualJoin($actualJoin)
            ->setCallJoin($callJoin)
            ->setCustomerJoin($customerJoin)
            ->setDecisionMakerJoin($decisionMakerJoin)
            ->setEstimateJoin($estimateJoin)
            ->setEventJoin($eventJoin)
            ->setFileJoin($fileJoin)
            ->setItemJoin($itemJoin)
            ->setLeadSourceJoin($leadSourceJoin)
            ->setMessagesJoin($messagesJoin)
            ->setOrderJoin($orderJoin)
            ->setOriginatingLeadJoin($originatingLeadJoin)
            ->setPartnerJoin($partnerJoin)
            ->setSalesRepJoin($salesRepJoin)
            ->setTaskJoin($taskJoin)
            ->setUserNotesJoin($userNotesJoin)
            ->setCustomSearchJoin($customSearchJoin);
    }
    /**
     * Get basic value
     * @return \StructType\OpportunitySearchRowBasic|null
     */
    public function getBasic()
    {
        return $this->basic;
    }
    /**
     * Set basic value
     * @param \StructType\OpportunitySearchRowBasic $basic
     * @return \StructType\OpportunitySearchRow
     */
    public function setBasic(\StructType\OpportunitySearchRowBasic $basic = null)
    {
        $this->basic = $basic;
        return $this;
    }
    /**
     * Get actualJoin value
     * @return \StructType\TransactionSearchRowBasic|null
     */
    public function getActualJoin()
    {
        return $this->actualJoin;
    }
    /**
     * Set actualJoin value
     * @param \StructType\TransactionSearchRowBasic $actualJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setActualJoin(\StructType\TransactionSearchRowBasic $actualJoin = null)
    {
        $this->actualJoin = $actualJoin;
        return $this;
    }
    /**
     * Get callJoin value
     * @return \StructType\PhoneCallSearchRowBasic|null
     */
    public function getCallJoin()
    {
        return $this->callJoin;
    }
    /**
     * Set callJoin value
     * @param \StructType\PhoneCallSearchRowBasic $callJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setCallJoin(\StructType\PhoneCallSearchRowBasic $callJoin = null)
    {
        $this->callJoin = $callJoin;
        return $this;
    }
    /**
     * Get customerJoin value
     * @return \StructType\CustomerSearchRowBasic|null
     */
    public function getCustomerJoin()
    {
        return $this->customerJoin;
    }
    /**
     * Set customerJoin value
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setCustomerJoin(\StructType\CustomerSearchRowBasic $customerJoin = null)
    {
        $this->customerJoin = $customerJoin;
        return $this;
    }
    /**
     * Get decisionMakerJoin value
     * @return \StructType\ContactSearchRowBasic|null
     */
    public function getDecisionMakerJoin()
    {
        return $this->decisionMakerJoin;
    }
    /**
     * Set decisionMakerJoin value
     * @param \StructType\ContactSearchRowBasic $decisionMakerJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setDecisionMakerJoin(\StructType\ContactSearchRowBasic $decisionMakerJoin = null)
    {
        $this->decisionMakerJoin = $decisionMakerJoin;
        return $this;
    }
    /**
     * Get estimateJoin value
     * @return \StructType\TransactionSearchRowBasic|null
     */
    public function getEstimateJoin()
    {
        return $this->estimateJoin;
    }
    /**
     * Set estimateJoin value
     * @param \StructType\TransactionSearchRowBasic $estimateJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setEstimateJoin(\StructType\TransactionSearchRowBasic $estimateJoin = null)
    {
        $this->estimateJoin = $estimateJoin;
        return $this;
    }
    /**
     * Get eventJoin value
     * @return \StructType\CalendarEventSearchRowBasic|null
     */
    public function getEventJoin()
    {
        return $this->eventJoin;
    }
    /**
     * Set eventJoin value
     * @param \StructType\CalendarEventSearchRowBasic $eventJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setEventJoin(\StructType\CalendarEventSearchRowBasic $eventJoin = null)
    {
        $this->eventJoin = $eventJoin;
        return $this;
    }
    /**
     * Get fileJoin value
     * @return \StructType\FileSearchRowBasic|null
     */
    public function getFileJoin()
    {
        return $this->fileJoin;
    }
    /**
     * Set fileJoin value
     * @param \StructType\FileSearchRowBasic $fileJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setFileJoin(\StructType\FileSearchRowBasic $fileJoin = null)
    {
        $this->fileJoin = $fileJoin;
        return $this;
    }
    /**
     * Get itemJoin value
     * @return \StructType\ItemSearchRowBasic|null
     */
    public function getItemJoin()
    {
        return $this->itemJoin;
    }
    /**
     * Set itemJoin value
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setItemJoin(\StructType\ItemSearchRowBasic $itemJoin = null)
    {
        $this->itemJoin = $itemJoin;
        return $this;
    }
    /**
     * Get leadSourceJoin value
     * @return \StructType\CampaignSearchRowBasic|null
     */
    public function getLeadSourceJoin()
    {
        return $this->leadSourceJoin;
    }
    /**
     * Set leadSourceJoin value
     * @param \StructType\CampaignSearchRowBasic $leadSourceJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setLeadSourceJoin(\StructType\CampaignSearchRowBasic $leadSourceJoin = null)
    {
        $this->leadSourceJoin = $leadSourceJoin;
        return $this;
    }
    /**
     * Get messagesJoin value
     * @return \StructType\MessageSearchRowBasic|null
     */
    public function getMessagesJoin()
    {
        return $this->messagesJoin;
    }
    /**
     * Set messagesJoin value
     * @param \StructType\MessageSearchRowBasic $messagesJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setMessagesJoin(\StructType\MessageSearchRowBasic $messagesJoin = null)
    {
        $this->messagesJoin = $messagesJoin;
        return $this;
    }
    /**
     * Get orderJoin value
     * @return \StructType\TransactionSearchRowBasic|null
     */
    public function getOrderJoin()
    {
        return $this->orderJoin;
    }
    /**
     * Set orderJoin value
     * @param \StructType\TransactionSearchRowBasic $orderJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setOrderJoin(\StructType\TransactionSearchRowBasic $orderJoin = null)
    {
        $this->orderJoin = $orderJoin;
        return $this;
    }
    /**
     * Get originatingLeadJoin value
     * @return \StructType\OriginatingLeadSearchRowBasic|null
     */
    public function getOriginatingLeadJoin()
    {
        return $this->originatingLeadJoin;
    }
    /**
     * Set originatingLeadJoin value
     * @param \StructType\OriginatingLeadSearchRowBasic $originatingLeadJoin
     * @return \StructType\OpportunitySearchRow
     */
    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\OpportunitySearchRow
     */
    public function setPartnerJoin(\StructType\PartnerSearchRowBasic $partnerJoin = null)
    {
        $this->partnerJoin = $partnerJoin;
        return $this;
    }
    /**
     * Get salesRepJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getSalesRepJoin()
    {
        return $this->salesRepJoin;
    }
    /**
     * Set salesRepJoin value
     * @param \StructType\EmployeeSearchRowBasic $salesRepJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setSalesRepJoin(\StructType\EmployeeSearchRowBasic $salesRepJoin = null)
    {
        $this->salesRepJoin = $salesRepJoin;
        return $this;
    }
    /**
     * Get taskJoin value
     * @return \StructType\TaskSearchRowBasic|null
     */
    public function getTaskJoin()
    {
        return $this->taskJoin;
    }
    /**
     * Set taskJoin value
     * @param \StructType\TaskSearchRowBasic $taskJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setTaskJoin(\StructType\TaskSearchRowBasic $taskJoin = null)
    {
        $this->taskJoin = $taskJoin;
        return $this;
    }
    /**
     * Get userNotesJoin value
     * @return \StructType\NoteSearchRowBasic|null
     */
    public function getUserNotesJoin()
    {
        return $this->userNotesJoin;
    }
    /**
     * Set userNotesJoin value
     * @param \StructType\NoteSearchRowBasic $userNotesJoin
     * @return \StructType\OpportunitySearchRow
     */
    public function setUserNotesJoin(\StructType\NoteSearchRowBasic $userNotesJoin = null)
    {
        $this->userNotesJoin = $userNotesJoin;
        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 $opportunitySearchRowCustomSearchJoinItem) {
            // validation for constraint: itemType
            if (!$opportunitySearchRowCustomSearchJoinItem instanceof \StructType\CustomSearchRowBasic) {
                $invalidValues[] = is_object($opportunitySearchRowCustomSearchJoinItem) ? get_class($opportunitySearchRowCustomSearchJoinItem) : sprintf('%s(%s)', gettype($opportunitySearchRowCustomSearchJoinItem), var_export($opportunitySearchRowCustomSearchJoinItem, 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\OpportunitySearchRow
     */
    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\OpportunitySearchRow
     */
    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;
    }
}
