<?php

namespace OfficeBrain\Bundle\CmsBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * ThirdPartyServiceKey.
 *
 * @ORM\Table(name="tbl_third_party_setting_service_key")
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartyServiceKeyRepository")
 */
class ThirdPartyServiceKey
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="bigint", options={"unsigned":true})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="ThirdPartySetting", inversedBy="thirdPartyServiceKey")
     * @ORM\JoinColumn(name="third_party_setting_id", referencedColumnName="id")
     **/
    private $thirdPartySettingId;

    /**
     * @var string
     *
     * @ORM\Column(name="key_name", type="string", length=255)
     */
    private $keyName;

    /**
     * @var string
     *
     * @ORM\Column(name="key_type", type="string", length=50)
     */
    private $keyType;

    /**
     * @var string
     *
     * @ORM\Column(name="predefined_value", type="text")
     */
    private $predefinedValue;

    /**
     * @var int
     *
     * @ORM\Column(name="required_field", type="smallint")
     */
    private $requiredField;

    /**
     * @var int
     *
     * @ORM\Column(name="key_status", type="smallint")
     */
    private $keyStatus;

    /**
     * @var string
     *
     * @ORM\Column(name="key_for", type="string", length=100)
     */
    private $keyFor;

    /**
     * @ORM\OneToMany(targetEntity="ThirdPartyServiceMeta", mappedBy="thirdPartyServiceKeyId")
     **/
    private $thirdPartyServiceMeta;

    public function __construct()
    {
        $this->thirdPartyServiceMeta = new ArrayCollection();
    }

    /**
     * Get id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set thirdPartySettingId.
     *
     * @param int $thirdPartySettingId
     *
     * @return ThirdPartyServiceKey
     */
    public function setTpsId($tpsId)
    {
        $this->thirdPartySettingId = $thirdPartySettingId;

        return $this;
    }

    /**
     * Get thirdPartySettingId.
     *
     * @return int
     */
    public function getThirdPartySettingId()
    {
        return $this->thirdPartySettingId;
    }

    /**
     * Set keyName.
     *
     * @param string $keyName
     *
     * @return ThirdPartyServiceKey
     */
    public function setKeyName($keyName)
    {
        $this->keyName = $keyName;

        return $this;
    }

    /**
     * Get keyName.
     *
     * @return string
     */
    public function getKeyName()
    {
        return $this->keyName;
    }

    /**
     * Set keyType.
     *
     * @param string $keyType
     *
     * @return ThirdPartyServiceKey
     */
    public function setKeyType($keyType)
    {
        $this->keyType = $keyType;

        return $this;
    }

    /**
     * Get keyType.
     *
     * @return string
     */
    public function getKeyType()
    {
        return $this->keyType;
    }

    /**
     * Set keyFor.
     *
     * @param string $keyFor
     *
     * @return ThirdPartyServiceKey
     */
    public function setKeyFor($keyFor)
    {
        $this->keyFor = $keyFor;

        return $this;
    }

    /**
     * Get keyFor.
     *
     * @return string
     */
    public function getKeyFor()
    {
        return $this->keyFor;
    }

    /**
     * Set predefinedValue.
     *
     * @param string $predefinedValue
     *
     * @return ThirdPartyServiceKey
     */
    public function setPredefinedValue($predefinedValue)
    {
        $this->predefinedValue = $predefinedValue;

        return $this;
    }

    /**
     * Get predefinedValue.
     *
     * @return string
     */
    public function getPredefinedValue()
    {
        return $this->predefinedValue;
    }

    /**
     * Set requiredField.
     *
     * @param int $requiredField
     *
     * @return ThirdPartyServiceKey
     */
    public function setRequiredField($requiredField)
    {
        $this->requiredField = $requiredField;

        return $this;
    }

    /**
     * Get requiredField.
     *
     * @return int
     */
    public function getRequiredField()
    {
        return $this->requiredField;
    }

    /**
     * Set keyStatus.
     *
     * @param int $keyStatus
     *
     * @return ThirdPartyServiceKey
     */
    public function setKeyStatus($keyStatus)
    {
        $this->keyStatus = $keyStatus;

        return $this;
    }

    /**
     * Get keyStatus.
     *
     * @return int
     */
    public function getKeyStatus()
    {
        return $this->keyStatus;
    }

    /**
     * Set thirdPartySettingId.
     *
     * @param \OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartySetting $thirdPartySettingId
     *
     * @return ThirdPartyServiceKey
     */
    public function setThirdPartySettingId(\OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartySetting $thirdPartySettingId = null)
    {
        $this->thirdPartySettingId = $thirdPartySettingId;

        return $this;
    }

    /**
     * Add thirdPartyServiceMeta.
     *
     * @param \OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartyServiceMeta $thirdPartyServiceMeta
     *
     * @return ThirdPartyServiceKey
     */
    public function addThirdPartyServiceMetum(\OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartyServiceMeta $thirdPartyServiceMeta)
    {
        $this->thirdPartyServiceMeta[] = $thirdPartyServiceMeta;

        return $this;
    }

    /**
     * Remove thirdPartyServiceMeta.
     *
     * @param \OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartyServiceMeta $thirdPartyServiceMeta
     */
    public function removeThirdPartyServiceMetum(\OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartyServiceMeta $thirdPartyServiceMeta)
    {
        $this->thirdPartyServiceMeta->removeElement($thirdPartyServiceMeta);
    }

    /**
     * Get thirdPartyServiceMeta.
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getThirdPartyServiceMeta()
    {
        return $this->thirdPartyServiceMeta;
    }
}
