<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for getKartyResponse StructType
 * @subpackage Structs
 */
class GetKartyResponse extends AbstractStructBase
{
    /**
     * The karta
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var KartaType[]
     */
    public $karta;
    /**
     * The error
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var ErrorType[]
     */
    public $error;
    /**
     * Constructor method for getKartyResponse
     * @uses GetKartyResponse::setKarta()
     * @uses GetKartyResponse::setError()
     * @param KartaType[] $karta
     * @param ErrorType[] $error
     */
    public function __construct(array $karta = array(), array $error = array())
    {
        $this
            ->setKarta($karta)
            ->setError($error);
    }
    /**
     * Get karta value
     * @return KartaType[]|null
     */
    public function getKarta()
    {
        return $this->karta;
    }
    /**
     * Set karta value
     * @param KartaType[] $karta
     * @return GetKartyResponse
     */
    public function setKarta(array $karta = array())
    {
        $this->karta = $karta;
        return $this;
    }
    /**
     * Add item to karta value
     * @throws \InvalidArgumentException
     * @param KartaType $item
     * @return GetKartyResponse
     */
    public function addToKarta(KartaType $item)
    {
        $this->karta[] = $item;
        return $this;
    }
    /**
     * Get error value
     * @return ErrorType[]|null
     */
    public function getError()
    {
        return $this->error;
    }
    /**
     * Set error value
     * @param ErrorType[] $error
     * @return GetKartyResponse
     */
    public function setError(array $error = array())
    {
        $this->error = $error;
        return $this;
    }
    /**
     * Add item to error value
     * @throws \InvalidArgumentException
     * @param ErrorType $item
     * @return GetKartyResponse
     */
    public function addToError(ErrorType $item)
    {
        $this->error[] = $item;
        return $this;
    }
}
