<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for EmployeeEmergencyContact StructType
 * @subpackage Structs
 */
class EmployeeEmergencyContact extends AbstractStructBase
{
    /**
     * The id
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $id;
    /**
     * The contact
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $contact;
    /**
     * The relationship
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $relationship;
    /**
     * The address
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $address;
    /**
     * The phone
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $phone;
    /**
     * Constructor method for EmployeeEmergencyContact
     * @uses EmployeeEmergencyContact::setId()
     * @uses EmployeeEmergencyContact::setContact()
     * @uses EmployeeEmergencyContact::setRelationship()
     * @uses EmployeeEmergencyContact::setAddress()
     * @uses EmployeeEmergencyContact::setPhone()
     * @param int $id
     * @param string $contact
     * @param string $relationship
     * @param string $address
     * @param string $phone
     */
    public function __construct($id = null, $contact = null, $relationship = null, $address = null, $phone = null)
    {
        $this
            ->setId($id)
            ->setContact($contact)
            ->setRelationship($relationship)
            ->setAddress($address)
            ->setPhone($phone);
    }
    /**
     * Get id value
     * @return int|null
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set id value
     * @param int $id
     * @return \StructType\EmployeeEmergencyContact
     */
    public function setId($id = null)
    {
        // validation for constraint: int
        if (!is_null($id) && !(is_int($id) || ctype_digit($id))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($id, true), gettype($id)), __LINE__);
        }
        $this->id = $id;
        return $this;
    }
    /**
     * Get contact value
     * @return string|null
     */
    public function getContact()
    {
        return $this->contact;
    }
    /**
     * Set contact value
     * @param string $contact
     * @return \StructType\EmployeeEmergencyContact
     */
    public function setContact($contact = null)
    {
        // validation for constraint: string
        if (!is_null($contact) && !is_string($contact)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($contact, true), gettype($contact)), __LINE__);
        }
        $this->contact = $contact;
        return $this;
    }
    /**
     * Get relationship value
     * @return string|null
     */
    public function getRelationship()
    {
        return $this->relationship;
    }
    /**
     * Set relationship value
     * @param string $relationship
     * @return \StructType\EmployeeEmergencyContact
     */
    public function setRelationship($relationship = null)
    {
        // validation for constraint: string
        if (!is_null($relationship) && !is_string($relationship)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($relationship, true), gettype($relationship)), __LINE__);
        }
        $this->relationship = $relationship;
        return $this;
    }
    /**
     * Get address value
     * @return string|null
     */
    public function getAddress()
    {
        return $this->address;
    }
    /**
     * Set address value
     * @param string $address
     * @return \StructType\EmployeeEmergencyContact
     */
    public function setAddress($address = null)
    {
        // validation for constraint: string
        if (!is_null($address) && !is_string($address)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($address, true), gettype($address)), __LINE__);
        }
        $this->address = $address;
        return $this;
    }
    /**
     * Get phone value
     * @return string|null
     */
    public function getPhone()
    {
        return $this->phone;
    }
    /**
     * Set phone value
     * @param string $phone
     * @return \StructType\EmployeeEmergencyContact
     */
    public function setPhone($phone = null)
    {
        // validation for constraint: string
        if (!is_null($phone) && !is_string($phone)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($phone, true), gettype($phone)), __LINE__);
        }
        $this->phone = $phone;
        return $this;
    }
}
