<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_SearchSegmentServices StructType
 * @subpackage Structs
 */
class JP_SearchSegmentServices extends JP_SearchSegmentBase
{
    /**
     * The Suppliers
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfString5
     */
    public $Suppliers;
    /**
     * The Type
     * @var int
     */
    public $Type;
    /**
     * The Class
     * @var int
     */
    public $Class;
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * The InternalSupplier
     * @var int
     */
    public $InternalSupplier;
    /**
     * Constructor method for JP_SearchSegmentServices
     * @uses JP_SearchSegmentServices::setSuppliers()
     * @uses JP_SearchSegmentServices::setType()
     * @uses JP_SearchSegmentServices::setClass()
     * @uses JP_SearchSegmentServices::setCode()
     * @uses JP_SearchSegmentServices::setInternalSupplier()
     * @param \ArrayType\ArrayOfString5 $suppliers
     * @param int $type
     * @param int $class
     * @param string $code
     * @param int $internalSupplier
     */
    public function __construct(\ArrayType\ArrayOfString5 $suppliers = null, $type = null, $class = null, $code = null, $internalSupplier = null)
    {
        $this
            ->setSuppliers($suppliers)
            ->setType($type)
            ->setClass($class)
            ->setCode($code)
            ->setInternalSupplier($internalSupplier);
    }
    /**
     * Get Suppliers value
     * @return \ArrayType\ArrayOfString5|null
     */
    public function getSuppliers()
    {
        return $this->Suppliers;
    }
    /**
     * Set Suppliers value
     * @param \ArrayType\ArrayOfString5 $suppliers
     * @return \StructType\JP_SearchSegmentServices
     */
    public function setSuppliers(\ArrayType\ArrayOfString5 $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_SearchSegmentServices
     */
    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 Class value
     * @return int|null
     */
    public function getClass()
    {
        return $this->Class;
    }
    /**
     * Set Class value
     * @param int $class
     * @return \StructType\JP_SearchSegmentServices
     */
    public function setClass($class = null)
    {
        // validation for constraint: int
        if (!is_null($class) && !is_numeric($class)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($class)), __LINE__);
        }
        $this->Class = $class;
        return $this;
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \StructType\JP_SearchSegmentServices
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get InternalSupplier value
     * @return int|null
     */
    public function getInternalSupplier()
    {
        return $this->InternalSupplier;
    }
    /**
     * Set InternalSupplier value
     * @param int $internalSupplier
     * @return \StructType\JP_SearchSegmentServices
     */
    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_SearchSegmentServices
     */
    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__;
    }
}
