<?php

/*
 * This file was automatically generated.
 */
namespace Syde\Vendor\Cawl\OnlinePayments\Sdk\Domain;

use UnexpectedValueException;
/**
 * @package OnlinePayments\Sdk\Domain
 */
class SubmitBatchResponse extends DataObject
{
    /**
     * @var string|null
     */
    public ?string $merchantBatchReference = null;
    /**
     * @var int|null
     */
    public ?int $totalCount = null;
    /**
     * @return string|null
     */
    public function getMerchantBatchReference() : ?string
    {
        return $this->merchantBatchReference;
    }
    /**
     * @param string|null $value
     */
    public function setMerchantBatchReference(?string $value) : void
    {
        $this->merchantBatchReference = $value;
    }
    /**
     * @return int|null
     */
    public function getTotalCount() : ?int
    {
        return $this->totalCount;
    }
    /**
     * @param int|null $value
     */
    public function setTotalCount(?int $value) : void
    {
        $this->totalCount = $value;
    }
    /**
     * @return object
     */
    public function toObject() : object
    {
        $object = parent::toObject();
        if (!\is_null($this->merchantBatchReference)) {
            $object->merchantBatchReference = $this->merchantBatchReference;
        }
        if (!\is_null($this->totalCount)) {
            $object->totalCount = $this->totalCount;
        }
        return $object;
    }
    /**
     * @param object $object
     * @return $this
     * @throws UnexpectedValueException
     */
    public function fromObject(object $object) : SubmitBatchResponse
    {
        parent::fromObject($object);
        if (\property_exists($object, 'merchantBatchReference')) {
            $this->merchantBatchReference = $object->merchantBatchReference;
        }
        if (\property_exists($object, 'totalCount')) {
            $this->totalCount = $object->totalCount;
        }
        return $this;
    }
}
