<?php
// Copyright 1999-2017. Plesk International GmbH. All rights reserved.

namespace Plesk\MigrationLibV8\MailImport\Entity\ImportOperation;

class MailAddressPair
{
    /** @var string */
    private $_sourceEmail;
    /** @var string */
    private $_sourcePassword;
    /** @var string */
    private $_targetMailname;
    /** @var string|null */
    private $_targetPassword;
    /** @var string|null */
    private $_imapHost;
    /** @var int */
    private $_imapPort;
    /** @var bool */
    private $_ignoreSecurityWarnings;
    /** @var string|null */
    private $_imapEncryption;
    /** @var int|null */
    private $_imapTimeout;
    /** @var string|null */
    private $_imapFolderSeparator;

    /**
     * Mail address pair constructor.
     *
     * @param $sourceEmail string
     * @param $sourcePassword string
     * @param $targetMailname string
     * @param $targetPassword string|null
     * @param $imapHost string|null
     * @param $imapPort int|null
     * @param $ignoreSecurityWarnings bool
     * @param $imapEncryption string|null
     * @param $imapTimeout int|null
     * @param $imapFolderSeparator string|null
     */
    public function __construct(
        $sourceEmail, $sourcePassword, $targetMailname, $targetPassword, $imapHost, $imapPort=null,
        $ignoreSecurityWarnings=false,
        $imapEncryption=null, $imapTimeout=null, $imapFolderSeparator=null
    ) {
        $this->_sourceEmail = $sourceEmail;
        $this->_sourcePassword = $sourcePassword;
        $this->_targetMailname = $targetMailname;
        $this->_targetPassword = $targetPassword;
        $this->_imapHost = $imapHost;
        $this->_imapPort = $imapPort;
        $this->_ignoreSecurityWarnings = $ignoreSecurityWarnings;
        $this->_imapEncryption = $imapEncryption;
        $this->_imapTimeout = $imapTimeout;
        $this->_imapFolderSeparator = $imapFolderSeparator;
    }

    /**
     * @return string
     */
    public function getSourceEmail()
    {
        return $this->_sourceEmail;
    }

    /**
     * @return string
     */
    public function getSourcePassword()
    {
        return $this->_sourcePassword;
    }

    /**
     * @return string
     */
    public function getTargetMailname()
    {
        return $this->_targetMailname;
    }

    /**
     * @return string|null
     */
    public function getTargetPassword()
    {
        return $this->_targetPassword;
    }

    /**
     * @return string|null
     */
    public function getImapHost()
    {
        return $this->_imapHost;
    }

    /**
     * @return int|null
     */
    public function getImapPort()
    {
        return $this->_imapPort;
    }

    /**
     * @return bool
     */
    public function getIgnoreSecurityWarnings()
    {
        return $this->_ignoreSecurityWarnings;
    }

    /**
     * @return string|null
     */
    public function getImapEncryption()
    {
        return $this->_imapEncryption;
    }

    /**
     * @return int|null
     */
    public function getImapTimeout()
    {
        return $this->_imapTimeout;
    }

    /**
     * @return string|null
     */
    public function getImapFolderSeparator()
    {
        return $this->_imapFolderSeparator;
    }
}
