<?php

namespace patest\ArrayType;

use \WsdlToPhp\PackageBase\AbstractStructArrayBase;

/**
 * This class stands for
 * ArrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionRes
 * ult-ResponsehpjoQDea ArrayType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ArrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult-ResponsehpjoQDea
 * @subpackage Arrays
 */
class ArrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea extends AbstractStructArrayBase
{
    /**
     * The
     * KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_Res
     * ponsehpjoQDea
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea[]
     */
    public $KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea;
    /**
     * Constructor method for
     * ArrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionRes
     * ult-ResponsehpjoQDea
     * @uses ArrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea::setKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea()
     * @param \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea[] $keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea
     */
    public function __construct(array $keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea = array())
    {
        $this
            ->setKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea($keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea);
    }
    /**
     * Get
     * KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_Res
     * ponsehpjoQDea value
     * @return \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea[]|null
     */
    public function getKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea()
    {
        return $this->{'KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult-ResponsehpjoQDea'};
    }
    /**
     * This method is responsible for validating the values passed to the setKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea method
     * This method is willingly generated in order to preserve the one-line inline validation within the setKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaForArrayConstraintsFromSetKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $arrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaItem) {
            // validation for constraint: itemType
            if (!$arrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaItem instanceof \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea) {
                $invalidValues[] = is_object($arrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaItem) ? get_class($arrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaItem) : sprintf('%s(%s)', gettype($arrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaItem), var_export($arrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea property can only contain items of type \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set
     * KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_Res
     * ponsehpjoQDea value
     * @throws \InvalidArgumentException
     * @param \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea[] $keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea
     * @return \patest\ArrayType\ArrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea
     */
    public function setKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea(array $keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea = array())
    {
        // validation for constraint: array
        if ('' !== ($keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaArrayErrorMessage = self::validateKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaForArrayConstraintsFromSetKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea($keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea))) {
            throw new \InvalidArgumentException($keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDeaArrayErrorMessage, __LINE__);
        }
        $this->KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea = $this->{'KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult-ResponsehpjoQDea'} = $keyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea;
        return $this;
    }
    /**
     * Add item to
     * KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_Res
     * ponsehpjoQDea value
     * @throws \InvalidArgumentException
     * @param \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea $item
     * @return \patest\ArrayType\ArrayOfKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea
     */
    public function addToKeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea(\patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea) {
            throw new \InvalidArgumentException(sprintf('The KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea property can only contain items of type \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea[] = $this->{'KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult-ResponsehpjoQDea'}[] = $item;
        return $this;
    }
    /**
     * Returns the current element
     * @see AbstractStructArrayBase::current()
     * @return \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea|null
     */
    public function current()
    {
        return parent::current();
    }
    /**
     * Returns the indexed element
     * @see AbstractStructArrayBase::item()
     * @param int $index
     * @return \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea|null
     */
    public function item($index)
    {
        return parent::item($index);
    }
    /**
     * Returns the first element
     * @see AbstractStructArrayBase::first()
     * @return \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea|null
     */
    public function first()
    {
        return parent::first();
    }
    /**
     * Returns the last element
     * @see AbstractStructArrayBase::last()
     * @return \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea|null
     */
    public function last()
    {
        return parent::last();
    }
    /**
     * Returns the element at the offset
     * @see AbstractStructArrayBase::offsetGet()
     * @param int $offset
     * @return \patest\StructType\KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult_ResponsehpjoQDea|null
     */
    public function offsetGet($offset)
    {
        return parent::offsetGet($offset);
    }
    /**
     * Returns the attribute name
     * @see AbstractStructArrayBase::getAttributeName()
     * @return string KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult-ResponsehpjoQDea
     */
    public function getAttributeName()
    {
        return 'KeyValueOfguidCancelResaleTransferTransactionsResponse_TicketExecutionResult-ResponsehpjoQDea';
    }
}
