src/Model/StructValue.php
public function setIndex($index)
    {
        if (!is_int($index) || $index < 0) {
            throw new \InvalidArgumentException(sprintf('The value\'s index must be a positive integer, "%s" given', var_export($index, true)));
        }
        $this->index = $index;
        return $this;
    }
public function setIndex($index)
    {
        if (!is_int($index) || $index < 0) {
            throw new \InvalidArgumentException(sprintf('The value\'s index must be a positive integer, "%s" given', var_export($index, true)));
        }
        $this->index = $index;
        return $this;
    }
public function setIndex ( $ index ) { if ( ! is_int ( $ index ) || $ index < 0 ) { throw new \ InvalidArgumentException ( sprintf ( 'The value\'s index must be a positive integer, "%s" given' , var_export ( $ index , true ) ) ) ; } $ this -> index = $ index ; return $ this ; }
Sets the index attribute value
@throws \InvalidArgumentException
@param int $index
@return StructValue
Sets the index attribute value