<?php

namespace OfficeBrain\Bundle\CmsBundle\Entity;

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

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

    /**
     * @var int
     *
     * @ORM\Column(name="parent", type="integer")
     */
    private $parent;

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

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

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

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

    /**
     * @var int
     *
     * @ORM\Column(name="position", type="integer")
     */
    private $position;

    /**
     * @ORM\OneToMany(targetEntity="ThirdPartyServiceKey", mappedBy="thirdPartySettingId")
     **/
    private $thirdPartyServiceKey;

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

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

    /**
     * Set parent.
     *
     * @param int $parent
     *
     * @return ThirdPartySetting
     */
    public function setParent($parent)
    {
        $this->parent = $parent;

        return $this;
    }

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

    /**
     * Set tpsKey.
     *
     * @param string $tpsKey
     *
     * @return ThirdPartySetting
     */
    public function setTpsKey($tpsKey)
    {
        $this->tpsKey = $tpsKey;

        return $this;
    }

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

    /**
     * Set name.
     *
     * @param string $name
     *
     * @return ThirdPartySetting
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

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

    /**
     * Set status.
     *
     * @param int $status
     *
     * @return ThirdPartySetting
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

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

    /**
     * Set type.
     *
     * @param string $type
     *
     * @return ThirdPartySetting
     */
    public function setType($type)
    {
        $this->type = $type;

        return $this;
    }

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

    /**
     * Set position.
     *
     * @param int $position
     *
     * @return ThirdPartySetting
     */
    public function setPosition($position)
    {
        $this->position = $position;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Remove thirdPartyServiceKey.
     *
     * @param \OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartyServiceKey $thirdPartyServiceKey
     */
    public function removeThirdPartyServiceKey(\OfficeBrain\Bundle\CmsBundle\Entity\ThirdPartyServiceKey $thirdPartyServiceKey)
    {
        $this->thirdPartyServiceKey->removeElement($thirdPartyServiceKey);
    }

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