<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ChargeSearchRow StructType
 * @subpackage Structs
 */
class ChargeSearchRow extends SearchRow
{
    /**
     * The basic
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ChargeSearchRowBasic
     */
    public $basic;
    /**
     * The billingAccountJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\BillingAccountSearchRowBasic
     */
    public $billingAccountJoin;
    /**
     * The billingScheduleJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\BillingScheduleSearchRowBasic
     */
    public $billingScheduleJoin;
    /**
     * The chargeEmployeeJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchRowBasic
     */
    public $chargeEmployeeJoin;
    /**
     * The customerJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomerSearchRowBasic
     */
    public $customerJoin;
    /**
     * The invoiceJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchRowBasic
     */
    public $invoiceJoin;
    /**
     * 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 salesOrderJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchRowBasic
     */
    public $salesOrderJoin;
    /**
     * The timeJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TimeBillSearchRowBasic
     */
    public $timeJoin;
    /**
     * The transactionJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\TransactionSearchRowBasic
     */
    public $transactionJoin;
    /**
     * The usageJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\UsageSearchRowBasic
     */
    public $usageJoin;
    /**
     * The userJoin
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\EmployeeSearchRowBasic
     */
    public $userJoin;
    /**
     * The customSearchJoin
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\CustomSearchRowBasic[]
     */
    public $customSearchJoin;
    /**
     * Constructor method for ChargeSearchRow
     * @uses ChargeSearchRow::setBasic()
     * @uses ChargeSearchRow::setBillingAccountJoin()
     * @uses ChargeSearchRow::setBillingScheduleJoin()
     * @uses ChargeSearchRow::setChargeEmployeeJoin()
     * @uses ChargeSearchRow::setCustomerJoin()
     * @uses ChargeSearchRow::setInvoiceJoin()
     * @uses ChargeSearchRow::setItemJoin()
     * @uses ChargeSearchRow::setJobJoin()
     * @uses ChargeSearchRow::setSalesOrderJoin()
     * @uses ChargeSearchRow::setTimeJoin()
     * @uses ChargeSearchRow::setTransactionJoin()
     * @uses ChargeSearchRow::setUsageJoin()
     * @uses ChargeSearchRow::setUserJoin()
     * @uses ChargeSearchRow::setCustomSearchJoin()
     * @param \StructType\ChargeSearchRowBasic $basic
     * @param \StructType\BillingAccountSearchRowBasic $billingAccountJoin
     * @param \StructType\BillingScheduleSearchRowBasic $billingScheduleJoin
     * @param \StructType\EmployeeSearchRowBasic $chargeEmployeeJoin
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @param \StructType\TransactionSearchRowBasic $invoiceJoin
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @param \StructType\JobSearchRowBasic $jobJoin
     * @param \StructType\TransactionSearchRowBasic $salesOrderJoin
     * @param \StructType\TimeBillSearchRowBasic $timeJoin
     * @param \StructType\TransactionSearchRowBasic $transactionJoin
     * @param \StructType\UsageSearchRowBasic $usageJoin
     * @param \StructType\EmployeeSearchRowBasic $userJoin
     * @param \StructType\CustomSearchRowBasic[] $customSearchJoin
     */
    public function __construct(\StructType\ChargeSearchRowBasic $basic = null, \StructType\BillingAccountSearchRowBasic $billingAccountJoin = null, \StructType\BillingScheduleSearchRowBasic $billingScheduleJoin = null, \StructType\EmployeeSearchRowBasic $chargeEmployeeJoin = null, \StructType\CustomerSearchRowBasic $customerJoin = null, \StructType\TransactionSearchRowBasic $invoiceJoin = null, \StructType\ItemSearchRowBasic $itemJoin = null, \StructType\JobSearchRowBasic $jobJoin = null, \StructType\TransactionSearchRowBasic $salesOrderJoin = null, \StructType\TimeBillSearchRowBasic $timeJoin = null, \StructType\TransactionSearchRowBasic $transactionJoin = null, \StructType\UsageSearchRowBasic $usageJoin = null, \StructType\EmployeeSearchRowBasic $userJoin = null, array $customSearchJoin = array())
    {
        $this
            ->setBasic($basic)
            ->setBillingAccountJoin($billingAccountJoin)
            ->setBillingScheduleJoin($billingScheduleJoin)
            ->setChargeEmployeeJoin($chargeEmployeeJoin)
            ->setCustomerJoin($customerJoin)
            ->setInvoiceJoin($invoiceJoin)
            ->setItemJoin($itemJoin)
            ->setJobJoin($jobJoin)
            ->setSalesOrderJoin($salesOrderJoin)
            ->setTimeJoin($timeJoin)
            ->setTransactionJoin($transactionJoin)
            ->setUsageJoin($usageJoin)
            ->setUserJoin($userJoin)
            ->setCustomSearchJoin($customSearchJoin);
    }
    /**
     * Get basic value
     * @return \StructType\ChargeSearchRowBasic|null
     */
    public function getBasic()
    {
        return $this->basic;
    }
    /**
     * Set basic value
     * @param \StructType\ChargeSearchRowBasic $basic
     * @return \StructType\ChargeSearchRow
     */
    public function setBasic(\StructType\ChargeSearchRowBasic $basic = null)
    {
        $this->basic = $basic;
        return $this;
    }
    /**
     * Get billingAccountJoin value
     * @return \StructType\BillingAccountSearchRowBasic|null
     */
    public function getBillingAccountJoin()
    {
        return $this->billingAccountJoin;
    }
    /**
     * Set billingAccountJoin value
     * @param \StructType\BillingAccountSearchRowBasic $billingAccountJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setBillingAccountJoin(\StructType\BillingAccountSearchRowBasic $billingAccountJoin = null)
    {
        $this->billingAccountJoin = $billingAccountJoin;
        return $this;
    }
    /**
     * Get billingScheduleJoin value
     * @return \StructType\BillingScheduleSearchRowBasic|null
     */
    public function getBillingScheduleJoin()
    {
        return $this->billingScheduleJoin;
    }
    /**
     * Set billingScheduleJoin value
     * @param \StructType\BillingScheduleSearchRowBasic $billingScheduleJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setBillingScheduleJoin(\StructType\BillingScheduleSearchRowBasic $billingScheduleJoin = null)
    {
        $this->billingScheduleJoin = $billingScheduleJoin;
        return $this;
    }
    /**
     * Get chargeEmployeeJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getChargeEmployeeJoin()
    {
        return $this->chargeEmployeeJoin;
    }
    /**
     * Set chargeEmployeeJoin value
     * @param \StructType\EmployeeSearchRowBasic $chargeEmployeeJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setChargeEmployeeJoin(\StructType\EmployeeSearchRowBasic $chargeEmployeeJoin = null)
    {
        $this->chargeEmployeeJoin = $chargeEmployeeJoin;
        return $this;
    }
    /**
     * Get customerJoin value
     * @return \StructType\CustomerSearchRowBasic|null
     */
    public function getCustomerJoin()
    {
        return $this->customerJoin;
    }
    /**
     * Set customerJoin value
     * @param \StructType\CustomerSearchRowBasic $customerJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setCustomerJoin(\StructType\CustomerSearchRowBasic $customerJoin = null)
    {
        $this->customerJoin = $customerJoin;
        return $this;
    }
    /**
     * Get invoiceJoin value
     * @return \StructType\TransactionSearchRowBasic|null
     */
    public function getInvoiceJoin()
    {
        return $this->invoiceJoin;
    }
    /**
     * Set invoiceJoin value
     * @param \StructType\TransactionSearchRowBasic $invoiceJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setInvoiceJoin(\StructType\TransactionSearchRowBasic $invoiceJoin = null)
    {
        $this->invoiceJoin = $invoiceJoin;
        return $this;
    }
    /**
     * Get itemJoin value
     * @return \StructType\ItemSearchRowBasic|null
     */
    public function getItemJoin()
    {
        return $this->itemJoin;
    }
    /**
     * Set itemJoin value
     * @param \StructType\ItemSearchRowBasic $itemJoin
     * @return \StructType\ChargeSearchRow
     */
    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\ChargeSearchRow
     */
    public function setJobJoin(\StructType\JobSearchRowBasic $jobJoin = null)
    {
        $this->jobJoin = $jobJoin;
        return $this;
    }
    /**
     * Get salesOrderJoin value
     * @return \StructType\TransactionSearchRowBasic|null
     */
    public function getSalesOrderJoin()
    {
        return $this->salesOrderJoin;
    }
    /**
     * Set salesOrderJoin value
     * @param \StructType\TransactionSearchRowBasic $salesOrderJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setSalesOrderJoin(\StructType\TransactionSearchRowBasic $salesOrderJoin = null)
    {
        $this->salesOrderJoin = $salesOrderJoin;
        return $this;
    }
    /**
     * Get timeJoin value
     * @return \StructType\TimeBillSearchRowBasic|null
     */
    public function getTimeJoin()
    {
        return $this->timeJoin;
    }
    /**
     * Set timeJoin value
     * @param \StructType\TimeBillSearchRowBasic $timeJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setTimeJoin(\StructType\TimeBillSearchRowBasic $timeJoin = null)
    {
        $this->timeJoin = $timeJoin;
        return $this;
    }
    /**
     * Get transactionJoin value
     * @return \StructType\TransactionSearchRowBasic|null
     */
    public function getTransactionJoin()
    {
        return $this->transactionJoin;
    }
    /**
     * Set transactionJoin value
     * @param \StructType\TransactionSearchRowBasic $transactionJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setTransactionJoin(\StructType\TransactionSearchRowBasic $transactionJoin = null)
    {
        $this->transactionJoin = $transactionJoin;
        return $this;
    }
    /**
     * Get usageJoin value
     * @return \StructType\UsageSearchRowBasic|null
     */
    public function getUsageJoin()
    {
        return $this->usageJoin;
    }
    /**
     * Set usageJoin value
     * @param \StructType\UsageSearchRowBasic $usageJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setUsageJoin(\StructType\UsageSearchRowBasic $usageJoin = null)
    {
        $this->usageJoin = $usageJoin;
        return $this;
    }
    /**
     * Get userJoin value
     * @return \StructType\EmployeeSearchRowBasic|null
     */
    public function getUserJoin()
    {
        return $this->userJoin;
    }
    /**
     * Set userJoin value
     * @param \StructType\EmployeeSearchRowBasic $userJoin
     * @return \StructType\ChargeSearchRow
     */
    public function setUserJoin(\StructType\EmployeeSearchRowBasic $userJoin = null)
    {
        $this->userJoin = $userJoin;
        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 $chargeSearchRowCustomSearchJoinItem) {
            // validation for constraint: itemType
            if (!$chargeSearchRowCustomSearchJoinItem instanceof \StructType\CustomSearchRowBasic) {
                $invalidValues[] = is_object($chargeSearchRowCustomSearchJoinItem) ? get_class($chargeSearchRowCustomSearchJoinItem) : sprintf('%s(%s)', gettype($chargeSearchRowCustomSearchJoinItem), var_export($chargeSearchRowCustomSearchJoinItem, 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\ChargeSearchRow
     */
    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\ChargeSearchRow
     */
    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;
    }
}
