<?php


namespace iDServer\Saml;


class ExtensionData
{
    /**
     * @var AttributeData[]
     */
    private $attributes = [];

    /**
     * @var AttributeData[]
     */
    private $requestedAttributes = [];

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

    /**
     * @return AttributeData[]
     */
    public function getAttributes(): array
    {
        return $this->attributes;
    }

    /**
     * @param AttributeData[] $attributes
     * @return ExtensionData
     */
    public function setAttributes(array $attributes): ExtensionData
    {
        $this->attributes = $attributes;
        return $this;
    }

    /**
     * @param AttributeData $attributeData
     * @return $this
     */
    public function addAttribute(AttributeData $attributeData): ExtensionData
    {
        $this->attributes[] = $attributeData;
        return $this;
    }

    /**
     * @return AttributeData[]
     */
    public function getRequestedAttributes(): array
    {
        return $this->requestedAttributes;
    }

    /**
     * @param AttributeData[] $requestedAttributes
     * @return ExtensionData
     */
    public function setRequestedAttributes(array $requestedAttributes): ExtensionData
    {
        $this->requestedAttributes = $requestedAttributes;
        return $this;
    }

    /**
     * @param AttributeData $attributeData
     * @return $this
     */
    public function addRequestedAttribute(AttributeData $attributeData): ExtensionData
    {
        $this->requestedAttributes[] = $attributeData;
        return $this;
    }
    
    /**
     * @return string
     */
    public function getSpType(): ?string
    {
        return $this->spType;
    }

    /**
     * @param string $spType
     * @return ExtensionData
     */
    public function setSpType(string $spType): ExtensionData
    {
        $this->spType = $spType;
        return $this;
    }
}
