<?php

/**
 * GetLockedProductPositionResponseRowsInner.
 *
 * PHP version 8.1
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 */

/**
 * Binance Simple Earn REST API.
 *
 * OpenAPI Specification for the Binance Simple Earn REST API
 *
 * The version of the OpenAPI document: 1.0.0
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.12.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 Binance\Client\SimpleEarn\Model;

use Binance\Common\Dtos\ModelInterface;
use Binance\Common\ObjectSerializer;

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

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

    /**
     * Array of property to type mappings. Used for (de)serialization.
     *
     * @var string[]
     */
    protected static $openAPITypes = [
        'positionId' => 'int',
        'parentPositionId' => 'int',
        'projectId' => 'string',
        'asset' => 'string',
        'amount' => 'string',
        'purchaseTime' => 'string',
        'duration' => 'string',
        'accrualDays' => 'string',
        'rewardAsset' => 'string',
        'aPY' => 'string',
        'rewardAmt' => 'string',
        'extraRewardAsset' => 'string',
        'extraRewardAPR' => 'string',
        'estExtraRewardAmt' => 'string',
        'boostRewardAsset' => 'string',
        'boostApr' => 'string',
        'totalBoostRewardAmt' => 'string',
        'nextPay' => 'string',
        'nextPayDate' => 'string',
        'payPeriod' => 'string',
        'redeemAmountEarly' => 'string',
        'rewardsEndDate' => 'string',
        'deliverDate' => 'string',
        'redeemPeriod' => 'string',
        'redeemingAmt' => 'string',
        'redeemTo' => 'string',
        'partialAmtDeliverDate' => 'string',
        'canRedeemEarly' => 'bool',
        'canFastRedemption' => 'bool',
        'autoSubscribe' => 'bool',
        'type' => 'string',
        'status' => 'string',
        'canReStake' => 'bool',
    ];

    /**
     * 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 = [
        'positionId' => 'int64',
        'parentPositionId' => 'int64',
        'projectId' => null,
        'asset' => null,
        'amount' => null,
        'purchaseTime' => null,
        'duration' => null,
        'accrualDays' => null,
        'rewardAsset' => null,
        'aPY' => null,
        'rewardAmt' => null,
        'extraRewardAsset' => null,
        'extraRewardAPR' => null,
        'estExtraRewardAmt' => null,
        'boostRewardAsset' => null,
        'boostApr' => null,
        'totalBoostRewardAmt' => null,
        'nextPay' => null,
        'nextPayDate' => null,
        'payPeriod' => null,
        'redeemAmountEarly' => null,
        'rewardsEndDate' => null,
        'deliverDate' => null,
        'redeemPeriod' => null,
        'redeemingAmt' => null,
        'redeemTo' => null,
        'partialAmtDeliverDate' => null,
        'canRedeemEarly' => null,
        'canFastRedemption' => null,
        'autoSubscribe' => null,
        'type' => null,
        'status' => null,
        'canReStake' => null,
    ];

    /**
     * Array of nullable properties. Used for (de)serialization.
     *
     * @var bool[]
     */
    protected static array $openAPINullables = [
        'positionId' => false,
        'parentPositionId' => false,
        'projectId' => false,
        'asset' => false,
        'amount' => false,
        'purchaseTime' => false,
        'duration' => false,
        'accrualDays' => false,
        'rewardAsset' => false,
        'aPY' => false,
        'rewardAmt' => false,
        'extraRewardAsset' => false,
        'extraRewardAPR' => false,
        'estExtraRewardAmt' => false,
        'boostRewardAsset' => false,
        'boostApr' => false,
        'totalBoostRewardAmt' => false,
        'nextPay' => false,
        'nextPayDate' => false,
        'payPeriod' => false,
        'redeemAmountEarly' => false,
        'rewardsEndDate' => false,
        'deliverDate' => false,
        'redeemPeriod' => false,
        'redeemingAmt' => false,
        'redeemTo' => false,
        'partialAmtDeliverDate' => false,
        'canRedeemEarly' => false,
        'canFastRedemption' => false,
        'autoSubscribe' => false,
        'type' => false,
        'status' => false,
        'canReStake' => false,
    ];

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

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name.
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'positionId' => 'positionId',
        'parentPositionId' => 'parentPositionId',
        'projectId' => 'projectId',
        'asset' => 'asset',
        'amount' => 'amount',
        'purchaseTime' => 'purchaseTime',
        'duration' => 'duration',
        'accrualDays' => 'accrualDays',
        'rewardAsset' => 'rewardAsset',
        'aPY' => 'APY',
        'rewardAmt' => 'rewardAmt',
        'extraRewardAsset' => 'extraRewardAsset',
        'extraRewardAPR' => 'extraRewardAPR',
        'estExtraRewardAmt' => 'estExtraRewardAmt',
        'boostRewardAsset' => 'boostRewardAsset',
        'boostApr' => 'boostApr',
        'totalBoostRewardAmt' => 'totalBoostRewardAmt',
        'nextPay' => 'nextPay',
        'nextPayDate' => 'nextPayDate',
        'payPeriod' => 'payPeriod',
        'redeemAmountEarly' => 'redeemAmountEarly',
        'rewardsEndDate' => 'rewardsEndDate',
        'deliverDate' => 'deliverDate',
        'redeemPeriod' => 'redeemPeriod',
        'redeemingAmt' => 'redeemingAmt',
        'redeemTo' => 'redeemTo',
        'partialAmtDeliverDate' => 'partialAmtDeliverDate',
        'canRedeemEarly' => 'canRedeemEarly',
        'canFastRedemption' => 'canFastRedemption',
        'autoSubscribe' => 'autoSubscribe',
        'type' => 'type',
        'status' => 'status',
        'canReStake' => 'canReStake',
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses).
     *
     * @var string[]
     */
    protected static $setters = [
        'positionId' => 'setPositionId',
        'parentPositionId' => 'setParentPositionId',
        'projectId' => 'setProjectId',
        'asset' => 'setAsset',
        'amount' => 'setAmount',
        'purchaseTime' => 'setPurchaseTime',
        'duration' => 'setDuration',
        'accrualDays' => 'setAccrualDays',
        'rewardAsset' => 'setRewardAsset',
        'aPY' => 'setAPY',
        'rewardAmt' => 'setRewardAmt',
        'extraRewardAsset' => 'setExtraRewardAsset',
        'extraRewardAPR' => 'setExtraRewardAPR',
        'estExtraRewardAmt' => 'setEstExtraRewardAmt',
        'boostRewardAsset' => 'setBoostRewardAsset',
        'boostApr' => 'setBoostApr',
        'totalBoostRewardAmt' => 'setTotalBoostRewardAmt',
        'nextPay' => 'setNextPay',
        'nextPayDate' => 'setNextPayDate',
        'payPeriod' => 'setPayPeriod',
        'redeemAmountEarly' => 'setRedeemAmountEarly',
        'rewardsEndDate' => 'setRewardsEndDate',
        'deliverDate' => 'setDeliverDate',
        'redeemPeriod' => 'setRedeemPeriod',
        'redeemingAmt' => 'setRedeemingAmt',
        'redeemTo' => 'setRedeemTo',
        'partialAmtDeliverDate' => 'setPartialAmtDeliverDate',
        'canRedeemEarly' => 'setCanRedeemEarly',
        'canFastRedemption' => 'setCanFastRedemption',
        'autoSubscribe' => 'setAutoSubscribe',
        'type' => 'setType',
        'status' => 'setStatus',
        'canReStake' => 'setCanReStake',
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests).
     *
     * @var string[]
     */
    protected static $getters = [
        'positionId' => 'getPositionId',
        'parentPositionId' => 'getParentPositionId',
        'projectId' => 'getProjectId',
        'asset' => 'getAsset',
        'amount' => 'getAmount',
        'purchaseTime' => 'getPurchaseTime',
        'duration' => 'getDuration',
        'accrualDays' => 'getAccrualDays',
        'rewardAsset' => 'getRewardAsset',
        'aPY' => 'getAPY',
        'rewardAmt' => 'getRewardAmt',
        'extraRewardAsset' => 'getExtraRewardAsset',
        'extraRewardAPR' => 'getExtraRewardAPR',
        'estExtraRewardAmt' => 'getEstExtraRewardAmt',
        'boostRewardAsset' => 'getBoostRewardAsset',
        'boostApr' => 'getBoostApr',
        'totalBoostRewardAmt' => 'getTotalBoostRewardAmt',
        'nextPay' => 'getNextPay',
        'nextPayDate' => 'getNextPayDate',
        'payPeriod' => 'getPayPeriod',
        'redeemAmountEarly' => 'getRedeemAmountEarly',
        'rewardsEndDate' => 'getRewardsEndDate',
        'deliverDate' => 'getDeliverDate',
        'redeemPeriod' => 'getRedeemPeriod',
        'redeemingAmt' => 'getRedeemingAmt',
        'redeemTo' => 'getRedeemTo',
        'partialAmtDeliverDate' => 'getPartialAmtDeliverDate',
        'canRedeemEarly' => 'getCanRedeemEarly',
        'canFastRedemption' => 'getCanFastRedemption',
        'autoSubscribe' => 'getAutoSubscribe',
        'type' => 'getType',
        'status' => 'getStatus',
        'canReStake' => 'getCanReStake',
    ];

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

    /**
     * Constructor.
     *
     * @param null|mixed[] $data Associated array of property values
     *                           initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('positionId', $data ?? [], null);
        $this->setIfExists('parentPositionId', $data ?? [], null);
        $this->setIfExists('projectId', $data ?? [], null);
        $this->setIfExists('asset', $data ?? [], null);
        $this->setIfExists('amount', $data ?? [], null);
        $this->setIfExists('purchaseTime', $data ?? [], null);
        $this->setIfExists('duration', $data ?? [], null);
        $this->setIfExists('accrualDays', $data ?? [], null);
        $this->setIfExists('rewardAsset', $data ?? [], null);
        $this->setIfExists('aPY', $data ?? [], null);
        $this->setIfExists('rewardAmt', $data ?? [], null);
        $this->setIfExists('extraRewardAsset', $data ?? [], null);
        $this->setIfExists('extraRewardAPR', $data ?? [], null);
        $this->setIfExists('estExtraRewardAmt', $data ?? [], null);
        $this->setIfExists('boostRewardAsset', $data ?? [], null);
        $this->setIfExists('boostApr', $data ?? [], null);
        $this->setIfExists('totalBoostRewardAmt', $data ?? [], null);
        $this->setIfExists('nextPay', $data ?? [], null);
        $this->setIfExists('nextPayDate', $data ?? [], null);
        $this->setIfExists('payPeriod', $data ?? [], null);
        $this->setIfExists('redeemAmountEarly', $data ?? [], null);
        $this->setIfExists('rewardsEndDate', $data ?? [], null);
        $this->setIfExists('deliverDate', $data ?? [], null);
        $this->setIfExists('redeemPeriod', $data ?? [], null);
        $this->setIfExists('redeemingAmt', $data ?? [], null);
        $this->setIfExists('redeemTo', $data ?? [], null);
        $this->setIfExists('partialAmtDeliverDate', $data ?? [], null);
        $this->setIfExists('canRedeemEarly', $data ?? [], null);
        $this->setIfExists('canFastRedemption', $data ?? [], null);
        $this->setIfExists('autoSubscribe', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('status', $data ?? [], null);
        $this->setIfExists('canReStake', $data ?? [], null);
    }

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

    /**
     * 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;
    }

    /**
     * If oneOf schema, get the possible response types.
     */
    public static function getComposedSchemas(): array
    {
        return [
        ];
    }

    /**
     * Return true if the model is an array.
     */
    public static function isArray(): bool
    {
        return false;
    }

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

    /**
     * Checks if a nullable property is set to null.
     */
    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.
     *
     * @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;
    }

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

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

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

    /**
     * Sets positionId.
     *
     * @param null|int $positionId positionId
     *
     * @return self
     */
    public function setPositionId($positionId)
    {
        if (is_null($positionId)) {
            throw new \InvalidArgumentException('non-nullable positionId cannot be null');
        }
        $this->container['positionId'] = $positionId;

        return $this;
    }

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

    /**
     * Sets parentPositionId.
     *
     * @param null|int $parentPositionId parentPositionId
     *
     * @return self
     */
    public function setParentPositionId($parentPositionId)
    {
        if (is_null($parentPositionId)) {
            throw new \InvalidArgumentException('non-nullable parentPositionId cannot be null');
        }
        $this->container['parentPositionId'] = $parentPositionId;

        return $this;
    }

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

    /**
     * Sets projectId.
     *
     * @param null|string $projectId projectId
     *
     * @return self
     */
    public function setProjectId($projectId)
    {
        if (is_null($projectId)) {
            throw new \InvalidArgumentException('non-nullable projectId cannot be null');
        }
        $this->container['projectId'] = $projectId;

        return $this;
    }

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

    /**
     * Sets asset.
     *
     * @param null|string $asset asset
     *
     * @return self
     */
    public function setAsset($asset)
    {
        if (is_null($asset)) {
            throw new \InvalidArgumentException('non-nullable asset cannot be null');
        }
        $this->container['asset'] = $asset;

        return $this;
    }

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

    /**
     * Sets amount.
     *
     * @param null|string $amount amount
     *
     * @return self
     */
    public function setAmount($amount)
    {
        if (is_null($amount)) {
            throw new \InvalidArgumentException('non-nullable amount cannot be null');
        }
        $this->container['amount'] = $amount;

        return $this;
    }

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

    /**
     * Sets purchaseTime.
     *
     * @param null|string $purchaseTime purchaseTime
     *
     * @return self
     */
    public function setPurchaseTime($purchaseTime)
    {
        if (is_null($purchaseTime)) {
            throw new \InvalidArgumentException('non-nullable purchaseTime cannot be null');
        }
        $this->container['purchaseTime'] = $purchaseTime;

        return $this;
    }

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

    /**
     * Sets duration.
     *
     * @param null|string $duration duration
     *
     * @return self
     */
    public function setDuration($duration)
    {
        if (is_null($duration)) {
            throw new \InvalidArgumentException('non-nullable duration cannot be null');
        }
        $this->container['duration'] = $duration;

        return $this;
    }

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

    /**
     * Sets accrualDays.
     *
     * @param null|string $accrualDays accrualDays
     *
     * @return self
     */
    public function setAccrualDays($accrualDays)
    {
        if (is_null($accrualDays)) {
            throw new \InvalidArgumentException('non-nullable accrualDays cannot be null');
        }
        $this->container['accrualDays'] = $accrualDays;

        return $this;
    }

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

    /**
     * Sets rewardAsset.
     *
     * @param null|string $rewardAsset rewardAsset
     *
     * @return self
     */
    public function setRewardAsset($rewardAsset)
    {
        if (is_null($rewardAsset)) {
            throw new \InvalidArgumentException('non-nullable rewardAsset cannot be null');
        }
        $this->container['rewardAsset'] = $rewardAsset;

        return $this;
    }

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

    /**
     * Sets aPY.
     *
     * @param null|string $aPY aPY
     *
     * @return self
     */
    public function setAPY($aPY)
    {
        if (is_null($aPY)) {
            throw new \InvalidArgumentException('non-nullable aPY cannot be null');
        }
        $this->container['aPY'] = $aPY;

        return $this;
    }

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

    /**
     * Sets rewardAmt.
     *
     * @param null|string $rewardAmt rewardAmt
     *
     * @return self
     */
    public function setRewardAmt($rewardAmt)
    {
        if (is_null($rewardAmt)) {
            throw new \InvalidArgumentException('non-nullable rewardAmt cannot be null');
        }
        $this->container['rewardAmt'] = $rewardAmt;

        return $this;
    }

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

    /**
     * Sets extraRewardAsset.
     *
     * @param null|string $extraRewardAsset extraRewardAsset
     *
     * @return self
     */
    public function setExtraRewardAsset($extraRewardAsset)
    {
        if (is_null($extraRewardAsset)) {
            throw new \InvalidArgumentException('non-nullable extraRewardAsset cannot be null');
        }
        $this->container['extraRewardAsset'] = $extraRewardAsset;

        return $this;
    }

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

    /**
     * Sets extraRewardAPR.
     *
     * @param null|string $extraRewardAPR extraRewardAPR
     *
     * @return self
     */
    public function setExtraRewardAPR($extraRewardAPR)
    {
        if (is_null($extraRewardAPR)) {
            throw new \InvalidArgumentException('non-nullable extraRewardAPR cannot be null');
        }
        $this->container['extraRewardAPR'] = $extraRewardAPR;

        return $this;
    }

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

    /**
     * Sets estExtraRewardAmt.
     *
     * @param null|string $estExtraRewardAmt estExtraRewardAmt
     *
     * @return self
     */
    public function setEstExtraRewardAmt($estExtraRewardAmt)
    {
        if (is_null($estExtraRewardAmt)) {
            throw new \InvalidArgumentException('non-nullable estExtraRewardAmt cannot be null');
        }
        $this->container['estExtraRewardAmt'] = $estExtraRewardAmt;

        return $this;
    }

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

    /**
     * Sets boostRewardAsset.
     *
     * @param null|string $boostRewardAsset boostRewardAsset
     *
     * @return self
     */
    public function setBoostRewardAsset($boostRewardAsset)
    {
        if (is_null($boostRewardAsset)) {
            throw new \InvalidArgumentException('non-nullable boostRewardAsset cannot be null');
        }
        $this->container['boostRewardAsset'] = $boostRewardAsset;

        return $this;
    }

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

    /**
     * Sets boostApr.
     *
     * @param null|string $boostApr boostApr
     *
     * @return self
     */
    public function setBoostApr($boostApr)
    {
        if (is_null($boostApr)) {
            throw new \InvalidArgumentException('non-nullable boostApr cannot be null');
        }
        $this->container['boostApr'] = $boostApr;

        return $this;
    }

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

    /**
     * Sets totalBoostRewardAmt.
     *
     * @param null|string $totalBoostRewardAmt totalBoostRewardAmt
     *
     * @return self
     */
    public function setTotalBoostRewardAmt($totalBoostRewardAmt)
    {
        if (is_null($totalBoostRewardAmt)) {
            throw new \InvalidArgumentException('non-nullable totalBoostRewardAmt cannot be null');
        }
        $this->container['totalBoostRewardAmt'] = $totalBoostRewardAmt;

        return $this;
    }

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

    /**
     * Sets nextPay.
     *
     * @param null|string $nextPay nextPay
     *
     * @return self
     */
    public function setNextPay($nextPay)
    {
        if (is_null($nextPay)) {
            throw new \InvalidArgumentException('non-nullable nextPay cannot be null');
        }
        $this->container['nextPay'] = $nextPay;

        return $this;
    }

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

    /**
     * Sets nextPayDate.
     *
     * @param null|string $nextPayDate nextPayDate
     *
     * @return self
     */
    public function setNextPayDate($nextPayDate)
    {
        if (is_null($nextPayDate)) {
            throw new \InvalidArgumentException('non-nullable nextPayDate cannot be null');
        }
        $this->container['nextPayDate'] = $nextPayDate;

        return $this;
    }

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

    /**
     * Sets payPeriod.
     *
     * @param null|string $payPeriod payPeriod
     *
     * @return self
     */
    public function setPayPeriod($payPeriod)
    {
        if (is_null($payPeriod)) {
            throw new \InvalidArgumentException('non-nullable payPeriod cannot be null');
        }
        $this->container['payPeriod'] = $payPeriod;

        return $this;
    }

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

    /**
     * Sets redeemAmountEarly.
     *
     * @param null|string $redeemAmountEarly redeemAmountEarly
     *
     * @return self
     */
    public function setRedeemAmountEarly($redeemAmountEarly)
    {
        if (is_null($redeemAmountEarly)) {
            throw new \InvalidArgumentException('non-nullable redeemAmountEarly cannot be null');
        }
        $this->container['redeemAmountEarly'] = $redeemAmountEarly;

        return $this;
    }

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

    /**
     * Sets rewardsEndDate.
     *
     * @param null|string $rewardsEndDate rewardsEndDate
     *
     * @return self
     */
    public function setRewardsEndDate($rewardsEndDate)
    {
        if (is_null($rewardsEndDate)) {
            throw new \InvalidArgumentException('non-nullable rewardsEndDate cannot be null');
        }
        $this->container['rewardsEndDate'] = $rewardsEndDate;

        return $this;
    }

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

    /**
     * Sets deliverDate.
     *
     * @param null|string $deliverDate deliverDate
     *
     * @return self
     */
    public function setDeliverDate($deliverDate)
    {
        if (is_null($deliverDate)) {
            throw new \InvalidArgumentException('non-nullable deliverDate cannot be null');
        }
        $this->container['deliverDate'] = $deliverDate;

        return $this;
    }

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

    /**
     * Sets redeemPeriod.
     *
     * @param null|string $redeemPeriod redeemPeriod
     *
     * @return self
     */
    public function setRedeemPeriod($redeemPeriod)
    {
        if (is_null($redeemPeriod)) {
            throw new \InvalidArgumentException('non-nullable redeemPeriod cannot be null');
        }
        $this->container['redeemPeriod'] = $redeemPeriod;

        return $this;
    }

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

    /**
     * Sets redeemingAmt.
     *
     * @param null|string $redeemingAmt redeemingAmt
     *
     * @return self
     */
    public function setRedeemingAmt($redeemingAmt)
    {
        if (is_null($redeemingAmt)) {
            throw new \InvalidArgumentException('non-nullable redeemingAmt cannot be null');
        }
        $this->container['redeemingAmt'] = $redeemingAmt;

        return $this;
    }

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

    /**
     * Sets redeemTo.
     *
     * @param null|string $redeemTo redeemTo
     *
     * @return self
     */
    public function setRedeemTo($redeemTo)
    {
        if (is_null($redeemTo)) {
            throw new \InvalidArgumentException('non-nullable redeemTo cannot be null');
        }
        $this->container['redeemTo'] = $redeemTo;

        return $this;
    }

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

    /**
     * Sets partialAmtDeliverDate.
     *
     * @param null|string $partialAmtDeliverDate partialAmtDeliverDate
     *
     * @return self
     */
    public function setPartialAmtDeliverDate($partialAmtDeliverDate)
    {
        if (is_null($partialAmtDeliverDate)) {
            throw new \InvalidArgumentException('non-nullable partialAmtDeliverDate cannot be null');
        }
        $this->container['partialAmtDeliverDate'] = $partialAmtDeliverDate;

        return $this;
    }

    /**
     * Gets canRedeemEarly.
     *
     * @return null|bool
     */
    public function getCanRedeemEarly()
    {
        return $this->container['canRedeemEarly'];
    }

    /**
     * Sets canRedeemEarly.
     *
     * @param null|bool $canRedeemEarly canRedeemEarly
     *
     * @return self
     */
    public function setCanRedeemEarly($canRedeemEarly)
    {
        if (is_null($canRedeemEarly)) {
            throw new \InvalidArgumentException('non-nullable canRedeemEarly cannot be null');
        }
        $this->container['canRedeemEarly'] = $canRedeemEarly;

        return $this;
    }

    /**
     * Gets canFastRedemption.
     *
     * @return null|bool
     */
    public function getCanFastRedemption()
    {
        return $this->container['canFastRedemption'];
    }

    /**
     * Sets canFastRedemption.
     *
     * @param null|bool $canFastRedemption canFastRedemption
     *
     * @return self
     */
    public function setCanFastRedemption($canFastRedemption)
    {
        if (is_null($canFastRedemption)) {
            throw new \InvalidArgumentException('non-nullable canFastRedemption cannot be null');
        }
        $this->container['canFastRedemption'] = $canFastRedemption;

        return $this;
    }

    /**
     * Gets autoSubscribe.
     *
     * @return null|bool
     */
    public function getAutoSubscribe()
    {
        return $this->container['autoSubscribe'];
    }

    /**
     * Sets autoSubscribe.
     *
     * @param null|bool $autoSubscribe autoSubscribe
     *
     * @return self
     */
    public function setAutoSubscribe($autoSubscribe)
    {
        if (is_null($autoSubscribe)) {
            throw new \InvalidArgumentException('non-nullable autoSubscribe cannot be null');
        }
        $this->container['autoSubscribe'] = $autoSubscribe;

        return $this;
    }

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

    /**
     * Sets type.
     *
     * @param null|string $type type
     *
     * @return self
     */
    public function setType($type)
    {
        if (is_null($type)) {
            throw new \InvalidArgumentException('non-nullable type cannot be null');
        }
        $this->container['type'] = $type;

        return $this;
    }

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

    /**
     * Sets status.
     *
     * @param null|string $status status
     *
     * @return self
     */
    public function setStatus($status)
    {
        if (is_null($status)) {
            throw new \InvalidArgumentException('non-nullable status cannot be null');
        }
        $this->container['status'] = $status;

        return $this;
    }

    /**
     * Gets canReStake.
     *
     * @return null|bool
     */
    public function getCanReStake()
    {
        return $this->container['canReStake'];
    }

    /**
     * Sets canReStake.
     *
     * @param null|bool $canReStake canReStake
     *
     * @return self
     */
    public function setCanReStake($canReStake)
    {
        if (is_null($canReStake)) {
            throw new \InvalidArgumentException('non-nullable canReStake cannot be null');
        }
        $this->container['canReStake'] = $canReStake;

        return $this;
    }

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

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

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

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

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     *
     * @see 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 a header-safe presentation of the object.
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }

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

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

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

    /**
     * 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 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;
    }
}
