<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ViaRouteItemResult StructType
 * @subpackage Structs
 */
class ViaRouteItemResult extends AbstractStructBase
{
    /**
     * The TransicsViaRouteID
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var int
     */
    public $TransicsViaRouteID;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * Constructor method for ViaRouteItemResult
     * @uses ViaRouteItemResult::setTransicsViaRouteID()
     * @uses ViaRouteItemResult::setName()
     * @param int $transicsViaRouteID
     * @param string $name
     */
    public function __construct($transicsViaRouteID = null, $name = null)
    {
        $this
            ->setTransicsViaRouteID($transicsViaRouteID)
            ->setName($name);
    }
    /**
     * Get TransicsViaRouteID value
     * @return int
     */
    public function getTransicsViaRouteID()
    {
        return $this->TransicsViaRouteID;
    }
    /**
     * Set TransicsViaRouteID value
     * @param int $transicsViaRouteID
     * @return \StructType\ViaRouteItemResult
     */
    public function setTransicsViaRouteID($transicsViaRouteID = null)
    {
        // validation for constraint: int
        if (!is_null($transicsViaRouteID) && !(is_int($transicsViaRouteID) || ctype_digit($transicsViaRouteID))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($transicsViaRouteID, true), gettype($transicsViaRouteID)), __LINE__);
        }
        $this->TransicsViaRouteID = $transicsViaRouteID;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\ViaRouteItemResult
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
}
