<?php
/**
 * UpdateFacilityRequest
 *
 * PHP version 8.1
 *
 * @category Class
 * @package  OmsorgCoreClient
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * OmsorgCore.Api
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.14.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace OmsorgCoreClient\Model;

use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;

/**
 * UpdateFacilityRequest Class Doc Comment
 *
 * @category Class
 * @package  OmsorgCoreClient
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'UpdateFacilityRequest';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'name' => 'string',
        'crm_status' => 'string',
        'facility_type' => 'string',
        'website' => 'string',
        'street' => 'string',
        'postal_code' => 'string',
        'city' => 'string',
        'country' => 'string',
        'billing_street' => 'string',
        'billing_postal_code' => 'string',
        'billing_city' => 'string',
        'billing_country' => 'string',
        'follow_up_days' => 'int',
        'billing_rate' => 'float',
        'night_surcharge_percent' => 'float',
        'saturday_surcharge_percent' => 'float',
        'sunday_surcharge_percent' => 'float',
        'holiday_surcharge_percent' => 'float',
        'travel_cost_rate' => 'float',
        'travel_cost_mode' => 'string',
        'travel_cost_per_km' => 'float',
        'meal_allowance_rate' => 'float',
        'minimum_hours' => 'float',
        'billing_interval' => 'string',
        'payment_term_days' => 'int',
        'individual_agreements' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'name' => null,
        'crm_status' => null,
        'facility_type' => null,
        'website' => null,
        'street' => null,
        'postal_code' => null,
        'city' => null,
        'country' => null,
        'billing_street' => null,
        'billing_postal_code' => null,
        'billing_city' => null,
        'billing_country' => null,
        'follow_up_days' => 'int32',
        'billing_rate' => 'double',
        'night_surcharge_percent' => 'double',
        'saturday_surcharge_percent' => 'double',
        'sunday_surcharge_percent' => 'double',
        'holiday_surcharge_percent' => 'double',
        'travel_cost_rate' => 'double',
        'travel_cost_mode' => null,
        'travel_cost_per_km' => 'double',
        'meal_allowance_rate' => 'double',
        'minimum_hours' => 'double',
        'billing_interval' => null,
        'payment_term_days' => 'int32',
        'individual_agreements' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'name' => true,
        'crm_status' => true,
        'facility_type' => true,
        'website' => true,
        'street' => true,
        'postal_code' => true,
        'city' => true,
        'country' => true,
        'billing_street' => true,
        'billing_postal_code' => true,
        'billing_city' => true,
        'billing_country' => true,
        'follow_up_days' => true,
        'billing_rate' => true,
        'night_surcharge_percent' => true,
        'saturday_surcharge_percent' => true,
        'sunday_surcharge_percent' => true,
        'holiday_surcharge_percent' => true,
        'travel_cost_rate' => true,
        'travel_cost_mode' => true,
        'travel_cost_per_km' => true,
        'meal_allowance_rate' => true,
        'minimum_hours' => true,
        'billing_interval' => true,
        'payment_term_days' => true,
        'individual_agreements' => true
    ];

    /**
      * If a nullable field gets set to null, insert it here
      *
      * @var boolean[]
      */
    protected array $openAPINullablesSetToNull = [];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPITypes()
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPIFormats()
    {
        return self::$openAPIFormats;
    }

    /**
     * Array of nullable properties
     *
     * @return array
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null
     *
     * @return boolean[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null
     *
     * @param boolean[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * Checks if a property is nullable
     *
     * @param string $property
     * @return bool
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     *
     * @param string $property
     * @return bool
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'name' => 'name',
        'crm_status' => 'crmStatus',
        'facility_type' => 'facilityType',
        'website' => 'website',
        'street' => 'street',
        'postal_code' => 'postalCode',
        'city' => 'city',
        'country' => 'country',
        'billing_street' => 'billingStreet',
        'billing_postal_code' => 'billingPostalCode',
        'billing_city' => 'billingCity',
        'billing_country' => 'billingCountry',
        'follow_up_days' => 'followUpDays',
        'billing_rate' => 'billingRate',
        'night_surcharge_percent' => 'nightSurchargePercent',
        'saturday_surcharge_percent' => 'saturdaySurchargePercent',
        'sunday_surcharge_percent' => 'sundaySurchargePercent',
        'holiday_surcharge_percent' => 'holidaySurchargePercent',
        'travel_cost_rate' => 'travelCostRate',
        'travel_cost_mode' => 'travelCostMode',
        'travel_cost_per_km' => 'travelCostPerKm',
        'meal_allowance_rate' => 'mealAllowanceRate',
        'minimum_hours' => 'minimumHours',
        'billing_interval' => 'billingInterval',
        'payment_term_days' => 'paymentTermDays',
        'individual_agreements' => 'individualAgreements'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'name' => 'setName',
        'crm_status' => 'setCrmStatus',
        'facility_type' => 'setFacilityType',
        'website' => 'setWebsite',
        'street' => 'setStreet',
        'postal_code' => 'setPostalCode',
        'city' => 'setCity',
        'country' => 'setCountry',
        'billing_street' => 'setBillingStreet',
        'billing_postal_code' => 'setBillingPostalCode',
        'billing_city' => 'setBillingCity',
        'billing_country' => 'setBillingCountry',
        'follow_up_days' => 'setFollowUpDays',
        'billing_rate' => 'setBillingRate',
        'night_surcharge_percent' => 'setNightSurchargePercent',
        'saturday_surcharge_percent' => 'setSaturdaySurchargePercent',
        'sunday_surcharge_percent' => 'setSundaySurchargePercent',
        'holiday_surcharge_percent' => 'setHolidaySurchargePercent',
        'travel_cost_rate' => 'setTravelCostRate',
        'travel_cost_mode' => 'setTravelCostMode',
        'travel_cost_per_km' => 'setTravelCostPerKm',
        'meal_allowance_rate' => 'setMealAllowanceRate',
        'minimum_hours' => 'setMinimumHours',
        'billing_interval' => 'setBillingInterval',
        'payment_term_days' => 'setPaymentTermDays',
        'individual_agreements' => 'setIndividualAgreements'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'name' => 'getName',
        'crm_status' => 'getCrmStatus',
        'facility_type' => 'getFacilityType',
        'website' => 'getWebsite',
        'street' => 'getStreet',
        'postal_code' => 'getPostalCode',
        'city' => 'getCity',
        'country' => 'getCountry',
        'billing_street' => 'getBillingStreet',
        'billing_postal_code' => 'getBillingPostalCode',
        'billing_city' => 'getBillingCity',
        'billing_country' => 'getBillingCountry',
        'follow_up_days' => 'getFollowUpDays',
        'billing_rate' => 'getBillingRate',
        'night_surcharge_percent' => 'getNightSurchargePercent',
        'saturday_surcharge_percent' => 'getSaturdaySurchargePercent',
        'sunday_surcharge_percent' => 'getSundaySurchargePercent',
        'holiday_surcharge_percent' => 'getHolidaySurchargePercent',
        'travel_cost_rate' => 'getTravelCostRate',
        'travel_cost_mode' => 'getTravelCostMode',
        'travel_cost_per_km' => 'getTravelCostPerKm',
        'meal_allowance_rate' => 'getMealAllowanceRate',
        'minimum_hours' => 'getMinimumHours',
        'billing_interval' => 'getBillingInterval',
        'payment_term_days' => 'getPaymentTermDays',
        'individual_agreements' => 'getIndividualAgreements'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$openAPIModelName;
    }


    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[]|null $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('name', $data ?? [], null);
        $this->setIfExists('crm_status', $data ?? [], null);
        $this->setIfExists('facility_type', $data ?? [], null);
        $this->setIfExists('website', $data ?? [], null);
        $this->setIfExists('street', $data ?? [], null);
        $this->setIfExists('postal_code', $data ?? [], null);
        $this->setIfExists('city', $data ?? [], null);
        $this->setIfExists('country', $data ?? [], null);
        $this->setIfExists('billing_street', $data ?? [], null);
        $this->setIfExists('billing_postal_code', $data ?? [], null);
        $this->setIfExists('billing_city', $data ?? [], null);
        $this->setIfExists('billing_country', $data ?? [], null);
        $this->setIfExists('follow_up_days', $data ?? [], null);
        $this->setIfExists('billing_rate', $data ?? [], null);
        $this->setIfExists('night_surcharge_percent', $data ?? [], null);
        $this->setIfExists('saturday_surcharge_percent', $data ?? [], null);
        $this->setIfExists('sunday_surcharge_percent', $data ?? [], null);
        $this->setIfExists('holiday_surcharge_percent', $data ?? [], null);
        $this->setIfExists('travel_cost_rate', $data ?? [], null);
        $this->setIfExists('travel_cost_mode', $data ?? [], null);
        $this->setIfExists('travel_cost_per_km', $data ?? [], null);
        $this->setIfExists('meal_allowance_rate', $data ?? [], null);
        $this->setIfExists('minimum_hours', $data ?? [], null);
        $this->setIfExists('billing_interval', $data ?? [], null);
        $this->setIfExists('payment_term_days', $data ?? [], null);
        $this->setIfExists('individual_agreements', $data ?? [], null);
    }

    /**
    * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
    * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
    * $this->openAPINullablesSetToNull array
    *
    * @param string $variableName
    * @param array  $fields
    * @param mixed  $defaultValue
    */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets name
     *
     * @return string|null
     */
    public function getName()
    {
        return $this->container['name'];
    }

    /**
     * Sets name
     *
     * @param string|null $name name
     *
     * @return self
     */
    public function setName($name)
    {
        if (is_null($name)) {
            array_push($this->openAPINullablesSetToNull, 'name');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('name', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['name'] = $name;

        return $this;
    }

    /**
     * Gets crm_status
     *
     * @return string|null
     */
    public function getCrmStatus()
    {
        return $this->container['crm_status'];
    }

    /**
     * Sets crm_status
     *
     * @param string|null $crm_status crm_status
     *
     * @return self
     */
    public function setCrmStatus($crm_status)
    {
        if (is_null($crm_status)) {
            array_push($this->openAPINullablesSetToNull, 'crm_status');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('crm_status', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['crm_status'] = $crm_status;

        return $this;
    }

    /**
     * Gets facility_type
     *
     * @return string|null
     */
    public function getFacilityType()
    {
        return $this->container['facility_type'];
    }

    /**
     * Sets facility_type
     *
     * @param string|null $facility_type facility_type
     *
     * @return self
     */
    public function setFacilityType($facility_type)
    {
        if (is_null($facility_type)) {
            array_push($this->openAPINullablesSetToNull, 'facility_type');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('facility_type', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['facility_type'] = $facility_type;

        return $this;
    }

    /**
     * Gets website
     *
     * @return string|null
     */
    public function getWebsite()
    {
        return $this->container['website'];
    }

    /**
     * Sets website
     *
     * @param string|null $website website
     *
     * @return self
     */
    public function setWebsite($website)
    {
        if (is_null($website)) {
            array_push($this->openAPINullablesSetToNull, 'website');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('website', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['website'] = $website;

        return $this;
    }

    /**
     * Gets street
     *
     * @return string|null
     */
    public function getStreet()
    {
        return $this->container['street'];
    }

    /**
     * Sets street
     *
     * @param string|null $street street
     *
     * @return self
     */
    public function setStreet($street)
    {
        if (is_null($street)) {
            array_push($this->openAPINullablesSetToNull, 'street');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('street', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['street'] = $street;

        return $this;
    }

    /**
     * Gets postal_code
     *
     * @return string|null
     */
    public function getPostalCode()
    {
        return $this->container['postal_code'];
    }

    /**
     * Sets postal_code
     *
     * @param string|null $postal_code postal_code
     *
     * @return self
     */
    public function setPostalCode($postal_code)
    {
        if (is_null($postal_code)) {
            array_push($this->openAPINullablesSetToNull, 'postal_code');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('postal_code', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['postal_code'] = $postal_code;

        return $this;
    }

    /**
     * Gets city
     *
     * @return string|null
     */
    public function getCity()
    {
        return $this->container['city'];
    }

    /**
     * Sets city
     *
     * @param string|null $city city
     *
     * @return self
     */
    public function setCity($city)
    {
        if (is_null($city)) {
            array_push($this->openAPINullablesSetToNull, 'city');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('city', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['city'] = $city;

        return $this;
    }

    /**
     * Gets country
     *
     * @return string|null
     */
    public function getCountry()
    {
        return $this->container['country'];
    }

    /**
     * Sets country
     *
     * @param string|null $country country
     *
     * @return self
     */
    public function setCountry($country)
    {
        if (is_null($country)) {
            array_push($this->openAPINullablesSetToNull, 'country');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('country', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['country'] = $country;

        return $this;
    }

    /**
     * Gets billing_street
     *
     * @return string|null
     */
    public function getBillingStreet()
    {
        return $this->container['billing_street'];
    }

    /**
     * Sets billing_street
     *
     * @param string|null $billing_street billing_street
     *
     * @return self
     */
    public function setBillingStreet($billing_street)
    {
        if (is_null($billing_street)) {
            array_push($this->openAPINullablesSetToNull, 'billing_street');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('billing_street', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['billing_street'] = $billing_street;

        return $this;
    }

    /**
     * Gets billing_postal_code
     *
     * @return string|null
     */
    public function getBillingPostalCode()
    {
        return $this->container['billing_postal_code'];
    }

    /**
     * Sets billing_postal_code
     *
     * @param string|null $billing_postal_code billing_postal_code
     *
     * @return self
     */
    public function setBillingPostalCode($billing_postal_code)
    {
        if (is_null($billing_postal_code)) {
            array_push($this->openAPINullablesSetToNull, 'billing_postal_code');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('billing_postal_code', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['billing_postal_code'] = $billing_postal_code;

        return $this;
    }

    /**
     * Gets billing_city
     *
     * @return string|null
     */
    public function getBillingCity()
    {
        return $this->container['billing_city'];
    }

    /**
     * Sets billing_city
     *
     * @param string|null $billing_city billing_city
     *
     * @return self
     */
    public function setBillingCity($billing_city)
    {
        if (is_null($billing_city)) {
            array_push($this->openAPINullablesSetToNull, 'billing_city');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('billing_city', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['billing_city'] = $billing_city;

        return $this;
    }

    /**
     * Gets billing_country
     *
     * @return string|null
     */
    public function getBillingCountry()
    {
        return $this->container['billing_country'];
    }

    /**
     * Sets billing_country
     *
     * @param string|null $billing_country billing_country
     *
     * @return self
     */
    public function setBillingCountry($billing_country)
    {
        if (is_null($billing_country)) {
            array_push($this->openAPINullablesSetToNull, 'billing_country');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('billing_country', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['billing_country'] = $billing_country;

        return $this;
    }

    /**
     * Gets follow_up_days
     *
     * @return int|null
     */
    public function getFollowUpDays()
    {
        return $this->container['follow_up_days'];
    }

    /**
     * Sets follow_up_days
     *
     * @param int|null $follow_up_days follow_up_days
     *
     * @return self
     */
    public function setFollowUpDays($follow_up_days)
    {
        if (is_null($follow_up_days)) {
            array_push($this->openAPINullablesSetToNull, 'follow_up_days');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('follow_up_days', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['follow_up_days'] = $follow_up_days;

        return $this;
    }

    /**
     * Gets billing_rate
     *
     * @return float|null
     */
    public function getBillingRate()
    {
        return $this->container['billing_rate'];
    }

    /**
     * Sets billing_rate
     *
     * @param float|null $billing_rate billing_rate
     *
     * @return self
     */
    public function setBillingRate($billing_rate)
    {
        if (is_null($billing_rate)) {
            array_push($this->openAPINullablesSetToNull, 'billing_rate');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('billing_rate', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['billing_rate'] = $billing_rate;

        return $this;
    }

    /**
     * Gets night_surcharge_percent
     *
     * @return float|null
     */
    public function getNightSurchargePercent()
    {
        return $this->container['night_surcharge_percent'];
    }

    /**
     * Sets night_surcharge_percent
     *
     * @param float|null $night_surcharge_percent night_surcharge_percent
     *
     * @return self
     */
    public function setNightSurchargePercent($night_surcharge_percent)
    {
        if (is_null($night_surcharge_percent)) {
            array_push($this->openAPINullablesSetToNull, 'night_surcharge_percent');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('night_surcharge_percent', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['night_surcharge_percent'] = $night_surcharge_percent;

        return $this;
    }

    /**
     * Gets saturday_surcharge_percent
     *
     * @return float|null
     */
    public function getSaturdaySurchargePercent()
    {
        return $this->container['saturday_surcharge_percent'];
    }

    /**
     * Sets saturday_surcharge_percent
     *
     * @param float|null $saturday_surcharge_percent saturday_surcharge_percent
     *
     * @return self
     */
    public function setSaturdaySurchargePercent($saturday_surcharge_percent)
    {
        if (is_null($saturday_surcharge_percent)) {
            array_push($this->openAPINullablesSetToNull, 'saturday_surcharge_percent');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('saturday_surcharge_percent', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['saturday_surcharge_percent'] = $saturday_surcharge_percent;

        return $this;
    }

    /**
     * Gets sunday_surcharge_percent
     *
     * @return float|null
     */
    public function getSundaySurchargePercent()
    {
        return $this->container['sunday_surcharge_percent'];
    }

    /**
     * Sets sunday_surcharge_percent
     *
     * @param float|null $sunday_surcharge_percent sunday_surcharge_percent
     *
     * @return self
     */
    public function setSundaySurchargePercent($sunday_surcharge_percent)
    {
        if (is_null($sunday_surcharge_percent)) {
            array_push($this->openAPINullablesSetToNull, 'sunday_surcharge_percent');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('sunday_surcharge_percent', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['sunday_surcharge_percent'] = $sunday_surcharge_percent;

        return $this;
    }

    /**
     * Gets holiday_surcharge_percent
     *
     * @return float|null
     */
    public function getHolidaySurchargePercent()
    {
        return $this->container['holiday_surcharge_percent'];
    }

    /**
     * Sets holiday_surcharge_percent
     *
     * @param float|null $holiday_surcharge_percent holiday_surcharge_percent
     *
     * @return self
     */
    public function setHolidaySurchargePercent($holiday_surcharge_percent)
    {
        if (is_null($holiday_surcharge_percent)) {
            array_push($this->openAPINullablesSetToNull, 'holiday_surcharge_percent');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('holiday_surcharge_percent', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['holiday_surcharge_percent'] = $holiday_surcharge_percent;

        return $this;
    }

    /**
     * Gets travel_cost_rate
     *
     * @return float|null
     */
    public function getTravelCostRate()
    {
        return $this->container['travel_cost_rate'];
    }

    /**
     * Sets travel_cost_rate
     *
     * @param float|null $travel_cost_rate travel_cost_rate
     *
     * @return self
     */
    public function setTravelCostRate($travel_cost_rate)
    {
        if (is_null($travel_cost_rate)) {
            array_push($this->openAPINullablesSetToNull, 'travel_cost_rate');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('travel_cost_rate', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['travel_cost_rate'] = $travel_cost_rate;

        return $this;
    }

    /**
     * Gets travel_cost_mode
     *
     * @return string|null
     */
    public function getTravelCostMode()
    {
        return $this->container['travel_cost_mode'];
    }

    /**
     * Sets travel_cost_mode
     *
     * @param string|null $travel_cost_mode travel_cost_mode
     *
     * @return self
     */
    public function setTravelCostMode($travel_cost_mode)
    {
        if (is_null($travel_cost_mode)) {
            array_push($this->openAPINullablesSetToNull, 'travel_cost_mode');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('travel_cost_mode', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['travel_cost_mode'] = $travel_cost_mode;

        return $this;
    }

    /**
     * Gets travel_cost_per_km
     *
     * @return float|null
     */
    public function getTravelCostPerKm()
    {
        return $this->container['travel_cost_per_km'];
    }

    /**
     * Sets travel_cost_per_km
     *
     * @param float|null $travel_cost_per_km travel_cost_per_km
     *
     * @return self
     */
    public function setTravelCostPerKm($travel_cost_per_km)
    {
        if (is_null($travel_cost_per_km)) {
            array_push($this->openAPINullablesSetToNull, 'travel_cost_per_km');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('travel_cost_per_km', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['travel_cost_per_km'] = $travel_cost_per_km;

        return $this;
    }

    /**
     * Gets meal_allowance_rate
     *
     * @return float|null
     */
    public function getMealAllowanceRate()
    {
        return $this->container['meal_allowance_rate'];
    }

    /**
     * Sets meal_allowance_rate
     *
     * @param float|null $meal_allowance_rate meal_allowance_rate
     *
     * @return self
     */
    public function setMealAllowanceRate($meal_allowance_rate)
    {
        if (is_null($meal_allowance_rate)) {
            array_push($this->openAPINullablesSetToNull, 'meal_allowance_rate');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('meal_allowance_rate', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['meal_allowance_rate'] = $meal_allowance_rate;

        return $this;
    }

    /**
     * Gets minimum_hours
     *
     * @return float|null
     */
    public function getMinimumHours()
    {
        return $this->container['minimum_hours'];
    }

    /**
     * Sets minimum_hours
     *
     * @param float|null $minimum_hours minimum_hours
     *
     * @return self
     */
    public function setMinimumHours($minimum_hours)
    {
        if (is_null($minimum_hours)) {
            array_push($this->openAPINullablesSetToNull, 'minimum_hours');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('minimum_hours', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['minimum_hours'] = $minimum_hours;

        return $this;
    }

    /**
     * Gets billing_interval
     *
     * @return string|null
     */
    public function getBillingInterval()
    {
        return $this->container['billing_interval'];
    }

    /**
     * Sets billing_interval
     *
     * @param string|null $billing_interval billing_interval
     *
     * @return self
     */
    public function setBillingInterval($billing_interval)
    {
        if (is_null($billing_interval)) {
            array_push($this->openAPINullablesSetToNull, 'billing_interval');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('billing_interval', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['billing_interval'] = $billing_interval;

        return $this;
    }

    /**
     * Gets payment_term_days
     *
     * @return int|null
     */
    public function getPaymentTermDays()
    {
        return $this->container['payment_term_days'];
    }

    /**
     * Sets payment_term_days
     *
     * @param int|null $payment_term_days payment_term_days
     *
     * @return self
     */
    public function setPaymentTermDays($payment_term_days)
    {
        if (is_null($payment_term_days)) {
            array_push($this->openAPINullablesSetToNull, 'payment_term_days');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('payment_term_days', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['payment_term_days'] = $payment_term_days;

        return $this;
    }

    /**
     * Gets individual_agreements
     *
     * @return string|null
     */
    public function getIndividualAgreements()
    {
        return $this->container['individual_agreements'];
    }

    /**
     * Sets individual_agreements
     *
     * @param string|null $individual_agreements individual_agreements
     *
     * @return self
     */
    public function setIndividualAgreements($individual_agreements)
    {
        if (is_null($individual_agreements)) {
            array_push($this->openAPINullablesSetToNull, 'individual_agreements');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('individual_agreements', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['individual_agreements'] = $individual_agreements;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset): bool
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
       return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * Gets a header-safe presentation of the object
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


