<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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