<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CustomRecordTypeChildren StructType
 * @subpackage Structs
 */
class CustomRecordTypeChildren extends AbstractStructBase
{
    /**
     * The childDescr
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $childDescr;
    /**
     * The childTab
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $childTab;
    /**
     * Constructor method for CustomRecordTypeChildren
     * @uses CustomRecordTypeChildren::setChildDescr()
     * @uses CustomRecordTypeChildren::setChildTab()
     * @param string $childDescr
     * @param \StructType\RecordRef $childTab
     */
    public function __construct($childDescr = null, \StructType\RecordRef $childTab = null)
    {
        $this
            ->setChildDescr($childDescr)
            ->setChildTab($childTab);
    }
    /**
     * Get childDescr value
     * @return string|null
     */
    public function getChildDescr()
    {
        return $this->childDescr;
    }
    /**
     * Set childDescr value
     * @param string $childDescr
     * @return \StructType\CustomRecordTypeChildren
     */
    public function setChildDescr($childDescr = null)
    {
        // validation for constraint: string
        if (!is_null($childDescr) && !is_string($childDescr)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($childDescr, true), gettype($childDescr)), __LINE__);
        }
        $this->childDescr = $childDescr;
        return $this;
    }
    /**
     * Get childTab value
     * @return \StructType\RecordRef|null
     */
    public function getChildTab()
    {
        return $this->childTab;
    }
    /**
     * Set childTab value
     * @param \StructType\RecordRef $childTab
     * @return \StructType\CustomRecordTypeChildren
     */
    public function setChildTab(\StructType\RecordRef $childTab = null)
    {
        $this->childTab = $childTab;
        return $this;
    }
}
