<?php

namespace Symfony\Config;

require_once __DIR__.\DIRECTORY_SEPARATOR.'LightSamlSymfonyBridge'.\DIRECTORY_SEPARATOR.'OwnConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'LightSamlSymfonyBridge'.\DIRECTORY_SEPARATOR.'SystemConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'LightSamlSymfonyBridge'.\DIRECTORY_SEPARATOR.'StoreConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'LightSamlSymfonyBridge'.\DIRECTORY_SEPARATOR.'PartyConfig.php';

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 LightSamlSymfonyBridgeConfig implements \Symfony\Component\Config\Builder\ConfigBuilderInterface
{
    private $symfony53;
    private $own;
    private $system;
    private $store;
    private $party;
    
    /**
     * @default true
     * @param ParamConfigurator|bool $value
     * @return $this
     */
    public function symfony53($value): self
    {
        $this->symfony53 = $value;
    
        return $this;
    }
    
    public function own(array $value = []): \Symfony\Config\LightSamlSymfonyBridge\OwnConfig
    {
        if (null === $this->own) {
            $this->own = new \Symfony\Config\LightSamlSymfonyBridge\OwnConfig($value);
        } elseif ([] !== $value) {
            throw new InvalidConfigurationException('The node created by "own()" has already been initialized. You cannot pass values the second time you call own().');
        }
    
        return $this->own;
    }
    
    public function system(array $value = []): \Symfony\Config\LightSamlSymfonyBridge\SystemConfig
    {
        if (null === $this->system) {
            $this->system = new \Symfony\Config\LightSamlSymfonyBridge\SystemConfig($value);
        } elseif ([] !== $value) {
            throw new InvalidConfigurationException('The node created by "system()" has already been initialized. You cannot pass values the second time you call system().');
        }
    
        return $this->system;
    }
    
    public function store(array $value = []): \Symfony\Config\LightSamlSymfonyBridge\StoreConfig
    {
        if (null === $this->store) {
            $this->store = new \Symfony\Config\LightSamlSymfonyBridge\StoreConfig($value);
        } elseif ([] !== $value) {
            throw new InvalidConfigurationException('The node created by "store()" has already been initialized. You cannot pass values the second time you call store().');
        }
    
        return $this->store;
    }
    
    public function party(array $value = []): \Symfony\Config\LightSamlSymfonyBridge\PartyConfig
    {
        if (null === $this->party) {
            $this->party = new \Symfony\Config\LightSamlSymfonyBridge\PartyConfig($value);
        } elseif ([] !== $value) {
            throw new InvalidConfigurationException('The node created by "party()" has already been initialized. You cannot pass values the second time you call party().');
        }
    
        return $this->party;
    }
    
    public function getExtensionAlias(): string
    {
        return 'light_saml_symfony_bridge';
    }
            
    
    public function __construct(array $value = [])
    {
    
        if (isset($value['symfony53'])) {
            $this->symfony53 = $value['symfony53'];
            unset($value['symfony53']);
        }
    
        if (isset($value['own'])) {
            $this->own = new \Symfony\Config\LightSamlSymfonyBridge\OwnConfig($value['own']);
            unset($value['own']);
        }
    
        if (isset($value['system'])) {
            $this->system = new \Symfony\Config\LightSamlSymfonyBridge\SystemConfig($value['system']);
            unset($value['system']);
        }
    
        if (isset($value['store'])) {
            $this->store = new \Symfony\Config\LightSamlSymfonyBridge\StoreConfig($value['store']);
            unset($value['store']);
        }
    
        if (isset($value['party'])) {
            $this->party = new \Symfony\Config\LightSamlSymfonyBridge\PartyConfig($value['party']);
            unset($value['party']);
        }
    
        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->symfony53) {
            $output['symfony53'] = $this->symfony53;
        }
        if (null !== $this->own) {
            $output['own'] = $this->own->toArray();
        }
        if (null !== $this->system) {
            $output['system'] = $this->system->toArray();
        }
        if (null !== $this->store) {
            $output['store'] = $this->store->toArray();
        }
        if (null !== $this->party) {
            $output['party'] = $this->party->toArray();
        }
    
        return $output;
    }
    

}
