resources:
    App\Entity\Subnet:
        processor: App\State\Processor\SubnetProcessor
        input: App\Dto\Input\SubnetInput
        output: App\Dto\Output\SubnetOutput
        normalizationContext:
            groups: ['default', 'subnet:read']
        denormalizationContext:
            groups: ['subnet:write']
        operations:
            ApiPlatform\Metadata\GetCollection:
                provider: App\State\Provider\SubnetProvider
                filters:
                    - 'api_platform.filter.subnet.order'
                    - 'api_platform.filter.subnet.search'

            ApiPlatform\Metadata\Get:
                provider: App\State\Provider\SubnetProvider
            ApiPlatform\Metadata\Put:
                provider: App\State\Provider\SubnetProvider
            ApiPlatform\Metadata\Patch:
                provider: App\State\Provider\SubnetProvider
            ApiPlatform\Metadata\Post: ~
            ApiPlatform\Metadata\Delete: ~

            subnet_sync:
                class: ApiPlatform\Metadata\Post
                method: POST
                input: false
                uriTemplate: /subnets/sync
                controller: App\Controller\OgDhcp\Subnet\SyncAction

            get_collection_subnets:
                shortName: Subnet Server
                description: Get collection of Subnet
                class: ApiPlatform\Metadata\GetCollection
                method: GET
                input: false
                uriTemplate: /og-dhcp/server/get-collection
                controller: App\Controller\OgDhcp\Subnet\GetCollectionAction

            get_subnet:
                shortName: Subnet Server
                description: Get Subnet
                class: ApiPlatform\Metadata\Get
                method: GET
                input: false
                uriTemplate: /og-dhcp/server/{uuid}/get
                controller: App\Controller\OgDhcp\Subnet\GetAction

            post_subnet:
                shortName: Subnet Server
                description: Create Subnet
                class: ApiPlatform\Metadata\Post
                method: POST
                input: false
                uriTemplate: /og-dhcp/server/{uuid}/post
                controller: App\Controller\OgDhcp\Subnet\PostAction

            put_subnet:
                shortName: Subnet Server
                description: Create Subnet
                class: ApiPlatform\Metadata\Put
                method: PUT
                input: false
                uriTemplate: /og-dhcp/server/{uuid}/put
                controller: App\Controller\OgDhcp\Subnet\PutAction

            delete_subnet:
                shortName: Subnet Server
                description: Delete Subnet
                class: ApiPlatform\Metadata\Delete
                method: DELETE
                input: false
                uriTemplate: /og-dhcp/server/{uuid}/delete
                controller: App\Controller\OgDhcp\Subnet\DeleteAction

            post_host:
                shortName: Subnet Server Hosts
                description: Post Host to Subnet
                class: ApiPlatform\Metadata\Post
                method: POST
                input: App\Dto\Input\SubnetAddHostInput
                uriTemplate: /og-dhcp/server/{uuid}/post-host
                controller: App\Controller\OgDhcp\Subnet\PostHostAction

            get_hosts:
                shortName: Subnet Server Hosts
                description: Get Hosts of Subnet
                class: ApiPlatform\Metadata\Get
                method: GET
                input: false
                uriTemplate: /og-dhcp/server/{uuid}/get-hosts
                controller: App\Controller\OgDhcp\Subnet\GetHostsAction

            put_host:
                shortName: Subnet Server Hosts
                description: Put Host of Subnet
                class: ApiPlatform\Metadata\Put
                method: PUT
                input: false
                uriTemplate: /og-dhcp/server/{uuid}/put-host
                controller: App\Controller\OgDhcp\Subnet\PutHostAction

            delete_host:
                shortName: Subnet Server Hosts
                description: Delete Host of Subnet
                class: ApiPlatform\Metadata\Delete
                method: DELETE
                input: false
                read: false
                uriTemplate: /og-dhcp/server/{uuid}/delete-host/{clientUuid}
                controller: App\Controller\OgDhcp\Subnet\DeleteHostAction


properties:
    App\Entity\Subnet:
        id:
            identifier: false
        uuid:
            identifier: true