<?php #CodeGenerator V4 Δ 1fe621a9414c8c8f5e2b3cd0c7d355bb Δ DYNAMICALLY GENERATED FILE - Do not modify this line! Remove it completely to protect the file from changes.
/**
 * JSON:API Request Class
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @version     STUB: 1.0.0
 * @generated   2026-03-23 15:02:27
 * @package     bplan-base/globals
 * @subpackage  Requests
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025, 2026 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */

namespace BplanBase\Globals\JsonApi\Data\Locations;


use LaravelJsonApi\Laravel\Http\Requests\ResourceRequest;
use LaravelJsonApi\Validation\Rule as JsonApiRule;


/**
 * JSON:API Request Class
 *
 * @version     1.0.0 / 2026-03-23
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
class LocationRequest extends ResourceRequest
{


/* +++ TRAITS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS CONSTANTS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT MEMBERS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS MEMBERS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT METHODS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


    /**
     * Get the validation rules for the resource.
     *
     * @return      array
     *
     * @version     1.0.0 / 2026-03-23
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function rules(): array
    {
        return [
            'active'          => JsonApiRule::boolean(),
            'addressAddition' => ['nullable', 'string', 'max:255'],
            'city'            => ['nullable', 'string', 'max:50'],
            'coordinates'     => ['nullable', 'string'],
            'direction'       => ['sometimes', 'required', 'string'],
            'email'           => ['nullable', 'email', 'max:255'],
            'houseNumber'     => ['nullable', 'string', 'max:5'],
            'identifier'      => ['nullable', 'string', 'max:30'],
            'internal'        => JsonApiRule::boolean(),
            'labels'          => [],
            'phoneNumber'     => ['nullable', 'string', 'max:30'],
            'street'          => ['nullable', 'string', 'max:50'],
            'subType'         => ['nullable', 'string', 'max:30'],
            'topLevel'        => JsonApiRule::boolean(),
            'uuid'            => ['required'],
            'zipCode'         => ['nullable', 'string', 'max:10'],

            'location-type'   => JsonApiRule::toOne(),
            'master'          => JsonApiRule::toOne(),
            'tenant'          => JsonApiRule::toOne(),

        ];
    } // rules()


/* +++ CLASS METHODS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


} // class LocationRequest extends ResourceRequest {}
