<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CampaignSubscription StructType
 * Meta information extracted from the WSDL
 * - type: listMkt:CampaignSubscription
 * @subpackage Structs
 */
class CampaignSubscription extends Record
{
    /**
     * The name
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $name;
    /**
     * The description
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $description;
    /**
     * The subscribedByDefault
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $subscribedByDefault;
    /**
     * The unsubscribed
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $unsubscribed;
    /**
     * The externalName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $externalName;
    /**
     * The externalDescription
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $externalDescription;
    /**
     * The isInactive
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $isInactive;
    /**
     * The internalId
     * @var string
     */
    public $internalId;
    /**
     * The externalId
     * @var string
     */
    public $externalId;
    /**
     * Constructor method for CampaignSubscription
     * @uses CampaignSubscription::setName()
     * @uses CampaignSubscription::setDescription()
     * @uses CampaignSubscription::setSubscribedByDefault()
     * @uses CampaignSubscription::setUnsubscribed()
     * @uses CampaignSubscription::setExternalName()
     * @uses CampaignSubscription::setExternalDescription()
     * @uses CampaignSubscription::setIsInactive()
     * @uses CampaignSubscription::setInternalId()
     * @uses CampaignSubscription::setExternalId()
     * @param string $name
     * @param string $description
     * @param bool $subscribedByDefault
     * @param bool $unsubscribed
     * @param string $externalName
     * @param string $externalDescription
     * @param bool $isInactive
     * @param string $internalId
     * @param string $externalId
     */
    public function __construct($name = null, $description = null, $subscribedByDefault = null, $unsubscribed = null, $externalName = null, $externalDescription = null, $isInactive = null, $internalId = null, $externalId = null)
    {
        $this
            ->setName($name)
            ->setDescription($description)
            ->setSubscribedByDefault($subscribedByDefault)
            ->setUnsubscribed($unsubscribed)
            ->setExternalName($externalName)
            ->setExternalDescription($externalDescription)
            ->setIsInactive($isInactive)
            ->setInternalId($internalId)
            ->setExternalId($externalId);
    }
    /**
     * Get name value
     * @return string|null
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return \StructType\CampaignSubscription
     */
    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 description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Set description value
     * @param string $description
     * @return \StructType\CampaignSubscription
     */
    public function setDescription($description = null)
    {
        // validation for constraint: string
        if (!is_null($description) && !is_string($description)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($description, true), gettype($description)), __LINE__);
        }
        $this->description = $description;
        return $this;
    }
    /**
     * Get subscribedByDefault value
     * @return bool|null
     */
    public function getSubscribedByDefault()
    {
        return $this->subscribedByDefault;
    }
    /**
     * Set subscribedByDefault value
     * @param bool $subscribedByDefault
     * @return \StructType\CampaignSubscription
     */
    public function setSubscribedByDefault($subscribedByDefault = null)
    {
        // validation for constraint: boolean
        if (!is_null($subscribedByDefault) && !is_bool($subscribedByDefault)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($subscribedByDefault, true), gettype($subscribedByDefault)), __LINE__);
        }
        $this->subscribedByDefault = $subscribedByDefault;
        return $this;
    }
    /**
     * Get unsubscribed value
     * @return bool|null
     */
    public function getUnsubscribed()
    {
        return $this->unsubscribed;
    }
    /**
     * Set unsubscribed value
     * @param bool $unsubscribed
     * @return \StructType\CampaignSubscription
     */
    public function setUnsubscribed($unsubscribed = null)
    {
        // validation for constraint: boolean
        if (!is_null($unsubscribed) && !is_bool($unsubscribed)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($unsubscribed, true), gettype($unsubscribed)), __LINE__);
        }
        $this->unsubscribed = $unsubscribed;
        return $this;
    }
    /**
     * Get externalName value
     * @return string|null
     */
    public function getExternalName()
    {
        return $this->externalName;
    }
    /**
     * Set externalName value
     * @param string $externalName
     * @return \StructType\CampaignSubscription
     */
    public function setExternalName($externalName = null)
    {
        // validation for constraint: string
        if (!is_null($externalName) && !is_string($externalName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($externalName, true), gettype($externalName)), __LINE__);
        }
        $this->externalName = $externalName;
        return $this;
    }
    /**
     * Get externalDescription value
     * @return string|null
     */
    public function getExternalDescription()
    {
        return $this->externalDescription;
    }
    /**
     * Set externalDescription value
     * @param string $externalDescription
     * @return \StructType\CampaignSubscription
     */
    public function setExternalDescription($externalDescription = null)
    {
        // validation for constraint: string
        if (!is_null($externalDescription) && !is_string($externalDescription)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($externalDescription, true), gettype($externalDescription)), __LINE__);
        }
        $this->externalDescription = $externalDescription;
        return $this;
    }
    /**
     * Get isInactive value
     * @return bool|null
     */
    public function getIsInactive()
    {
        return $this->isInactive;
    }
    /**
     * Set isInactive value
     * @param bool $isInactive
     * @return \StructType\CampaignSubscription
     */
    public function setIsInactive($isInactive = null)
    {
        // validation for constraint: boolean
        if (!is_null($isInactive) && !is_bool($isInactive)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isInactive, true), gettype($isInactive)), __LINE__);
        }
        $this->isInactive = $isInactive;
        return $this;
    }
    /**
     * Get internalId value
     * @return string|null
     */
    public function getInternalId()
    {
        return $this->internalId;
    }
    /**
     * Set internalId value
     * @param string $internalId
     * @return \StructType\CampaignSubscription
     */
    public function setInternalId($internalId = null)
    {
        // validation for constraint: string
        if (!is_null($internalId) && !is_string($internalId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($internalId, true), gettype($internalId)), __LINE__);
        }
        $this->internalId = $internalId;
        return $this;
    }
    /**
     * Get externalId value
     * @return string|null
     */
    public function getExternalId()
    {
        return $this->externalId;
    }
    /**
     * Set externalId value
     * @param string $externalId
     * @return \StructType\CampaignSubscription
     */
    public function setExternalId($externalId = null)
    {
        // validation for constraint: string
        if (!is_null($externalId) && !is_string($externalId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($externalId, true), gettype($externalId)), __LINE__);
        }
        $this->externalId = $externalId;
        return $this;
    }
}
