<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TokenPassportSignature StructType
 * @subpackage Structs
 */
class TokenPassportSignature extends AbstractStructBase
{
    /**
     * The algorithm
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $algorithm;
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * Constructor method for TokenPassportSignature
     * @uses TokenPassportSignature::setAlgorithm()
     * @uses TokenPassportSignature::set_()
     * @param string $algorithm
     * @param string $_
     */
    public function __construct($algorithm = null, $_ = null)
    {
        $this
            ->setAlgorithm($algorithm)
            ->set_($_);
    }
    /**
     * Get algorithm value
     * @return string
     */
    public function getAlgorithm()
    {
        return $this->algorithm;
    }
    /**
     * Set algorithm value
     * @param string $algorithm
     * @return \StructType\TokenPassportSignature
     */
    public function setAlgorithm($algorithm = null)
    {
        // validation for constraint: string
        if (!is_null($algorithm) && !is_string($algorithm)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($algorithm, true), gettype($algorithm)), __LINE__);
        }
        $this->algorithm = $algorithm;
        return $this;
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \StructType\TokenPassportSignature
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($_, true), gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
}
