<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for trace StructType
 * @subpackage Structs
 */
class Trace extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The level
     * @var string
     */
    public $level;
    /**
     * Constructor method for trace
     * @uses Trace::set_()
     * @uses Trace::setLevel()
     * @param string $_
     * @param string $level
     */
    public function __construct($_ = null, $level = null)
    {
        $this
            ->set_($_)
            ->setLevel($level);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \StructType\Trace
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($_, true), gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
    /**
     * Get level value
     * @return string|null
     */
    public function getLevel()
    {
        return $this->level;
    }
    /**
     * Set level value
     * @param string $level
     * @return \StructType\Trace
     */
    public function setLevel($level = null)
    {
        // validation for constraint: string
        if (!is_null($level) && !is_string($level)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($level, true), gettype($level)), __LINE__);
        }
        $this->level = $level;
        return $this;
    }
}
