<?php

namespace GlsApi\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for cCustomsAttachedFile Struct
 * @subpackage Structs
 */
class CCustomsAttachedFile extends AbstractStructBase
{
    /**
     * The name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $name;
    /**
     * The bin
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $bin;
    /**
     * Constructor method for cCustomsAttachedFile
     * @uses CCustomsAttachedFile::setName()
     * @uses CCustomsAttachedFile::setBin()
     * @param string $name
     * @param string $bin
     */
    public function __construct($name = null, $bin = null)
    {
        $this
            ->setName($name)
            ->setBin($bin);
    }
    /**
     * Get name value
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return \GlsApi\Struct\CCustomsAttachedFile
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        $this->name = $name;
        return $this;
    }
    /**
     * Get bin value
     * @return string
     */
    public function getBin()
    {
        return $this->bin;
    }
    /**
     * Set bin value
     * @param string $bin
     * @return \GlsApi\Struct\CCustomsAttachedFile
     */
    public function setBin($bin = null)
    {
        // validation for constraint: string
        if (!is_null($bin) && !is_string($bin)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($bin, true), gettype($bin)), __LINE__);
        }
        $this->bin = $bin;
        return $this;
    }
}
