Trace/src/V2/BatchWriteSpansRequest.php
public function setSpans($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span::class);
        $this->spans = $arr;

        return $this;
    }
public function setSpans($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span::class);
        $this->spans = $arr;

        return $this;
    }
public function setSpans ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Trace \ V2 \ Span :: class ) ; $ this -> spans = $ arr ; return $ this ; }
A list of new spans. The span names must not match existing
spans, or the results are undefined.

Generated from protobuf field <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code>
@param \Google\Cloud\Trace\V2\Span[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this
A list of new spans . The span names must not match existing spans or the results are undefined .