<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_InsuranceBookingInfo StructType
 * @subpackage Structs
 */
class JP_InsuranceBookingInfo extends AbstractStructBase
{
    /**
     * The AdditionalRequiredFields
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_AdditionalRequiredField
     */
    public $AdditionalRequiredFields;
    /**
     * The ICode
     * @var string
     */
    public $ICode;
    /**
     * Constructor method for JP_InsuranceBookingInfo
     * @uses JP_InsuranceBookingInfo::setAdditionalRequiredFields()
     * @uses JP_InsuranceBookingInfo::setICode()
     * @param \ArrayType\ArrayOfJP_AdditionalRequiredField $additionalRequiredFields
     * @param string $iCode
     */
    public function __construct(\ArrayType\ArrayOfJP_AdditionalRequiredField $additionalRequiredFields = null, $iCode = null)
    {
        $this
            ->setAdditionalRequiredFields($additionalRequiredFields)
            ->setICode($iCode);
    }
    /**
     * Get AdditionalRequiredFields value
     * @return \ArrayType\ArrayOfJP_AdditionalRequiredField|null
     */
    public function getAdditionalRequiredFields()
    {
        return $this->AdditionalRequiredFields;
    }
    /**
     * Set AdditionalRequiredFields value
     * @param \ArrayType\ArrayOfJP_AdditionalRequiredField $additionalRequiredFields
     * @return \StructType\JP_InsuranceBookingInfo
     */
    public function setAdditionalRequiredFields(\ArrayType\ArrayOfJP_AdditionalRequiredField $additionalRequiredFields = null)
    {
        $this->AdditionalRequiredFields = $additionalRequiredFields;
        return $this;
    }
    /**
     * Get ICode value
     * @return string|null
     */
    public function getICode()
    {
        return $this->ICode;
    }
    /**
     * Set ICode value
     * @param string $iCode
     * @return \StructType\JP_InsuranceBookingInfo
     */
    public function setICode($iCode = null)
    {
        // validation for constraint: string
        if (!is_null($iCode) && !is_string($iCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($iCode, true), gettype($iCode)), __LINE__);
        }
        $this->ICode = $iCode;
        return $this;
    }
}
