<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SinglePropertyCriteriaOfPaymentMethodType8Q8HnG_P7
 * StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:SinglePropertyCriteriaOfPaymentMethodType8Q8HnG_P7
 * @subpackage Structs
 */
class SinglePropertyCriteriaOfPaymentMethodType8Q8HnG_P7 extends SinglePropertyCriteriaBase
{
    /**
     * The Value
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $Value;
    /**
     * Constructor method for SinglePropertyCriteriaOfPaymentMethodType8Q8HnG_P7
     * @uses SinglePropertyCriteriaOfPaymentMethodType8Q8HnG_P7::setValue()
     * @param string $value
     */
    public function __construct($value = null)
    {
        $this
            ->setValue($value);
    }
    /**
     * Get Value value
     * @return string|null
     */
    public function getValue()
    {
        return $this->Value;
    }
    /**
     * Set Value value
     * @uses \patest\EnumType\PaymentMethodType::valueIsValid()
     * @uses \patest\EnumType\PaymentMethodType::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $value
     * @return \patest\StructType\SinglePropertyCriteriaOfPaymentMethodType8Q8HnG_P7
     */
    public function setValue($value = null)
    {
        // validation for constraint: enumeration
        if (!\patest\EnumType\PaymentMethodType::valueIsValid($value)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \patest\EnumType\PaymentMethodType', is_array($value) ? implode(', ', $value) : var_export($value, true), implode(', ', \patest\EnumType\PaymentMethodType::getValidValues())), __LINE__);
        }
        $this->Value = $value;
        return $this;
    }
}
