<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for createEnvelopeBuforResponse StructType
 * @subpackage Structs
 */
class CreateEnvelopeBuforResponse extends AbstractStructBase
{
    /**
     * The createdBufor
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var BuforType[]
     */
    public $createdBufor;
    /**
     * The error
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var ErrorType_1[]
     */
    public $error;
    /**
     * Constructor method for createEnvelopeBuforResponse
     * @uses CreateEnvelopeBuforResponse::setCreatedBufor()
     * @uses CreateEnvelopeBuforResponse::setError()
     * @param BuforType[] $createdBufor
     * @param ErrorType_1[] $error
     */
    public function __construct(array $createdBufor = array(), array $error = array())
    {
        $this
            ->setCreatedBufor($createdBufor)
            ->setError($error);
    }
    /**
     * Get createdBufor value
     * @return BuforType[]|null
     */
    public function getCreatedBufor()
    {
        return $this->createdBufor;
    }
    /**
     * Set createdBufor value
     * @param BuforType[] $createdBufor
     * @return CreateEnvelopeBuforResponse
     */
    public function setCreatedBufor(array $createdBufor = array())
    {
        $this->createdBufor = $createdBufor;
        return $this;
    }
    /**
     * Add item to createdBufor value
     * @throws \InvalidArgumentException
     * @param BuforType $item
     * @return CreateEnvelopeBuforResponse
     */
    public function addToCreatedBufor(BuforType $item)
    {
        $this->createdBufor[] = $item;
        return $this;
    }
    /**
     * Get error value
     * @return ErrorType_1[]|null
     */
    public function getError()
    {
        return $this->error;
    }
    /**
     * Set error value
     * @param ErrorType_1[] $error
     * @return CreateEnvelopeBuforResponse
     */
    public function setError(array $error = array())
    {
        $this->error = $error;
        return $this;
    }
    /**
     * Add item to error value
     * @throws \InvalidArgumentException
     * @param ErrorType_1 $item
     * @return CreateEnvelopeBuforResponse
     */
    public function addToError(ErrorType_1 $item)
    {
        $this->error[] = $item;
        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 CreateEnvelopeBuforResponse
     */
    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__;
    }
}
