<?php

namespace Straxus\FarfetchSDK\Model;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsertMaterialsResponse Model
 * @subpackage Structs
 */
class InsertMaterialsResponse extends AbstractStructBase
{
    /**
     * The InsertMaterialsResult
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $InsertMaterialsResult;
    /**
     * The articleId
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $articleId;
    /**
     * Constructor method for InsertMaterialsResponse
     * @uses InsertMaterialsResponse::setInsertMaterialsResult()
     * @uses InsertMaterialsResponse::setArticleId()
     * @param bool $insertMaterialsResult
     * @param int $articleId
     */
    public function __construct($insertMaterialsResult = null, $articleId = null)
    {
        $this
            ->setInsertMaterialsResult($insertMaterialsResult)
            ->setArticleId($articleId);
    }
    /**
     * Get InsertMaterialsResult value
     * @return bool
     */
    public function getInsertMaterialsResult()
    {
        return $this->InsertMaterialsResult;
    }
    /**
     * Set InsertMaterialsResult value
     * @param bool $insertMaterialsResult
     * @return \Straxus\FarfetchSDK\Model\InsertMaterialsResponse
     */
    public function setInsertMaterialsResult($insertMaterialsResult = null)
    {
        // validation for constraint: boolean
        if (!is_null($insertMaterialsResult) && !is_bool($insertMaterialsResult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($insertMaterialsResult, true), gettype($insertMaterialsResult)), __LINE__);
        }
        $this->InsertMaterialsResult = $insertMaterialsResult;
        return $this;
    }
    /**
     * Get articleId value
     * @return int
     */
    public function getArticleId()
    {
        return $this->articleId;
    }
    /**
     * Set articleId value
     * @param int $articleId
     * @return \Straxus\FarfetchSDK\Model\InsertMaterialsResponse
     */
    public function setArticleId($articleId = null)
    {
        // validation for constraint: int
        if (!is_null($articleId) && !(is_int($articleId) || ctype_digit($articleId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($articleId, true), gettype($articleId)), __LINE__);
        }
        $this->articleId = $articleId;
        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\InsertMaterialsResponse
     */
    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__;
    }
}
