<?php


namespace App\ViewModels\Perfil\PerfilDetailsViewModel;


use App\Utils\Builder;
use App\ViewModels\Perfil\PerfilDetailsViewModel\PermissaoDetails;

class PermissaoDetailsBuilder implements Builder
{
    protected $permissao_id;
    protected $ativo;
    protected $endpoint_id;
    protected $endpoint_method;
    protected $endpoint_controller;
    protected $endpoint_action;
    protected $endpoint_path;

    /**
     * @param mixed $permissao_id
     * @return PermissaoDetailsBuilder
     */
    public function setPermissaoId($permissao_id)
    {
        $this->permissao_id = $permissao_id;
        return $this;
    }

    /**
     * @param mixed $ativo
     * @return PermissaoDetailsBuilder
     */
    public function setAtivo($ativo)
    {
        $this->ativo = $ativo;
        return $this;
    }

    /**
     * @param mixed $endpoint_id
     * @return PermissaoDetailsBuilder
     */
    public function setEndpointId($endpoint_id)
    {
        $this->endpoint_id = $endpoint_id;
        return $this;
    }

    /**
     * @param mixed $endpoint_method
     * @return PermissaoDetailsBuilder
     */
    public function setEndpointMethod($endpoint_method)
    {
        $this->endpoint_method = $endpoint_method;
        return $this;
    }

    /**
     * @param mixed $endpoint_controller
     * @return PermissaoDetailsBuilder
     */
    public function setEndpointController($endpoint_controller)
    {
        $this->endpoint_controller = $endpoint_controller;
        return $this;
    }

    /**
     * @param mixed $endpoint_action
     * @return PermissaoDetailsBuilder
     */
    public function setEndpointAction($endpoint_action)
    {
        $this->endpoint_action = $endpoint_action;
        return $this;
    }

    /**
     * @param mixed $endpoint_path
     * @return PermissaoDetailsBuilder
     */
    public function setEndpointPath($endpoint_path)
    {
        $this->endpoint_path = $endpoint_path;
        return $this;
    }

    public function build(): PermissaoDetails
    {
        $pergunta_details = new PermissaoDetails();
        $pergunta_details->setPermissaoId($this->permissao_id);
        $pergunta_details->setAtivo($this->ativo);
        $pergunta_details->setEndpointId($this->endpoint_id);
        $pergunta_details->setEndpointPath($this->endpoint_path);
        $pergunta_details->setEndpointMethod($this->endpoint_method);
        $pergunta_details->setEndpointController($this->endpoint_controller);
        $pergunta_details->setEndpointAction($this->endpoint_action);
        return $pergunta_details;
    }
}