<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ClsVoucherCheckpoint_Station EasyStruct
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ClsVoucherCheckpoint_Station
 * @package Easy
 * @subpackage Structs
 */
class EasyClsVoucherCheckpoint_Station extends EasyClsVoucherCheckpoint
{
    /**
     * The CheckpointStation
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyStruct\EasyClsStation
     */
    public $CheckpointStation;
    /**
     * Constructor method for ClsVoucherCheckpoint_Station
     * @uses EasyClsVoucherCheckpoint_Station::setCheckpointStation()
     * @param \Easy\EasyStruct\EasyClsStation $checkpointStation
     */
    public function __construct(\Easy\EasyStruct\EasyClsStation $checkpointStation = null)
    {
        $this
            ->setCheckpointStation($checkpointStation);
    }
    /**
     * Get CheckpointStation value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \Easy\EasyStruct\EasyClsStation|null
     */
    public function getCheckpointStation()
    {
        return isset($this->CheckpointStation) ? $this->CheckpointStation : null;
    }
    /**
     * Set CheckpointStation value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \Easy\EasyStruct\EasyClsStation $checkpointStation
     * @return \Easy\EasyStruct\EasyClsVoucherCheckpoint_Station
     */
    public function setCheckpointStation(\Easy\EasyStruct\EasyClsStation $checkpointStation = null)
    {
        if (is_null($checkpointStation) || (is_array($checkpointStation) && empty($checkpointStation))) {
            unset($this->CheckpointStation);
        } else {
            $this->CheckpointStation = $checkpointStation;
        }
        return $this;
    }
}
