<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Payment.Printing.InstallmentsData StructType
 * @subpackage Structs
 */
class Payment_Printing_InstallmentsData extends AnyEntity
{
    /**
     * The ConstPayment
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ConstPayment;
    /**
     * The FirstPayment
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $FirstPayment;
    /**
     * The PaymentsCount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PaymentsCount;
    /**
     * Constructor method for Payment.Printing.InstallmentsData
     * @uses Payment_Printing_InstallmentsData::setConstPayment()
     * @uses Payment_Printing_InstallmentsData::setFirstPayment()
     * @uses Payment_Printing_InstallmentsData::setPaymentsCount()
     * @param string $constPayment
     * @param string $firstPayment
     * @param string $paymentsCount
     */
    public function __construct($constPayment = null, $firstPayment = null, $paymentsCount = null)
    {
        $this
            ->setConstPayment($constPayment)
            ->setFirstPayment($firstPayment)
            ->setPaymentsCount($paymentsCount);
    }
    /**
     * Get ConstPayment value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getConstPayment()
    {
        return isset($this->ConstPayment) ? $this->ConstPayment : null;
    }
    /**
     * Set ConstPayment value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $constPayment
     * @return \patest\StructType\Payment_Printing_InstallmentsData
     */
    public function setConstPayment($constPayment = null)
    {
        // validation for constraint: string
        if (!is_null($constPayment) && !is_string($constPayment)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($constPayment, true), gettype($constPayment)), __LINE__);
        }
        if (is_null($constPayment) || (is_array($constPayment) && empty($constPayment))) {
            unset($this->ConstPayment);
        } else {
            $this->ConstPayment = $constPayment;
        }
        return $this;
    }
    /**
     * Get FirstPayment value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getFirstPayment()
    {
        return isset($this->FirstPayment) ? $this->FirstPayment : null;
    }
    /**
     * Set FirstPayment value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $firstPayment
     * @return \patest\StructType\Payment_Printing_InstallmentsData
     */
    public function setFirstPayment($firstPayment = null)
    {
        // validation for constraint: string
        if (!is_null($firstPayment) && !is_string($firstPayment)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($firstPayment, true), gettype($firstPayment)), __LINE__);
        }
        if (is_null($firstPayment) || (is_array($firstPayment) && empty($firstPayment))) {
            unset($this->FirstPayment);
        } else {
            $this->FirstPayment = $firstPayment;
        }
        return $this;
    }
    /**
     * Get PaymentsCount value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getPaymentsCount()
    {
        return isset($this->PaymentsCount) ? $this->PaymentsCount : null;
    }
    /**
     * Set PaymentsCount value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $paymentsCount
     * @return \patest\StructType\Payment_Printing_InstallmentsData
     */
    public function setPaymentsCount($paymentsCount = null)
    {
        // validation for constraint: string
        if (!is_null($paymentsCount) && !is_string($paymentsCount)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($paymentsCount, true), gettype($paymentsCount)), __LINE__);
        }
        if (is_null($paymentsCount) || (is_array($paymentsCount) && empty($paymentsCount))) {
            unset($this->PaymentsCount);
        } else {
            $this->PaymentsCount = $paymentsCount;
        }
        return $this;
    }
}
