<?php

namespace App\Services;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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