<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TerminateSubscriptionRequestBodyStructure StructType
 * Meta informations extracted from the WSDL
 * - documentation: Type for Body of Terminate Subscription Request content. Used in WSDL.
 * @subpackage Structs
 */
class TerminateSubscriptionRequestBodyStructure extends AbstractStructBase
{
    /**
     * The SubscriberRef
     * @var \StructType\ParticipantRefStructure
     */
    public $SubscriberRef;
    /**
     * The All
     * @var string
     */
    public $All;
    /**
     * The SubscriptionRef
     * @var \StructType\SubscriptionQualifierStructure
     */
    public $SubscriptionRef;
    /**
     * Constructor method for TerminateSubscriptionRequestBodyStructure
     * @uses TerminateSubscriptionRequestBodyStructure::setSubscriberRef()
     * @uses TerminateSubscriptionRequestBodyStructure::setAll()
     * @uses TerminateSubscriptionRequestBodyStructure::setSubscriptionRef()
     * @param \StructType\ParticipantRefStructure $subscriberRef
     * @param string $all
     * @param \StructType\SubscriptionQualifierStructure $subscriptionRef
     */
    public function __construct(\StructType\ParticipantRefStructure $subscriberRef = null, $all = null, \StructType\SubscriptionQualifierStructure $subscriptionRef = null)
    {
        $this
            ->setSubscriberRef($subscriberRef)
            ->setAll($all)
            ->setSubscriptionRef($subscriptionRef);
    }
    /**
     * Get SubscriberRef value
     * @return \StructType\ParticipantRefStructure|null
     */
    public function getSubscriberRef()
    {
        return $this->SubscriberRef;
    }
    /**
     * Set SubscriberRef value
     * @param \StructType\ParticipantRefStructure $subscriberRef
     * @return \StructType\TerminateSubscriptionRequestBodyStructure
     */
    public function setSubscriberRef(\StructType\ParticipantRefStructure $subscriberRef = null)
    {
        $this->SubscriberRef = $subscriberRef;
        return $this;
    }
    /**
     * Get All value
     * @return string|null
     */
    public function getAll()
    {
        return $this->All;
    }
    /**
     * Set All value
     * @uses \EnumType\EmptyType::valueIsValid()
     * @uses \EnumType\EmptyType::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $all
     * @return \StructType\TerminateSubscriptionRequestBodyStructure
     */
    public function setAll($all = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\EmptyType::valueIsValid($all)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $all, implode(', ', \EnumType\EmptyType::getValidValues())), __LINE__);
        }
        $this->All = $all;
        return $this;
    }
    /**
     * Get SubscriptionRef value
     * @return \StructType\SubscriptionQualifierStructure|null
     */
    public function getSubscriptionRef()
    {
        return $this->SubscriptionRef;
    }
    /**
     * Set SubscriptionRef value
     * @param \StructType\SubscriptionQualifierStructure $subscriptionRef
     * @return \StructType\TerminateSubscriptionRequestBodyStructure
     */
    public function setSubscriptionRef(\StructType\SubscriptionQualifierStructure $subscriptionRef = null)
    {
        $this->SubscriptionRef = $subscriptionRef;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \StructType\TerminateSubscriptionRequestBodyStructure
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
