<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.PrintableItem.MerchandiseAddOn StructType
 * @subpackage Structs
 */
class Printing_PrintableItem_MerchandiseAddOn extends AnyEntity
{
    /**
     * The AddOnComponentName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $AddOnComponentName;
    /**
     * The AddOnComponentValue
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $AddOnComponentValue;
    /**
     * The AddOnTypeName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $AddOnTypeName;
    /**
     * Constructor method for Printing.PrintableItem.MerchandiseAddOn
     * @uses Printing_PrintableItem_MerchandiseAddOn::setAddOnComponentName()
     * @uses Printing_PrintableItem_MerchandiseAddOn::setAddOnComponentValue()
     * @uses Printing_PrintableItem_MerchandiseAddOn::setAddOnTypeName()
     * @param string $addOnComponentName
     * @param string $addOnComponentValue
     * @param string $addOnTypeName
     */
    public function __construct($addOnComponentName = null, $addOnComponentValue = null, $addOnTypeName = null)
    {
        $this
            ->setAddOnComponentName($addOnComponentName)
            ->setAddOnComponentValue($addOnComponentValue)
            ->setAddOnTypeName($addOnTypeName);
    }
    /**
     * Get AddOnComponentName value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getAddOnComponentName()
    {
        return isset($this->AddOnComponentName) ? $this->AddOnComponentName : null;
    }
    /**
     * Set AddOnComponentName value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $addOnComponentName
     * @return \patest\StructType\Printing_PrintableItem_MerchandiseAddOn
     */
    public function setAddOnComponentName($addOnComponentName = null)
    {
        // validation for constraint: string
        if (!is_null($addOnComponentName) && !is_string($addOnComponentName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addOnComponentName, true), gettype($addOnComponentName)), __LINE__);
        }
        if (is_null($addOnComponentName) || (is_array($addOnComponentName) && empty($addOnComponentName))) {
            unset($this->AddOnComponentName);
        } else {
            $this->AddOnComponentName = $addOnComponentName;
        }
        return $this;
    }
    /**
     * Get AddOnComponentValue value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getAddOnComponentValue()
    {
        return isset($this->AddOnComponentValue) ? $this->AddOnComponentValue : null;
    }
    /**
     * Set AddOnComponentValue value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $addOnComponentValue
     * @return \patest\StructType\Printing_PrintableItem_MerchandiseAddOn
     */
    public function setAddOnComponentValue($addOnComponentValue = null)
    {
        // validation for constraint: string
        if (!is_null($addOnComponentValue) && !is_string($addOnComponentValue)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addOnComponentValue, true), gettype($addOnComponentValue)), __LINE__);
        }
        if (is_null($addOnComponentValue) || (is_array($addOnComponentValue) && empty($addOnComponentValue))) {
            unset($this->AddOnComponentValue);
        } else {
            $this->AddOnComponentValue = $addOnComponentValue;
        }
        return $this;
    }
    /**
     * Get AddOnTypeName value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getAddOnTypeName()
    {
        return isset($this->AddOnTypeName) ? $this->AddOnTypeName : null;
    }
    /**
     * Set AddOnTypeName value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $addOnTypeName
     * @return \patest\StructType\Printing_PrintableItem_MerchandiseAddOn
     */
    public function setAddOnTypeName($addOnTypeName = null)
    {
        // validation for constraint: string
        if (!is_null($addOnTypeName) && !is_string($addOnTypeName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addOnTypeName, true), gettype($addOnTypeName)), __LINE__);
        }
        if (is_null($addOnTypeName) || (is_array($addOnTypeName) && empty($addOnTypeName))) {
            unset($this->AddOnTypeName);
        } else {
            $this->AddOnTypeName = $addOnTypeName;
        }
        return $this;
    }
}
