Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this
979777
public function setLeadingDetachedComments($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->leading_detached_comments = $arr;
        $this->has_leading_detached_comments = true;

        return $this;
    }
779966
public function setAttributes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Attrpubapi\Attribute::class);
        $this->attributes = $arr;

        return $this;
    }
1171141
public function setTextSnippet($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\TextSnippet::class);
        $this->writeOneof(2, $var);

        return $this;
    }
1062504
public function setLabel($var)
    {
        GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto_Label::class);
        $this->label = $var;
        $this->has_label = true;

        return $this;
    }
1120179
public function setPartitions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\V1\Partition::class);
        $this->partitions = $arr;

        return $this;
    }
696823
public function setText($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->text = $arr;

        return $this;
    }
137290
public function setVoice($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech_Voice::class);
        $this->voice = $var;

        return $this;
    }
898850
public function setText($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class);
        $this->text = $var;

        return $this;
    }
847395
public function setFieldFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter::class);
        $this->writeOneof(2, $var);

        return $this;
    }
1070782
public function setExplicitAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation::class);
        $this->explicit_annotation = $var;

        return $this;
    }
1174557
public function setCropHints($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\CropHint::class);
        $this->crop_hints = $arr;

        return $this;
    }
777606
public function setSuffixes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->suffixes = $arr;

        return $this;
    }
867008
public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;
        $this->has_name = true;

        return $this;
    }
106237
public function setMethods($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Method::class);
        $this->methods = $arr;

        return $this;
    }
873118
public function setGit($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\GitSourceContext::class);
        $this->writeOneof(6, $var);

        return $this;
    }
549562
public function setSpeechContext($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1beta1\SpeechContext::class);
        $this->speech_context = $var;

        return $this;
    }
83987
public function setTopic($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Topic::class);
        $this->topic = $var;

        return $this;
    }