<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for
 * ValidateForAnyClientsContainedInAnotherBallotApplicationResponse StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ValidateForAnyClientsContainedInAnotherBallotApplicationResponse
 * @subpackage Structs
 */
class ValidateForAnyClientsContainedInAnotherBallotApplicationResponse extends AbstractStructBase
{
    /**
     * The AnyClientContainedInAnotherApplication
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $AnyClientContainedInAnotherApplication;
    /**
     * The FailingClientIds
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfguid
     */
    public $FailingClientIds;
    /**
     * Constructor method for
     * ValidateForAnyClientsContainedInAnotherBallotApplicationResponse
     * @uses ValidateForAnyClientsContainedInAnotherBallotApplicationResponse::setAnyClientContainedInAnotherApplication()
     * @uses ValidateForAnyClientsContainedInAnotherBallotApplicationResponse::setFailingClientIds()
     * @param bool $anyClientContainedInAnotherApplication
     * @param \patest\ArrayType\ArrayOfguid $failingClientIds
     */
    public function __construct($anyClientContainedInAnotherApplication = null, \patest\ArrayType\ArrayOfguid $failingClientIds = null)
    {
        $this
            ->setAnyClientContainedInAnotherApplication($anyClientContainedInAnotherApplication)
            ->setFailingClientIds($failingClientIds);
    }
    /**
     * Get AnyClientContainedInAnotherApplication value
     * @return bool|null
     */
    public function getAnyClientContainedInAnotherApplication()
    {
        return $this->AnyClientContainedInAnotherApplication;
    }
    /**
     * Set AnyClientContainedInAnotherApplication value
     * @param bool $anyClientContainedInAnotherApplication
     * @return \patest\StructType\ValidateForAnyClientsContainedInAnotherBallotApplicationResponse
     */
    public function setAnyClientContainedInAnotherApplication($anyClientContainedInAnotherApplication = null)
    {
        // validation for constraint: boolean
        if (!is_null($anyClientContainedInAnotherApplication) && !is_bool($anyClientContainedInAnotherApplication)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($anyClientContainedInAnotherApplication, true), gettype($anyClientContainedInAnotherApplication)), __LINE__);
        }
        $this->AnyClientContainedInAnotherApplication = $anyClientContainedInAnotherApplication;
        return $this;
    }
    /**
     * Get FailingClientIds 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 \patest\ArrayType\ArrayOfguid|null
     */
    public function getFailingClientIds()
    {
        return isset($this->FailingClientIds) ? $this->FailingClientIds : null;
    }
    /**
     * Set FailingClientIds 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 \patest\ArrayType\ArrayOfguid $failingClientIds
     * @return \patest\StructType\ValidateForAnyClientsContainedInAnotherBallotApplicationResponse
     */
    public function setFailingClientIds(\patest\ArrayType\ArrayOfguid $failingClientIds = null)
    {
        if (is_null($failingClientIds) || (is_array($failingClientIds) && empty($failingClientIds))) {
            unset($this->FailingClientIds);
        } else {
            $this->FailingClientIds = $failingClientIds;
        }
        return $this;
    }
}
