<?php

namespace Symfony\Config\Lti1p3;


use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;


/**
 * This class is automatically generated to help creating config.
 *
 * @experimental in 5.3
 */
class ToolConfig 
{
    private $name;
    private $audience;
    private $oidcInitiationUrl;
    private $launchUrl;
    private $deepLinkingUrl;
    
    /**
     * @default null
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function name($value): self
    {
        $this->name = $value;
    
        return $this;
    }
    
    /**
     * @default null
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function audience($value): self
    {
        $this->audience = $value;
    
        return $this;
    }
    
    /**
     * @default null
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function oidcInitiationUrl($value): self
    {
        $this->oidcInitiationUrl = $value;
    
        return $this;
    }
    
    /**
     * @default null
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function launchUrl($value): self
    {
        $this->launchUrl = $value;
    
        return $this;
    }
    
    /**
     * @default null
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function deepLinkingUrl($value): self
    {
        $this->deepLinkingUrl = $value;
    
        return $this;
    }
    
    public function __construct(array $value = [])
    {
    
        if (isset($value['name'])) {
            $this->name = $value['name'];
            unset($value['name']);
        }
    
        if (isset($value['audience'])) {
            $this->audience = $value['audience'];
            unset($value['audience']);
        }
    
        if (isset($value['oidc_initiation_url'])) {
            $this->oidcInitiationUrl = $value['oidc_initiation_url'];
            unset($value['oidc_initiation_url']);
        }
    
        if (isset($value['launch_url'])) {
            $this->launchUrl = $value['launch_url'];
            unset($value['launch_url']);
        }
    
        if (isset($value['deep_linking_url'])) {
            $this->deepLinkingUrl = $value['deep_linking_url'];
            unset($value['deep_linking_url']);
        }
    
        if ([] !== $value) {
            throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
        }
    }
    
    
    public function toArray(): array
    {
        $output = [];
        if (null !== $this->name) {
            $output['name'] = $this->name;
        }
        if (null !== $this->audience) {
            $output['audience'] = $this->audience;
        }
        if (null !== $this->oidcInitiationUrl) {
            $output['oidc_initiation_url'] = $this->oidcInitiationUrl;
        }
        if (null !== $this->launchUrl) {
            $output['launch_url'] = $this->launchUrl;
        }
        if (null !== $this->deepLinkingUrl) {
            $output['deep_linking_url'] = $this->deepLinkingUrl;
        }
    
        return $output;
    }
    

}
