<?php


namespace iDServer\Saml;


class AttributeData

{
    /**
     * @var string
     */
    private $name;

    /**
     * @var string
     */
    private $nameFormat;

    /**
     * @var bool
     */
    private $required = false;

    /**
     * @var mixed
     */
    private $value;

    /**
     * @var string
     */
    private $type;

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

    /**
     * @param string $name
     * @return AttributeData
     */
    public function setName(string $name): AttributeData
    {
        $this->name = $name;
        return $this;
    }

    /**
     * @return string
     */
    public function getNameFormat(): ?string
    {
        return $this->nameFormat;
    }

    /**
     * @param string $nameFormat
     * @return AttributeData
     */
    public function setNameFormat(string $nameFormat): AttributeData
    {
        $this->nameFormat = $nameFormat;
        return $this;
    }

    /**
     * @return bool
     */
    public function isRequired(): bool
    {
        return $this->required;
    }

    /**
     * @param bool $required
     * @return AttributeData
     */
    public function setRequired(bool $required): AttributeData
    {
        $this->required = $required;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * @param mixed $value
     * @return AttributeData
     */
    public function setValue($value): AttributeData
    {
        $this->value = $value;
        return $this;
    }

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

    /**
     * @param string $type
     * @return AttributeData
     */
    public function setType(string $type): AttributeData
    {
        $this->type = $type;
        return $this;
    }
}
