<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Security.CurrentSupplierOrganizationUnit StructType
 * @subpackage Structs
 */
class Security_CurrentSupplierOrganizationUnit extends Security_CurrentOrganizationUnit
{
    /**
     * The Suplier_TotalEvents
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $Suplier_TotalEvents;
    /**
     * The Suplier_TotalSubscriptions
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $Suplier_TotalSubscriptions;
    /**
     * Constructor method for Security.CurrentSupplierOrganizationUnit
     * @uses Security_CurrentSupplierOrganizationUnit::setSuplier_TotalEvents()
     * @uses Security_CurrentSupplierOrganizationUnit::setSuplier_TotalSubscriptions()
     * @param int $suplier_TotalEvents
     * @param int $suplier_TotalSubscriptions
     */
    public function __construct($suplier_TotalEvents = null, $suplier_TotalSubscriptions = null)
    {
        $this
            ->setSuplier_TotalEvents($suplier_TotalEvents)
            ->setSuplier_TotalSubscriptions($suplier_TotalSubscriptions);
    }
    /**
     * Get Suplier_TotalEvents 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 int|null
     */
    public function getSuplier_TotalEvents()
    {
        return isset($this->Suplier_TotalEvents) ? $this->Suplier_TotalEvents : null;
    }
    /**
     * Set Suplier_TotalEvents 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 int $suplier_TotalEvents
     * @return \patest\StructType\Security_CurrentSupplierOrganizationUnit
     */
    public function setSuplier_TotalEvents($suplier_TotalEvents = null)
    {
        // validation for constraint: int
        if (!is_null($suplier_TotalEvents) && !(is_int($suplier_TotalEvents) || ctype_digit($suplier_TotalEvents))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($suplier_TotalEvents, true), gettype($suplier_TotalEvents)), __LINE__);
        }
        if (is_null($suplier_TotalEvents) || (is_array($suplier_TotalEvents) && empty($suplier_TotalEvents))) {
            unset($this->Suplier_TotalEvents);
        } else {
            $this->Suplier_TotalEvents = $suplier_TotalEvents;
        }
        return $this;
    }
    /**
     * Get Suplier_TotalSubscriptions 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 int|null
     */
    public function getSuplier_TotalSubscriptions()
    {
        return isset($this->Suplier_TotalSubscriptions) ? $this->Suplier_TotalSubscriptions : null;
    }
    /**
     * Set Suplier_TotalSubscriptions 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 int $suplier_TotalSubscriptions
     * @return \patest\StructType\Security_CurrentSupplierOrganizationUnit
     */
    public function setSuplier_TotalSubscriptions($suplier_TotalSubscriptions = null)
    {
        // validation for constraint: int
        if (!is_null($suplier_TotalSubscriptions) && !(is_int($suplier_TotalSubscriptions) || ctype_digit($suplier_TotalSubscriptions))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($suplier_TotalSubscriptions, true), gettype($suplier_TotalSubscriptions)), __LINE__);
        }
        if (is_null($suplier_TotalSubscriptions) || (is_array($suplier_TotalSubscriptions) && empty($suplier_TotalSubscriptions))) {
            unset($this->Suplier_TotalSubscriptions);
        } else {
            $this->Suplier_TotalSubscriptions = $suplier_TotalSubscriptions;
        }
        return $this;
    }
}
