<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PasswordQuestion StructType
 * @subpackage Structs
 */
class PasswordQuestion extends AbstractStructBase
{
    /**
     * The id
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $id;
    /**
     * The prompt
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $prompt;
    /**
     * Constructor method for PasswordQuestion
     * @uses PasswordQuestion::setId()
     * @uses PasswordQuestion::setPrompt()
     * @param int $id
     * @param string $prompt
     */
    public function __construct($id = null, $prompt = null)
    {
        $this
            ->setId($id)
            ->setPrompt($prompt);
    }
    /**
     * Get id value
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set id value
     * @param int $id
     * @return \CustomerManagement\StructType\PasswordQuestion
     */
    public function setId($id = null)
    {
        // validation for constraint: int
        if (!is_null($id) && !(is_int($id) || ctype_digit($id))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($id, true), gettype($id)), __LINE__);
        }
        $this->id = $id;
        return $this;
    }
    /**
     * Get prompt value
     * @return string|null
     */
    public function getPrompt()
    {
        return $this->prompt;
    }
    /**
     * Set prompt value
     * @param string $prompt
     * @return \CustomerManagement\StructType\PasswordQuestion
     */
    public function setPrompt($prompt = null)
    {
        // validation for constraint: string
        if (!is_null($prompt) && !is_string($prompt)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($prompt, true), gettype($prompt)), __LINE__);
        }
        $this->prompt = $prompt;
        return $this;
    }
}
