<?php

namespace Straxus\FarfetchSDK\Model;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsertSizesQuantityResponse Model
 * @subpackage Structs
 */
class InsertSizesQuantityResponse extends AbstractStructBase
{
    /**
     * The InsertSizesQuantityResult
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $InsertSizesQuantityResult;
    /**
     * The barcode
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $barcode;
    /**
     * Constructor method for InsertSizesQuantityResponse
     * @uses InsertSizesQuantityResponse::setInsertSizesQuantityResult()
     * @uses InsertSizesQuantityResponse::setBarcode()
     * @param bool $insertSizesQuantityResult
     * @param string $barcode
     */
    public function __construct($insertSizesQuantityResult = null, $barcode = null)
    {
        $this
            ->setInsertSizesQuantityResult($insertSizesQuantityResult)
            ->setBarcode($barcode);
    }
    /**
     * Get InsertSizesQuantityResult value
     * @return bool
     */
    public function getInsertSizesQuantityResult()
    {
        return $this->InsertSizesQuantityResult;
    }
    /**
     * Set InsertSizesQuantityResult value
     * @param bool $insertSizesQuantityResult
     * @return \Straxus\FarfetchSDK\Model\InsertSizesQuantityResponse
     */
    public function setInsertSizesQuantityResult($insertSizesQuantityResult = null)
    {
        // validation for constraint: boolean
        if (!is_null($insertSizesQuantityResult) && !is_bool($insertSizesQuantityResult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($insertSizesQuantityResult, true), gettype($insertSizesQuantityResult)), __LINE__);
        }
        $this->InsertSizesQuantityResult = $insertSizesQuantityResult;
        return $this;
    }
    /**
     * Get barcode value
     * @return string|null
     */
    public function getBarcode()
    {
        return $this->barcode;
    }
    /**
     * Set barcode value
     * @param string $barcode
     * @return \Straxus\FarfetchSDK\Model\InsertSizesQuantityResponse
     */
    public function setBarcode($barcode = null)
    {
        // validation for constraint: string
        if (!is_null($barcode) && !is_string($barcode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($barcode, true), gettype($barcode)), __LINE__);
        }
        $this->barcode = $barcode;
        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 \Straxus\FarfetchSDK\Model\InsertSizesQuantityResponse
     */
    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__;
    }
}
