<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_FareGroupService StructType
 * @subpackage Structs
 */
class JP_FareGroupService extends AbstractStructBase
{
    /**
     * The TypeCode
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $TypeCode;
    /**
     * The PriceApplicationCode
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $PriceApplicationCode;
    /**
     * Constructor method for JP_FareGroupService
     * @uses JP_FareGroupService::setTypeCode()
     * @uses JP_FareGroupService::setPriceApplicationCode()
     * @param int $typeCode
     * @param int $priceApplicationCode
     */
    public function __construct($typeCode = null, $priceApplicationCode = null)
    {
        $this
            ->setTypeCode($typeCode)
            ->setPriceApplicationCode($priceApplicationCode);
    }
    /**
     * Get TypeCode value
     * @return int
     */
    public function getTypeCode()
    {
        return $this->TypeCode;
    }
    /**
     * Set TypeCode value
     * @param int $typeCode
     * @return \StructType\JP_FareGroupService
     */
    public function setTypeCode($typeCode = null)
    {
        // validation for constraint: int
        if (!is_null($typeCode) && !(is_int($typeCode) || ctype_digit($typeCode))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($typeCode, true), gettype($typeCode)), __LINE__);
        }
        $this->TypeCode = $typeCode;
        return $this;
    }
    /**
     * Get PriceApplicationCode value
     * @return int
     */
    public function getPriceApplicationCode()
    {
        return $this->PriceApplicationCode;
    }
    /**
     * Set PriceApplicationCode value
     * @param int $priceApplicationCode
     * @return \StructType\JP_FareGroupService
     */
    public function setPriceApplicationCode($priceApplicationCode = null)
    {
        // validation for constraint: int
        if (!is_null($priceApplicationCode) && !(is_int($priceApplicationCode) || ctype_digit($priceApplicationCode))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($priceApplicationCode, true), gettype($priceApplicationCode)), __LINE__);
        }
        $this->PriceApplicationCode = $priceApplicationCode;
        return $this;
    }
}
