<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UpdatePanelCommunicationSetting StructType
 * @subpackage Structs
 */
class UpdatePanelCommunicationSetting extends AbstractStructBase
{
    /**
     * The customerId
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $customerId;
    /**
     * The communicationSetting
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $communicationSetting;
    /**
     * Constructor method for UpdatePanelCommunicationSetting
     * @uses UpdatePanelCommunicationSetting::setCustomerId()
     * @uses UpdatePanelCommunicationSetting::setCommunicationSetting()
     * @param int $customerId
     * @param string $communicationSetting
     */
    public function __construct($customerId = null, $communicationSetting = null)
    {
        $this
            ->setCustomerId($customerId)
            ->setCommunicationSetting($communicationSetting);
    }
    /**
     * Get customerId value
     * @return int
     */
    public function getCustomerId()
    {
        return $this->customerId;
    }
    /**
     * Set customerId value
     * @param int $customerId
     * @return \CustomerManagement\StructType\UpdatePanelCommunicationSetting
     */
    public function setCustomerId($customerId = null)
    {
        // validation for constraint: int
        if (!is_null($customerId) && !(is_int($customerId) || ctype_digit($customerId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($customerId, true), gettype($customerId)), __LINE__);
        }
        $this->customerId = $customerId;
        return $this;
    }
    /**
     * Get communicationSetting value
     * @return string
     */
    public function getCommunicationSetting()
    {
        return $this->communicationSetting;
    }
    /**
     * Set communicationSetting value
     * @uses \CustomerManagement\EnumType\DualPathCommunicationSettingEnum::valueIsValid()
     * @uses \CustomerManagement\EnumType\DualPathCommunicationSettingEnum::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $communicationSetting
     * @return \CustomerManagement\StructType\UpdatePanelCommunicationSetting
     */
    public function setCommunicationSetting($communicationSetting = null)
    {
        // validation for constraint: enumeration
        if (!\CustomerManagement\EnumType\DualPathCommunicationSettingEnum::valueIsValid($communicationSetting)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \CustomerManagement\EnumType\DualPathCommunicationSettingEnum', is_array($communicationSetting) ? implode(', ', $communicationSetting) : var_export($communicationSetting, true), implode(', ', \CustomerManagement\EnumType\DualPathCommunicationSettingEnum::getValidValues())), __LINE__);
        }
        $this->communicationSetting = $communicationSetting;
        return $this;
    }
}
