<?php

namespace Sabre\TravelItineraryRead\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BagWeight Structs
 * @subpackage Structs
 */
class BagWeight extends AbstractStructBase
{
    /**
     * The _
     * @var int
     */
    public $_;
    /**
     * The Unit
     * @var CommonString
     */
    public $Unit;
    /**
     * Constructor method for BagWeight
     * @uses BagWeight::set_()
     * @uses BagWeight::setUnit()
     * @param int $_
     * @param CommonString $unit
     */
    public function __construct($_ = null, CommonString $unit = null)
    {
        $this
            ->set_($_)
            ->setUnit($unit);
    }
    /**
     * Get _ value
     * @return int|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param int $_
     * @return \Sabre\TravelItineraryRead\Structs\BagWeight
     */
    public function set_($_ = null)
    {
        $this->_ = $_;
        return $this;
    }
    /**
     * Get Unit value
     * @return CommonString|null
     */
    public function getUnit()
    {
        return $this->Unit;
    }
    /**
     * Set Unit value
     * @param CommonString $unit
     * @return \Sabre\TravelItineraryRead\Structs\BagWeight
     */
    public function setUnit(CommonString $unit = null)
    {
        $this->Unit = $unit;
        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 \Sabre\TravelItineraryRead\Structs\BagWeight
     */
    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__;
    }
}
