<?php

namespace GlsApi\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for cConsignBindIDs Struct
 * @subpackage Structs
 */
class CConsignBindIDs extends AbstractStructBase
{
    /**
     * The id
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $id;
    /**
     * The id_src
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $id_src;
    /**
     * Constructor method for cConsignBindIDs
     * @uses CConsignBindIDs::setId()
     * @uses CConsignBindIDs::setId_src()
     * @param int $id
     * @param int $id_src
     */
    public function __construct($id = null, $id_src = null)
    {
        $this
            ->setId($id)
            ->setId_src($id_src);
    }
    /**
     * Get id value
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set id value
     * @param int $id
     * @return \GlsApi\Struct\CConsignBindIDs
     */
    public function setId($id = null)
    {
        // validation for constraint: int
        if (!is_null($id) && !(is_int($id) || ctype_digit($id))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($id, true), gettype($id)), __LINE__);
        }
        $this->id = $id;
        return $this;
    }
    /**
     * Get id_src value
     * @return int
     */
    public function getId_src()
    {
        return $this->id_src;
    }
    /**
     * Set id_src value
     * @param int $id_src
     * @return \GlsApi\Struct\CConsignBindIDs
     */
    public function setId_src($id_src = null)
    {
        // validation for constraint: int
        if (!is_null($id_src) && !(is_int($id_src) || ctype_digit($id_src))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($id_src, true), gettype($id_src)), __LINE__);
        }
        $this->id_src = $id_src;
        return $this;
    }
}
