<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for VehicleAvailCoreTypeVendor StructType
 * @package Dg
 * @subpackage Structs
 */
class DgVehicleAvailCoreTypeVendor extends DgCompanyNameType
{
    /**
     * The _
     * @var \dgsoft\StructType\DgCompanyNameType
     */
    public $_;
    /**
     * The ParticipationLevelCode
     * @var string
     */
    public $ParticipationLevelCode;
    /**
     * Constructor method for VehicleAvailCoreTypeVendor
     * @uses DgVehicleAvailCoreTypeVendor::set_()
     * @uses DgVehicleAvailCoreTypeVendor::setParticipationLevelCode()
     * @param \dgsoft\StructType\DgCompanyNameType $_
     * @param string $participationLevelCode
     */
    public function __construct(\dgsoft\StructType\DgCompanyNameType $_ = null, $participationLevelCode = null)
    {
        $this
            ->set_($_)
            ->setParticipationLevelCode($participationLevelCode);
    }
    /**
     * Get _ value
     * @return \dgsoft\StructType\DgCompanyNameType|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param \dgsoft\StructType\DgCompanyNameType $_
     * @return \dgsoft\StructType\DgVehicleAvailCoreTypeVendor
     */
    public function set_(\dgsoft\StructType\DgCompanyNameType $_ = null)
    {
        $this->_ = $_;
        return $this;
    }
    /**
     * Get ParticipationLevelCode value
     * @return string|null
     */
    public function getParticipationLevelCode()
    {
        return $this->ParticipationLevelCode;
    }
    /**
     * Set ParticipationLevelCode value
     * @param string $participationLevelCode
     * @return \dgsoft\StructType\DgVehicleAvailCoreTypeVendor
     */
    public function setParticipationLevelCode($participationLevelCode = null)
    {
        // validation for constraint: string
        if (!is_null($participationLevelCode) && !is_string($participationLevelCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($participationLevelCode)), __LINE__);
        }
        $this->ParticipationLevelCode = $participationLevelCode;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \dgsoft\StructType\DgVehicleAvailCoreTypeVendor
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
