Language/src/V1beta2/Document.php
public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document_Type::class);
        $this->type = $var;

        return $this;
    }
public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document_Type::class);
        $this->type = $var;

        return $this;
    }
public function setType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1beta2 \ Document_Type :: class ) ; $ this -> type = $ var ; return $ this ; }
Required. If the type is not set or is `TYPE_UNSPECIFIED`,
returns an `INVALID_ARGUMENT` error.

Generated from protobuf field <code>.google.cloud.language.v1beta2.Document.Type type = 1;</code>
@param int $var
@return $this
Required . If the type is not set or is TYPE_UNSPECIFIED returns an INVALID_ARGUMENT error .