<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for FlxTransactionResponse StructType
 * @subpackage Structs
 */
class FlxTransactionResponse extends AbstractStructBase
{
    /**
     * The IATA_AirShoppingRS
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - ref: s2:IATA_AirShoppingRS
     * @var \StructType\IATA_AirShoppingRS
     */
    public $IATA_AirShoppingRS;
    /**
     * The Context
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Context;
    /**
     * Constructor method for FlxTransactionResponse
     * @uses FlxTransactionResponse::setIATA_AirShoppingRS()
     * @uses FlxTransactionResponse::setContext()
     * @param \StructType\IATA_AirShoppingRS $iATA_AirShoppingRS
     * @param string $context
     */
    public function __construct(\StructType\IATA_AirShoppingRS $iATA_AirShoppingRS = null, $context = null)
    {
        $this
            ->setIATA_AirShoppingRS($iATA_AirShoppingRS)
            ->setContext($context);
    }
    /**
     * Get IATA_AirShoppingRS value
     * @return \StructType\IATA_AirShoppingRS
     */
    public function getIATA_AirShoppingRS()
    {
        return $this->IATA_AirShoppingRS;
    }
    /**
     * Set IATA_AirShoppingRS value
     * @param \StructType\IATA_AirShoppingRS $iATA_AirShoppingRS
     * @return \StructType\FlxTransactionResponse
     */
    public function setIATA_AirShoppingRS(\StructType\IATA_AirShoppingRS $iATA_AirShoppingRS = null)
    {
        $this->IATA_AirShoppingRS = $iATA_AirShoppingRS;
        return $this;
    }
    /**
     * Get Context value
     * @return string|null
     */
    public function getContext()
    {
        return $this->Context;
    }
    /**
     * Set Context value
     * @param string $context
     * @return \StructType\FlxTransactionResponse
     */
    public function setContext($context = null)
    {
        // validation for constraint: string
        if (!is_null($context) && !is_string($context)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($context, true), gettype($context)), __LINE__);
        }
        $this->Context = $context;
        return $this;
    }
}
