<?php

namespace GlsApi\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for cCODMax Struct
 * @subpackage Structs
 */
class CCODMax extends AbstractStructBase
{
    /**
     * The max_cod
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var float
     */
    public $max_cod;
    /**
     * Constructor method for cCODMax
     * @uses CCODMax::setMax_cod()
     * @param float $max_cod
     */
    public function __construct($max_cod = null)
    {
        $this
            ->setMax_cod($max_cod);
    }
    /**
     * Get max_cod value
     * @return float
     */
    public function getMax_cod()
    {
        return $this->max_cod;
    }
    /**
     * Set max_cod value
     * @param float $max_cod
     * @return \GlsApi\Struct\CCODMax
     */
    public function setMax_cod($max_cod = null)
    {
        // validation for constraint: float
        if (!is_null($max_cod) && !(is_float($max_cod) || is_numeric($max_cod))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($max_cod, true), gettype($max_cod)), __LINE__);
        }
        $this->max_cod = $max_cod;
        return $this;
    }
}
