<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for MarketingAirline StructType
 * @package Dg
 * @subpackage Structs
 */
class DgMarketingAirline extends DgCompanyNameType
{
    /**
     * The _
     * @var \dgsoft\StructType\DgCompanyNameType
     */
    public $_;
    /**
     * The SingleVendorInd
     * @var string
     */
    public $SingleVendorInd;
    /**
     * Constructor method for MarketingAirline
     * @uses DgMarketingAirline::set_()
     * @uses DgMarketingAirline::setSingleVendorInd()
     * @param \dgsoft\StructType\DgCompanyNameType $_
     * @param string $singleVendorInd
     */
    public function __construct(\dgsoft\StructType\DgCompanyNameType $_ = null, $singleVendorInd = null)
    {
        $this
            ->set_($_)
            ->setSingleVendorInd($singleVendorInd);
    }
    /**
     * Get _ value
     * @return \dgsoft\StructType\DgCompanyNameType|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param \dgsoft\StructType\DgCompanyNameType $_
     * @return \dgsoft\StructType\DgMarketingAirline
     */
    public function set_(\dgsoft\StructType\DgCompanyNameType $_ = null)
    {
        $this->_ = $_;
        return $this;
    }
    /**
     * Get SingleVendorInd value
     * @return string|null
     */
    public function getSingleVendorInd()
    {
        return $this->SingleVendorInd;
    }
    /**
     * Set SingleVendorInd value
     * @param string $singleVendorInd
     * @return \dgsoft\StructType\DgMarketingAirline
     */
    public function setSingleVendorInd($singleVendorInd = null)
    {
        // validation for constraint: string
        if (!is_null($singleVendorInd) && !is_string($singleVendorInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($singleVendorInd)), __LINE__);
        }
        $this->SingleVendorInd = $singleVendorInd;
        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\DgMarketingAirline
     */
    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__;
    }
}
