<?php

namespace OXModule\StructClass;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for changeCapabilities StructClass
 * @subpackage Structs
 */
class ChangeCapabilities extends AbstractStructBase
{
    /**
     * The ctx
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \OXModule\StructClass\Context
     */
    public $ctx;
    /**
     * The capsToAdd
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $capsToAdd;
    /**
     * The capsToRemove
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $capsToRemove;
    /**
     * The capsToDrop
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $capsToDrop;
    /**
     * The auth
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \OXModule\StructClass\Credentials
     */
    public $auth;
    /**
     * Constructor method for changeCapabilities
     * @uses ChangeCapabilities::setCtx()
     * @uses ChangeCapabilities::setCapsToAdd()
     * @uses ChangeCapabilities::setCapsToRemove()
     * @uses ChangeCapabilities::setCapsToDrop()
     * @uses ChangeCapabilities::setAuth()
     * @param \OXModule\StructClass\Context $ctx
     * @param string $capsToAdd
     * @param string $capsToRemove
     * @param string $capsToDrop
     * @param \OXModule\StructClass\Credentials $auth
     */
    public function __construct(\OXModule\StructClass\Context $ctx = null, $capsToAdd = null, $capsToRemove = null, $capsToDrop = null, \OXModule\StructClass\Credentials $auth = null)
    {
        $this
            ->setCtx($ctx)
            ->setCapsToAdd($capsToAdd)
            ->setCapsToRemove($capsToRemove)
            ->setCapsToDrop($capsToDrop)
            ->setAuth($auth);
    }
    /**
     * Get ctx 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 \OXModule\StructClass\Context|null
     */
    public function getCtx()
    {
        return isset($this->ctx) ? $this->ctx : null;
    }
    /**
     * Set ctx 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 \OXModule\StructClass\Context $ctx
     * @return \OXModule\StructClass\ChangeCapabilities
     */
    public function setCtx(\OXModule\StructClass\Context $ctx = null)
    {
        if (is_null($ctx) || (is_array($ctx) && empty($ctx))) {
            unset($this->ctx);
        } else {
            $this->ctx = $ctx;
        }
        return $this;
    }
    /**
     * Get capsToAdd 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 getCapsToAdd()
    {
        return isset($this->capsToAdd) ? $this->capsToAdd : null;
    }
    /**
     * Set capsToAdd 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 $capsToAdd
     * @return \OXModule\StructClass\ChangeCapabilities
     */
    public function setCapsToAdd($capsToAdd = null)
    {
        // validation for constraint: string
        if (!is_null($capsToAdd) && !is_string($capsToAdd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($capsToAdd)), __LINE__);
        }
        if (is_null($capsToAdd) || (is_array($capsToAdd) && empty($capsToAdd))) {
            unset($this->capsToAdd);
        } else {
            $this->capsToAdd = $capsToAdd;
        }
        return $this;
    }
    /**
     * Get capsToRemove 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 getCapsToRemove()
    {
        return isset($this->capsToRemove) ? $this->capsToRemove : null;
    }
    /**
     * Set capsToRemove 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 $capsToRemove
     * @return \OXModule\StructClass\ChangeCapabilities
     */
    public function setCapsToRemove($capsToRemove = null)
    {
        // validation for constraint: string
        if (!is_null($capsToRemove) && !is_string($capsToRemove)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($capsToRemove)), __LINE__);
        }
        if (is_null($capsToRemove) || (is_array($capsToRemove) && empty($capsToRemove))) {
            unset($this->capsToRemove);
        } else {
            $this->capsToRemove = $capsToRemove;
        }
        return $this;
    }
    /**
     * Get capsToDrop 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 getCapsToDrop()
    {
        return isset($this->capsToDrop) ? $this->capsToDrop : null;
    }
    /**
     * Set capsToDrop 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 $capsToDrop
     * @return \OXModule\StructClass\ChangeCapabilities
     */
    public function setCapsToDrop($capsToDrop = null)
    {
        // validation for constraint: string
        if (!is_null($capsToDrop) && !is_string($capsToDrop)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($capsToDrop)), __LINE__);
        }
        if (is_null($capsToDrop) || (is_array($capsToDrop) && empty($capsToDrop))) {
            unset($this->capsToDrop);
        } else {
            $this->capsToDrop = $capsToDrop;
        }
        return $this;
    }
    /**
     * Get auth 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 \OXModule\StructClass\Credentials|null
     */
    public function getAuth()
    {
        return isset($this->auth) ? $this->auth : null;
    }
    /**
     * Set auth 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 \OXModule\StructClass\Credentials $auth
     * @return \OXModule\StructClass\ChangeCapabilities
     */
    public function setAuth(\OXModule\StructClass\Credentials $auth = null)
    {
        if (is_null($auth) || (is_array($auth) && empty($auth))) {
            unset($this->auth);
        } else {
            $this->auth = $auth;
        }
        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 \OXModule\StructClass\ChangeCapabilities
     */
    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__;
    }
}
