<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for AddSensorGetKeyfobPropertiesOutput StructType
 * @subpackage Structs
 */
class AddSensorGetKeyfobPropertiesOutput extends AbstractStructBase
{
    /**
     * The Success
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $Success;
    /**
     * The ErrorMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $ErrorMessage;
    /**
     * The VoiceDescriptors
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \CustomerManagement\ArrayType\ArrayOfKeyfobVoiceDescriptor
     */
    public $VoiceDescriptors;
    /**
     * The EmergencyKeys
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \CustomerManagement\ArrayType\ArrayOfKeyfobEmergencyKey
     */
    public $EmergencyKeys;
    /**
     * The Key4Outputs
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \CustomerManagement\ArrayType\ArrayOfKeyfobKey4Output
     */
    public $Key4Outputs;
    /**
     * Constructor method for AddSensorGetKeyfobPropertiesOutput
     * @uses AddSensorGetKeyfobPropertiesOutput::setSuccess()
     * @uses AddSensorGetKeyfobPropertiesOutput::setErrorMessage()
     * @uses AddSensorGetKeyfobPropertiesOutput::setVoiceDescriptors()
     * @uses AddSensorGetKeyfobPropertiesOutput::setEmergencyKeys()
     * @uses AddSensorGetKeyfobPropertiesOutput::setKey4Outputs()
     * @param bool $success
     * @param string $errorMessage
     * @param \CustomerManagement\ArrayType\ArrayOfKeyfobVoiceDescriptor $voiceDescriptors
     * @param \CustomerManagement\ArrayType\ArrayOfKeyfobEmergencyKey $emergencyKeys
     * @param \CustomerManagement\ArrayType\ArrayOfKeyfobKey4Output $key4Outputs
     */
    public function __construct($success = null, $errorMessage = null, \CustomerManagement\ArrayType\ArrayOfKeyfobVoiceDescriptor $voiceDescriptors = null, \CustomerManagement\ArrayType\ArrayOfKeyfobEmergencyKey $emergencyKeys = null, \CustomerManagement\ArrayType\ArrayOfKeyfobKey4Output $key4Outputs = null)
    {
        $this
            ->setSuccess($success)
            ->setErrorMessage($errorMessage)
            ->setVoiceDescriptors($voiceDescriptors)
            ->setEmergencyKeys($emergencyKeys)
            ->setKey4Outputs($key4Outputs);
    }
    /**
     * Get Success value
     * @return bool
     */
    public function getSuccess()
    {
        return $this->Success;
    }
    /**
     * Set Success value
     * @param bool $success
     * @return \CustomerManagement\StructType\AddSensorGetKeyfobPropertiesOutput
     */
    public function setSuccess($success = null)
    {
        // validation for constraint: boolean
        if (!is_null($success) && !is_bool($success)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($success, true), gettype($success)), __LINE__);
        }
        $this->Success = $success;
        return $this;
    }
    /**
     * Get ErrorMessage value
     * @return string|null
     */
    public function getErrorMessage()
    {
        return $this->ErrorMessage;
    }
    /**
     * Set ErrorMessage value
     * @param string $errorMessage
     * @return \CustomerManagement\StructType\AddSensorGetKeyfobPropertiesOutput
     */
    public function setErrorMessage($errorMessage = null)
    {
        // validation for constraint: string
        if (!is_null($errorMessage) && !is_string($errorMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorMessage, true), gettype($errorMessage)), __LINE__);
        }
        $this->ErrorMessage = $errorMessage;
        return $this;
    }
    /**
     * Get VoiceDescriptors value
     * @return \CustomerManagement\ArrayType\ArrayOfKeyfobVoiceDescriptor|null
     */
    public function getVoiceDescriptors()
    {
        return $this->VoiceDescriptors;
    }
    /**
     * Set VoiceDescriptors value
     * @param \CustomerManagement\ArrayType\ArrayOfKeyfobVoiceDescriptor $voiceDescriptors
     * @return \CustomerManagement\StructType\AddSensorGetKeyfobPropertiesOutput
     */
    public function setVoiceDescriptors(\CustomerManagement\ArrayType\ArrayOfKeyfobVoiceDescriptor $voiceDescriptors = null)
    {
        $this->VoiceDescriptors = $voiceDescriptors;
        return $this;
    }
    /**
     * Get EmergencyKeys value
     * @return \CustomerManagement\ArrayType\ArrayOfKeyfobEmergencyKey|null
     */
    public function getEmergencyKeys()
    {
        return $this->EmergencyKeys;
    }
    /**
     * Set EmergencyKeys value
     * @param \CustomerManagement\ArrayType\ArrayOfKeyfobEmergencyKey $emergencyKeys
     * @return \CustomerManagement\StructType\AddSensorGetKeyfobPropertiesOutput
     */
    public function setEmergencyKeys(\CustomerManagement\ArrayType\ArrayOfKeyfobEmergencyKey $emergencyKeys = null)
    {
        $this->EmergencyKeys = $emergencyKeys;
        return $this;
    }
    /**
     * Get Key4Outputs value
     * @return \CustomerManagement\ArrayType\ArrayOfKeyfobKey4Output|null
     */
    public function getKey4Outputs()
    {
        return $this->Key4Outputs;
    }
    /**
     * Set Key4Outputs value
     * @param \CustomerManagement\ArrayType\ArrayOfKeyfobKey4Output $key4Outputs
     * @return \CustomerManagement\StructType\AddSensorGetKeyfobPropertiesOutput
     */
    public function setKey4Outputs(\CustomerManagement\ArrayType\ArrayOfKeyfobKey4Output $key4Outputs = null)
    {
        $this->Key4Outputs = $key4Outputs;
        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 \CustomerManagement\StructType\AddSensorGetKeyfobPropertiesOutput
     */
    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__;
    }
}
