<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_SearchSegmentVisa StructType
 * @subpackage Structs
 */
class JP_SearchSegmentVisa extends JP_SearchSegmentBase
{
    /**
     * The Suppliers
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfString6
     */
    public $Suppliers;
    /**
     * The Type
     * @var int
     */
    public $Type;
    /**
     * The InternalSupplier
     * @var int
     */
    public $InternalSupplier;
    /**
     * Constructor method for JP_SearchSegmentVisa
     * @uses JP_SearchSegmentVisa::setSuppliers()
     * @uses JP_SearchSegmentVisa::setType()
     * @uses JP_SearchSegmentVisa::setInternalSupplier()
     * @param \ArrayType\ArrayOfString6 $suppliers
     * @param int $type
     * @param int $internalSupplier
     */
    public function __construct(\ArrayType\ArrayOfString6 $suppliers = null, $type = null, $internalSupplier = null)
    {
        $this
            ->setSuppliers($suppliers)
            ->setType($type)
            ->setInternalSupplier($internalSupplier);
    }
    /**
     * Get Suppliers value
     * @return \ArrayType\ArrayOfString6|null
     */
    public function getSuppliers()
    {
        return $this->Suppliers;
    }
    /**
     * Set Suppliers value
     * @param \ArrayType\ArrayOfString6 $suppliers
     * @return \StructType\JP_SearchSegmentVisa
     */
    public function setSuppliers(\ArrayType\ArrayOfString6 $suppliers = null)
    {
        $this->Suppliers = $suppliers;
        return $this;
    }
    /**
     * Get Type value
     * @return int|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param int $type
     * @return \StructType\JP_SearchSegmentVisa
     */
    public function setType($type = null)
    {
        // validation for constraint: int
        if (!is_null($type) && !is_numeric($type)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($type)), __LINE__);
        }
        $this->Type = $type;
        return $this;
    }
    /**
     * Get InternalSupplier value
     * @return int|null
     */
    public function getInternalSupplier()
    {
        return $this->InternalSupplier;
    }
    /**
     * Set InternalSupplier value
     * @param int $internalSupplier
     * @return \StructType\JP_SearchSegmentVisa
     */
    public function setInternalSupplier($internalSupplier = null)
    {
        // validation for constraint: int
        if (!is_null($internalSupplier) && !is_numeric($internalSupplier)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($internalSupplier)), __LINE__);
        }
        $this->InternalSupplier = $internalSupplier;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \StructType\JP_SearchSegmentVisa
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
